From c7129a07442e56594588edc52ccd69329d5dcd72 Mon Sep 17 00:00:00 2001 From: Chirag Aggarwal Date: Mon, 28 Sep 2026 16:05:23 +0100 Subject: [PATCH] chore: update Console SDK to 18.1.0 --- CHANGELOG.md | 7 + README.md | 2 +- package-lock.json | 4 +- package.json | 2 +- src/client.ts | 32 +- src/enums/build-runtime.ts | 3 - src/enums/runtime.ts | 3 - src/services/account.ts | 580 +++++++++--------- src/services/activities.ts | 10 +- src/services/advisor.ts | 28 +- src/services/affiliates.ts | 42 +- src/services/apps.ts | 184 +++--- src/services/assistant.ts | 16 +- src/services/avatars.ts | 188 +++--- src/services/backups.ts | 88 +-- src/services/console.ts | 126 ++-- src/services/databases.ts | 716 +++++++++++------------ src/services/documents-db.ts | 294 +++++----- src/services/domains.ts | 486 +++++++-------- src/services/embeddings.ts | 8 +- src/services/functions.ts | 298 +++++----- src/services/graphql.ts | 12 +- src/services/growth.ts | 48 +- src/services/locale.ts | 32 +- src/services/manager.ts | 70 +-- src/services/messaging.ts | 914 ++++++++++++++--------------- src/services/migrations.ts | 212 +++---- src/services/mongo.ts | 272 ++++----- src/services/mysql.ts | 306 +++++----- src/services/notifications.ts | 12 +- src/services/oauth-2.ts | 222 +++---- src/services/organization.ts | 202 +++---- src/services/organizations.ts | 292 ++++----- src/services/postgresql.ts | 320 +++++----- src/services/presences.ts | 50 +- src/services/project.ts | 1041 +++++++++++++++++---------------- src/services/projects.ts | 76 +-- src/services/proxy.ts | 70 +-- src/services/sites.ts | 288 ++++----- src/services/storage.ts | 164 +++--- src/services/tables-db.ts | 780 ++++++++++++------------ src/services/teams.ts | 122 ++-- src/services/tokens.ts | 28 +- src/services/usage.ts | 50 +- src/services/users.ts | 358 ++++++------ src/services/vcs.ts | 82 +-- src/services/vectors-db.ts | 290 ++++----- src/services/waf.ts | 246 ++++---- src/services/webhooks.ts | 62 +- 49 files changed, 4899 insertions(+), 4839 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index d09cdeaa..2d2ca22f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,12 @@ # Change Log +## 18.1.0 + +* Breaking: removed `deno-1.21`, `deno-1.24` and `deno-1.35` from `Runtime` and `BuildRuntime` enums +* Breaking: `Assistant.chat` now returns the response text as a `string` instead of `{ message }` +* Breaking: `Domains.getZone` now returns the zone file as a `string` instead of `{ message }` +* Fixed: nested objects in multipart requests are sent as JSON instead of `[object Object]` + ## 18.0.0 * Breaking: SDK now targets Appwrite 2.3 (`X-Appwrite-Response-Format: 2.3.0`) diff --git a/README.md b/README.md index c1c963be..52a1a4c9 100644 --- a/README.md +++ b/README.md @@ -33,7 +33,7 @@ import { Client, Account } from '@appwrite.io/console'; To install with a CDN (content delivery network) add the following scripts to the bottom of your tag, but before you use any Appwrite services: ```html - + ``` ## Getting Started diff --git a/package-lock.json b/package-lock.json index 3bd09a25..477cd69e 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@appwrite.io/console", - "version": "18.0.0", + "version": "18.1.0", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@appwrite.io/console", - "version": "18.0.0", + "version": "18.1.0", "license": "BSD-3-Clause", "dependencies": { "buffer": "6.0.3", diff --git a/package.json b/package.json index 72f45446..ca1cb878 100644 --- a/package.json +++ b/package.json @@ -2,7 +2,7 @@ "name": "@appwrite.io/console", "homepage": "https://appwrite.io/support", "description": "Appwrite is an open-source self-hosted backend server that abstracts and simplifies complex and repetitive development tasks behind a very simple REST API", - "version": "18.0.0", + "version": "18.1.0", "license": "BSD-3-Clause", "main": "dist/cjs/sdk.js", "exports": { diff --git a/src/client.ts b/src/client.ts index f2eabf6f..93cb3972 100644 --- a/src/client.ts +++ b/src/client.ts @@ -413,7 +413,7 @@ class Client { 'x-sdk-name': 'Console', 'x-sdk-platform': 'console', 'x-sdk-language': 'web', - 'x-sdk-version': '18.0.0', + 'x-sdk-version': '18.1.0', 'X-Appwrite-Response-Format': '2.3.0', }; @@ -1171,6 +1171,11 @@ class Client { for (const nestedValue of value) { formData.append(`${key}[]`, nestedValue); } + } else if ( + value !== null && + typeof value === 'object' + ) { + formData.append(key, JSONbig.stringify(value)); } else { formData.append(key, value); } @@ -1192,6 +1197,7 @@ class Client { headers: Headers = {}, originalPayload: Payload = {}, onProgress: (progress: UploadProgress) => void, + responseType = 'json', ) { const [fileParam, file] = Object.entries(originalPayload).find( @@ -1199,11 +1205,23 @@ class Client { ) ?? []; if (!file || !fileParam) { - return await this.call(method, url, headers, originalPayload); + return await this.call( + method, + url, + headers, + originalPayload, + responseType, + ); } - if (file.size <= Client.CHUNK_SIZE) { - return await this.call(method, url, headers, originalPayload); + if (file.size <= Client.CHUNK_SIZE || responseType === 'text') { + return await this.call( + method, + url, + headers, + originalPayload, + responseType, + ); } const totalChunks = Math.ceil(file.size / Client.CHUNK_SIZE); @@ -1223,6 +1241,7 @@ class Client { url, firstChunkHeaders, firstPayload, + responseType, ); const uploadId = response?.$id; @@ -1283,6 +1302,7 @@ class Client { url, chunkHeaders, chunkPayload, + responseType, ); if (rejected) { @@ -1392,7 +1412,9 @@ class Client { ); } - if ( + if (responseType === 'text' && response.status < 400) { + data = await response.text(); + } else if ( response.headers.get('content-type')?.includes('application/json') ) { data = JSONbig.parse(await response.text()); diff --git a/src/enums/build-runtime.ts b/src/enums/build-runtime.ts index 01558318..2dfd9c61 100644 --- a/src/enums/build-runtime.ts +++ b/src/enums/build-runtime.ts @@ -31,9 +31,6 @@ export enum BuildRuntime { Pythonml311 = 'python-ml-3.11', Pythonml312 = 'python-ml-3.12', Pythonml313 = 'python-ml-3.13', - Deno121 = 'deno-1.21', - Deno124 = 'deno-1.24', - Deno135 = 'deno-1.35', Deno140 = 'deno-1.40', Deno146 = 'deno-1.46', Deno20 = 'deno-2.0', diff --git a/src/enums/runtime.ts b/src/enums/runtime.ts index 1f3d4823..7bbcbb6f 100644 --- a/src/enums/runtime.ts +++ b/src/enums/runtime.ts @@ -31,9 +31,6 @@ export enum Runtime { Pythonml311 = 'python-ml-3.11', Pythonml312 = 'python-ml-3.12', Pythonml313 = 'python-ml-3.13', - Deno121 = 'deno-1.21', - Deno124 = 'deno-1.24', - Deno135 = 'deno-1.35', Deno140 = 'deno-1.40', Deno146 = 'deno-1.46', Deno20 = 'deno-2.0', diff --git a/src/services/account.ts b/src/services/account.ts index 6e00bad5..4b1bb611 100644 --- a/src/services/account.ts +++ b/src/services/account.ts @@ -24,7 +24,7 @@ export class Account { Preferences extends Models.Preferences = Models.DefaultPreferences, >(): Promise> { const apiPath = '/account'; - const payload: Payload = {}; + const apiPayload: Payload = {}; const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { @@ -32,7 +32,7 @@ export class Account { accept: 'application/json', }; - return this.client.call('get', uri, apiHeaders, payload); + return this.client.call('get', uri, apiHeaders, apiPayload); } /** @@ -120,18 +120,18 @@ export class Account { ); } const apiPath = '/account'; - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof userId !== 'undefined') { - payload['userId'] = userId; + apiPayload['userId'] = userId; } if (typeof email !== 'undefined') { - payload['email'] = email; + apiPayload['email'] = email; } if (typeof password !== 'undefined') { - payload['password'] = password; + apiPayload['password'] = password; } if (typeof name !== 'undefined') { - payload['name'] = name; + apiPayload['name'] = name; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -141,7 +141,7 @@ export class Account { accept: 'application/json', }; - return this.client.call('post', uri, apiHeaders, payload); + return this.client.call('post', uri, apiHeaders, apiPayload); } /** @@ -152,7 +152,7 @@ export class Account { */ delete(): Promise<{}> { const apiPath = '/account'; - const payload: Payload = {}; + const apiPayload: Payload = {}; const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { @@ -161,7 +161,7 @@ export class Account { accept: 'application/json', }; - return this.client.call('delete', uri, apiHeaders, payload); + return this.client.call('delete', uri, apiHeaders, apiPayload); } /** @@ -206,9 +206,9 @@ export class Account { const queries = params.queries; const apiPath = '/account/billing-addresses'; - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof queries !== 'undefined') { - payload['queries'] = queries; + apiPayload['queries'] = queries; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -217,7 +217,7 @@ export class Account { accept: 'application/json', }; - return this.client.call('get', uri, apiHeaders, payload); + return this.client.call('get', uri, apiHeaders, apiPayload); } /** @@ -328,24 +328,24 @@ export class Account { ); } const apiPath = '/account/billing-addresses'; - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof country !== 'undefined') { - payload['country'] = country; + apiPayload['country'] = country; } if (typeof city !== 'undefined') { - payload['city'] = city; + apiPayload['city'] = city; } if (typeof streetAddress !== 'undefined') { - payload['streetAddress'] = streetAddress; + apiPayload['streetAddress'] = streetAddress; } if (typeof addressLine2 !== 'undefined') { - payload['addressLine2'] = addressLine2; + apiPayload['addressLine2'] = addressLine2; } if (typeof state !== 'undefined') { - payload['state'] = state; + apiPayload['state'] = state; } if (typeof postalCode !== 'undefined') { - payload['postalCode'] = postalCode; + apiPayload['postalCode'] = postalCode; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -355,7 +355,7 @@ export class Account { accept: 'application/json', }; - return this.client.call('post', uri, apiHeaders, payload); + return this.client.call('post', uri, apiHeaders, apiPayload); } /** @@ -408,7 +408,7 @@ export class Account { '{billingAddressId}', encodeURIComponent(String(billingAddressId)), ); - const payload: Payload = {}; + const apiPayload: Payload = {}; const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { @@ -416,7 +416,7 @@ export class Account { accept: 'application/json', }; - return this.client.call('get', uri, apiHeaders, payload); + return this.client.call('get', uri, apiHeaders, apiPayload); } /** @@ -547,24 +547,24 @@ export class Account { '{billingAddressId}', encodeURIComponent(String(billingAddressId)), ); - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof country !== 'undefined') { - payload['country'] = country; + apiPayload['country'] = country; } if (typeof city !== 'undefined') { - payload['city'] = city; + apiPayload['city'] = city; } if (typeof streetAddress !== 'undefined') { - payload['streetAddress'] = streetAddress; + apiPayload['streetAddress'] = streetAddress; } if (typeof addressLine2 !== 'undefined') { - payload['addressLine2'] = addressLine2; + apiPayload['addressLine2'] = addressLine2; } if (typeof state !== 'undefined') { - payload['state'] = state; + apiPayload['state'] = state; } if (typeof postalCode !== 'undefined') { - payload['postalCode'] = postalCode; + apiPayload['postalCode'] = postalCode; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -574,7 +574,7 @@ export class Account { accept: 'application/json', }; - return this.client.call('put', uri, apiHeaders, payload); + return this.client.call('put', uri, apiHeaders, apiPayload); } /** @@ -625,7 +625,7 @@ export class Account { '{billingAddressId}', encodeURIComponent(String(billingAddressId)), ); - const payload: Payload = {}; + const apiPayload: Payload = {}; const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { @@ -634,7 +634,7 @@ export class Account { accept: 'application/json', }; - return this.client.call('delete', uri, apiHeaders, payload); + return this.client.call('delete', uri, apiHeaders, apiPayload); } /** @@ -689,12 +689,12 @@ export class Account { const total = params.total; const apiPath = '/account/consents'; - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof queries !== 'undefined') { - payload['queries'] = queries; + apiPayload['queries'] = queries; } if (typeof total !== 'undefined') { - payload['total'] = total; + apiPayload['total'] = total; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -703,7 +703,7 @@ export class Account { accept: 'application/json', }; - return this.client.call('get', uri, apiHeaders, payload); + return this.client.call('get', uri, apiHeaders, apiPayload); } /** @@ -751,7 +751,7 @@ export class Account { '{consentId}', encodeURIComponent(String(consentId)), ); - const payload: Payload = {}; + const apiPayload: Payload = {}; const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { @@ -759,7 +759,7 @@ export class Account { accept: 'application/json', }; - return this.client.call('get', uri, apiHeaders, payload); + return this.client.call('get', uri, apiHeaders, apiPayload); } /** @@ -805,7 +805,7 @@ export class Account { '{consentId}', encodeURIComponent(String(consentId)), ); - const payload: Payload = {}; + const apiPayload: Payload = {}; const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { @@ -814,7 +814,7 @@ export class Account { accept: 'application/json', }; - return this.client.call('delete', uri, apiHeaders, payload); + return this.client.call('delete', uri, apiHeaders, apiPayload); } /** @@ -884,12 +884,12 @@ export class Account { '{consentId}', encodeURIComponent(String(consentId)), ); - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof queries !== 'undefined') { - payload['queries'] = queries; + apiPayload['queries'] = queries; } if (typeof total !== 'undefined') { - payload['total'] = total; + apiPayload['total'] = total; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -898,7 +898,7 @@ export class Account { accept: 'application/json', }; - return this.client.call('get', uri, apiHeaders, payload); + return this.client.call('get', uri, apiHeaders, apiPayload); } /** @@ -964,7 +964,7 @@ export class Account { const apiPath = '/account/consents/{consentId}/tokens/{tokenId}' .replace('{consentId}', encodeURIComponent(String(consentId))) .replace('{tokenId}', encodeURIComponent(String(tokenId))); - const payload: Payload = {}; + const apiPayload: Payload = {}; const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { @@ -972,7 +972,7 @@ export class Account { accept: 'application/json', }; - return this.client.call('get', uri, apiHeaders, payload); + return this.client.call('get', uri, apiHeaders, apiPayload); } /** @@ -1035,7 +1035,7 @@ export class Account { const apiPath = '/account/consents/{consentId}/tokens/{tokenId}' .replace('{consentId}', encodeURIComponent(String(consentId))) .replace('{tokenId}', encodeURIComponent(String(tokenId))); - const payload: Payload = {}; + const apiPayload: Payload = {}; const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { @@ -1044,7 +1044,7 @@ export class Account { accept: 'application/json', }; - return this.client.call('delete', uri, apiHeaders, payload); + return this.client.call('delete', uri, apiHeaders, apiPayload); } /** @@ -1092,7 +1092,7 @@ export class Account { '{couponId}', encodeURIComponent(String(couponId)), ); - const payload: Payload = {}; + const apiPayload: Payload = {}; const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { @@ -1100,7 +1100,7 @@ export class Account { accept: 'application/json', }; - return this.client.call('get', uri, apiHeaders, payload); + return this.client.call('get', uri, apiHeaders, apiPayload); } /** @@ -1169,12 +1169,12 @@ export class Account { ); } const apiPath = '/account/email'; - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof email !== 'undefined') { - payload['email'] = email; + apiPayload['email'] = email; } if (typeof password !== 'undefined') { - payload['password'] = password; + apiPayload['password'] = password; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -1184,7 +1184,7 @@ export class Account { accept: 'application/json', }; - return this.client.call('patch', uri, apiHeaders, payload); + return this.client.call('patch', uri, apiHeaders, apiPayload); } /** @@ -1239,12 +1239,12 @@ export class Account { const total = params.total; const apiPath = '/account/identities'; - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof queries !== 'undefined') { - payload['queries'] = queries; + apiPayload['queries'] = queries; } if (typeof total !== 'undefined') { - payload['total'] = total; + apiPayload['total'] = total; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -1253,7 +1253,7 @@ export class Account { accept: 'application/json', }; - return this.client.call('get', uri, apiHeaders, payload); + return this.client.call('get', uri, apiHeaders, apiPayload); } /** @@ -1301,7 +1301,7 @@ export class Account { '{identityId}', encodeURIComponent(String(identityId)), ); - const payload: Payload = {}; + const apiPayload: Payload = {}; const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { @@ -1310,7 +1310,7 @@ export class Account { accept: 'application/json', }; - return this.client.call('delete', uri, apiHeaders, payload); + return this.client.call('delete', uri, apiHeaders, apiPayload); } /** @@ -1351,9 +1351,9 @@ export class Account { const queries = params.queries; const apiPath = '/account/invoices'; - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof queries !== 'undefined') { - payload['queries'] = queries; + apiPayload['queries'] = queries; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -1362,7 +1362,7 @@ export class Account { accept: 'application/json', }; - return this.client.call('get', uri, apiHeaders, payload); + return this.client.call('get', uri, apiHeaders, apiPayload); } /** @@ -1403,9 +1403,9 @@ export class Account { const duration = params.duration; const apiPath = '/account/jwts'; - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof duration !== 'undefined') { - payload['duration'] = duration; + apiPayload['duration'] = duration; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -1415,7 +1415,7 @@ export class Account { accept: 'application/json', }; - return this.client.call('post', uri, apiHeaders, payload); + return this.client.call('post', uri, apiHeaders, apiPayload); } /** @@ -1456,9 +1456,9 @@ export class Account { const total = params.total; const apiPath = '/account/keys'; - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof total !== 'undefined') { - payload['total'] = total; + apiPayload['total'] = total; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -1467,7 +1467,7 @@ export class Account { accept: 'application/json', }; - return this.client.call('get', uri, apiHeaders, payload); + return this.client.call('get', uri, apiHeaders, apiPayload); } /** @@ -1540,15 +1540,15 @@ export class Account { throw new AppwriteException('Missing required parameter: "scopes"'); } const apiPath = '/account/keys'; - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof name !== 'undefined') { - payload['name'] = name; + apiPayload['name'] = name; } if (typeof scopes !== 'undefined') { - payload['scopes'] = scopes; + apiPayload['scopes'] = scopes; } if (typeof expire !== 'undefined') { - payload['expire'] = expire; + apiPayload['expire'] = expire; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -1558,7 +1558,7 @@ export class Account { accept: 'application/json', }; - return this.client.call('post', uri, apiHeaders, payload); + return this.client.call('post', uri, apiHeaders, apiPayload); } /** @@ -1602,7 +1602,7 @@ export class Account { '{keyId}', encodeURIComponent(String(keyId)), ); - const payload: Payload = {}; + const apiPayload: Payload = {}; const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { @@ -1610,7 +1610,7 @@ export class Account { accept: 'application/json', }; - return this.client.call('get', uri, apiHeaders, payload); + return this.client.call('get', uri, apiHeaders, apiPayload); } /** @@ -1702,15 +1702,15 @@ export class Account { '{keyId}', encodeURIComponent(String(keyId)), ); - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof name !== 'undefined') { - payload['name'] = name; + apiPayload['name'] = name; } if (typeof scopes !== 'undefined') { - payload['scopes'] = scopes; + apiPayload['scopes'] = scopes; } if (typeof expire !== 'undefined') { - payload['expire'] = expire; + apiPayload['expire'] = expire; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -1720,7 +1720,7 @@ export class Account { accept: 'application/json', }; - return this.client.call('put', uri, apiHeaders, payload); + return this.client.call('put', uri, apiHeaders, apiPayload); } /** @@ -1764,7 +1764,7 @@ export class Account { '{keyId}', encodeURIComponent(String(keyId)), ); - const payload: Payload = {}; + const apiPayload: Payload = {}; const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { @@ -1773,7 +1773,7 @@ export class Account { accept: 'application/json', }; - return this.client.call('delete', uri, apiHeaders, payload); + return this.client.call('delete', uri, apiHeaders, apiPayload); } /** @@ -1822,9 +1822,9 @@ export class Account { throw new AppwriteException('Missing required parameter: "mfa"'); } const apiPath = '/account/mfa'; - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof mfa !== 'undefined') { - payload['mfa'] = mfa; + apiPayload['mfa'] = mfa; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -1834,7 +1834,7 @@ export class Account { accept: 'application/json', }; - return this.client.call('patch', uri, apiHeaders, payload); + return this.client.call('patch', uri, apiHeaders, apiPayload); } /** @@ -1884,7 +1884,7 @@ export class Account { '{type}', encodeURIComponent(String(type)), ); - const payload: Payload = {}; + const apiPayload: Payload = {}; const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { @@ -1893,7 +1893,7 @@ export class Account { accept: 'application/json', }; - return this.client.call('post', uri, apiHeaders, payload); + return this.client.call('post', uri, apiHeaders, apiPayload); } /** @@ -1942,7 +1942,7 @@ export class Account { '{type}', encodeURIComponent(String(type)), ); - const payload: Payload = {}; + const apiPayload: Payload = {}; const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { @@ -1951,7 +1951,7 @@ export class Account { accept: 'application/json', }; - return this.client.call('post', uri, apiHeaders, payload); + return this.client.call('post', uri, apiHeaders, apiPayload); } /** @@ -2020,9 +2020,9 @@ export class Account { '{type}', encodeURIComponent(String(type)), ); - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof otp !== 'undefined') { - payload['otp'] = otp; + apiPayload['otp'] = otp; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -2032,7 +2032,7 @@ export class Account { accept: 'application/json', }; - return this.client.call('put', uri, apiHeaders, payload); + return this.client.call('put', uri, apiHeaders, apiPayload); } /** @@ -2100,9 +2100,9 @@ export class Account { '{type}', encodeURIComponent(String(type)), ); - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof otp !== 'undefined') { - payload['otp'] = otp; + apiPayload['otp'] = otp; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -2112,7 +2112,7 @@ export class Account { accept: 'application/json', }; - return this.client.call('put', uri, apiHeaders, payload); + return this.client.call('put', uri, apiHeaders, apiPayload); } /** @@ -2160,7 +2160,7 @@ export class Account { '{type}', encodeURIComponent(String(type)), ); - const payload: Payload = {}; + const apiPayload: Payload = {}; const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { @@ -2169,7 +2169,7 @@ export class Account { accept: 'application/json', }; - return this.client.call('delete', uri, apiHeaders, payload); + return this.client.call('delete', uri, apiHeaders, apiPayload); } /** @@ -2216,7 +2216,7 @@ export class Account { '{type}', encodeURIComponent(String(type)), ); - const payload: Payload = {}; + const apiPayload: Payload = {}; const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { @@ -2225,7 +2225,7 @@ export class Account { accept: 'application/json', }; - return this.client.call('delete', uri, apiHeaders, payload); + return this.client.call('delete', uri, apiHeaders, apiPayload); } /** @@ -2274,9 +2274,9 @@ export class Account { throw new AppwriteException('Missing required parameter: "factor"'); } const apiPath = '/account/mfa/challenges'; - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof factor !== 'undefined') { - payload['factor'] = factor; + apiPayload['factor'] = factor; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -2286,7 +2286,7 @@ export class Account { accept: 'application/json', }; - return this.client.call('post', uri, apiHeaders, payload); + return this.client.call('post', uri, apiHeaders, apiPayload); } /** @@ -2334,9 +2334,9 @@ export class Account { throw new AppwriteException('Missing required parameter: "factor"'); } const apiPath = '/account/mfa/challenges'; - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof factor !== 'undefined') { - payload['factor'] = factor; + apiPayload['factor'] = factor; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -2346,7 +2346,7 @@ export class Account { accept: 'application/json', }; - return this.client.call('post', uri, apiHeaders, payload); + return this.client.call('post', uri, apiHeaders, apiPayload); } /** @@ -2409,12 +2409,12 @@ export class Account { throw new AppwriteException('Missing required parameter: "otp"'); } const apiPath = '/account/mfa/challenges'; - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof challengeId !== 'undefined') { - payload['challengeId'] = challengeId; + apiPayload['challengeId'] = challengeId; } if (typeof otp !== 'undefined') { - payload['otp'] = otp; + apiPayload['otp'] = otp; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -2424,7 +2424,7 @@ export class Account { accept: 'application/json', }; - return this.client.call('put', uri, apiHeaders, payload); + return this.client.call('put', uri, apiHeaders, apiPayload); } /** @@ -2486,12 +2486,12 @@ export class Account { throw new AppwriteException('Missing required parameter: "otp"'); } const apiPath = '/account/mfa/challenges'; - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof challengeId !== 'undefined') { - payload['challengeId'] = challengeId; + apiPayload['challengeId'] = challengeId; } if (typeof otp !== 'undefined') { - payload['otp'] = otp; + apiPayload['otp'] = otp; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -2501,7 +2501,7 @@ export class Account { accept: 'application/json', }; - return this.client.call('put', uri, apiHeaders, payload); + return this.client.call('put', uri, apiHeaders, apiPayload); } /** @@ -2513,7 +2513,7 @@ export class Account { */ listMfaFactors(): Promise { const apiPath = '/account/mfa/factors'; - const payload: Payload = {}; + const apiPayload: Payload = {}; const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { @@ -2521,7 +2521,7 @@ export class Account { accept: 'application/json', }; - return this.client.call('get', uri, apiHeaders, payload); + return this.client.call('get', uri, apiHeaders, apiPayload); } /** @@ -2532,7 +2532,7 @@ export class Account { */ listMFAFactors(): Promise { const apiPath = '/account/mfa/factors'; - const payload: Payload = {}; + const apiPayload: Payload = {}; const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { @@ -2540,7 +2540,7 @@ export class Account { accept: 'application/json', }; - return this.client.call('get', uri, apiHeaders, payload); + return this.client.call('get', uri, apiHeaders, apiPayload); } /** @@ -2552,7 +2552,7 @@ export class Account { */ getMfaRecoveryCodes(): Promise { const apiPath = '/account/mfa/recovery-codes'; - const payload: Payload = {}; + const apiPayload: Payload = {}; const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { @@ -2560,7 +2560,7 @@ export class Account { accept: 'application/json', }; - return this.client.call('get', uri, apiHeaders, payload); + return this.client.call('get', uri, apiHeaders, apiPayload); } /** @@ -2571,7 +2571,7 @@ export class Account { */ getMFARecoveryCodes(): Promise { const apiPath = '/account/mfa/recovery-codes'; - const payload: Payload = {}; + const apiPayload: Payload = {}; const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { @@ -2579,7 +2579,7 @@ export class Account { accept: 'application/json', }; - return this.client.call('get', uri, apiHeaders, payload); + return this.client.call('get', uri, apiHeaders, apiPayload); } /** @@ -2591,7 +2591,7 @@ export class Account { */ createMfaRecoveryCodes(): Promise { const apiPath = '/account/mfa/recovery-codes'; - const payload: Payload = {}; + const apiPayload: Payload = {}; const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { @@ -2600,7 +2600,7 @@ export class Account { accept: 'application/json', }; - return this.client.call('post', uri, apiHeaders, payload); + return this.client.call('post', uri, apiHeaders, apiPayload); } /** @@ -2611,7 +2611,7 @@ export class Account { */ createMFARecoveryCodes(): Promise { const apiPath = '/account/mfa/recovery-codes'; - const payload: Payload = {}; + const apiPayload: Payload = {}; const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { @@ -2620,7 +2620,7 @@ export class Account { accept: 'application/json', }; - return this.client.call('post', uri, apiHeaders, payload); + return this.client.call('post', uri, apiHeaders, apiPayload); } /** @@ -2632,7 +2632,7 @@ export class Account { */ updateMfaRecoveryCodes(): Promise { const apiPath = '/account/mfa/recovery-codes'; - const payload: Payload = {}; + const apiPayload: Payload = {}; const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { @@ -2641,7 +2641,7 @@ export class Account { accept: 'application/json', }; - return this.client.call('patch', uri, apiHeaders, payload); + return this.client.call('patch', uri, apiHeaders, apiPayload); } /** @@ -2652,7 +2652,7 @@ export class Account { */ updateMFARecoveryCodes(): Promise { const apiPath = '/account/mfa/recovery-codes'; - const payload: Payload = {}; + const apiPayload: Payload = {}; const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { @@ -2661,7 +2661,7 @@ export class Account { accept: 'application/json', }; - return this.client.call('patch', uri, apiHeaders, payload); + return this.client.call('patch', uri, apiHeaders, apiPayload); } /** @@ -2710,9 +2710,9 @@ export class Account { throw new AppwriteException('Missing required parameter: "name"'); } const apiPath = '/account/name'; - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof name !== 'undefined') { - payload['name'] = name; + apiPayload['name'] = name; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -2722,7 +2722,7 @@ export class Account { accept: 'application/json', }; - return this.client.call('patch', uri, apiHeaders, payload); + return this.client.call('patch', uri, apiHeaders, apiPayload); } /** @@ -2787,12 +2787,12 @@ export class Account { ); } const apiPath = '/account/password'; - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof password !== 'undefined') { - payload['password'] = password; + apiPayload['password'] = password; } if (typeof oldPassword !== 'undefined') { - payload['oldPassword'] = oldPassword; + apiPayload['oldPassword'] = oldPassword; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -2802,7 +2802,7 @@ export class Account { accept: 'application/json', }; - return this.client.call('patch', uri, apiHeaders, payload); + return this.client.call('patch', uri, apiHeaders, apiPayload); } /** @@ -2845,9 +2845,9 @@ export class Account { const queries = params.queries; const apiPath = '/account/payment-methods'; - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof queries !== 'undefined') { - payload['queries'] = queries; + apiPayload['queries'] = queries; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -2856,7 +2856,7 @@ export class Account { accept: 'application/json', }; - return this.client.call('get', uri, apiHeaders, payload); + return this.client.call('get', uri, apiHeaders, apiPayload); } /** @@ -2867,7 +2867,7 @@ export class Account { */ createPaymentMethod(): Promise { const apiPath = '/account/payment-methods'; - const payload: Payload = {}; + const apiPayload: Payload = {}; const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { @@ -2876,7 +2876,7 @@ export class Account { accept: 'application/json', }; - return this.client.call('post', uri, apiHeaders, payload); + return this.client.call('post', uri, apiHeaders, apiPayload); } /** @@ -2926,7 +2926,7 @@ export class Account { '{paymentMethodId}', encodeURIComponent(String(paymentMethodId)), ); - const payload: Payload = {}; + const apiPayload: Payload = {}; const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { @@ -2934,7 +2934,7 @@ export class Account { accept: 'application/json', }; - return this.client.call('get', uri, apiHeaders, payload); + return this.client.call('get', uri, apiHeaders, apiPayload); } /** @@ -3032,15 +3032,15 @@ export class Account { '{paymentMethodId}', encodeURIComponent(String(paymentMethodId)), ); - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof expiryMonth !== 'undefined') { - payload['expiryMonth'] = expiryMonth; + apiPayload['expiryMonth'] = expiryMonth; } if (typeof expiryYear !== 'undefined') { - payload['expiryYear'] = expiryYear; + apiPayload['expiryYear'] = expiryYear; } if (typeof state !== 'undefined') { - payload['state'] = state; + apiPayload['state'] = state; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -3050,7 +3050,7 @@ export class Account { accept: 'application/json', }; - return this.client.call('patch', uri, apiHeaders, payload); + return this.client.call('patch', uri, apiHeaders, apiPayload); } /** @@ -3098,7 +3098,7 @@ export class Account { '{paymentMethodId}', encodeURIComponent(String(paymentMethodId)), ); - const payload: Payload = {}; + const apiPayload: Payload = {}; const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { @@ -3107,7 +3107,7 @@ export class Account { accept: 'application/json', }; - return this.client.call('delete', uri, apiHeaders, payload); + return this.client.call('delete', uri, apiHeaders, apiPayload); } /** @@ -3204,15 +3204,15 @@ export class Account { '{paymentMethodId}', encodeURIComponent(String(paymentMethodId)), ); - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof providerMethodId !== 'undefined') { - payload['providerMethodId'] = providerMethodId; + apiPayload['providerMethodId'] = providerMethodId; } if (typeof name !== 'undefined') { - payload['name'] = name; + apiPayload['name'] = name; } if (typeof state !== 'undefined') { - payload['state'] = state; + apiPayload['state'] = state; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -3222,7 +3222,7 @@ export class Account { accept: 'application/json', }; - return this.client.call('patch', uri, apiHeaders, payload); + return this.client.call('patch', uri, apiHeaders, apiPayload); } /** @@ -3275,7 +3275,7 @@ export class Account { '{paymentMethodId}', encodeURIComponent(String(paymentMethodId)), ); - const payload: Payload = {}; + const apiPayload: Payload = {}; const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { @@ -3284,7 +3284,7 @@ export class Account { accept: 'application/json', }; - return this.client.call('patch', uri, apiHeaders, payload); + return this.client.call('patch', uri, apiHeaders, apiPayload); } /** @@ -3349,12 +3349,12 @@ export class Account { ); } const apiPath = '/account/phone'; - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof phone !== 'undefined') { - payload['phone'] = phone; + apiPayload['phone'] = phone; } if (typeof password !== 'undefined') { - payload['password'] = password; + apiPayload['password'] = password; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -3364,7 +3364,7 @@ export class Account { accept: 'application/json', }; - return this.client.call('patch', uri, apiHeaders, payload); + return this.client.call('patch', uri, apiHeaders, apiPayload); } /** @@ -3377,7 +3377,7 @@ export class Account { Preferences extends Models.Preferences = Models.DefaultPreferences, >(): Promise { const apiPath = '/account/prefs'; - const payload: Payload = {}; + const apiPayload: Payload = {}; const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { @@ -3385,7 +3385,7 @@ export class Account { accept: 'application/json', }; - return this.client.call('get', uri, apiHeaders, payload); + return this.client.call('get', uri, apiHeaders, apiPayload); } /** @@ -3437,9 +3437,9 @@ export class Account { throw new AppwriteException('Missing required parameter: "prefs"'); } const apiPath = '/account/prefs'; - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof prefs !== 'undefined') { - payload['prefs'] = prefs; + apiPayload['prefs'] = prefs; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -3449,7 +3449,7 @@ export class Account { accept: 'application/json', }; - return this.client.call('patch', uri, apiHeaders, payload); + return this.client.call('patch', uri, apiHeaders, apiPayload); } /** @@ -3503,12 +3503,12 @@ export class Account { throw new AppwriteException('Missing required parameter: "url"'); } const apiPath = '/account/recovery'; - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof email !== 'undefined') { - payload['email'] = email; + apiPayload['email'] = email; } if (typeof url !== 'undefined') { - payload['url'] = url; + apiPayload['url'] = url; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -3518,7 +3518,7 @@ export class Account { accept: 'application/json', }; - return this.client.call('post', uri, apiHeaders, payload); + return this.client.call('post', uri, apiHeaders, apiPayload); } /** @@ -3595,15 +3595,15 @@ export class Account { ); } const apiPath = '/account/recovery'; - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof userId !== 'undefined') { - payload['userId'] = userId; + apiPayload['userId'] = userId; } if (typeof secret !== 'undefined') { - payload['secret'] = secret; + apiPayload['secret'] = secret; } if (typeof password !== 'undefined') { - payload['password'] = password; + apiPayload['password'] = password; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -3613,7 +3613,7 @@ export class Account { accept: 'application/json', }; - return this.client.call('put', uri, apiHeaders, payload); + return this.client.call('put', uri, apiHeaders, apiPayload); } /** @@ -3673,12 +3673,12 @@ export class Account { throw new AppwriteException('Missing required parameter: "email"'); } const apiPath = '/account/recovery/otp'; - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof email !== 'undefined') { - payload['email'] = email; + apiPayload['email'] = email; } if (typeof phrase !== 'undefined') { - payload['phrase'] = phrase; + apiPayload['phrase'] = phrase; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -3688,7 +3688,7 @@ export class Account { accept: 'application/json', }; - return this.client.call('post', uri, apiHeaders, payload); + return this.client.call('post', uri, apiHeaders, apiPayload); } /** @@ -3763,15 +3763,15 @@ export class Account { ); } const apiPath = '/account/recovery/otp'; - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof userId !== 'undefined') { - payload['userId'] = userId; + apiPayload['userId'] = userId; } if (typeof secret !== 'undefined') { - payload['secret'] = secret; + apiPayload['secret'] = secret; } if (typeof password !== 'undefined') { - payload['password'] = password; + apiPayload['password'] = password; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -3781,7 +3781,7 @@ export class Account { accept: 'application/json', }; - return this.client.call('put', uri, apiHeaders, payload); + return this.client.call('put', uri, apiHeaders, apiPayload); } /** @@ -3792,7 +3792,7 @@ export class Account { */ listSessions(): Promise { const apiPath = '/account/sessions'; - const payload: Payload = {}; + const apiPayload: Payload = {}; const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { @@ -3800,7 +3800,7 @@ export class Account { accept: 'application/json', }; - return this.client.call('get', uri, apiHeaders, payload); + return this.client.call('get', uri, apiHeaders, apiPayload); } /** @@ -3811,7 +3811,7 @@ export class Account { */ deleteSessions(): Promise<{}> { const apiPath = '/account/sessions'; - const payload: Payload = {}; + const apiPayload: Payload = {}; const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { @@ -3820,7 +3820,7 @@ export class Account { accept: 'application/json', }; - return this.client.call('delete', uri, apiHeaders, payload); + return this.client.call('delete', uri, apiHeaders, apiPayload); } /** @@ -3831,7 +3831,7 @@ export class Account { */ createAnonymousSession(): Promise { const apiPath = '/account/sessions/anonymous'; - const payload: Payload = {}; + const apiPayload: Payload = {}; const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { @@ -3840,7 +3840,7 @@ export class Account { accept: 'application/json', }; - return this.client.call('post', uri, apiHeaders, payload); + return this.client.call('post', uri, apiHeaders, apiPayload); } /** @@ -3906,12 +3906,12 @@ export class Account { ); } const apiPath = '/account/sessions/email'; - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof email !== 'undefined') { - payload['email'] = email; + apiPayload['email'] = email; } if (typeof password !== 'undefined') { - payload['password'] = password; + apiPayload['password'] = password; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -3921,7 +3921,7 @@ export class Account { accept: 'application/json', }; - return this.client.call('post', uri, apiHeaders, payload); + return this.client.call('post', uri, apiHeaders, apiPayload); } /** @@ -4057,24 +4057,24 @@ export class Account { ); } const apiPath = '/account/sessions/id-token'; - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof provider !== 'undefined') { - payload['provider'] = provider; + apiPayload['provider'] = provider; } if (typeof idToken !== 'undefined') { - payload['idToken'] = idToken; + apiPayload['idToken'] = idToken; } if (typeof nonce !== 'undefined') { - payload['nonce'] = nonce; + apiPayload['nonce'] = nonce; } if (typeof accessToken !== 'undefined') { - payload['accessToken'] = accessToken; + apiPayload['accessToken'] = accessToken; } if (typeof accessTokenExpiry !== 'undefined') { - payload['accessTokenExpiry'] = accessTokenExpiry; + apiPayload['accessTokenExpiry'] = accessTokenExpiry; } if (typeof name !== 'undefined') { - payload['name'] = name; + apiPayload['name'] = name; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -4084,7 +4084,7 @@ export class Account { accept: 'application/json', }; - return this.client.call('post', uri, apiHeaders, payload); + return this.client.call('post', uri, apiHeaders, apiPayload); } /** @@ -4145,12 +4145,12 @@ export class Account { throw new AppwriteException('Missing required parameter: "secret"'); } const apiPath = '/account/sessions/magic-url'; - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof userId !== 'undefined') { - payload['userId'] = userId; + apiPayload['userId'] = userId; } if (typeof secret !== 'undefined') { - payload['secret'] = secret; + apiPayload['secret'] = secret; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -4160,7 +4160,7 @@ export class Account { accept: 'application/json', }; - return this.client.call('put', uri, apiHeaders, payload); + return this.client.call('put', uri, apiHeaders, apiPayload); } /** @@ -4262,21 +4262,23 @@ export class Account { '{provider}', encodeURIComponent(String(provider)), ); - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof success !== 'undefined') { - payload['success'] = success; + apiPayload['success'] = success; } if (typeof failure !== 'undefined') { - payload['failure'] = failure; + apiPayload['failure'] = failure; } if (typeof scopes !== 'undefined') { - payload['scopes'] = scopes; + apiPayload['scopes'] = scopes; } const uri = new URL(this.client.config.endpoint + apiPath); - payload['project'] = this.client.config.project; + apiPayload['project'] = this.client.config.project; - for (const [key, value] of Object.entries(Service.flatten(payload))) { + for (const [key, value] of Object.entries( + Service.flatten(apiPayload), + )) { uri.searchParams.append(key, value); } @@ -4343,12 +4345,12 @@ export class Account { throw new AppwriteException('Missing required parameter: "secret"'); } const apiPath = '/account/sessions/phone'; - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof userId !== 'undefined') { - payload['userId'] = userId; + apiPayload['userId'] = userId; } if (typeof secret !== 'undefined') { - payload['secret'] = secret; + apiPayload['secret'] = secret; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -4358,7 +4360,7 @@ export class Account { accept: 'application/json', }; - return this.client.call('put', uri, apiHeaders, payload); + return this.client.call('put', uri, apiHeaders, apiPayload); } /** @@ -4415,12 +4417,12 @@ export class Account { throw new AppwriteException('Missing required parameter: "secret"'); } const apiPath = '/account/sessions/token'; - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof userId !== 'undefined') { - payload['userId'] = userId; + apiPayload['userId'] = userId; } if (typeof secret !== 'undefined') { - payload['secret'] = secret; + apiPayload['secret'] = secret; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -4430,7 +4432,7 @@ export class Account { accept: 'application/json', }; - return this.client.call('post', uri, apiHeaders, payload); + return this.client.call('post', uri, apiHeaders, apiPayload); } /** @@ -4478,7 +4480,7 @@ export class Account { '{sessionId}', encodeURIComponent(String(sessionId)), ); - const payload: Payload = {}; + const apiPayload: Payload = {}; const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { @@ -4486,7 +4488,7 @@ export class Account { accept: 'application/json', }; - return this.client.call('get', uri, apiHeaders, payload); + return this.client.call('get', uri, apiHeaders, apiPayload); } /** @@ -4534,7 +4536,7 @@ export class Account { '{sessionId}', encodeURIComponent(String(sessionId)), ); - const payload: Payload = {}; + const apiPayload: Payload = {}; const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { @@ -4543,7 +4545,7 @@ export class Account { accept: 'application/json', }; - return this.client.call('patch', uri, apiHeaders, payload); + return this.client.call('patch', uri, apiHeaders, apiPayload); } /** @@ -4589,7 +4591,7 @@ export class Account { '{sessionId}', encodeURIComponent(String(sessionId)), ); - const payload: Payload = {}; + const apiPayload: Payload = {}; const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { @@ -4598,7 +4600,7 @@ export class Account { accept: 'application/json', }; - return this.client.call('delete', uri, apiHeaders, payload); + return this.client.call('delete', uri, apiHeaders, apiPayload); } /** @@ -4611,7 +4613,7 @@ export class Account { Preferences extends Models.Preferences = Models.DefaultPreferences, >(): Promise> { const apiPath = '/account/status'; - const payload: Payload = {}; + const apiPayload: Payload = {}; const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { @@ -4620,7 +4622,7 @@ export class Account { accept: 'application/json', }; - return this.client.call('patch', uri, apiHeaders, payload); + return this.client.call('patch', uri, apiHeaders, apiPayload); } /** @@ -4697,15 +4699,15 @@ export class Account { ); } const apiPath = '/account/targets/push'; - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof targetId !== 'undefined') { - payload['targetId'] = targetId; + apiPayload['targetId'] = targetId; } if (typeof identifier !== 'undefined') { - payload['identifier'] = identifier; + apiPayload['identifier'] = identifier; } if (typeof providerId !== 'undefined') { - payload['providerId'] = providerId; + apiPayload['providerId'] = providerId; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -4715,7 +4717,7 @@ export class Account { accept: 'application/json', }; - return this.client.call('post', uri, apiHeaders, payload); + return this.client.call('post', uri, apiHeaders, apiPayload); } /** @@ -4782,9 +4784,9 @@ export class Account { '{targetId}', encodeURIComponent(String(targetId)), ); - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof identifier !== 'undefined') { - payload['identifier'] = identifier; + apiPayload['identifier'] = identifier; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -4794,7 +4796,7 @@ export class Account { accept: 'application/json', }; - return this.client.call('put', uri, apiHeaders, payload); + return this.client.call('put', uri, apiHeaders, apiPayload); } /** @@ -4842,7 +4844,7 @@ export class Account { '{targetId}', encodeURIComponent(String(targetId)), ); - const payload: Payload = {}; + const apiPayload: Payload = {}; const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { @@ -4851,7 +4853,7 @@ export class Account { accept: 'application/json', }; - return this.client.call('delete', uri, apiHeaders, payload); + return this.client.call('delete', uri, apiHeaders, apiPayload); } /** @@ -4925,15 +4927,15 @@ export class Account { throw new AppwriteException('Missing required parameter: "email"'); } const apiPath = '/account/tokens/email'; - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof userId !== 'undefined') { - payload['userId'] = userId; + apiPayload['userId'] = userId; } if (typeof email !== 'undefined') { - payload['email'] = email; + apiPayload['email'] = email; } if (typeof phrase !== 'undefined') { - payload['phrase'] = phrase; + apiPayload['phrase'] = phrase; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -4943,7 +4945,7 @@ export class Account { accept: 'application/json', }; - return this.client.call('post', uri, apiHeaders, payload); + return this.client.call('post', uri, apiHeaders, apiPayload); } /** @@ -5030,18 +5032,18 @@ export class Account { throw new AppwriteException('Missing required parameter: "email"'); } const apiPath = '/account/tokens/magic-url'; - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof userId !== 'undefined') { - payload['userId'] = userId; + apiPayload['userId'] = userId; } if (typeof email !== 'undefined') { - payload['email'] = email; + apiPayload['email'] = email; } if (typeof url !== 'undefined') { - payload['url'] = url; + apiPayload['url'] = url; } if (typeof phrase !== 'undefined') { - payload['phrase'] = phrase; + apiPayload['phrase'] = phrase; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -5051,7 +5053,7 @@ export class Account { accept: 'application/json', }; - return this.client.call('post', uri, apiHeaders, payload); + return this.client.call('post', uri, apiHeaders, apiPayload); } /** @@ -5155,21 +5157,23 @@ export class Account { '{provider}', encodeURIComponent(String(provider)), ); - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof success !== 'undefined') { - payload['success'] = success; + apiPayload['success'] = success; } if (typeof failure !== 'undefined') { - payload['failure'] = failure; + apiPayload['failure'] = failure; } if (typeof scopes !== 'undefined') { - payload['scopes'] = scopes; + apiPayload['scopes'] = scopes; } const uri = new URL(this.client.config.endpoint + apiPath); - payload['project'] = this.client.config.project; + apiPayload['project'] = this.client.config.project; - for (const [key, value] of Object.entries(Service.flatten(payload))) { + for (const [key, value] of Object.entries( + Service.flatten(apiPayload), + )) { uri.searchParams.append(key, value); } @@ -5236,12 +5240,12 @@ export class Account { throw new AppwriteException('Missing required parameter: "phone"'); } const apiPath = '/account/tokens/phone'; - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof userId !== 'undefined') { - payload['userId'] = userId; + apiPayload['userId'] = userId; } if (typeof phone !== 'undefined') { - payload['phone'] = phone; + apiPayload['phone'] = phone; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -5251,7 +5255,7 @@ export class Account { accept: 'application/json', }; - return this.client.call('post', uri, apiHeaders, payload); + return this.client.call('post', uri, apiHeaders, apiPayload); } /** @@ -5300,9 +5304,9 @@ export class Account { throw new AppwriteException('Missing required parameter: "url"'); } const apiPath = '/account/verifications/email'; - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof url !== 'undefined') { - payload['url'] = url; + apiPayload['url'] = url; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -5312,7 +5316,7 @@ export class Account { accept: 'application/json', }; - return this.client.call('post', uri, apiHeaders, payload); + return this.client.call('post', uri, apiHeaders, apiPayload); } /** @@ -5362,9 +5366,9 @@ export class Account { throw new AppwriteException('Missing required parameter: "url"'); } const apiPath = '/account/verifications/email'; - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof url !== 'undefined') { - payload['url'] = url; + apiPayload['url'] = url; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -5374,7 +5378,7 @@ export class Account { accept: 'application/json', }; - return this.client.call('post', uri, apiHeaders, payload); + return this.client.call('post', uri, apiHeaders, apiPayload); } /** @@ -5434,12 +5438,12 @@ export class Account { throw new AppwriteException('Missing required parameter: "secret"'); } const apiPath = '/account/verifications/email'; - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof userId !== 'undefined') { - payload['userId'] = userId; + apiPayload['userId'] = userId; } if (typeof secret !== 'undefined') { - payload['secret'] = secret; + apiPayload['secret'] = secret; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -5449,7 +5453,7 @@ export class Account { accept: 'application/json', }; - return this.client.call('put', uri, apiHeaders, payload); + return this.client.call('put', uri, apiHeaders, apiPayload); } /** @@ -5507,12 +5511,12 @@ export class Account { throw new AppwriteException('Missing required parameter: "secret"'); } const apiPath = '/account/verifications/email'; - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof userId !== 'undefined') { - payload['userId'] = userId; + apiPayload['userId'] = userId; } if (typeof secret !== 'undefined') { - payload['secret'] = secret; + apiPayload['secret'] = secret; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -5522,7 +5526,7 @@ export class Account { accept: 'application/json', }; - return this.client.call('put', uri, apiHeaders, payload); + return this.client.call('put', uri, apiHeaders, apiPayload); } /** @@ -5571,9 +5575,9 @@ export class Account { const phrase = params.phrase; const apiPath = '/account/verifications/email/otp'; - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof phrase !== 'undefined') { - payload['phrase'] = phrase; + apiPayload['phrase'] = phrase; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -5583,7 +5587,7 @@ export class Account { accept: 'application/json', }; - return this.client.call('post', uri, apiHeaders, payload); + return this.client.call('post', uri, apiHeaders, apiPayload); } /** @@ -5645,12 +5649,12 @@ export class Account { throw new AppwriteException('Missing required parameter: "secret"'); } const apiPath = '/account/verifications/email/otp'; - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof userId !== 'undefined') { - payload['userId'] = userId; + apiPayload['userId'] = userId; } if (typeof secret !== 'undefined') { - payload['secret'] = secret; + apiPayload['secret'] = secret; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -5660,7 +5664,7 @@ export class Account { accept: 'application/json', }; - return this.client.call('put', uri, apiHeaders, payload); + return this.client.call('put', uri, apiHeaders, apiPayload); } /** @@ -5671,7 +5675,7 @@ export class Account { */ createPhoneVerification(): Promise { const apiPath = '/account/verifications/phone'; - const payload: Payload = {}; + const apiPayload: Payload = {}; const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { @@ -5680,7 +5684,7 @@ export class Account { accept: 'application/json', }; - return this.client.call('post', uri, apiHeaders, payload); + return this.client.call('post', uri, apiHeaders, apiPayload); } /** @@ -5740,12 +5744,12 @@ export class Account { throw new AppwriteException('Missing required parameter: "secret"'); } const apiPath = '/account/verifications/phone'; - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof userId !== 'undefined') { - payload['userId'] = userId; + apiPayload['userId'] = userId; } if (typeof secret !== 'undefined') { - payload['secret'] = secret; + apiPayload['secret'] = secret; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -5755,6 +5759,6 @@ export class Account { accept: 'application/json', }; - return this.client.call('put', uri, apiHeaders, payload); + return this.client.call('put', uri, apiHeaders, apiPayload); } } diff --git a/src/services/activities.ts b/src/services/activities.ts index 44d02900..9c9ca8bd 100644 --- a/src/services/activities.ts +++ b/src/services/activities.ts @@ -48,9 +48,9 @@ export class Activities { const queries = params.queries; const apiPath = '/activities/events'; - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof queries !== 'undefined') { - payload['queries'] = queries; + apiPayload['queries'] = queries; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -59,7 +59,7 @@ export class Activities { accept: 'application/json', }; - return this.client.call('get', uri, apiHeaders, payload); + return this.client.call('get', uri, apiHeaders, apiPayload); } /** @@ -109,7 +109,7 @@ export class Activities { '{eventId}', encodeURIComponent(String(eventId)), ); - const payload: Payload = {}; + const apiPayload: Payload = {}; const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { @@ -117,6 +117,6 @@ export class Activities { accept: 'application/json', }; - return this.client.call('get', uri, apiHeaders, payload); + return this.client.call('get', uri, apiHeaders, apiPayload); } } diff --git a/src/services/advisor.ts b/src/services/advisor.ts index 5b528330..4be2f69f 100644 --- a/src/services/advisor.ts +++ b/src/services/advisor.ts @@ -62,12 +62,12 @@ export class Advisor { const total = params.total; const apiPath = '/reports'; - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof queries !== 'undefined') { - payload['queries'] = queries; + apiPayload['queries'] = queries; } if (typeof total !== 'undefined') { - payload['total'] = total; + apiPayload['total'] = total; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -76,7 +76,7 @@ export class Advisor { accept: 'application/json', }; - return this.client.call('get', uri, apiHeaders, payload); + return this.client.call('get', uri, apiHeaders, apiPayload); } /** @@ -126,7 +126,7 @@ export class Advisor { '{reportId}', encodeURIComponent(String(reportId)), ); - const payload: Payload = {}; + const apiPayload: Payload = {}; const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { @@ -134,7 +134,7 @@ export class Advisor { accept: 'application/json', }; - return this.client.call('get', uri, apiHeaders, payload); + return this.client.call('get', uri, apiHeaders, apiPayload); } /** @@ -182,7 +182,7 @@ export class Advisor { '{reportId}', encodeURIComponent(String(reportId)), ); - const payload: Payload = {}; + const apiPayload: Payload = {}; const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { @@ -191,7 +191,7 @@ export class Advisor { accept: 'application/json', }; - return this.client.call('delete', uri, apiHeaders, payload); + return this.client.call('delete', uri, apiHeaders, apiPayload); } /** @@ -263,12 +263,12 @@ export class Advisor { '{reportId}', encodeURIComponent(String(reportId)), ); - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof queries !== 'undefined') { - payload['queries'] = queries; + apiPayload['queries'] = queries; } if (typeof total !== 'undefined') { - payload['total'] = total; + apiPayload['total'] = total; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -277,7 +277,7 @@ export class Advisor { accept: 'application/json', }; - return this.client.call('get', uri, apiHeaders, payload); + return this.client.call('get', uri, apiHeaders, apiPayload); } /** @@ -342,7 +342,7 @@ export class Advisor { const apiPath = '/reports/{reportId}/insights/{insightId}' .replace('{reportId}', encodeURIComponent(String(reportId))) .replace('{insightId}', encodeURIComponent(String(insightId))); - const payload: Payload = {}; + const apiPayload: Payload = {}; const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { @@ -350,6 +350,6 @@ export class Advisor { accept: 'application/json', }; - return this.client.call('get', uri, apiHeaders, payload); + return this.client.call('get', uri, apiHeaders, apiPayload); } } diff --git a/src/services/affiliates.ts b/src/services/affiliates.ts index e3578e3c..2edbeacb 100644 --- a/src/services/affiliates.ts +++ b/src/services/affiliates.ts @@ -50,9 +50,9 @@ export class Affiliates { const queries = params.queries; const apiPath = '/affiliates/links'; - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof queries !== 'undefined') { - payload['queries'] = queries; + apiPayload['queries'] = queries; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -61,7 +61,7 @@ export class Affiliates { accept: 'application/json', }; - return this.client.call('get', uri, apiHeaders, payload); + return this.client.call('get', uri, apiHeaders, apiPayload); } /** @@ -114,12 +114,12 @@ export class Affiliates { throw new AppwriteException('Missing required parameter: "linkId"'); } const apiPath = '/affiliates/links'; - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof linkId !== 'undefined') { - payload['linkId'] = linkId; + apiPayload['linkId'] = linkId; } if (typeof name !== 'undefined') { - payload['name'] = name; + apiPayload['name'] = name; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -129,7 +129,7 @@ export class Affiliates { accept: 'application/json', }; - return this.client.call('post', uri, apiHeaders, payload); + return this.client.call('post', uri, apiHeaders, apiPayload); } /** @@ -177,7 +177,7 @@ export class Affiliates { '{linkId}', encodeURIComponent(String(linkId)), ); - const payload: Payload = {}; + const apiPayload: Payload = {}; const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { @@ -185,7 +185,7 @@ export class Affiliates { accept: 'application/json', }; - return this.client.call('get', uri, apiHeaders, payload); + return this.client.call('get', uri, apiHeaders, apiPayload); } /** @@ -231,7 +231,7 @@ export class Affiliates { '{linkId}', encodeURIComponent(String(linkId)), ); - const payload: Payload = {}; + const apiPayload: Payload = {}; const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { @@ -240,7 +240,7 @@ export class Affiliates { accept: 'application/json', }; - return this.client.call('delete', uri, apiHeaders, payload); + return this.client.call('delete', uri, apiHeaders, apiPayload); } /** @@ -285,9 +285,9 @@ export class Affiliates { const queries = params.queries; const apiPath = '/affiliates/referrals'; - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof queries !== 'undefined') { - payload['queries'] = queries; + apiPayload['queries'] = queries; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -296,7 +296,7 @@ export class Affiliates { accept: 'application/json', }; - return this.client.call('get', uri, apiHeaders, payload); + return this.client.call('get', uri, apiHeaders, apiPayload); } /** @@ -341,9 +341,9 @@ export class Affiliates { const queries = params.queries; const apiPath = '/affiliates/rewards'; - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof queries !== 'undefined') { - payload['queries'] = queries; + apiPayload['queries'] = queries; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -352,7 +352,7 @@ export class Affiliates { accept: 'application/json', }; - return this.client.call('get', uri, apiHeaders, payload); + return this.client.call('get', uri, apiHeaders, apiPayload); } /** @@ -437,12 +437,12 @@ export class Affiliates { '{rewardId}', encodeURIComponent(String(rewardId)), ); - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof status !== 'undefined') { - payload['status'] = status; + apiPayload['status'] = status; } if (typeof organizationId !== 'undefined') { - payload['organizationId'] = organizationId; + apiPayload['organizationId'] = organizationId; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -452,6 +452,6 @@ export class Affiliates { accept: 'application/json', }; - return this.client.call('patch', uri, apiHeaders, payload); + return this.client.call('patch', uri, apiHeaders, apiPayload); } } diff --git a/src/services/apps.ts b/src/services/apps.ts index 27c3ec89..555b8814 100644 --- a/src/services/apps.ts +++ b/src/services/apps.ts @@ -57,12 +57,12 @@ export class Apps { const total = params.total; const apiPath = '/apps'; - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof queries !== 'undefined') { - payload['queries'] = queries; + apiPayload['queries'] = queries; } if (typeof total !== 'undefined') { - payload['total'] = total; + apiPayload['total'] = total; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -71,7 +71,7 @@ export class Apps { accept: 'application/json', }; - return this.client.call('get', uri, apiHeaders, payload); + return this.client.call('get', uri, apiHeaders, apiPayload); } /** @@ -316,63 +316,63 @@ export class Apps { ); } const apiPath = '/apps'; - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof appId !== 'undefined') { - payload['appId'] = appId; + apiPayload['appId'] = appId; } if (typeof name !== 'undefined') { - payload['name'] = name; + apiPayload['name'] = name; } if (typeof description !== 'undefined') { - payload['description'] = description; + apiPayload['description'] = description; } if (typeof clientUri !== 'undefined') { - payload['clientUri'] = clientUri; + apiPayload['clientUri'] = clientUri; } if (typeof logoUri !== 'undefined') { - payload['logoUri'] = logoUri; + apiPayload['logoUri'] = logoUri; } if (typeof privacyPolicyUrl !== 'undefined') { - payload['privacyPolicyUrl'] = privacyPolicyUrl; + apiPayload['privacyPolicyUrl'] = privacyPolicyUrl; } if (typeof termsUrl !== 'undefined') { - payload['termsUrl'] = termsUrl; + apiPayload['termsUrl'] = termsUrl; } if (typeof contacts !== 'undefined') { - payload['contacts'] = contacts; + apiPayload['contacts'] = contacts; } if (typeof tagline !== 'undefined') { - payload['tagline'] = tagline; + apiPayload['tagline'] = tagline; } if (typeof tags !== 'undefined') { - payload['tags'] = tags; + apiPayload['tags'] = tags; } if (typeof images !== 'undefined') { - payload['images'] = images; + apiPayload['images'] = images; } if (typeof supportUrl !== 'undefined') { - payload['supportUrl'] = supportUrl; + apiPayload['supportUrl'] = supportUrl; } if (typeof dataDeletionUrl !== 'undefined') { - payload['dataDeletionUrl'] = dataDeletionUrl; + apiPayload['dataDeletionUrl'] = dataDeletionUrl; } if (typeof redirectUris !== 'undefined') { - payload['redirectUris'] = redirectUris; + apiPayload['redirectUris'] = redirectUris; } if (typeof postLogoutRedirectUris !== 'undefined') { - payload['postLogoutRedirectUris'] = postLogoutRedirectUris; + apiPayload['postLogoutRedirectUris'] = postLogoutRedirectUris; } if (typeof enabled !== 'undefined') { - payload['enabled'] = enabled; + apiPayload['enabled'] = enabled; } if (typeof type !== 'undefined') { - payload['type'] = type; + apiPayload['type'] = type; } if (typeof deviceFlow !== 'undefined') { - payload['deviceFlow'] = deviceFlow; + apiPayload['deviceFlow'] = deviceFlow; } if (typeof teamId !== 'undefined') { - payload['teamId'] = teamId; + apiPayload['teamId'] = teamId; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -382,7 +382,7 @@ export class Apps { accept: 'application/json', }; - return this.client.call('post', uri, apiHeaders, payload); + return this.client.call('post', uri, apiHeaders, apiPayload); } /** @@ -393,7 +393,7 @@ export class Apps { */ listInstallationScopes(): Promise { const apiPath = '/apps/scopes/installations'; - const payload: Payload = {}; + const apiPayload: Payload = {}; const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { @@ -401,7 +401,7 @@ export class Apps { accept: 'application/json', }; - return this.client.call('get', uri, apiHeaders, payload); + return this.client.call('get', uri, apiHeaders, apiPayload); } /** @@ -412,7 +412,7 @@ export class Apps { */ listOAuth2Scopes(): Promise { const apiPath = '/apps/scopes/oauth2'; - const payload: Payload = {}; + const apiPayload: Payload = {}; const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { @@ -420,7 +420,7 @@ export class Apps { accept: 'application/json', }; - return this.client.call('get', uri, apiHeaders, payload); + return this.client.call('get', uri, apiHeaders, apiPayload); } /** @@ -464,7 +464,7 @@ export class Apps { '{appId}', encodeURIComponent(String(appId)), ); - const payload: Payload = {}; + const apiPayload: Payload = {}; const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { @@ -472,7 +472,7 @@ export class Apps { accept: 'application/json', }; - return this.client.call('get', uri, apiHeaders, payload); + return this.client.call('get', uri, apiHeaders, apiPayload); } /** @@ -725,63 +725,63 @@ export class Apps { '{appId}', encodeURIComponent(String(appId)), ); - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof name !== 'undefined') { - payload['name'] = name; + apiPayload['name'] = name; } if (typeof description !== 'undefined') { - payload['description'] = description; + apiPayload['description'] = description; } if (typeof clientUri !== 'undefined') { - payload['clientUri'] = clientUri; + apiPayload['clientUri'] = clientUri; } if (typeof logoUri !== 'undefined') { - payload['logoUri'] = logoUri; + apiPayload['logoUri'] = logoUri; } if (typeof privacyPolicyUrl !== 'undefined') { - payload['privacyPolicyUrl'] = privacyPolicyUrl; + apiPayload['privacyPolicyUrl'] = privacyPolicyUrl; } if (typeof termsUrl !== 'undefined') { - payload['termsUrl'] = termsUrl; + apiPayload['termsUrl'] = termsUrl; } if (typeof contacts !== 'undefined') { - payload['contacts'] = contacts; + apiPayload['contacts'] = contacts; } if (typeof tagline !== 'undefined') { - payload['tagline'] = tagline; + apiPayload['tagline'] = tagline; } if (typeof tags !== 'undefined') { - payload['tags'] = tags; + apiPayload['tags'] = tags; } if (typeof images !== 'undefined') { - payload['images'] = images; + apiPayload['images'] = images; } if (typeof supportUrl !== 'undefined') { - payload['supportUrl'] = supportUrl; + apiPayload['supportUrl'] = supportUrl; } if (typeof dataDeletionUrl !== 'undefined') { - payload['dataDeletionUrl'] = dataDeletionUrl; + apiPayload['dataDeletionUrl'] = dataDeletionUrl; } if (typeof enabled !== 'undefined') { - payload['enabled'] = enabled; + apiPayload['enabled'] = enabled; } if (typeof redirectUris !== 'undefined') { - payload['redirectUris'] = redirectUris; + apiPayload['redirectUris'] = redirectUris; } if (typeof postLogoutRedirectUris !== 'undefined') { - payload['postLogoutRedirectUris'] = postLogoutRedirectUris; + apiPayload['postLogoutRedirectUris'] = postLogoutRedirectUris; } if (typeof type !== 'undefined') { - payload['type'] = type; + apiPayload['type'] = type; } if (typeof deviceFlow !== 'undefined') { - payload['deviceFlow'] = deviceFlow; + apiPayload['deviceFlow'] = deviceFlow; } if (typeof installationScopes !== 'undefined') { - payload['installationScopes'] = installationScopes; + apiPayload['installationScopes'] = installationScopes; } if (typeof installationRedirectUrl !== 'undefined') { - payload['installationRedirectUrl'] = installationRedirectUrl; + apiPayload['installationRedirectUrl'] = installationRedirectUrl; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -791,7 +791,7 @@ export class Apps { accept: 'application/json', }; - return this.client.call('put', uri, apiHeaders, payload); + return this.client.call('put', uri, apiHeaders, apiPayload); } /** @@ -835,7 +835,7 @@ export class Apps { '{appId}', encodeURIComponent(String(appId)), ); - const payload: Payload = {}; + const apiPayload: Payload = {}; const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { @@ -844,7 +844,7 @@ export class Apps { accept: 'application/json', }; - return this.client.call('delete', uri, apiHeaders, payload); + return this.client.call('delete', uri, apiHeaders, apiPayload); } /** @@ -912,12 +912,12 @@ export class Apps { '{appId}', encodeURIComponent(String(appId)), ); - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof queries !== 'undefined') { - payload['queries'] = queries; + apiPayload['queries'] = queries; } if (typeof total !== 'undefined') { - payload['total'] = total; + apiPayload['total'] = total; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -926,7 +926,7 @@ export class Apps { accept: 'application/json', }; - return this.client.call('get', uri, apiHeaders, payload); + return this.client.call('get', uri, apiHeaders, apiPayload); } /** @@ -993,7 +993,7 @@ export class Apps { '{installationId}', encodeURIComponent(String(installationId)), ); - const payload: Payload = {}; + const apiPayload: Payload = {}; const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { @@ -1001,7 +1001,7 @@ export class Apps { accept: 'application/json', }; - return this.client.call('get', uri, apiHeaders, payload); + return this.client.call('get', uri, apiHeaders, apiPayload); } /** @@ -1065,7 +1065,7 @@ export class Apps { '{installationId}', encodeURIComponent(String(installationId)), ); - const payload: Payload = {}; + const apiPayload: Payload = {}; const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { @@ -1074,7 +1074,7 @@ export class Apps { accept: 'application/json', }; - return this.client.call('delete', uri, apiHeaders, payload); + return this.client.call('delete', uri, apiHeaders, apiPayload); } /** @@ -1141,7 +1141,7 @@ export class Apps { '{installationId}', encodeURIComponent(String(installationId)), ); - const payload: Payload = {}; + const apiPayload: Payload = {}; const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { @@ -1150,7 +1150,7 @@ export class Apps { accept: 'application/json', }; - return this.client.call('post', uri, apiHeaders, payload); + return this.client.call('post', uri, apiHeaders, apiPayload); } /** @@ -1218,12 +1218,12 @@ export class Apps { '{appId}', encodeURIComponent(String(appId)), ); - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof queries !== 'undefined') { - payload['queries'] = queries; + apiPayload['queries'] = queries; } if (typeof total !== 'undefined') { - payload['total'] = total; + apiPayload['total'] = total; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -1232,7 +1232,7 @@ export class Apps { accept: 'application/json', }; - return this.client.call('get', uri, apiHeaders, payload); + return this.client.call('get', uri, apiHeaders, apiPayload); } /** @@ -1278,7 +1278,7 @@ export class Apps { '{appId}', encodeURIComponent(String(appId)), ); - const payload: Payload = {}; + const apiPayload: Payload = {}; const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { @@ -1287,7 +1287,7 @@ export class Apps { accept: 'application/json', }; - return this.client.call('post', uri, apiHeaders, payload); + return this.client.call('post', uri, apiHeaders, apiPayload); } /** @@ -1340,7 +1340,7 @@ export class Apps { const apiPath = '/apps/{appId}/keys/{keyId}' .replace('{appId}', encodeURIComponent(String(appId))) .replace('{keyId}', encodeURIComponent(String(keyId))); - const payload: Payload = {}; + const apiPayload: Payload = {}; const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { @@ -1348,7 +1348,7 @@ export class Apps { accept: 'application/json', }; - return this.client.call('get', uri, apiHeaders, payload); + return this.client.call('get', uri, apiHeaders, apiPayload); } /** @@ -1401,7 +1401,7 @@ export class Apps { const apiPath = '/apps/{appId}/keys/{keyId}' .replace('{appId}', encodeURIComponent(String(appId))) .replace('{keyId}', encodeURIComponent(String(keyId))); - const payload: Payload = {}; + const apiPayload: Payload = {}; const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { @@ -1410,7 +1410,7 @@ export class Apps { accept: 'application/json', }; - return this.client.call('delete', uri, apiHeaders, payload); + return this.client.call('delete', uri, apiHeaders, apiPayload); } /** @@ -1470,9 +1470,9 @@ export class Apps { '{appId}', encodeURIComponent(String(appId)), ); - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof labels !== 'undefined') { - payload['labels'] = labels; + apiPayload['labels'] = labels; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -1482,7 +1482,7 @@ export class Apps { accept: 'application/json', }; - return this.client.call('put', uri, apiHeaders, payload); + return this.client.call('put', uri, apiHeaders, apiPayload); } /** @@ -1550,12 +1550,12 @@ export class Apps { '{appId}', encodeURIComponent(String(appId)), ); - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof queries !== 'undefined') { - payload['queries'] = queries; + apiPayload['queries'] = queries; } if (typeof total !== 'undefined') { - payload['total'] = total; + apiPayload['total'] = total; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -1564,7 +1564,7 @@ export class Apps { accept: 'application/json', }; - return this.client.call('get', uri, apiHeaders, payload); + return this.client.call('get', uri, apiHeaders, apiPayload); } /** @@ -1610,7 +1610,7 @@ export class Apps { '{appId}', encodeURIComponent(String(appId)), ); - const payload: Payload = {}; + const apiPayload: Payload = {}; const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { @@ -1619,7 +1619,7 @@ export class Apps { accept: 'application/json', }; - return this.client.call('post', uri, apiHeaders, payload); + return this.client.call('post', uri, apiHeaders, apiPayload); } /** @@ -1680,7 +1680,7 @@ export class Apps { const apiPath = '/apps/{appId}/secrets/{secretId}' .replace('{appId}', encodeURIComponent(String(appId))) .replace('{secretId}', encodeURIComponent(String(secretId))); - const payload: Payload = {}; + const apiPayload: Payload = {}; const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { @@ -1688,7 +1688,7 @@ export class Apps { accept: 'application/json', }; - return this.client.call('get', uri, apiHeaders, payload); + return this.client.call('get', uri, apiHeaders, apiPayload); } /** @@ -1746,7 +1746,7 @@ export class Apps { const apiPath = '/apps/{appId}/secrets/{secretId}' .replace('{appId}', encodeURIComponent(String(appId))) .replace('{secretId}', encodeURIComponent(String(secretId))); - const payload: Payload = {}; + const apiPayload: Payload = {}; const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { @@ -1755,7 +1755,7 @@ export class Apps { accept: 'application/json', }; - return this.client.call('delete', uri, apiHeaders, payload); + return this.client.call('delete', uri, apiHeaders, apiPayload); } /** @@ -1809,9 +1809,9 @@ export class Apps { '{appId}', encodeURIComponent(String(appId)), ); - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof teamId !== 'undefined') { - payload['teamId'] = teamId; + apiPayload['teamId'] = teamId; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -1821,7 +1821,7 @@ export class Apps { accept: 'application/json', }; - return this.client.call('patch', uri, apiHeaders, payload); + return this.client.call('patch', uri, apiHeaders, apiPayload); } /** @@ -1865,7 +1865,7 @@ export class Apps { '{appId}', encodeURIComponent(String(appId)), ); - const payload: Payload = {}; + const apiPayload: Payload = {}; const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { @@ -1874,6 +1874,6 @@ export class Apps { accept: 'application/json', }; - return this.client.call('delete', uri, apiHeaders, payload); + return this.client.call('delete', uri, apiHeaders, apiPayload); } } diff --git a/src/services/assistant.ts b/src/services/assistant.ts index cae5471b..a8846bde 100644 --- a/src/services/assistant.ts +++ b/src/services/assistant.ts @@ -12,19 +12,19 @@ export class Assistant { * * @param {string} params.prompt - Prompt. A string containing questions asked to the AI assistant. * @throws {AppwriteException} - * @returns {Promise<{}>} + * @returns {Promise} */ - chat(params: { prompt: string }): Promise<{}>; + chat(params: { prompt: string }): Promise; /** * Send a prompt to the AI assistant and receive a response. This endpoint allows you to interact with Appwrite's AI assistant by sending questions or prompts and receiving helpful responses in real-time through a server-sent events stream. * * @param {string} prompt - Prompt. A string containing questions asked to the AI assistant. * @throws {AppwriteException} - * @returns {Promise<{}>} + * @returns {Promise} * @deprecated Use the object parameter style method for a better developer experience. */ - chat(prompt: string): Promise<{}>; - chat(paramsOrFirst: { prompt: string } | string): Promise<{}> { + chat(prompt: string): Promise; + chat(paramsOrFirst: { prompt: string } | string): Promise { let params: { prompt: string }; if ( @@ -45,9 +45,9 @@ export class Assistant { throw new AppwriteException('Missing required parameter: "prompt"'); } const apiPath = '/console/assistant'; - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof prompt !== 'undefined') { - payload['prompt'] = prompt; + apiPayload['prompt'] = prompt; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -57,6 +57,6 @@ export class Assistant { accept: 'text/plain', }; - return this.client.call('post', uri, apiHeaders, payload); + return this.client.call('post', uri, apiHeaders, apiPayload, 'text'); } } diff --git a/src/services/avatars.ts b/src/services/avatars.ts index 84c42d3c..60679320 100644 --- a/src/services/avatars.ts +++ b/src/services/avatars.ts @@ -106,22 +106,24 @@ export class Avatars { '{code}', encodeURIComponent(String(code)), ); - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof width !== 'undefined') { - payload['width'] = width; + apiPayload['width'] = width; } if (typeof height !== 'undefined') { - payload['height'] = height; + apiPayload['height'] = height; } if (typeof quality !== 'undefined') { - payload['quality'] = quality; + apiPayload['quality'] = quality; } const uri = new URL(this.client.config.endpoint + apiPath); - payload['project'] = this.client.config.project; - payload['impersonateuserid'] = this.client.config.impersonateuserid; + apiPayload['project'] = this.client.config.project; + apiPayload['impersonateuserid'] = this.client.config.impersonateuserid; - for (const [key, value] of Object.entries(Service.flatten(payload))) { + for (const [key, value] of Object.entries( + Service.flatten(apiPayload), + )) { uri.searchParams.append(key, value); } @@ -221,22 +223,24 @@ export class Avatars { '{code}', encodeURIComponent(String(code)), ); - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof width !== 'undefined') { - payload['width'] = width; + apiPayload['width'] = width; } if (typeof height !== 'undefined') { - payload['height'] = height; + apiPayload['height'] = height; } if (typeof quality !== 'undefined') { - payload['quality'] = quality; + apiPayload['quality'] = quality; } const uri = new URL(this.client.config.endpoint + apiPath); - payload['project'] = this.client.config.project; - payload['impersonateuserid'] = this.client.config.impersonateuserid; + apiPayload['project'] = this.client.config.project; + apiPayload['impersonateuserid'] = this.client.config.impersonateuserid; - for (const [key, value] of Object.entries(Service.flatten(payload))) { + for (const [key, value] of Object.entries( + Service.flatten(apiPayload), + )) { uri.searchParams.append(key, value); } @@ -285,16 +289,18 @@ export class Avatars { throw new AppwriteException('Missing required parameter: "url"'); } const apiPath = '/avatars/favicon'; - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof url !== 'undefined') { - payload['url'] = url; + apiPayload['url'] = url; } const uri = new URL(this.client.config.endpoint + apiPath); - payload['project'] = this.client.config.project; - payload['impersonateuserid'] = this.client.config.impersonateuserid; + apiPayload['project'] = this.client.config.project; + apiPayload['impersonateuserid'] = this.client.config.impersonateuserid; - for (const [key, value] of Object.entries(Service.flatten(payload))) { + for (const [key, value] of Object.entries( + Service.flatten(apiPayload), + )) { uri.searchParams.append(key, value); } @@ -389,22 +395,24 @@ export class Avatars { '{code}', encodeURIComponent(String(code)), ); - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof width !== 'undefined') { - payload['width'] = width; + apiPayload['width'] = width; } if (typeof height !== 'undefined') { - payload['height'] = height; + apiPayload['height'] = height; } if (typeof quality !== 'undefined') { - payload['quality'] = quality; + apiPayload['quality'] = quality; } const uri = new URL(this.client.config.endpoint + apiPath); - payload['project'] = this.client.config.project; - payload['impersonateuserid'] = this.client.config.impersonateuserid; + apiPayload['project'] = this.client.config.project; + apiPayload['impersonateuserid'] = this.client.config.impersonateuserid; - for (const [key, value] of Object.entries(Service.flatten(payload))) { + for (const [key, value] of Object.entries( + Service.flatten(apiPayload), + )) { uri.searchParams.append(key, value); } @@ -473,22 +481,24 @@ export class Avatars { throw new AppwriteException('Missing required parameter: "url"'); } const apiPath = '/avatars/image'; - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof url !== 'undefined') { - payload['url'] = url; + apiPayload['url'] = url; } if (typeof width !== 'undefined') { - payload['width'] = width; + apiPayload['width'] = width; } if (typeof height !== 'undefined') { - payload['height'] = height; + apiPayload['height'] = height; } const uri = new URL(this.client.config.endpoint + apiPath); - payload['project'] = this.client.config.project; - payload['impersonateuserid'] = this.client.config.impersonateuserid; + apiPayload['project'] = this.client.config.project; + apiPayload['impersonateuserid'] = this.client.config.impersonateuserid; - for (const [key, value] of Object.entries(Service.flatten(payload))) { + for (const [key, value] of Object.entries( + Service.flatten(apiPayload), + )) { uri.searchParams.append(key, value); } @@ -583,25 +593,27 @@ export class Avatars { const background = params.background; const apiPath = '/avatars/initials'; - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof name !== 'undefined') { - payload['name'] = name; + apiPayload['name'] = name; } if (typeof width !== 'undefined') { - payload['width'] = width; + apiPayload['width'] = width; } if (typeof height !== 'undefined') { - payload['height'] = height; + apiPayload['height'] = height; } if (typeof background !== 'undefined') { - payload['background'] = background; + apiPayload['background'] = background; } const uri = new URL(this.client.config.endpoint + apiPath); - payload['project'] = this.client.config.project; - payload['impersonateuserid'] = this.client.config.impersonateuserid; + apiPayload['project'] = this.client.config.project; + apiPayload['impersonateuserid'] = this.client.config.impersonateuserid; - for (const [key, value] of Object.entries(Service.flatten(payload))) { + for (const [key, value] of Object.entries( + Service.flatten(apiPayload), + )) { uri.searchParams.append(key, value); } @@ -726,37 +738,39 @@ export class Avatars { const name = params.name; const apiPath = '/avatars/photo'; - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof width !== 'undefined') { - payload['width'] = width; + apiPayload['width'] = width; } if (typeof height !== 'undefined') { - payload['height'] = height; + apiPayload['height'] = height; } if (typeof quality !== 'undefined') { - payload['quality'] = quality; + apiPayload['quality'] = quality; } if (typeof output !== 'undefined') { - payload['output'] = output; + apiPayload['output'] = output; } if (typeof rating !== 'undefined') { - payload['rating'] = rating; + apiPayload['rating'] = rating; } if (typeof userId !== 'undefined') { - payload['userId'] = userId; + apiPayload['userId'] = userId; } if (typeof emailHash !== 'undefined') { - payload['emailHash'] = emailHash; + apiPayload['emailHash'] = emailHash; } if (typeof name !== 'undefined') { - payload['name'] = name; + apiPayload['name'] = name; } const uri = new URL(this.client.config.endpoint + apiPath); - payload['project'] = this.client.config.project; - payload['impersonateuserid'] = this.client.config.impersonateuserid; + apiPayload['project'] = this.client.config.project; + apiPayload['impersonateuserid'] = this.client.config.impersonateuserid; - for (const [key, value] of Object.entries(Service.flatten(payload))) { + for (const [key, value] of Object.entries( + Service.flatten(apiPayload), + )) { uri.searchParams.append(key, value); } @@ -845,25 +859,27 @@ export class Avatars { throw new AppwriteException('Missing required parameter: "text"'); } const apiPath = '/avatars/qr'; - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof text !== 'undefined') { - payload['text'] = text; + apiPayload['text'] = text; } if (typeof size !== 'undefined') { - payload['size'] = size; + apiPayload['size'] = size; } if (typeof margin !== 'undefined') { - payload['margin'] = margin; + apiPayload['margin'] = margin; } if (typeof download !== 'undefined') { - payload['download'] = download; + apiPayload['download'] = download; } const uri = new URL(this.client.config.endpoint + apiPath); - payload['project'] = this.client.config.project; - payload['impersonateuserid'] = this.client.config.impersonateuserid; + apiPayload['project'] = this.client.config.project; + apiPayload['impersonateuserid'] = this.client.config.impersonateuserid; - for (const [key, value] of Object.entries(Service.flatten(payload))) { + for (const [key, value] of Object.entries( + Service.flatten(apiPayload), + )) { uri.searchParams.append(key, value); } @@ -1122,73 +1138,75 @@ export class Avatars { throw new AppwriteException('Missing required parameter: "url"'); } const apiPath = '/avatars/screenshots'; - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof url !== 'undefined') { - payload['url'] = url; + apiPayload['url'] = url; } if (typeof headers !== 'undefined') { - payload['headers'] = headers; + apiPayload['headers'] = headers; } if (typeof viewportWidth !== 'undefined') { - payload['viewportWidth'] = viewportWidth; + apiPayload['viewportWidth'] = viewportWidth; } if (typeof viewportHeight !== 'undefined') { - payload['viewportHeight'] = viewportHeight; + apiPayload['viewportHeight'] = viewportHeight; } if (typeof scale !== 'undefined') { - payload['scale'] = scale; + apiPayload['scale'] = scale; } if (typeof theme !== 'undefined') { - payload['theme'] = theme; + apiPayload['theme'] = theme; } if (typeof userAgent !== 'undefined') { - payload['userAgent'] = userAgent; + apiPayload['userAgent'] = userAgent; } if (typeof fullpage !== 'undefined') { - payload['fullpage'] = fullpage; + apiPayload['fullpage'] = fullpage; } if (typeof locale !== 'undefined') { - payload['locale'] = locale; + apiPayload['locale'] = locale; } if (typeof timezone !== 'undefined') { - payload['timezone'] = timezone; + apiPayload['timezone'] = timezone; } if (typeof latitude !== 'undefined') { - payload['latitude'] = latitude; + apiPayload['latitude'] = latitude; } if (typeof longitude !== 'undefined') { - payload['longitude'] = longitude; + apiPayload['longitude'] = longitude; } if (typeof accuracy !== 'undefined') { - payload['accuracy'] = accuracy; + apiPayload['accuracy'] = accuracy; } if (typeof touch !== 'undefined') { - payload['touch'] = touch; + apiPayload['touch'] = touch; } if (typeof permissions !== 'undefined') { - payload['permissions'] = permissions; + apiPayload['permissions'] = permissions; } if (typeof sleep !== 'undefined') { - payload['sleep'] = sleep; + apiPayload['sleep'] = sleep; } if (typeof width !== 'undefined') { - payload['width'] = width; + apiPayload['width'] = width; } if (typeof height !== 'undefined') { - payload['height'] = height; + apiPayload['height'] = height; } if (typeof quality !== 'undefined') { - payload['quality'] = quality; + apiPayload['quality'] = quality; } if (typeof output !== 'undefined') { - payload['output'] = output; + apiPayload['output'] = output; } const uri = new URL(this.client.config.endpoint + apiPath); - payload['project'] = this.client.config.project; - payload['impersonateuserid'] = this.client.config.impersonateuserid; + apiPayload['project'] = this.client.config.project; + apiPayload['impersonateuserid'] = this.client.config.impersonateuserid; - for (const [key, value] of Object.entries(Service.flatten(payload))) { + for (const [key, value] of Object.entries( + Service.flatten(apiPayload), + )) { uri.searchParams.append(key, value); } diff --git a/src/services/backups.ts b/src/services/backups.ts index cb904cfa..2a599486 100644 --- a/src/services/backups.ts +++ b/src/services/backups.ts @@ -49,9 +49,9 @@ export class Backups { const queries = params.queries; const apiPath = '/backups/archives'; - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof queries !== 'undefined') { - payload['queries'] = queries; + apiPayload['queries'] = queries; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -60,7 +60,7 @@ export class Backups { accept: 'application/json', }; - return this.client.call('get', uri, apiHeaders, payload); + return this.client.call('get', uri, apiHeaders, apiPayload); } /** @@ -122,12 +122,12 @@ export class Backups { ); } const apiPath = '/backups/archives'; - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof services !== 'undefined') { - payload['services'] = services; + apiPayload['services'] = services; } if (typeof resourceId !== 'undefined') { - payload['resourceId'] = resourceId; + apiPayload['resourceId'] = resourceId; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -137,7 +137,7 @@ export class Backups { accept: 'application/json', }; - return this.client.call('post', uri, apiHeaders, payload); + return this.client.call('post', uri, apiHeaders, apiPayload); } /** @@ -185,7 +185,7 @@ export class Backups { '{archiveId}', encodeURIComponent(String(archiveId)), ); - const payload: Payload = {}; + const apiPayload: Payload = {}; const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { @@ -193,7 +193,7 @@ export class Backups { accept: 'application/json', }; - return this.client.call('get', uri, apiHeaders, payload); + return this.client.call('get', uri, apiHeaders, apiPayload); } /** @@ -239,7 +239,7 @@ export class Backups { '{archiveId}', encodeURIComponent(String(archiveId)), ); - const payload: Payload = {}; + const apiPayload: Payload = {}; const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { @@ -248,7 +248,7 @@ export class Backups { accept: 'application/json', }; - return this.client.call('delete', uri, apiHeaders, payload); + return this.client.call('delete', uri, apiHeaders, apiPayload); } /** @@ -291,9 +291,9 @@ export class Backups { const queries = params.queries; const apiPath = '/backups/policies'; - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof queries !== 'undefined') { - payload['queries'] = queries; + apiPayload['queries'] = queries; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -302,7 +302,7 @@ export class Backups { accept: 'application/json', }; - return this.client.call('get', uri, apiHeaders, payload); + return this.client.call('get', uri, apiHeaders, apiPayload); } /** @@ -436,27 +436,27 @@ export class Backups { ); } const apiPath = '/backups/policies'; - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof policyId !== 'undefined') { - payload['policyId'] = policyId; + apiPayload['policyId'] = policyId; } if (typeof name !== 'undefined') { - payload['name'] = name; + apiPayload['name'] = name; } if (typeof services !== 'undefined') { - payload['services'] = services; + apiPayload['services'] = services; } if (typeof resourceId !== 'undefined') { - payload['resourceId'] = resourceId; + apiPayload['resourceId'] = resourceId; } if (typeof enabled !== 'undefined') { - payload['enabled'] = enabled; + apiPayload['enabled'] = enabled; } if (typeof retention !== 'undefined') { - payload['retention'] = retention; + apiPayload['retention'] = retention; } if (typeof schedule !== 'undefined') { - payload['schedule'] = schedule; + apiPayload['schedule'] = schedule; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -466,7 +466,7 @@ export class Backups { accept: 'application/json', }; - return this.client.call('post', uri, apiHeaders, payload); + return this.client.call('post', uri, apiHeaders, apiPayload); } /** @@ -514,7 +514,7 @@ export class Backups { '{policyId}', encodeURIComponent(String(policyId)), ); - const payload: Payload = {}; + const apiPayload: Payload = {}; const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { @@ -522,7 +522,7 @@ export class Backups { accept: 'application/json', }; - return this.client.call('get', uri, apiHeaders, payload); + return this.client.call('get', uri, apiHeaders, apiPayload); } /** @@ -619,18 +619,18 @@ export class Backups { '{policyId}', encodeURIComponent(String(policyId)), ); - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof name !== 'undefined') { - payload['name'] = name; + apiPayload['name'] = name; } if (typeof retention !== 'undefined') { - payload['retention'] = retention; + apiPayload['retention'] = retention; } if (typeof schedule !== 'undefined') { - payload['schedule'] = schedule; + apiPayload['schedule'] = schedule; } if (typeof enabled !== 'undefined') { - payload['enabled'] = enabled; + apiPayload['enabled'] = enabled; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -640,7 +640,7 @@ export class Backups { accept: 'application/json', }; - return this.client.call('patch', uri, apiHeaders, payload); + return this.client.call('patch', uri, apiHeaders, apiPayload); } /** @@ -686,7 +686,7 @@ export class Backups { '{policyId}', encodeURIComponent(String(policyId)), ); - const payload: Payload = {}; + const apiPayload: Payload = {}; const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { @@ -695,7 +695,7 @@ export class Backups { accept: 'application/json', }; - return this.client.call('delete', uri, apiHeaders, payload); + return this.client.call('delete', uri, apiHeaders, apiPayload); } /** @@ -803,18 +803,18 @@ export class Backups { ); } const apiPath = '/backups/restoration'; - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof archiveId !== 'undefined') { - payload['archiveId'] = archiveId; + apiPayload['archiveId'] = archiveId; } if (typeof services !== 'undefined') { - payload['services'] = services; + apiPayload['services'] = services; } if (typeof newResourceId !== 'undefined') { - payload['newResourceId'] = newResourceId; + apiPayload['newResourceId'] = newResourceId; } if (typeof newResourceName !== 'undefined') { - payload['newResourceName'] = newResourceName; + apiPayload['newResourceName'] = newResourceName; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -824,7 +824,7 @@ export class Backups { accept: 'application/json', }; - return this.client.call('post', uri, apiHeaders, payload); + return this.client.call('post', uri, apiHeaders, apiPayload); } /** @@ -867,9 +867,9 @@ export class Backups { const queries = params.queries; const apiPath = '/backups/restorations'; - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof queries !== 'undefined') { - payload['queries'] = queries; + apiPayload['queries'] = queries; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -878,7 +878,7 @@ export class Backups { accept: 'application/json', }; - return this.client.call('get', uri, apiHeaders, payload); + return this.client.call('get', uri, apiHeaders, apiPayload); } /** @@ -928,7 +928,7 @@ export class Backups { '{restorationId}', encodeURIComponent(String(restorationId)), ); - const payload: Payload = {}; + const apiPayload: Payload = {}; const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { @@ -936,6 +936,6 @@ export class Backups { accept: 'application/json', }; - return this.client.call('get', uri, apiHeaders, payload); + return this.client.call('get', uri, apiHeaders, apiPayload); } } diff --git a/src/services/console.ts b/src/services/console.ts index 29b5cc66..6da29237 100644 --- a/src/services/console.ts +++ b/src/services/console.ts @@ -58,7 +58,7 @@ export class Console { '{campaignId}', encodeURIComponent(String(campaignId)), ); - const payload: Payload = {}; + const apiPayload: Payload = {}; const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { @@ -66,7 +66,7 @@ export class Console { accept: 'application/json', }; - return this.client.call('get', uri, apiHeaders, payload); + return this.client.call('get', uri, apiHeaders, apiPayload); } /** @@ -114,7 +114,7 @@ export class Console { '{couponId}', encodeURIComponent(String(couponId)), ); - const payload: Payload = {}; + const apiPayload: Payload = {}; const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { @@ -122,7 +122,7 @@ export class Console { accept: 'application/json', }; - return this.client.call('get', uri, apiHeaders, payload); + return this.client.call('get', uri, apiHeaders, apiPayload); } /** @@ -187,15 +187,15 @@ export class Console { const total = params.total; const apiPath = '/console/databases'; - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof queries !== 'undefined') { - payload['queries'] = queries; + apiPayload['queries'] = queries; } if (typeof search !== 'undefined') { - payload['search'] = search; + apiPayload['search'] = search; } if (typeof total !== 'undefined') { - payload['total'] = total; + apiPayload['total'] = total; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -204,7 +204,7 @@ export class Console { accept: 'application/json', }; - return this.client.call('get', uri, apiHeaders, payload); + return this.client.call('get', uri, apiHeaders, apiPayload); } /** @@ -215,7 +215,7 @@ export class Console { */ listOAuth2Providers(): Promise { const apiPath = '/console/oauth2-providers'; - const payload: Payload = {}; + const apiPayload: Payload = {}; const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { @@ -223,7 +223,7 @@ export class Console { accept: 'application/json', }; - return this.client.call('get', uri, apiHeaders, payload); + return this.client.call('get', uri, apiHeaders, apiPayload); } /** @@ -265,9 +265,9 @@ export class Console { const platform = params.platform; const apiPath = '/console/plans'; - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof platform !== 'undefined') { - payload['platform'] = platform; + apiPayload['platform'] = platform; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -276,7 +276,7 @@ export class Console { accept: 'application/json', }; - return this.client.call('get', uri, apiHeaders, payload); + return this.client.call('get', uri, apiHeaders, apiPayload); } /** @@ -322,7 +322,7 @@ export class Console { '{planId}', encodeURIComponent(String(planId)), ); - const payload: Payload = {}; + const apiPayload: Payload = {}; const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { @@ -330,7 +330,7 @@ export class Console { accept: 'application/json', }; - return this.client.call('get', uri, apiHeaders, payload); + return this.client.call('get', uri, apiHeaders, apiPayload); } /** @@ -342,7 +342,7 @@ export class Console { */ listPostgresExtensions(): Promise { const apiPath = '/console/postgres-extensions'; - const payload: Payload = {}; + const apiPayload: Payload = {}; const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { @@ -350,7 +350,7 @@ export class Console { accept: 'application/json', }; - return this.client.call('get', uri, apiHeaders, payload); + return this.client.call('get', uri, apiHeaders, apiPayload); } /** @@ -398,7 +398,7 @@ export class Console { '{programId}', encodeURIComponent(String(programId)), ); - const payload: Payload = {}; + const apiPayload: Payload = {}; const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { @@ -406,7 +406,7 @@ export class Console { accept: 'application/json', }; - return this.client.call('get', uri, apiHeaders, payload); + return this.client.call('get', uri, apiHeaders, apiPayload); } /** @@ -460,7 +460,7 @@ export class Console { '{programId}', encodeURIComponent(String(programId)), ); - const payload: Payload = {}; + const apiPayload: Payload = {}; const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { @@ -469,7 +469,7 @@ export class Console { accept: 'application/json', }; - return this.client.call('post', uri, apiHeaders, payload); + return this.client.call('post', uri, apiHeaders, apiPayload); } /** @@ -480,7 +480,7 @@ export class Console { */ listRegions(): Promise { const apiPath = '/console/regions'; - const payload: Payload = {}; + const apiPayload: Payload = {}; const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { @@ -488,7 +488,7 @@ export class Console { accept: 'application/json', }; - return this.client.call('get', uri, apiHeaders, payload); + return this.client.call('get', uri, apiHeaders, apiPayload); } /** @@ -545,12 +545,12 @@ export class Console { throw new AppwriteException('Missing required parameter: "type"'); } const apiPath = '/console/resources'; - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof value !== 'undefined') { - payload['value'] = value; + apiPayload['value'] = value; } if (typeof type !== 'undefined') { - payload['type'] = type; + apiPayload['type'] = type; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -559,7 +559,7 @@ export class Console { accept: 'application/json', }; - return this.client.call('get', uri, apiHeaders, payload); + return this.client.call('get', uri, apiHeaders, apiPayload); } /** @@ -570,7 +570,7 @@ export class Console { */ listOrganizationScopes(): Promise { const apiPath = '/console/scopes/organization'; - const payload: Payload = {}; + const apiPayload: Payload = {}; const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { @@ -578,7 +578,7 @@ export class Console { accept: 'application/json', }; - return this.client.call('get', uri, apiHeaders, payload); + return this.client.call('get', uri, apiHeaders, apiPayload); } /** @@ -589,7 +589,7 @@ export class Console { */ listProjectScopes(): Promise { const apiPath = '/console/scopes/project'; - const payload: Payload = {}; + const apiPayload: Payload = {}; const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { @@ -597,7 +597,7 @@ export class Console { accept: 'application/json', }; - return this.client.call('get', uri, apiHeaders, payload); + return this.client.call('get', uri, apiHeaders, apiPayload); } /** @@ -687,21 +687,21 @@ export class Console { const utmMedium = params.utmMedium; const apiPath = '/console/sources'; - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof ref !== 'undefined') { - payload['ref'] = ref; + apiPayload['ref'] = ref; } if (typeof referrer !== 'undefined') { - payload['referrer'] = referrer; + apiPayload['referrer'] = referrer; } if (typeof utmSource !== 'undefined') { - payload['utmSource'] = utmSource; + apiPayload['utmSource'] = utmSource; } if (typeof utmCampaign !== 'undefined') { - payload['utmCampaign'] = utmCampaign; + apiPayload['utmCampaign'] = utmCampaign; } if (typeof utmMedium !== 'undefined') { - payload['utmMedium'] = utmMedium; + apiPayload['utmMedium'] = utmMedium; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -711,7 +711,7 @@ export class Console { accept: 'application/json', }; - return this.client.call('post', uri, apiHeaders, payload); + return this.client.call('post', uri, apiHeaders, apiPayload); } /** @@ -810,21 +810,21 @@ export class Console { ); } const apiPath = '/console/suggestions/columns'; - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof databaseId !== 'undefined') { - payload['databaseId'] = databaseId; + apiPayload['databaseId'] = databaseId; } if (typeof tableId !== 'undefined') { - payload['tableId'] = tableId; + apiPayload['tableId'] = tableId; } if (typeof context !== 'undefined') { - payload['context'] = context; + apiPayload['context'] = context; } if (typeof min !== 'undefined') { - payload['min'] = min; + apiPayload['min'] = min; } if (typeof max !== 'undefined') { - payload['max'] = max; + apiPayload['max'] = max; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -833,7 +833,7 @@ export class Console { accept: 'application/json', }; - return this.client.call('get', uri, apiHeaders, payload); + return this.client.call('get', uri, apiHeaders, apiPayload); } /** @@ -923,18 +923,18 @@ export class Console { ); } const apiPath = '/console/suggestions/indexes'; - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof databaseId !== 'undefined') { - payload['databaseId'] = databaseId; + apiPayload['databaseId'] = databaseId; } if (typeof tableId !== 'undefined') { - payload['tableId'] = tableId; + apiPayload['tableId'] = tableId; } if (typeof min !== 'undefined') { - payload['min'] = min; + apiPayload['min'] = min; } if (typeof max !== 'undefined') { - payload['max'] = max; + apiPayload['max'] = max; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -943,7 +943,7 @@ export class Console { accept: 'application/json', }; - return this.client.call('get', uri, apiHeaders, payload); + return this.client.call('get', uri, apiHeaders, apiPayload); } /** @@ -1037,18 +1037,18 @@ export class Console { throw new AppwriteException('Missing required parameter: "input"'); } const apiPath = '/console/suggestions/queries'; - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof resource !== 'undefined') { - payload['resource'] = resource; + apiPayload['resource'] = resource; } if (typeof input !== 'undefined') { - payload['input'] = input; + apiPayload['input'] = input; } if (typeof databaseId !== 'undefined') { - payload['databaseId'] = databaseId; + apiPayload['databaseId'] = databaseId; } if (typeof tableId !== 'undefined') { - payload['tableId'] = tableId; + apiPayload['tableId'] = tableId; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -1057,7 +1057,7 @@ export class Console { accept: 'application/json', }; - return this.client.call('get', uri, apiHeaders, payload); + return this.client.call('get', uri, apiHeaders, apiPayload); } /** @@ -1128,9 +1128,9 @@ export class Console { '{templateId}', encodeURIComponent(String(templateId)), ); - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof locale !== 'undefined') { - payload['locale'] = locale; + apiPayload['locale'] = locale; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -1139,7 +1139,7 @@ export class Console { accept: 'application/json', }; - return this.client.call('get', uri, apiHeaders, payload); + return this.client.call('get', uri, apiHeaders, apiPayload); } /** @@ -1150,7 +1150,7 @@ export class Console { */ variables(): Promise { const apiPath = '/console/variables'; - const payload: Payload = {}; + const apiPayload: Payload = {}; const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { @@ -1158,6 +1158,6 @@ export class Console { accept: 'application/json', }; - return this.client.call('get', uri, apiHeaders, payload); + return this.client.call('get', uri, apiHeaders, apiPayload); } } diff --git a/src/services/databases.ts b/src/services/databases.ts index 0d998723..59f64676 100644 --- a/src/services/databases.ts +++ b/src/services/databases.ts @@ -73,15 +73,15 @@ export class Databases { const total = params.total; const apiPath = '/databases'; - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof queries !== 'undefined') { - payload['queries'] = queries; + apiPayload['queries'] = queries; } if (typeof search !== 'undefined') { - payload['search'] = search; + apiPayload['search'] = search; } if (typeof total !== 'undefined') { - payload['total'] = total; + apiPayload['total'] = total; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -90,7 +90,7 @@ export class Databases { accept: 'application/json', }; - return this.client.call('get', uri, apiHeaders, payload); + return this.client.call('get', uri, apiHeaders, apiPayload); } /** @@ -163,15 +163,15 @@ export class Databases { throw new AppwriteException('Missing required parameter: "name"'); } const apiPath = '/databases'; - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof databaseId !== 'undefined') { - payload['databaseId'] = databaseId; + apiPayload['databaseId'] = databaseId; } if (typeof name !== 'undefined') { - payload['name'] = name; + apiPayload['name'] = name; } if (typeof enabled !== 'undefined') { - payload['enabled'] = enabled; + apiPayload['enabled'] = enabled; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -181,7 +181,7 @@ export class Databases { accept: 'application/json', }; - return this.client.call('post', uri, apiHeaders, payload); + return this.client.call('post', uri, apiHeaders, apiPayload); } /** @@ -225,9 +225,9 @@ export class Databases { const queries = params.queries; const apiPath = '/databases/transactions'; - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof queries !== 'undefined') { - payload['queries'] = queries; + apiPayload['queries'] = queries; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -236,7 +236,7 @@ export class Databases { accept: 'application/json', }; - return this.client.call('get', uri, apiHeaders, payload); + return this.client.call('get', uri, apiHeaders, apiPayload); } /** @@ -278,9 +278,9 @@ export class Databases { const ttl = params.ttl; const apiPath = '/databases/transactions'; - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof ttl !== 'undefined') { - payload['ttl'] = ttl; + apiPayload['ttl'] = ttl; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -290,7 +290,7 @@ export class Databases { accept: 'application/json', }; - return this.client.call('post', uri, apiHeaders, payload); + return this.client.call('post', uri, apiHeaders, apiPayload); } /** @@ -341,7 +341,7 @@ export class Databases { '{transactionId}', encodeURIComponent(String(transactionId)), ); - const payload: Payload = {}; + const apiPayload: Payload = {}; const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { @@ -349,7 +349,7 @@ export class Databases { accept: 'application/json', }; - return this.client.call('get', uri, apiHeaders, payload); + return this.client.call('get', uri, apiHeaders, apiPayload); } /** @@ -425,12 +425,12 @@ export class Databases { '{transactionId}', encodeURIComponent(String(transactionId)), ); - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof commit !== 'undefined') { - payload['commit'] = commit; + apiPayload['commit'] = commit; } if (typeof rollback !== 'undefined') { - payload['rollback'] = rollback; + apiPayload['rollback'] = rollback; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -440,7 +440,7 @@ export class Databases { accept: 'application/json', }; - return this.client.call('patch', uri, apiHeaders, payload); + return this.client.call('patch', uri, apiHeaders, apiPayload); } /** @@ -489,7 +489,7 @@ export class Databases { '{transactionId}', encodeURIComponent(String(transactionId)), ); - const payload: Payload = {}; + const apiPayload: Payload = {}; const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { @@ -498,7 +498,7 @@ export class Databases { accept: 'application/json', }; - return this.client.call('delete', uri, apiHeaders, payload); + return this.client.call('delete', uri, apiHeaders, apiPayload); } /** @@ -563,9 +563,9 @@ export class Databases { '{transactionId}', encodeURIComponent(String(transactionId)), ); - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof operations !== 'undefined') { - payload['operations'] = operations; + apiPayload['operations'] = operations; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -575,7 +575,7 @@ export class Databases { accept: 'application/json', }; - return this.client.call('post', uri, apiHeaders, payload); + return this.client.call('post', uri, apiHeaders, apiPayload); } /** @@ -624,7 +624,7 @@ export class Databases { '{databaseId}', encodeURIComponent(String(databaseId)), ); - const payload: Payload = {}; + const apiPayload: Payload = {}; const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { @@ -632,7 +632,7 @@ export class Databases { accept: 'application/json', }; - return this.client.call('get', uri, apiHeaders, payload); + return this.client.call('get', uri, apiHeaders, apiPayload); } /** @@ -703,12 +703,12 @@ export class Databases { '{databaseId}', encodeURIComponent(String(databaseId)), ); - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof name !== 'undefined') { - payload['name'] = name; + apiPayload['name'] = name; } if (typeof enabled !== 'undefined') { - payload['enabled'] = enabled; + apiPayload['enabled'] = enabled; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -718,7 +718,7 @@ export class Databases { accept: 'application/json', }; - return this.client.call('put', uri, apiHeaders, payload); + return this.client.call('put', uri, apiHeaders, apiPayload); } /** @@ -765,7 +765,7 @@ export class Databases { '{databaseId}', encodeURIComponent(String(databaseId)), ); - const payload: Payload = {}; + const apiPayload: Payload = {}; const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { @@ -774,7 +774,7 @@ export class Databases { accept: 'application/json', }; - return this.client.call('delete', uri, apiHeaders, payload); + return this.client.call('delete', uri, apiHeaders, apiPayload); } /** @@ -863,15 +863,15 @@ export class Databases { '{databaseId}', encodeURIComponent(String(databaseId)), ); - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof queries !== 'undefined') { - payload['queries'] = queries; + apiPayload['queries'] = queries; } if (typeof search !== 'undefined') { - payload['search'] = search; + apiPayload['search'] = search; } if (typeof total !== 'undefined') { - payload['total'] = total; + apiPayload['total'] = total; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -880,7 +880,7 @@ export class Databases { accept: 'application/json', }; - return this.client.call('get', uri, apiHeaders, payload); + return this.client.call('get', uri, apiHeaders, apiPayload); } /** @@ -1021,27 +1021,27 @@ export class Databases { '{databaseId}', encodeURIComponent(String(databaseId)), ); - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof collectionId !== 'undefined') { - payload['collectionId'] = collectionId; + apiPayload['collectionId'] = collectionId; } if (typeof name !== 'undefined') { - payload['name'] = name; + apiPayload['name'] = name; } if (typeof permissions !== 'undefined') { - payload['permissions'] = permissions; + apiPayload['permissions'] = permissions; } if (typeof documentSecurity !== 'undefined') { - payload['documentSecurity'] = documentSecurity; + apiPayload['documentSecurity'] = documentSecurity; } if (typeof enabled !== 'undefined') { - payload['enabled'] = enabled; + apiPayload['enabled'] = enabled; } if (typeof attributes !== 'undefined') { - payload['attributes'] = attributes; + apiPayload['attributes'] = attributes; } if (typeof indexes !== 'undefined') { - payload['indexes'] = indexes; + apiPayload['indexes'] = indexes; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -1051,7 +1051,7 @@ export class Databases { accept: 'application/json', }; - return this.client.call('post', uri, apiHeaders, payload); + return this.client.call('post', uri, apiHeaders, apiPayload); } /** @@ -1121,7 +1121,7 @@ export class Databases { '{collectionId}', encodeURIComponent(String(collectionId)), ); - const payload: Payload = {}; + const apiPayload: Payload = {}; const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { @@ -1129,7 +1129,7 @@ export class Databases { accept: 'application/json', }; - return this.client.call('get', uri, apiHeaders, payload); + return this.client.call('get', uri, apiHeaders, apiPayload); } /** @@ -1252,21 +1252,21 @@ export class Databases { '{collectionId}', encodeURIComponent(String(collectionId)), ); - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof name !== 'undefined') { - payload['name'] = name; + apiPayload['name'] = name; } if (typeof permissions !== 'undefined') { - payload['permissions'] = permissions; + apiPayload['permissions'] = permissions; } if (typeof documentSecurity !== 'undefined') { - payload['documentSecurity'] = documentSecurity; + apiPayload['documentSecurity'] = documentSecurity; } if (typeof enabled !== 'undefined') { - payload['enabled'] = enabled; + apiPayload['enabled'] = enabled; } if (typeof purge !== 'undefined') { - payload['purge'] = purge; + apiPayload['purge'] = purge; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -1276,7 +1276,7 @@ export class Databases { accept: 'application/json', }; - return this.client.call('put', uri, apiHeaders, payload); + return this.client.call('put', uri, apiHeaders, apiPayload); } /** @@ -1343,7 +1343,7 @@ export class Databases { '{collectionId}', encodeURIComponent(String(collectionId)), ); - const payload: Payload = {}; + const apiPayload: Payload = {}; const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { @@ -1352,7 +1352,7 @@ export class Databases { accept: 'application/json', }; - return this.client.call('delete', uri, apiHeaders, payload); + return this.client.call('delete', uri, apiHeaders, apiPayload); } /** @@ -1449,12 +1449,12 @@ export class Databases { '{collectionId}', encodeURIComponent(String(collectionId)), ); - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof queries !== 'undefined') { - payload['queries'] = queries; + apiPayload['queries'] = queries; } if (typeof total !== 'undefined') { - payload['total'] = total; + apiPayload['total'] = total; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -1463,7 +1463,7 @@ export class Databases { accept: 'application/json', }; - return this.client.call('get', uri, apiHeaders, payload); + return this.client.call('get', uri, apiHeaders, apiPayload); } /** @@ -1614,24 +1614,24 @@ export class Databases { '{collectionId}', encodeURIComponent(String(collectionId)), ); - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof key !== 'undefined') { - payload['key'] = key; + apiPayload['key'] = key; } if (typeof required !== 'undefined') { - payload['required'] = required; + apiPayload['required'] = required; } if (typeof min !== 'undefined') { - payload['min'] = min; + apiPayload['min'] = min; } if (typeof max !== 'undefined') { - payload['max'] = max; + apiPayload['max'] = max; } if (typeof xdefault !== 'undefined') { - payload['default'] = xdefault; + apiPayload['default'] = xdefault; } if (typeof array !== 'undefined') { - payload['array'] = array; + apiPayload['array'] = array; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -1641,7 +1641,7 @@ export class Databases { accept: 'application/json', }; - return this.client.call('post', uri, apiHeaders, payload); + return this.client.call('post', uri, apiHeaders, apiPayload); } /** @@ -1798,21 +1798,21 @@ export class Databases { encodeURIComponent(String(collectionId)), ) .replace('{key}', encodeURIComponent(String(key))); - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof required !== 'undefined') { - payload['required'] = required; + apiPayload['required'] = required; } if (typeof min !== 'undefined') { - payload['min'] = min; + apiPayload['min'] = min; } if (typeof max !== 'undefined') { - payload['max'] = max; + apiPayload['max'] = max; } if (typeof xdefault !== 'undefined') { - payload['default'] = xdefault; + apiPayload['default'] = xdefault; } if (typeof newKey !== 'undefined') { - payload['newKey'] = newKey; + apiPayload['newKey'] = newKey; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -1822,7 +1822,7 @@ export class Databases { accept: 'application/json', }; - return this.client.call('patch', uri, apiHeaders, payload); + return this.client.call('patch', uri, apiHeaders, apiPayload); } /** @@ -1947,18 +1947,18 @@ export class Databases { '{collectionId}', encodeURIComponent(String(collectionId)), ); - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof key !== 'undefined') { - payload['key'] = key; + apiPayload['key'] = key; } if (typeof required !== 'undefined') { - payload['required'] = required; + apiPayload['required'] = required; } if (typeof xdefault !== 'undefined') { - payload['default'] = xdefault; + apiPayload['default'] = xdefault; } if (typeof array !== 'undefined') { - payload['array'] = array; + apiPayload['array'] = array; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -1968,7 +1968,7 @@ export class Databases { accept: 'application/json', }; - return this.client.call('post', uri, apiHeaders, payload); + return this.client.call('post', uri, apiHeaders, apiPayload); } /** @@ -2097,15 +2097,15 @@ export class Databases { encodeURIComponent(String(collectionId)), ) .replace('{key}', encodeURIComponent(String(key))); - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof required !== 'undefined') { - payload['required'] = required; + apiPayload['required'] = required; } if (typeof xdefault !== 'undefined') { - payload['default'] = xdefault; + apiPayload['default'] = xdefault; } if (typeof newKey !== 'undefined') { - payload['newKey'] = newKey; + apiPayload['newKey'] = newKey; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -2115,7 +2115,7 @@ export class Databases { accept: 'application/json', }; - return this.client.call('patch', uri, apiHeaders, payload); + return this.client.call('patch', uri, apiHeaders, apiPayload); } /** @@ -2238,18 +2238,18 @@ export class Databases { '{collectionId}', encodeURIComponent(String(collectionId)), ); - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof key !== 'undefined') { - payload['key'] = key; + apiPayload['key'] = key; } if (typeof required !== 'undefined') { - payload['required'] = required; + apiPayload['required'] = required; } if (typeof xdefault !== 'undefined') { - payload['default'] = xdefault; + apiPayload['default'] = xdefault; } if (typeof array !== 'undefined') { - payload['array'] = array; + apiPayload['array'] = array; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -2259,7 +2259,7 @@ export class Databases { accept: 'application/json', }; - return this.client.call('post', uri, apiHeaders, payload); + return this.client.call('post', uri, apiHeaders, apiPayload); } /** @@ -2388,15 +2388,15 @@ export class Databases { encodeURIComponent(String(collectionId)), ) .replace('{key}', encodeURIComponent(String(key))); - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof required !== 'undefined') { - payload['required'] = required; + apiPayload['required'] = required; } if (typeof xdefault !== 'undefined') { - payload['default'] = xdefault; + apiPayload['default'] = xdefault; } if (typeof newKey !== 'undefined') { - payload['newKey'] = newKey; + apiPayload['newKey'] = newKey; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -2406,7 +2406,7 @@ export class Databases { accept: 'application/json', }; - return this.client.call('patch', uri, apiHeaders, payload); + return this.client.call('patch', uri, apiHeaders, apiPayload); } /** @@ -2531,18 +2531,18 @@ export class Databases { '{collectionId}', encodeURIComponent(String(collectionId)), ); - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof key !== 'undefined') { - payload['key'] = key; + apiPayload['key'] = key; } if (typeof required !== 'undefined') { - payload['required'] = required; + apiPayload['required'] = required; } if (typeof xdefault !== 'undefined') { - payload['default'] = xdefault; + apiPayload['default'] = xdefault; } if (typeof array !== 'undefined') { - payload['array'] = array; + apiPayload['array'] = array; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -2552,7 +2552,7 @@ export class Databases { accept: 'application/json', }; - return this.client.call('post', uri, apiHeaders, payload); + return this.client.call('post', uri, apiHeaders, apiPayload); } /** @@ -2683,15 +2683,15 @@ export class Databases { encodeURIComponent(String(collectionId)), ) .replace('{key}', encodeURIComponent(String(key))); - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof required !== 'undefined') { - payload['required'] = required; + apiPayload['required'] = required; } if (typeof xdefault !== 'undefined') { - payload['default'] = xdefault; + apiPayload['default'] = xdefault; } if (typeof newKey !== 'undefined') { - payload['newKey'] = newKey; + apiPayload['newKey'] = newKey; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -2701,7 +2701,7 @@ export class Databases { accept: 'application/json', }; - return this.client.call('patch', uri, apiHeaders, payload); + return this.client.call('patch', uri, apiHeaders, apiPayload); } /** @@ -2840,21 +2840,21 @@ export class Databases { '{collectionId}', encodeURIComponent(String(collectionId)), ); - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof key !== 'undefined') { - payload['key'] = key; + apiPayload['key'] = key; } if (typeof elements !== 'undefined') { - payload['elements'] = elements; + apiPayload['elements'] = elements; } if (typeof required !== 'undefined') { - payload['required'] = required; + apiPayload['required'] = required; } if (typeof xdefault !== 'undefined') { - payload['default'] = xdefault; + apiPayload['default'] = xdefault; } if (typeof array !== 'undefined') { - payload['array'] = array; + apiPayload['array'] = array; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -2864,7 +2864,7 @@ export class Databases { accept: 'application/json', }; - return this.client.call('post', uri, apiHeaders, payload); + return this.client.call('post', uri, apiHeaders, apiPayload); } /** @@ -3009,18 +3009,18 @@ export class Databases { encodeURIComponent(String(collectionId)), ) .replace('{key}', encodeURIComponent(String(key))); - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof elements !== 'undefined') { - payload['elements'] = elements; + apiPayload['elements'] = elements; } if (typeof required !== 'undefined') { - payload['required'] = required; + apiPayload['required'] = required; } if (typeof xdefault !== 'undefined') { - payload['default'] = xdefault; + apiPayload['default'] = xdefault; } if (typeof newKey !== 'undefined') { - payload['newKey'] = newKey; + apiPayload['newKey'] = newKey; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -3030,7 +3030,7 @@ export class Databases { accept: 'application/json', }; - return this.client.call('patch', uri, apiHeaders, payload); + return this.client.call('patch', uri, apiHeaders, apiPayload); } /** @@ -3181,24 +3181,24 @@ export class Databases { '{collectionId}', encodeURIComponent(String(collectionId)), ); - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof key !== 'undefined') { - payload['key'] = key; + apiPayload['key'] = key; } if (typeof required !== 'undefined') { - payload['required'] = required; + apiPayload['required'] = required; } if (typeof min !== 'undefined') { - payload['min'] = min; + apiPayload['min'] = min; } if (typeof max !== 'undefined') { - payload['max'] = max; + apiPayload['max'] = max; } if (typeof xdefault !== 'undefined') { - payload['default'] = xdefault; + apiPayload['default'] = xdefault; } if (typeof array !== 'undefined') { - payload['array'] = array; + apiPayload['array'] = array; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -3208,7 +3208,7 @@ export class Databases { accept: 'application/json', }; - return this.client.call('post', uri, apiHeaders, payload); + return this.client.call('post', uri, apiHeaders, apiPayload); } /** @@ -3365,21 +3365,21 @@ export class Databases { encodeURIComponent(String(collectionId)), ) .replace('{key}', encodeURIComponent(String(key))); - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof required !== 'undefined') { - payload['required'] = required; + apiPayload['required'] = required; } if (typeof min !== 'undefined') { - payload['min'] = min; + apiPayload['min'] = min; } if (typeof max !== 'undefined') { - payload['max'] = max; + apiPayload['max'] = max; } if (typeof xdefault !== 'undefined') { - payload['default'] = xdefault; + apiPayload['default'] = xdefault; } if (typeof newKey !== 'undefined') { - payload['newKey'] = newKey; + apiPayload['newKey'] = newKey; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -3389,7 +3389,7 @@ export class Databases { accept: 'application/json', }; - return this.client.call('patch', uri, apiHeaders, payload); + return this.client.call('patch', uri, apiHeaders, apiPayload); } /** @@ -3540,24 +3540,24 @@ export class Databases { '{collectionId}', encodeURIComponent(String(collectionId)), ); - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof key !== 'undefined') { - payload['key'] = key; + apiPayload['key'] = key; } if (typeof required !== 'undefined') { - payload['required'] = required; + apiPayload['required'] = required; } if (typeof min !== 'undefined') { - payload['min'] = min; + apiPayload['min'] = min; } if (typeof max !== 'undefined') { - payload['max'] = max; + apiPayload['max'] = max; } if (typeof xdefault !== 'undefined') { - payload['default'] = xdefault; + apiPayload['default'] = xdefault; } if (typeof array !== 'undefined') { - payload['array'] = array; + apiPayload['array'] = array; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -3567,7 +3567,7 @@ export class Databases { accept: 'application/json', }; - return this.client.call('post', uri, apiHeaders, payload); + return this.client.call('post', uri, apiHeaders, apiPayload); } /** @@ -3724,21 +3724,21 @@ export class Databases { encodeURIComponent(String(collectionId)), ) .replace('{key}', encodeURIComponent(String(key))); - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof required !== 'undefined') { - payload['required'] = required; + apiPayload['required'] = required; } if (typeof min !== 'undefined') { - payload['min'] = min; + apiPayload['min'] = min; } if (typeof max !== 'undefined') { - payload['max'] = max; + apiPayload['max'] = max; } if (typeof xdefault !== 'undefined') { - payload['default'] = xdefault; + apiPayload['default'] = xdefault; } if (typeof newKey !== 'undefined') { - payload['newKey'] = newKey; + apiPayload['newKey'] = newKey; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -3748,7 +3748,7 @@ export class Databases { accept: 'application/json', }; - return this.client.call('patch', uri, apiHeaders, payload); + return this.client.call('patch', uri, apiHeaders, apiPayload); } /** @@ -3873,18 +3873,18 @@ export class Databases { '{collectionId}', encodeURIComponent(String(collectionId)), ); - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof key !== 'undefined') { - payload['key'] = key; + apiPayload['key'] = key; } if (typeof required !== 'undefined') { - payload['required'] = required; + apiPayload['required'] = required; } if (typeof xdefault !== 'undefined') { - payload['default'] = xdefault; + apiPayload['default'] = xdefault; } if (typeof array !== 'undefined') { - payload['array'] = array; + apiPayload['array'] = array; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -3894,7 +3894,7 @@ export class Databases { accept: 'application/json', }; - return this.client.call('post', uri, apiHeaders, payload); + return this.client.call('post', uri, apiHeaders, apiPayload); } /** @@ -4025,15 +4025,15 @@ export class Databases { encodeURIComponent(String(collectionId)), ) .replace('{key}', encodeURIComponent(String(key))); - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof required !== 'undefined') { - payload['required'] = required; + apiPayload['required'] = required; } if (typeof xdefault !== 'undefined') { - payload['default'] = xdefault; + apiPayload['default'] = xdefault; } if (typeof newKey !== 'undefined') { - payload['newKey'] = newKey; + apiPayload['newKey'] = newKey; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -4043,7 +4043,7 @@ export class Databases { accept: 'application/json', }; - return this.client.call('patch', uri, apiHeaders, payload); + return this.client.call('patch', uri, apiHeaders, apiPayload); } /** @@ -4157,15 +4157,15 @@ export class Databases { '{collectionId}', encodeURIComponent(String(collectionId)), ); - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof key !== 'undefined') { - payload['key'] = key; + apiPayload['key'] = key; } if (typeof required !== 'undefined') { - payload['required'] = required; + apiPayload['required'] = required; } if (typeof xdefault !== 'undefined') { - payload['default'] = xdefault; + apiPayload['default'] = xdefault; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -4175,7 +4175,7 @@ export class Databases { accept: 'application/json', }; - return this.client.call('post', uri, apiHeaders, payload); + return this.client.call('post', uri, apiHeaders, apiPayload); } /** @@ -4299,15 +4299,15 @@ export class Databases { encodeURIComponent(String(collectionId)), ) .replace('{key}', encodeURIComponent(String(key))); - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof required !== 'undefined') { - payload['required'] = required; + apiPayload['required'] = required; } if (typeof xdefault !== 'undefined') { - payload['default'] = xdefault; + apiPayload['default'] = xdefault; } if (typeof newKey !== 'undefined') { - payload['newKey'] = newKey; + apiPayload['newKey'] = newKey; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -4317,7 +4317,7 @@ export class Databases { accept: 'application/json', }; - return this.client.call('patch', uri, apiHeaders, payload); + return this.client.call('patch', uri, apiHeaders, apiPayload); } /** @@ -4451,21 +4451,21 @@ export class Databases { '{collectionId}', encodeURIComponent(String(collectionId)), ); - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof key !== 'undefined') { - payload['key'] = key; + apiPayload['key'] = key; } if (typeof required !== 'undefined') { - payload['required'] = required; + apiPayload['required'] = required; } if (typeof xdefault !== 'undefined') { - payload['default'] = xdefault; + apiPayload['default'] = xdefault; } if (typeof array !== 'undefined') { - payload['array'] = array; + apiPayload['array'] = array; } if (typeof encrypt !== 'undefined') { - payload['encrypt'] = encrypt; + apiPayload['encrypt'] = encrypt; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -4475,7 +4475,7 @@ export class Databases { accept: 'application/json', }; - return this.client.call('post', uri, apiHeaders, payload); + return this.client.call('post', uri, apiHeaders, apiPayload); } /** @@ -4606,15 +4606,15 @@ export class Databases { encodeURIComponent(String(collectionId)), ) .replace('{key}', encodeURIComponent(String(key))); - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof required !== 'undefined') { - payload['required'] = required; + apiPayload['required'] = required; } if (typeof xdefault !== 'undefined') { - payload['default'] = xdefault; + apiPayload['default'] = xdefault; } if (typeof newKey !== 'undefined') { - payload['newKey'] = newKey; + apiPayload['newKey'] = newKey; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -4624,7 +4624,7 @@ export class Databases { accept: 'application/json', }; - return this.client.call('patch', uri, apiHeaders, payload); + return this.client.call('patch', uri, apiHeaders, apiPayload); } /** @@ -4758,21 +4758,21 @@ export class Databases { '{collectionId}', encodeURIComponent(String(collectionId)), ); - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof key !== 'undefined') { - payload['key'] = key; + apiPayload['key'] = key; } if (typeof required !== 'undefined') { - payload['required'] = required; + apiPayload['required'] = required; } if (typeof xdefault !== 'undefined') { - payload['default'] = xdefault; + apiPayload['default'] = xdefault; } if (typeof array !== 'undefined') { - payload['array'] = array; + apiPayload['array'] = array; } if (typeof encrypt !== 'undefined') { - payload['encrypt'] = encrypt; + apiPayload['encrypt'] = encrypt; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -4782,7 +4782,7 @@ export class Databases { accept: 'application/json', }; - return this.client.call('post', uri, apiHeaders, payload); + return this.client.call('post', uri, apiHeaders, apiPayload); } /** @@ -4913,15 +4913,15 @@ export class Databases { encodeURIComponent(String(collectionId)), ) .replace('{key}', encodeURIComponent(String(key))); - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof required !== 'undefined') { - payload['required'] = required; + apiPayload['required'] = required; } if (typeof xdefault !== 'undefined') { - payload['default'] = xdefault; + apiPayload['default'] = xdefault; } if (typeof newKey !== 'undefined') { - payload['newKey'] = newKey; + apiPayload['newKey'] = newKey; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -4931,7 +4931,7 @@ export class Databases { accept: 'application/json', }; - return this.client.call('patch', uri, apiHeaders, payload); + return this.client.call('patch', uri, apiHeaders, apiPayload); } /** @@ -5045,15 +5045,15 @@ export class Databases { '{collectionId}', encodeURIComponent(String(collectionId)), ); - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof key !== 'undefined') { - payload['key'] = key; + apiPayload['key'] = key; } if (typeof required !== 'undefined') { - payload['required'] = required; + apiPayload['required'] = required; } if (typeof xdefault !== 'undefined') { - payload['default'] = xdefault; + apiPayload['default'] = xdefault; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -5063,7 +5063,7 @@ export class Databases { accept: 'application/json', }; - return this.client.call('post', uri, apiHeaders, payload); + return this.client.call('post', uri, apiHeaders, apiPayload); } /** @@ -5187,15 +5187,15 @@ export class Databases { encodeURIComponent(String(collectionId)), ) .replace('{key}', encodeURIComponent(String(key))); - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof required !== 'undefined') { - payload['required'] = required; + apiPayload['required'] = required; } if (typeof xdefault !== 'undefined') { - payload['default'] = xdefault; + apiPayload['default'] = xdefault; } if (typeof newKey !== 'undefined') { - payload['newKey'] = newKey; + apiPayload['newKey'] = newKey; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -5205,7 +5205,7 @@ export class Databases { accept: 'application/json', }; - return this.client.call('patch', uri, apiHeaders, payload); + return this.client.call('patch', uri, apiHeaders, apiPayload); } /** @@ -5319,15 +5319,15 @@ export class Databases { '{collectionId}', encodeURIComponent(String(collectionId)), ); - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof key !== 'undefined') { - payload['key'] = key; + apiPayload['key'] = key; } if (typeof required !== 'undefined') { - payload['required'] = required; + apiPayload['required'] = required; } if (typeof xdefault !== 'undefined') { - payload['default'] = xdefault; + apiPayload['default'] = xdefault; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -5337,7 +5337,7 @@ export class Databases { accept: 'application/json', }; - return this.client.call('post', uri, apiHeaders, payload); + return this.client.call('post', uri, apiHeaders, apiPayload); } /** @@ -5461,15 +5461,15 @@ export class Databases { encodeURIComponent(String(collectionId)), ) .replace('{key}', encodeURIComponent(String(key))); - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof required !== 'undefined') { - payload['required'] = required; + apiPayload['required'] = required; } if (typeof xdefault !== 'undefined') { - payload['default'] = xdefault; + apiPayload['default'] = xdefault; } if (typeof newKey !== 'undefined') { - payload['newKey'] = newKey; + apiPayload['newKey'] = newKey; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -5479,7 +5479,7 @@ export class Databases { accept: 'application/json', }; - return this.client.call('patch', uri, apiHeaders, payload); + return this.client.call('patch', uri, apiHeaders, apiPayload); } /** @@ -5630,24 +5630,24 @@ export class Databases { '{collectionId}', encodeURIComponent(String(collectionId)), ); - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof relatedCollectionId !== 'undefined') { - payload['relatedCollectionId'] = relatedCollectionId; + apiPayload['relatedCollectionId'] = relatedCollectionId; } if (typeof type !== 'undefined') { - payload['type'] = type; + apiPayload['type'] = type; } if (typeof twoWay !== 'undefined') { - payload['twoWay'] = twoWay; + apiPayload['twoWay'] = twoWay; } if (typeof key !== 'undefined') { - payload['key'] = key; + apiPayload['key'] = key; } if (typeof twoWayKey !== 'undefined') { - payload['twoWayKey'] = twoWayKey; + apiPayload['twoWayKey'] = twoWayKey; } if (typeof onDelete !== 'undefined') { - payload['onDelete'] = onDelete; + apiPayload['onDelete'] = onDelete; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -5657,7 +5657,7 @@ export class Databases { accept: 'application/json', }; - return this.client.call('post', uri, apiHeaders, payload); + return this.client.call('post', uri, apiHeaders, apiPayload); } /** @@ -5769,12 +5769,12 @@ export class Databases { encodeURIComponent(String(collectionId)), ) .replace('{key}', encodeURIComponent(String(key))); - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof onDelete !== 'undefined') { - payload['onDelete'] = onDelete; + apiPayload['onDelete'] = onDelete; } if (typeof newKey !== 'undefined') { - payload['newKey'] = newKey; + apiPayload['newKey'] = newKey; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -5784,7 +5784,7 @@ export class Databases { accept: 'application/json', }; - return this.client.call('patch', uri, apiHeaders, payload); + return this.client.call('patch', uri, apiHeaders, apiPayload); } /** @@ -5938,24 +5938,24 @@ export class Databases { '{collectionId}', encodeURIComponent(String(collectionId)), ); - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof key !== 'undefined') { - payload['key'] = key; + apiPayload['key'] = key; } if (typeof size !== 'undefined') { - payload['size'] = size; + apiPayload['size'] = size; } if (typeof required !== 'undefined') { - payload['required'] = required; + apiPayload['required'] = required; } if (typeof xdefault !== 'undefined') { - payload['default'] = xdefault; + apiPayload['default'] = xdefault; } if (typeof array !== 'undefined') { - payload['array'] = array; + apiPayload['array'] = array; } if (typeof encrypt !== 'undefined') { - payload['encrypt'] = encrypt; + apiPayload['encrypt'] = encrypt; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -5965,7 +5965,7 @@ export class Databases { accept: 'application/json', }; - return this.client.call('post', uri, apiHeaders, payload); + return this.client.call('post', uri, apiHeaders, apiPayload); } /** @@ -6105,18 +6105,18 @@ export class Databases { encodeURIComponent(String(collectionId)), ) .replace('{key}', encodeURIComponent(String(key))); - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof required !== 'undefined') { - payload['required'] = required; + apiPayload['required'] = required; } if (typeof xdefault !== 'undefined') { - payload['default'] = xdefault; + apiPayload['default'] = xdefault; } if (typeof size !== 'undefined') { - payload['size'] = size; + apiPayload['size'] = size; } if (typeof newKey !== 'undefined') { - payload['newKey'] = newKey; + apiPayload['newKey'] = newKey; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -6126,7 +6126,7 @@ export class Databases { accept: 'application/json', }; - return this.client.call('patch', uri, apiHeaders, payload); + return this.client.call('patch', uri, apiHeaders, apiPayload); } /** @@ -6260,21 +6260,21 @@ export class Databases { '{collectionId}', encodeURIComponent(String(collectionId)), ); - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof key !== 'undefined') { - payload['key'] = key; + apiPayload['key'] = key; } if (typeof required !== 'undefined') { - payload['required'] = required; + apiPayload['required'] = required; } if (typeof xdefault !== 'undefined') { - payload['default'] = xdefault; + apiPayload['default'] = xdefault; } if (typeof array !== 'undefined') { - payload['array'] = array; + apiPayload['array'] = array; } if (typeof encrypt !== 'undefined') { - payload['encrypt'] = encrypt; + apiPayload['encrypt'] = encrypt; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -6284,7 +6284,7 @@ export class Databases { accept: 'application/json', }; - return this.client.call('post', uri, apiHeaders, payload); + return this.client.call('post', uri, apiHeaders, apiPayload); } /** @@ -6415,15 +6415,15 @@ export class Databases { encodeURIComponent(String(collectionId)), ) .replace('{key}', encodeURIComponent(String(key))); - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof required !== 'undefined') { - payload['required'] = required; + apiPayload['required'] = required; } if (typeof xdefault !== 'undefined') { - payload['default'] = xdefault; + apiPayload['default'] = xdefault; } if (typeof newKey !== 'undefined') { - payload['newKey'] = newKey; + apiPayload['newKey'] = newKey; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -6433,7 +6433,7 @@ export class Databases { accept: 'application/json', }; - return this.client.call('patch', uri, apiHeaders, payload); + return this.client.call('patch', uri, apiHeaders, apiPayload); } /** @@ -6558,18 +6558,18 @@ export class Databases { '{collectionId}', encodeURIComponent(String(collectionId)), ); - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof key !== 'undefined') { - payload['key'] = key; + apiPayload['key'] = key; } if (typeof required !== 'undefined') { - payload['required'] = required; + apiPayload['required'] = required; } if (typeof xdefault !== 'undefined') { - payload['default'] = xdefault; + apiPayload['default'] = xdefault; } if (typeof array !== 'undefined') { - payload['array'] = array; + apiPayload['array'] = array; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -6579,7 +6579,7 @@ export class Databases { accept: 'application/json', }; - return this.client.call('post', uri, apiHeaders, payload); + return this.client.call('post', uri, apiHeaders, apiPayload); } /** @@ -6710,15 +6710,15 @@ export class Databases { encodeURIComponent(String(collectionId)), ) .replace('{key}', encodeURIComponent(String(key))); - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof required !== 'undefined') { - payload['required'] = required; + apiPayload['required'] = required; } if (typeof xdefault !== 'undefined') { - payload['default'] = xdefault; + apiPayload['default'] = xdefault; } if (typeof newKey !== 'undefined') { - payload['newKey'] = newKey; + apiPayload['newKey'] = newKey; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -6728,7 +6728,7 @@ export class Databases { accept: 'application/json', }; - return this.client.call('patch', uri, apiHeaders, payload); + return this.client.call('patch', uri, apiHeaders, apiPayload); } /** @@ -6882,24 +6882,24 @@ export class Databases { '{collectionId}', encodeURIComponent(String(collectionId)), ); - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof key !== 'undefined') { - payload['key'] = key; + apiPayload['key'] = key; } if (typeof size !== 'undefined') { - payload['size'] = size; + apiPayload['size'] = size; } if (typeof required !== 'undefined') { - payload['required'] = required; + apiPayload['required'] = required; } if (typeof xdefault !== 'undefined') { - payload['default'] = xdefault; + apiPayload['default'] = xdefault; } if (typeof array !== 'undefined') { - payload['array'] = array; + apiPayload['array'] = array; } if (typeof encrypt !== 'undefined') { - payload['encrypt'] = encrypt; + apiPayload['encrypt'] = encrypt; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -6909,7 +6909,7 @@ export class Databases { accept: 'application/json', }; - return this.client.call('post', uri, apiHeaders, payload); + return this.client.call('post', uri, apiHeaders, apiPayload); } /** @@ -7049,18 +7049,18 @@ export class Databases { encodeURIComponent(String(collectionId)), ) .replace('{key}', encodeURIComponent(String(key))); - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof required !== 'undefined') { - payload['required'] = required; + apiPayload['required'] = required; } if (typeof xdefault !== 'undefined') { - payload['default'] = xdefault; + apiPayload['default'] = xdefault; } if (typeof size !== 'undefined') { - payload['size'] = size; + apiPayload['size'] = size; } if (typeof newKey !== 'undefined') { - payload['newKey'] = newKey; + apiPayload['newKey'] = newKey; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -7070,7 +7070,7 @@ export class Databases { accept: 'application/json', }; - return this.client.call('patch', uri, apiHeaders, payload); + return this.client.call('patch', uri, apiHeaders, apiPayload); } /** @@ -7210,7 +7210,7 @@ export class Databases { encodeURIComponent(String(collectionId)), ) .replace('{key}', encodeURIComponent(String(key))); - const payload: Payload = {}; + const apiPayload: Payload = {}; const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { @@ -7218,7 +7218,7 @@ export class Databases { accept: 'application/json', }; - return this.client.call('get', uri, apiHeaders, payload); + return this.client.call('get', uri, apiHeaders, apiPayload); } /** @@ -7301,7 +7301,7 @@ export class Databases { encodeURIComponent(String(collectionId)), ) .replace('{key}', encodeURIComponent(String(key))); - const payload: Payload = {}; + const apiPayload: Payload = {}; const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { @@ -7310,7 +7310,7 @@ export class Databases { accept: 'application/json', }; - return this.client.call('delete', uri, apiHeaders, payload); + return this.client.call('delete', uri, apiHeaders, apiPayload); } /** @@ -7427,18 +7427,18 @@ export class Databases { '{collectionId}', encodeURIComponent(String(collectionId)), ); - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof queries !== 'undefined') { - payload['queries'] = queries; + apiPayload['queries'] = queries; } if (typeof transactionId !== 'undefined') { - payload['transactionId'] = transactionId; + apiPayload['transactionId'] = transactionId; } if (typeof total !== 'undefined') { - payload['total'] = total; + apiPayload['total'] = total; } if (typeof ttl !== 'undefined') { - payload['ttl'] = ttl; + apiPayload['ttl'] = ttl; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -7447,7 +7447,7 @@ export class Databases { accept: 'application/json', }; - return this.client.call('get', uri, apiHeaders, payload); + return this.client.call('get', uri, apiHeaders, apiPayload); } /** @@ -7597,18 +7597,18 @@ export class Databases { '{collectionId}', encodeURIComponent(String(collectionId)), ); - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof documentId !== 'undefined') { - payload['documentId'] = documentId; + apiPayload['documentId'] = documentId; } if (typeof data !== 'undefined') { - payload['data'] = data; + apiPayload['data'] = data; } if (typeof permissions !== 'undefined') { - payload['permissions'] = permissions; + apiPayload['permissions'] = permissions; } if (typeof transactionId !== 'undefined') { - payload['transactionId'] = transactionId; + apiPayload['transactionId'] = transactionId; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -7618,7 +7618,7 @@ export class Databases { accept: 'application/json', }; - return this.client.call('post', uri, apiHeaders, payload); + return this.client.call('post', uri, apiHeaders, apiPayload); } /** @@ -7722,12 +7722,12 @@ export class Databases { '{collectionId}', encodeURIComponent(String(collectionId)), ); - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof documents !== 'undefined') { - payload['documents'] = documents; + apiPayload['documents'] = documents; } if (typeof transactionId !== 'undefined') { - payload['transactionId'] = transactionId; + apiPayload['transactionId'] = transactionId; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -7737,7 +7737,7 @@ export class Databases { accept: 'application/json', }; - return this.client.call('post', uri, apiHeaders, payload); + return this.client.call('post', uri, apiHeaders, apiPayload); } /** @@ -7843,12 +7843,12 @@ export class Databases { '{collectionId}', encodeURIComponent(String(collectionId)), ); - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof documents !== 'undefined') { - payload['documents'] = documents; + apiPayload['documents'] = documents; } if (typeof transactionId !== 'undefined') { - payload['transactionId'] = transactionId; + apiPayload['transactionId'] = transactionId; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -7858,7 +7858,7 @@ export class Databases { accept: 'application/json', }; - return this.client.call('put', uri, apiHeaders, payload); + return this.client.call('put', uri, apiHeaders, apiPayload); } /** @@ -7966,15 +7966,15 @@ export class Databases { '{collectionId}', encodeURIComponent(String(collectionId)), ); - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof data !== 'undefined') { - payload['data'] = data; + apiPayload['data'] = data; } if (typeof queries !== 'undefined') { - payload['queries'] = queries; + apiPayload['queries'] = queries; } if (typeof transactionId !== 'undefined') { - payload['transactionId'] = transactionId; + apiPayload['transactionId'] = transactionId; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -7984,7 +7984,7 @@ export class Databases { accept: 'application/json', }; - return this.client.call('patch', uri, apiHeaders, payload); + return this.client.call('patch', uri, apiHeaders, apiPayload); } /** @@ -8083,12 +8083,12 @@ export class Databases { '{collectionId}', encodeURIComponent(String(collectionId)), ); - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof queries !== 'undefined') { - payload['queries'] = queries; + apiPayload['queries'] = queries; } if (typeof transactionId !== 'undefined') { - payload['transactionId'] = transactionId; + apiPayload['transactionId'] = transactionId; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -8098,7 +8098,7 @@ export class Databases { accept: 'application/json', }; - return this.client.call('delete', uri, apiHeaders, payload); + return this.client.call('delete', uri, apiHeaders, apiPayload); } /** @@ -8215,12 +8215,12 @@ export class Databases { '{documentId}', encodeURIComponent(String(documentId)), ); - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof queries !== 'undefined') { - payload['queries'] = queries; + apiPayload['queries'] = queries; } if (typeof transactionId !== 'undefined') { - payload['transactionId'] = transactionId; + apiPayload['transactionId'] = transactionId; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -8229,7 +8229,7 @@ export class Databases { accept: 'application/json', }; - return this.client.call('get', uri, apiHeaders, payload); + return this.client.call('get', uri, apiHeaders, apiPayload); } /** @@ -8382,15 +8382,15 @@ export class Databases { '{documentId}', encodeURIComponent(String(documentId)), ); - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof data !== 'undefined') { - payload['data'] = data; + apiPayload['data'] = data; } if (typeof permissions !== 'undefined') { - payload['permissions'] = permissions; + apiPayload['permissions'] = permissions; } if (typeof transactionId !== 'undefined') { - payload['transactionId'] = transactionId; + apiPayload['transactionId'] = transactionId; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -8400,7 +8400,7 @@ export class Databases { accept: 'application/json', }; - return this.client.call('put', uri, apiHeaders, payload); + return this.client.call('put', uri, apiHeaders, apiPayload); } /** @@ -8553,15 +8553,15 @@ export class Databases { '{documentId}', encodeURIComponent(String(documentId)), ); - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof data !== 'undefined') { - payload['data'] = data; + apiPayload['data'] = data; } if (typeof permissions !== 'undefined') { - payload['permissions'] = permissions; + apiPayload['permissions'] = permissions; } if (typeof transactionId !== 'undefined') { - payload['transactionId'] = transactionId; + apiPayload['transactionId'] = transactionId; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -8571,7 +8571,7 @@ export class Databases { accept: 'application/json', }; - return this.client.call('patch', uri, apiHeaders, payload); + return this.client.call('patch', uri, apiHeaders, apiPayload); } /** @@ -8677,9 +8677,9 @@ export class Databases { '{documentId}', encodeURIComponent(String(documentId)), ); - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof transactionId !== 'undefined') { - payload['transactionId'] = transactionId; + apiPayload['transactionId'] = transactionId; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -8689,7 +8689,7 @@ export class Databases { accept: 'application/json', }; - return this.client.call('delete', uri, apiHeaders, payload); + return this.client.call('delete', uri, apiHeaders, apiPayload); } /** @@ -8831,15 +8831,15 @@ export class Databases { ) .replace('{documentId}', encodeURIComponent(String(documentId))) .replace('{attribute}', encodeURIComponent(String(attribute))); - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof value !== 'undefined') { - payload['value'] = value; + apiPayload['value'] = value; } if (typeof min !== 'undefined') { - payload['min'] = min; + apiPayload['min'] = min; } if (typeof transactionId !== 'undefined') { - payload['transactionId'] = transactionId; + apiPayload['transactionId'] = transactionId; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -8849,7 +8849,7 @@ export class Databases { accept: 'application/json', }; - return this.client.call('patch', uri, apiHeaders, payload); + return this.client.call('patch', uri, apiHeaders, apiPayload); } /** @@ -8991,15 +8991,15 @@ export class Databases { ) .replace('{documentId}', encodeURIComponent(String(documentId))) .replace('{attribute}', encodeURIComponent(String(attribute))); - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof value !== 'undefined') { - payload['value'] = value; + apiPayload['value'] = value; } if (typeof max !== 'undefined') { - payload['max'] = max; + apiPayload['max'] = max; } if (typeof transactionId !== 'undefined') { - payload['transactionId'] = transactionId; + apiPayload['transactionId'] = transactionId; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -9009,7 +9009,7 @@ export class Databases { accept: 'application/json', }; - return this.client.call('patch', uri, apiHeaders, payload); + return this.client.call('patch', uri, apiHeaders, apiPayload); } /** @@ -9106,12 +9106,12 @@ export class Databases { '{collectionId}', encodeURIComponent(String(collectionId)), ); - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof queries !== 'undefined') { - payload['queries'] = queries; + apiPayload['queries'] = queries; } if (typeof total !== 'undefined') { - payload['total'] = total; + apiPayload['total'] = total; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -9120,7 +9120,7 @@ export class Databases { accept: 'application/json', }; - return this.client.call('get', uri, apiHeaders, payload); + return this.client.call('get', uri, apiHeaders, apiPayload); } /** @@ -9264,21 +9264,21 @@ export class Databases { '{collectionId}', encodeURIComponent(String(collectionId)), ); - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof key !== 'undefined') { - payload['key'] = key; + apiPayload['key'] = key; } if (typeof type !== 'undefined') { - payload['type'] = type; + apiPayload['type'] = type; } if (typeof attributes !== 'undefined') { - payload['attributes'] = attributes; + apiPayload['attributes'] = attributes; } if (typeof orders !== 'undefined') { - payload['orders'] = orders; + apiPayload['orders'] = orders; } if (typeof lengths !== 'undefined') { - payload['lengths'] = lengths; + apiPayload['lengths'] = lengths; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -9288,7 +9288,7 @@ export class Databases { accept: 'application/json', }; - return this.client.call('post', uri, apiHeaders, payload); + return this.client.call('post', uri, apiHeaders, apiPayload); } /** @@ -9371,7 +9371,7 @@ export class Databases { encodeURIComponent(String(collectionId)), ) .replace('{key}', encodeURIComponent(String(key))); - const payload: Payload = {}; + const apiPayload: Payload = {}; const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { @@ -9379,7 +9379,7 @@ export class Databases { accept: 'application/json', }; - return this.client.call('get', uri, apiHeaders, payload); + return this.client.call('get', uri, apiHeaders, apiPayload); } /** @@ -9462,7 +9462,7 @@ export class Databases { encodeURIComponent(String(collectionId)), ) .replace('{key}', encodeURIComponent(String(key))); - const payload: Payload = {}; + const apiPayload: Payload = {}; const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { @@ -9471,6 +9471,6 @@ export class Databases { accept: 'application/json', }; - return this.client.call('delete', uri, apiHeaders, payload); + return this.client.call('delete', uri, apiHeaders, apiPayload); } } diff --git a/src/services/documents-db.ts b/src/services/documents-db.ts index f9edb0b1..bfae6d27 100644 --- a/src/services/documents-db.ts +++ b/src/services/documents-db.ts @@ -59,12 +59,12 @@ export class DocumentsDB { const total = params.total; const apiPath = '/documentsdb'; - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof queries !== 'undefined') { - payload['queries'] = queries; + apiPayload['queries'] = queries; } if (typeof total !== 'undefined') { - payload['total'] = total; + apiPayload['total'] = total; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -73,7 +73,7 @@ export class DocumentsDB { accept: 'application/json', }; - return this.client.call('get', uri, apiHeaders, payload); + return this.client.call('get', uri, apiHeaders, apiPayload); } /** @@ -181,24 +181,24 @@ export class DocumentsDB { throw new AppwriteException('Missing required parameter: "name"'); } const apiPath = '/documentsdb'; - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof databaseId !== 'undefined') { - payload['databaseId'] = databaseId; + apiPayload['databaseId'] = databaseId; } if (typeof name !== 'undefined') { - payload['name'] = name; + apiPayload['name'] = name; } if (typeof enabled !== 'undefined') { - payload['enabled'] = enabled; + apiPayload['enabled'] = enabled; } if (typeof specification !== 'undefined') { - payload['specification'] = specification; + apiPayload['specification'] = specification; } if (typeof replicas !== 'undefined') { - payload['replicas'] = replicas; + apiPayload['replicas'] = replicas; } if (typeof syncMode !== 'undefined') { - payload['syncMode'] = syncMode; + apiPayload['syncMode'] = syncMode; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -208,7 +208,7 @@ export class DocumentsDB { accept: 'application/json', }; - return this.client.call('post', uri, apiHeaders, payload); + return this.client.call('post', uri, apiHeaders, apiPayload); } /** @@ -219,7 +219,7 @@ export class DocumentsDB { */ listSpecifications(): Promise { const apiPath = '/documentsdb/specifications'; - const payload: Payload = {}; + const apiPayload: Payload = {}; const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { @@ -227,7 +227,7 @@ export class DocumentsDB { accept: 'application/json', }; - return this.client.call('get', uri, apiHeaders, payload); + return this.client.call('get', uri, apiHeaders, apiPayload); } /** @@ -270,9 +270,9 @@ export class DocumentsDB { const queries = params.queries; const apiPath = '/documentsdb/transactions'; - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof queries !== 'undefined') { - payload['queries'] = queries; + apiPayload['queries'] = queries; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -281,7 +281,7 @@ export class DocumentsDB { accept: 'application/json', }; - return this.client.call('get', uri, apiHeaders, payload); + return this.client.call('get', uri, apiHeaders, apiPayload); } /** @@ -322,9 +322,9 @@ export class DocumentsDB { const ttl = params.ttl; const apiPath = '/documentsdb/transactions'; - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof ttl !== 'undefined') { - payload['ttl'] = ttl; + apiPayload['ttl'] = ttl; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -334,7 +334,7 @@ export class DocumentsDB { accept: 'application/json', }; - return this.client.call('post', uri, apiHeaders, payload); + return this.client.call('post', uri, apiHeaders, apiPayload); } /** @@ -384,7 +384,7 @@ export class DocumentsDB { '{transactionId}', encodeURIComponent(String(transactionId)), ); - const payload: Payload = {}; + const apiPayload: Payload = {}; const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { @@ -392,7 +392,7 @@ export class DocumentsDB { accept: 'application/json', }; - return this.client.call('get', uri, apiHeaders, payload); + return this.client.call('get', uri, apiHeaders, apiPayload); } /** @@ -467,12 +467,12 @@ export class DocumentsDB { '{transactionId}', encodeURIComponent(String(transactionId)), ); - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof commit !== 'undefined') { - payload['commit'] = commit; + apiPayload['commit'] = commit; } if (typeof rollback !== 'undefined') { - payload['rollback'] = rollback; + apiPayload['rollback'] = rollback; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -482,7 +482,7 @@ export class DocumentsDB { accept: 'application/json', }; - return this.client.call('patch', uri, apiHeaders, payload); + return this.client.call('patch', uri, apiHeaders, apiPayload); } /** @@ -530,7 +530,7 @@ export class DocumentsDB { '{transactionId}', encodeURIComponent(String(transactionId)), ); - const payload: Payload = {}; + const apiPayload: Payload = {}; const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { @@ -539,7 +539,7 @@ export class DocumentsDB { accept: 'application/json', }; - return this.client.call('delete', uri, apiHeaders, payload); + return this.client.call('delete', uri, apiHeaders, apiPayload); } /** @@ -587,7 +587,7 @@ export class DocumentsDB { '{databaseId}', encodeURIComponent(String(databaseId)), ); - const payload: Payload = {}; + const apiPayload: Payload = {}; const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { @@ -595,7 +595,7 @@ export class DocumentsDB { accept: 'application/json', }; - return this.client.call('get', uri, apiHeaders, payload); + return this.client.call('get', uri, apiHeaders, apiPayload); } /** @@ -704,21 +704,21 @@ export class DocumentsDB { '{databaseId}', encodeURIComponent(String(databaseId)), ); - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof name !== 'undefined') { - payload['name'] = name; + apiPayload['name'] = name; } if (typeof enabled !== 'undefined') { - payload['enabled'] = enabled; + apiPayload['enabled'] = enabled; } if (typeof specification !== 'undefined') { - payload['specification'] = specification; + apiPayload['specification'] = specification; } if (typeof replicas !== 'undefined') { - payload['replicas'] = replicas; + apiPayload['replicas'] = replicas; } if (typeof syncMode !== 'undefined') { - payload['syncMode'] = syncMode; + apiPayload['syncMode'] = syncMode; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -728,7 +728,7 @@ export class DocumentsDB { accept: 'application/json', }; - return this.client.call('put', uri, apiHeaders, payload); + return this.client.call('put', uri, apiHeaders, apiPayload); } /** @@ -774,7 +774,7 @@ export class DocumentsDB { '{databaseId}', encodeURIComponent(String(databaseId)), ); - const payload: Payload = {}; + const apiPayload: Payload = {}; const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { @@ -783,7 +783,7 @@ export class DocumentsDB { accept: 'application/json', }; - return this.client.call('delete', uri, apiHeaders, payload); + return this.client.call('delete', uri, apiHeaders, apiPayload); } /** @@ -871,15 +871,15 @@ export class DocumentsDB { '{databaseId}', encodeURIComponent(String(databaseId)), ); - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof queries !== 'undefined') { - payload['queries'] = queries; + apiPayload['queries'] = queries; } if (typeof search !== 'undefined') { - payload['search'] = search; + apiPayload['search'] = search; } if (typeof total !== 'undefined') { - payload['total'] = total; + apiPayload['total'] = total; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -888,7 +888,7 @@ export class DocumentsDB { accept: 'application/json', }; - return this.client.call('get', uri, apiHeaders, payload); + return this.client.call('get', uri, apiHeaders, apiPayload); } /** @@ -1028,27 +1028,27 @@ export class DocumentsDB { '{databaseId}', encodeURIComponent(String(databaseId)), ); - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof collectionId !== 'undefined') { - payload['collectionId'] = collectionId; + apiPayload['collectionId'] = collectionId; } if (typeof name !== 'undefined') { - payload['name'] = name; + apiPayload['name'] = name; } if (typeof permissions !== 'undefined') { - payload['permissions'] = permissions; + apiPayload['permissions'] = permissions; } if (typeof documentSecurity !== 'undefined') { - payload['documentSecurity'] = documentSecurity; + apiPayload['documentSecurity'] = documentSecurity; } if (typeof enabled !== 'undefined') { - payload['enabled'] = enabled; + apiPayload['enabled'] = enabled; } if (typeof attributes !== 'undefined') { - payload['attributes'] = attributes; + apiPayload['attributes'] = attributes; } if (typeof indexes !== 'undefined') { - payload['indexes'] = indexes; + apiPayload['indexes'] = indexes; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -1058,7 +1058,7 @@ export class DocumentsDB { accept: 'application/json', }; - return this.client.call('post', uri, apiHeaders, payload); + return this.client.call('post', uri, apiHeaders, apiPayload); } /** @@ -1127,7 +1127,7 @@ export class DocumentsDB { '{collectionId}', encodeURIComponent(String(collectionId)), ); - const payload: Payload = {}; + const apiPayload: Payload = {}; const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { @@ -1135,7 +1135,7 @@ export class DocumentsDB { accept: 'application/json', }; - return this.client.call('get', uri, apiHeaders, payload); + return this.client.call('get', uri, apiHeaders, apiPayload); } /** @@ -1260,21 +1260,21 @@ export class DocumentsDB { '{collectionId}', encodeURIComponent(String(collectionId)), ); - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof name !== 'undefined') { - payload['name'] = name; + apiPayload['name'] = name; } if (typeof permissions !== 'undefined') { - payload['permissions'] = permissions; + apiPayload['permissions'] = permissions; } if (typeof documentSecurity !== 'undefined') { - payload['documentSecurity'] = documentSecurity; + apiPayload['documentSecurity'] = documentSecurity; } if (typeof enabled !== 'undefined') { - payload['enabled'] = enabled; + apiPayload['enabled'] = enabled; } if (typeof purge !== 'undefined') { - payload['purge'] = purge; + apiPayload['purge'] = purge; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -1284,7 +1284,7 @@ export class DocumentsDB { accept: 'application/json', }; - return this.client.call('put', uri, apiHeaders, payload); + return this.client.call('put', uri, apiHeaders, apiPayload); } /** @@ -1350,7 +1350,7 @@ export class DocumentsDB { '{collectionId}', encodeURIComponent(String(collectionId)), ); - const payload: Payload = {}; + const apiPayload: Payload = {}; const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { @@ -1359,7 +1359,7 @@ export class DocumentsDB { accept: 'application/json', }; - return this.client.call('delete', uri, apiHeaders, payload); + return this.client.call('delete', uri, apiHeaders, apiPayload); } /** @@ -1475,18 +1475,18 @@ export class DocumentsDB { '{collectionId}', encodeURIComponent(String(collectionId)), ); - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof queries !== 'undefined') { - payload['queries'] = queries; + apiPayload['queries'] = queries; } if (typeof transactionId !== 'undefined') { - payload['transactionId'] = transactionId; + apiPayload['transactionId'] = transactionId; } if (typeof total !== 'undefined') { - payload['total'] = total; + apiPayload['total'] = total; } if (typeof ttl !== 'undefined') { - payload['ttl'] = ttl; + apiPayload['ttl'] = ttl; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -1495,7 +1495,7 @@ export class DocumentsDB { accept: 'application/json', }; - return this.client.call('get', uri, apiHeaders, payload); + return this.client.call('get', uri, apiHeaders, apiPayload); } /** @@ -1644,18 +1644,18 @@ export class DocumentsDB { '{collectionId}', encodeURIComponent(String(collectionId)), ); - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof documentId !== 'undefined') { - payload['documentId'] = documentId; + apiPayload['documentId'] = documentId; } if (typeof data !== 'undefined') { - payload['data'] = data; + apiPayload['data'] = data; } if (typeof permissions !== 'undefined') { - payload['permissions'] = permissions; + apiPayload['permissions'] = permissions; } if (typeof transactionId !== 'undefined') { - payload['transactionId'] = transactionId; + apiPayload['transactionId'] = transactionId; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -1665,7 +1665,7 @@ export class DocumentsDB { accept: 'application/json', }; - return this.client.call('post', uri, apiHeaders, payload); + return this.client.call('post', uri, apiHeaders, apiPayload); } /** @@ -1768,12 +1768,12 @@ export class DocumentsDB { '{collectionId}', encodeURIComponent(String(collectionId)), ); - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof documents !== 'undefined') { - payload['documents'] = documents; + apiPayload['documents'] = documents; } if (typeof transactionId !== 'undefined') { - payload['transactionId'] = transactionId; + apiPayload['transactionId'] = transactionId; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -1783,7 +1783,7 @@ export class DocumentsDB { accept: 'application/json', }; - return this.client.call('post', uri, apiHeaders, payload); + return this.client.call('post', uri, apiHeaders, apiPayload); } /** @@ -1888,12 +1888,12 @@ export class DocumentsDB { '{collectionId}', encodeURIComponent(String(collectionId)), ); - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof documents !== 'undefined') { - payload['documents'] = documents; + apiPayload['documents'] = documents; } if (typeof transactionId !== 'undefined') { - payload['transactionId'] = transactionId; + apiPayload['transactionId'] = transactionId; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -1903,7 +1903,7 @@ export class DocumentsDB { accept: 'application/json', }; - return this.client.call('put', uri, apiHeaders, payload); + return this.client.call('put', uri, apiHeaders, apiPayload); } /** @@ -2010,15 +2010,15 @@ export class DocumentsDB { '{collectionId}', encodeURIComponent(String(collectionId)), ); - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof data !== 'undefined') { - payload['data'] = data; + apiPayload['data'] = data; } if (typeof queries !== 'undefined') { - payload['queries'] = queries; + apiPayload['queries'] = queries; } if (typeof transactionId !== 'undefined') { - payload['transactionId'] = transactionId; + apiPayload['transactionId'] = transactionId; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -2028,7 +2028,7 @@ export class DocumentsDB { accept: 'application/json', }; - return this.client.call('patch', uri, apiHeaders, payload); + return this.client.call('patch', uri, apiHeaders, apiPayload); } /** @@ -2126,12 +2126,12 @@ export class DocumentsDB { '{collectionId}', encodeURIComponent(String(collectionId)), ); - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof queries !== 'undefined') { - payload['queries'] = queries; + apiPayload['queries'] = queries; } if (typeof transactionId !== 'undefined') { - payload['transactionId'] = transactionId; + apiPayload['transactionId'] = transactionId; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -2141,7 +2141,7 @@ export class DocumentsDB { accept: 'application/json', }; - return this.client.call('delete', uri, apiHeaders, payload); + return this.client.call('delete', uri, apiHeaders, apiPayload); } /** @@ -2257,12 +2257,12 @@ export class DocumentsDB { '{documentId}', encodeURIComponent(String(documentId)), ); - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof queries !== 'undefined') { - payload['queries'] = queries; + apiPayload['queries'] = queries; } if (typeof transactionId !== 'undefined') { - payload['transactionId'] = transactionId; + apiPayload['transactionId'] = transactionId; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -2271,7 +2271,7 @@ export class DocumentsDB { accept: 'application/json', }; - return this.client.call('get', uri, apiHeaders, payload); + return this.client.call('get', uri, apiHeaders, apiPayload); } /** @@ -2423,15 +2423,15 @@ export class DocumentsDB { '{documentId}', encodeURIComponent(String(documentId)), ); - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof data !== 'undefined') { - payload['data'] = data; + apiPayload['data'] = data; } if (typeof permissions !== 'undefined') { - payload['permissions'] = permissions; + apiPayload['permissions'] = permissions; } if (typeof transactionId !== 'undefined') { - payload['transactionId'] = transactionId; + apiPayload['transactionId'] = transactionId; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -2441,7 +2441,7 @@ export class DocumentsDB { accept: 'application/json', }; - return this.client.call('put', uri, apiHeaders, payload); + return this.client.call('put', uri, apiHeaders, apiPayload); } /** @@ -2593,15 +2593,15 @@ export class DocumentsDB { '{documentId}', encodeURIComponent(String(documentId)), ); - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof data !== 'undefined') { - payload['data'] = data; + apiPayload['data'] = data; } if (typeof permissions !== 'undefined') { - payload['permissions'] = permissions; + apiPayload['permissions'] = permissions; } if (typeof transactionId !== 'undefined') { - payload['transactionId'] = transactionId; + apiPayload['transactionId'] = transactionId; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -2611,7 +2611,7 @@ export class DocumentsDB { accept: 'application/json', }; - return this.client.call('patch', uri, apiHeaders, payload); + return this.client.call('patch', uri, apiHeaders, apiPayload); } /** @@ -2716,9 +2716,9 @@ export class DocumentsDB { '{documentId}', encodeURIComponent(String(documentId)), ); - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof transactionId !== 'undefined') { - payload['transactionId'] = transactionId; + apiPayload['transactionId'] = transactionId; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -2728,7 +2728,7 @@ export class DocumentsDB { accept: 'application/json', }; - return this.client.call('delete', uri, apiHeaders, payload); + return this.client.call('delete', uri, apiHeaders, apiPayload); } /** @@ -2869,15 +2869,15 @@ export class DocumentsDB { ) .replace('{documentId}', encodeURIComponent(String(documentId))) .replace('{attribute}', encodeURIComponent(String(attribute))); - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof value !== 'undefined') { - payload['value'] = value; + apiPayload['value'] = value; } if (typeof min !== 'undefined') { - payload['min'] = min; + apiPayload['min'] = min; } if (typeof transactionId !== 'undefined') { - payload['transactionId'] = transactionId; + apiPayload['transactionId'] = transactionId; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -2887,7 +2887,7 @@ export class DocumentsDB { accept: 'application/json', }; - return this.client.call('patch', uri, apiHeaders, payload); + return this.client.call('patch', uri, apiHeaders, apiPayload); } /** @@ -3028,15 +3028,15 @@ export class DocumentsDB { ) .replace('{documentId}', encodeURIComponent(String(documentId))) .replace('{attribute}', encodeURIComponent(String(attribute))); - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof value !== 'undefined') { - payload['value'] = value; + apiPayload['value'] = value; } if (typeof max !== 'undefined') { - payload['max'] = max; + apiPayload['max'] = max; } if (typeof transactionId !== 'undefined') { - payload['transactionId'] = transactionId; + apiPayload['transactionId'] = transactionId; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -3046,7 +3046,7 @@ export class DocumentsDB { accept: 'application/json', }; - return this.client.call('patch', uri, apiHeaders, payload); + return this.client.call('patch', uri, apiHeaders, apiPayload); } /** @@ -3142,12 +3142,12 @@ export class DocumentsDB { '{collectionId}', encodeURIComponent(String(collectionId)), ); - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof queries !== 'undefined') { - payload['queries'] = queries; + apiPayload['queries'] = queries; } if (typeof total !== 'undefined') { - payload['total'] = total; + apiPayload['total'] = total; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -3156,7 +3156,7 @@ export class DocumentsDB { accept: 'application/json', }; - return this.client.call('get', uri, apiHeaders, payload); + return this.client.call('get', uri, apiHeaders, apiPayload); } /** @@ -3299,21 +3299,21 @@ export class DocumentsDB { '{collectionId}', encodeURIComponent(String(collectionId)), ); - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof key !== 'undefined') { - payload['key'] = key; + apiPayload['key'] = key; } if (typeof type !== 'undefined') { - payload['type'] = type; + apiPayload['type'] = type; } if (typeof attributes !== 'undefined') { - payload['attributes'] = attributes; + apiPayload['attributes'] = attributes; } if (typeof orders !== 'undefined') { - payload['orders'] = orders; + apiPayload['orders'] = orders; } if (typeof lengths !== 'undefined') { - payload['lengths'] = lengths; + apiPayload['lengths'] = lengths; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -3323,7 +3323,7 @@ export class DocumentsDB { accept: 'application/json', }; - return this.client.call('post', uri, apiHeaders, payload); + return this.client.call('post', uri, apiHeaders, apiPayload); } /** @@ -3405,7 +3405,7 @@ export class DocumentsDB { encodeURIComponent(String(collectionId)), ) .replace('{key}', encodeURIComponent(String(key))); - const payload: Payload = {}; + const apiPayload: Payload = {}; const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { @@ -3413,7 +3413,7 @@ export class DocumentsDB { accept: 'application/json', }; - return this.client.call('get', uri, apiHeaders, payload); + return this.client.call('get', uri, apiHeaders, apiPayload); } /** @@ -3495,7 +3495,7 @@ export class DocumentsDB { encodeURIComponent(String(collectionId)), ) .replace('{key}', encodeURIComponent(String(key))); - const payload: Payload = {}; + const apiPayload: Payload = {}; const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { @@ -3504,7 +3504,7 @@ export class DocumentsDB { accept: 'application/json', }; - return this.client.call('delete', uri, apiHeaders, payload); + return this.client.call('delete', uri, apiHeaders, apiPayload); } /** @@ -3567,9 +3567,9 @@ export class DocumentsDB { '{databaseId}', encodeURIComponent(String(databaseId)), ); - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof targetReplicaId !== 'undefined') { - payload['targetReplicaId'] = targetReplicaId; + apiPayload['targetReplicaId'] = targetReplicaId; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -3579,7 +3579,7 @@ export class DocumentsDB { accept: 'application/json', }; - return this.client.call('post', uri, apiHeaders, payload); + return this.client.call('post', uri, apiHeaders, apiPayload); } /** @@ -3667,15 +3667,15 @@ export class DocumentsDB { '{databaseId}', encodeURIComponent(String(databaseId)), ); - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof status !== 'undefined') { - payload['status'] = status; + apiPayload['status'] = status; } if (typeof limit !== 'undefined') { - payload['limit'] = limit; + apiPayload['limit'] = limit; } if (typeof offset !== 'undefined') { - payload['offset'] = offset; + apiPayload['offset'] = offset; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -3684,7 +3684,7 @@ export class DocumentsDB { accept: 'application/json', }; - return this.client.call('get', uri, apiHeaders, payload); + return this.client.call('get', uri, apiHeaders, apiPayload); } /** @@ -3734,7 +3734,7 @@ export class DocumentsDB { '{databaseId}', encodeURIComponent(String(databaseId)), ); - const payload: Payload = {}; + const apiPayload: Payload = {}; const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { @@ -3742,7 +3742,7 @@ export class DocumentsDB { accept: 'application/json', }; - return this.client.call('get', uri, apiHeaders, payload); + return this.client.call('get', uri, apiHeaders, apiPayload); } /** @@ -3790,7 +3790,7 @@ export class DocumentsDB { '{databaseId}', encodeURIComponent(String(databaseId)), ); - const payload: Payload = {}; + const apiPayload: Payload = {}; const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { @@ -3798,6 +3798,6 @@ export class DocumentsDB { accept: 'application/json', }; - return this.client.call('get', uri, apiHeaders, payload); + return this.client.call('get', uri, apiHeaders, apiPayload); } } diff --git a/src/services/domains.ts b/src/services/domains.ts index 7599db1e..26430644 100644 --- a/src/services/domains.ts +++ b/src/services/domains.ts @@ -59,12 +59,12 @@ export class Domains { const search = params.search; const apiPath = '/domains'; - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof queries !== 'undefined') { - payload['queries'] = queries; + apiPayload['queries'] = queries; } if (typeof search !== 'undefined') { - payload['search'] = search; + apiPayload['search'] = search; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -73,7 +73,7 @@ export class Domains { accept: 'application/json', }; - return this.client.call('get', uri, apiHeaders, payload); + return this.client.call('get', uri, apiHeaders, apiPayload); } /** @@ -127,12 +127,12 @@ export class Domains { throw new AppwriteException('Missing required parameter: "domain"'); } const apiPath = '/domains'; - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof teamId !== 'undefined') { - payload['teamId'] = teamId; + apiPayload['teamId'] = teamId; } if (typeof domain !== 'undefined') { - payload['domain'] = domain; + apiPayload['domain'] = domain; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -142,7 +142,7 @@ export class Domains { accept: 'application/json', }; - return this.client.call('post', uri, apiHeaders, payload); + return this.client.call('post', uri, apiHeaders, apiPayload); } /** @@ -217,15 +217,15 @@ export class Domains { throw new AppwriteException('Missing required parameter: "domain"'); } const apiPath = '/domains/price'; - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof domain !== 'undefined') { - payload['domain'] = domain; + apiPayload['domain'] = domain; } if (typeof periodYears !== 'undefined') { - payload['periodYears'] = periodYears; + apiPayload['periodYears'] = periodYears; } if (typeof registrationType !== 'undefined') { - payload['registrationType'] = registrationType; + apiPayload['registrationType'] = registrationType; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -234,7 +234,7 @@ export class Domains { accept: 'application/json', }; - return this.client.call('get', uri, apiHeaders, payload); + return this.client.call('get', uri, apiHeaders, apiPayload); } /** @@ -310,15 +310,15 @@ export class Domains { ); } const apiPath = '/domains/prices'; - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof domains !== 'undefined') { - payload['domains'] = domains; + apiPayload['domains'] = domains; } if (typeof periodYears !== 'undefined') { - payload['periodYears'] = periodYears; + apiPayload['periodYears'] = periodYears; } if (typeof registrationType !== 'undefined') { - payload['registrationType'] = registrationType; + apiPayload['registrationType'] = registrationType; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -327,7 +327,7 @@ export class Domains { accept: 'application/json', }; - return this.client.call('get', uri, apiHeaders, payload); + return this.client.call('get', uri, apiHeaders, apiPayload); } /** @@ -525,42 +525,42 @@ export class Domains { ); } const apiPath = '/domains/purchases'; - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof domain !== 'undefined') { - payload['domain'] = domain; + apiPayload['domain'] = domain; } if (typeof organizationId !== 'undefined') { - payload['organizationId'] = organizationId; + apiPayload['organizationId'] = organizationId; } if (typeof firstName !== 'undefined') { - payload['firstName'] = firstName; + apiPayload['firstName'] = firstName; } if (typeof lastName !== 'undefined') { - payload['lastName'] = lastName; + apiPayload['lastName'] = lastName; } if (typeof email !== 'undefined') { - payload['email'] = email; + apiPayload['email'] = email; } if (typeof phone !== 'undefined') { - payload['phone'] = phone; + apiPayload['phone'] = phone; } if (typeof billingAddressId !== 'undefined') { - payload['billingAddressId'] = billingAddressId; + apiPayload['billingAddressId'] = billingAddressId; } if (typeof addressLine3 !== 'undefined') { - payload['addressLine3'] = addressLine3; + apiPayload['addressLine3'] = addressLine3; } if (typeof companyName !== 'undefined') { - payload['companyName'] = companyName; + apiPayload['companyName'] = companyName; } if (typeof periodYears !== 'undefined') { - payload['periodYears'] = periodYears; + apiPayload['periodYears'] = periodYears; } if (typeof autoRenewal !== 'undefined') { - payload['autoRenewal'] = autoRenewal; + apiPayload['autoRenewal'] = autoRenewal; } if (typeof paymentMethodId !== 'undefined') { - payload['paymentMethodId'] = paymentMethodId; + apiPayload['paymentMethodId'] = paymentMethodId; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -570,7 +570,7 @@ export class Domains { accept: 'application/json', }; - return this.client.call('post', uri, apiHeaders, payload); + return this.client.call('post', uri, apiHeaders, apiPayload); } /** @@ -637,9 +637,9 @@ export class Domains { '{invoiceId}', encodeURIComponent(String(invoiceId)), ); - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof organizationId !== 'undefined') { - payload['organizationId'] = organizationId; + apiPayload['organizationId'] = organizationId; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -649,7 +649,7 @@ export class Domains { accept: 'application/json', }; - return this.client.call('patch', uri, apiHeaders, payload); + return this.client.call('patch', uri, apiHeaders, apiPayload); } /** @@ -750,24 +750,24 @@ export class Domains { throw new AppwriteException('Missing required parameter: "query"'); } const apiPath = '/domains/suggestions'; - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof query !== 'undefined') { - payload['query'] = query; + apiPayload['query'] = query; } if (typeof tlds !== 'undefined') { - payload['tlds'] = tlds; + apiPayload['tlds'] = tlds; } if (typeof limit !== 'undefined') { - payload['limit'] = limit; + apiPayload['limit'] = limit; } if (typeof filterType !== 'undefined') { - payload['filterType'] = filterType; + apiPayload['filterType'] = filterType; } if (typeof priceMax !== 'undefined') { - payload['priceMax'] = priceMax; + apiPayload['priceMax'] = priceMax; } if (typeof priceMin !== 'undefined') { - payload['priceMin'] = priceMin; + apiPayload['priceMin'] = priceMin; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -776,7 +776,7 @@ export class Domains { accept: 'application/json', }; - return this.client.call('get', uri, apiHeaders, payload); + return this.client.call('get', uri, apiHeaders, apiPayload); } /** @@ -883,21 +883,21 @@ export class Domains { ); } const apiPath = '/domains/transfers/in'; - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof domain !== 'undefined') { - payload['domain'] = domain; + apiPayload['domain'] = domain; } if (typeof organizationId !== 'undefined') { - payload['organizationId'] = organizationId; + apiPayload['organizationId'] = organizationId; } if (typeof authCode !== 'undefined') { - payload['authCode'] = authCode; + apiPayload['authCode'] = authCode; } if (typeof autoRenewal !== 'undefined') { - payload['autoRenewal'] = autoRenewal; + apiPayload['autoRenewal'] = autoRenewal; } if (typeof paymentMethodId !== 'undefined') { - payload['paymentMethodId'] = paymentMethodId; + apiPayload['paymentMethodId'] = paymentMethodId; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -907,7 +907,7 @@ export class Domains { accept: 'application/json', }; - return this.client.call('post', uri, apiHeaders, payload); + return this.client.call('post', uri, apiHeaders, apiPayload); } /** @@ -974,9 +974,9 @@ export class Domains { '{invoiceId}', encodeURIComponent(String(invoiceId)), ); - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof organizationId !== 'undefined') { - payload['organizationId'] = organizationId; + apiPayload['organizationId'] = organizationId; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -986,7 +986,7 @@ export class Domains { accept: 'application/json', }; - return this.client.call('patch', uri, apiHeaders, payload); + return this.client.call('patch', uri, apiHeaders, apiPayload); } /** @@ -1050,12 +1050,12 @@ export class Domains { ); } const apiPath = '/domains/transfers/out'; - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof domainId !== 'undefined') { - payload['domainId'] = domainId; + apiPayload['domainId'] = domainId; } if (typeof organizationId !== 'undefined') { - payload['organizationId'] = organizationId; + apiPayload['organizationId'] = organizationId; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -1065,7 +1065,7 @@ export class Domains { accept: 'application/json', }; - return this.client.call('post', uri, apiHeaders, payload); + return this.client.call('post', uri, apiHeaders, apiPayload); } /** @@ -1111,7 +1111,7 @@ export class Domains { '{domainId}', encodeURIComponent(String(domainId)), ); - const payload: Payload = {}; + const apiPayload: Payload = {}; const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { @@ -1119,7 +1119,7 @@ export class Domains { accept: 'application/json', }; - return this.client.call('get', uri, apiHeaders, payload); + return this.client.call('get', uri, apiHeaders, apiPayload); } /** @@ -1167,7 +1167,7 @@ export class Domains { '{domainId}', encodeURIComponent(String(domainId)), ); - const payload: Payload = {}; + const apiPayload: Payload = {}; const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { @@ -1176,7 +1176,7 @@ export class Domains { accept: 'application/json', }; - return this.client.call('delete', uri, apiHeaders, payload); + return this.client.call('delete', uri, apiHeaders, apiPayload); } /** @@ -1243,9 +1243,9 @@ export class Domains { '{domainId}', encodeURIComponent(String(domainId)), ); - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof autoRenewal !== 'undefined') { - payload['autoRenewal'] = autoRenewal; + apiPayload['autoRenewal'] = autoRenewal; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -1255,7 +1255,7 @@ export class Domains { accept: 'application/json', }; - return this.client.call('patch', uri, apiHeaders, payload); + return this.client.call('patch', uri, apiHeaders, apiPayload); } /** @@ -1319,9 +1319,9 @@ export class Domains { '{domainId}', encodeURIComponent(String(domainId)), ); - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof nameservers !== 'undefined') { - payload['nameservers'] = nameservers; + apiPayload['nameservers'] = nameservers; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -1331,7 +1331,7 @@ export class Domains { accept: 'application/json', }; - return this.client.call('patch', uri, apiHeaders, payload); + return this.client.call('patch', uri, apiHeaders, apiPayload); } /** @@ -1383,7 +1383,7 @@ export class Domains { '{domainId}', encodeURIComponent(String(domainId)), ); - const payload: Payload = {}; + const apiPayload: Payload = {}; const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { @@ -1392,7 +1392,7 @@ export class Domains { accept: 'application/json', }; - return this.client.call('patch', uri, apiHeaders, payload); + return this.client.call('patch', uri, apiHeaders, apiPayload); } /** @@ -1442,7 +1442,7 @@ export class Domains { '{domainId}', encodeURIComponent(String(domainId)), ); - const payload: Payload = {}; + const apiPayload: Payload = {}; const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { @@ -1450,7 +1450,7 @@ export class Domains { accept: 'application/json', }; - return this.client.call('get', uri, apiHeaders, payload); + return this.client.call('get', uri, apiHeaders, apiPayload); } /** @@ -1504,7 +1504,7 @@ export class Domains { '{domainId}', encodeURIComponent(String(domainId)), ); - const payload: Payload = {}; + const apiPayload: Payload = {}; const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { @@ -1513,7 +1513,7 @@ export class Domains { accept: 'application/json', }; - return this.client.call('post', uri, apiHeaders, payload); + return this.client.call('post', uri, apiHeaders, apiPayload); } /** @@ -1563,7 +1563,7 @@ export class Domains { '{domainId}', encodeURIComponent(String(domainId)), ); - const payload: Payload = {}; + const apiPayload: Payload = {}; const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { @@ -1571,7 +1571,7 @@ export class Domains { accept: 'application/json', }; - return this.client.call('get', uri, apiHeaders, payload); + return this.client.call('get', uri, apiHeaders, apiPayload); } /** @@ -1623,7 +1623,7 @@ export class Domains { '{domainId}', encodeURIComponent(String(domainId)), ); - const payload: Payload = {}; + const apiPayload: Payload = {}; const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { @@ -1632,7 +1632,7 @@ export class Domains { accept: 'application/json', }; - return this.client.call('post', uri, apiHeaders, payload); + return this.client.call('post', uri, apiHeaders, apiPayload); } /** @@ -1682,7 +1682,7 @@ export class Domains { '{domainId}', encodeURIComponent(String(domainId)), ); - const payload: Payload = {}; + const apiPayload: Payload = {}; const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { @@ -1690,7 +1690,7 @@ export class Domains { accept: 'application/json', }; - return this.client.call('get', uri, apiHeaders, payload); + return this.client.call('get', uri, apiHeaders, apiPayload); } /** @@ -1742,7 +1742,7 @@ export class Domains { '{domainId}', encodeURIComponent(String(domainId)), ); - const payload: Payload = {}; + const apiPayload: Payload = {}; const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { @@ -1751,7 +1751,7 @@ export class Domains { accept: 'application/json', }; - return this.client.call('post', uri, apiHeaders, payload); + return this.client.call('post', uri, apiHeaders, apiPayload); } /** @@ -1801,7 +1801,7 @@ export class Domains { '{domainId}', encodeURIComponent(String(domainId)), ); - const payload: Payload = {}; + const apiPayload: Payload = {}; const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { @@ -1809,7 +1809,7 @@ export class Domains { accept: 'application/json', }; - return this.client.call('get', uri, apiHeaders, payload); + return this.client.call('get', uri, apiHeaders, apiPayload); } /** @@ -1861,7 +1861,7 @@ export class Domains { '{domainId}', encodeURIComponent(String(domainId)), ); - const payload: Payload = {}; + const apiPayload: Payload = {}; const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { @@ -1870,7 +1870,7 @@ export class Domains { accept: 'application/json', }; - return this.client.call('post', uri, apiHeaders, payload); + return this.client.call('post', uri, apiHeaders, apiPayload); } /** @@ -1920,7 +1920,7 @@ export class Domains { '{domainId}', encodeURIComponent(String(domainId)), ); - const payload: Payload = {}; + const apiPayload: Payload = {}; const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { @@ -1928,7 +1928,7 @@ export class Domains { accept: 'application/json', }; - return this.client.call('get', uri, apiHeaders, payload); + return this.client.call('get', uri, apiHeaders, apiPayload); } /** @@ -1980,7 +1980,7 @@ export class Domains { '{domainId}', encodeURIComponent(String(domainId)), ); - const payload: Payload = {}; + const apiPayload: Payload = {}; const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { @@ -1989,7 +1989,7 @@ export class Domains { accept: 'application/json', }; - return this.client.call('post', uri, apiHeaders, payload); + return this.client.call('post', uri, apiHeaders, apiPayload); } /** @@ -2037,7 +2037,7 @@ export class Domains { '{domainId}', encodeURIComponent(String(domainId)), ); - const payload: Payload = {}; + const apiPayload: Payload = {}; const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { @@ -2045,7 +2045,7 @@ export class Domains { accept: 'application/json', }; - return this.client.call('get', uri, apiHeaders, payload); + return this.client.call('get', uri, apiHeaders, apiPayload); } /** @@ -2097,7 +2097,7 @@ export class Domains { '{domainId}', encodeURIComponent(String(domainId)), ); - const payload: Payload = {}; + const apiPayload: Payload = {}; const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { @@ -2106,7 +2106,7 @@ export class Domains { accept: 'application/json', }; - return this.client.call('post', uri, apiHeaders, payload); + return this.client.call('post', uri, apiHeaders, apiPayload); } /** @@ -2170,9 +2170,9 @@ export class Domains { '{domainId}', encodeURIComponent(String(domainId)), ); - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof queries !== 'undefined') { - payload['queries'] = queries; + apiPayload['queries'] = queries; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -2181,7 +2181,7 @@ export class Domains { accept: 'application/json', }; - return this.client.call('get', uri, apiHeaders, payload); + return this.client.call('get', uri, apiHeaders, apiPayload); } /** @@ -2289,18 +2289,18 @@ export class Domains { '{domainId}', encodeURIComponent(String(domainId)), ); - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof name !== 'undefined') { - payload['name'] = name; + apiPayload['name'] = name; } if (typeof value !== 'undefined') { - payload['value'] = value; + apiPayload['value'] = value; } if (typeof ttl !== 'undefined') { - payload['ttl'] = ttl; + apiPayload['ttl'] = ttl; } if (typeof comment !== 'undefined') { - payload['comment'] = comment; + apiPayload['comment'] = comment; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -2310,7 +2310,7 @@ export class Domains { accept: 'application/json', }; - return this.client.call('post', uri, apiHeaders, payload); + return this.client.call('post', uri, apiHeaders, apiPayload); } /** @@ -2433,18 +2433,18 @@ export class Domains { const apiPath = '/domains/{domainId}/records/a/{recordId}' .replace('{domainId}', encodeURIComponent(String(domainId))) .replace('{recordId}', encodeURIComponent(String(recordId))); - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof name !== 'undefined') { - payload['name'] = name; + apiPayload['name'] = name; } if (typeof value !== 'undefined') { - payload['value'] = value; + apiPayload['value'] = value; } if (typeof ttl !== 'undefined') { - payload['ttl'] = ttl; + apiPayload['ttl'] = ttl; } if (typeof comment !== 'undefined') { - payload['comment'] = comment; + apiPayload['comment'] = comment; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -2454,7 +2454,7 @@ export class Domains { accept: 'application/json', }; - return this.client.call('put', uri, apiHeaders, payload); + return this.client.call('put', uri, apiHeaders, apiPayload); } /** @@ -2562,18 +2562,18 @@ export class Domains { '{domainId}', encodeURIComponent(String(domainId)), ); - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof name !== 'undefined') { - payload['name'] = name; + apiPayload['name'] = name; } if (typeof value !== 'undefined') { - payload['value'] = value; + apiPayload['value'] = value; } if (typeof ttl !== 'undefined') { - payload['ttl'] = ttl; + apiPayload['ttl'] = ttl; } if (typeof comment !== 'undefined') { - payload['comment'] = comment; + apiPayload['comment'] = comment; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -2583,7 +2583,7 @@ export class Domains { accept: 'application/json', }; - return this.client.call('post', uri, apiHeaders, payload); + return this.client.call('post', uri, apiHeaders, apiPayload); } /** @@ -2706,18 +2706,18 @@ export class Domains { const apiPath = '/domains/{domainId}/records/aaaa/{recordId}' .replace('{domainId}', encodeURIComponent(String(domainId))) .replace('{recordId}', encodeURIComponent(String(recordId))); - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof name !== 'undefined') { - payload['name'] = name; + apiPayload['name'] = name; } if (typeof value !== 'undefined') { - payload['value'] = value; + apiPayload['value'] = value; } if (typeof ttl !== 'undefined') { - payload['ttl'] = ttl; + apiPayload['ttl'] = ttl; } if (typeof comment !== 'undefined') { - payload['comment'] = comment; + apiPayload['comment'] = comment; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -2727,7 +2727,7 @@ export class Domains { accept: 'application/json', }; - return this.client.call('put', uri, apiHeaders, payload); + return this.client.call('put', uri, apiHeaders, apiPayload); } /** @@ -2837,18 +2837,18 @@ export class Domains { '{domainId}', encodeURIComponent(String(domainId)), ); - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof name !== 'undefined') { - payload['name'] = name; + apiPayload['name'] = name; } if (typeof value !== 'undefined') { - payload['value'] = value; + apiPayload['value'] = value; } if (typeof ttl !== 'undefined') { - payload['ttl'] = ttl; + apiPayload['ttl'] = ttl; } if (typeof comment !== 'undefined') { - payload['comment'] = comment; + apiPayload['comment'] = comment; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -2858,7 +2858,7 @@ export class Domains { accept: 'application/json', }; - return this.client.call('post', uri, apiHeaders, payload); + return this.client.call('post', uri, apiHeaders, apiPayload); } /** @@ -2985,18 +2985,18 @@ export class Domains { const apiPath = '/domains/{domainId}/records/alias/{recordId}' .replace('{domainId}', encodeURIComponent(String(domainId))) .replace('{recordId}', encodeURIComponent(String(recordId))); - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof name !== 'undefined') { - payload['name'] = name; + apiPayload['name'] = name; } if (typeof value !== 'undefined') { - payload['value'] = value; + apiPayload['value'] = value; } if (typeof ttl !== 'undefined') { - payload['ttl'] = ttl; + apiPayload['ttl'] = ttl; } if (typeof comment !== 'undefined') { - payload['comment'] = comment; + apiPayload['comment'] = comment; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -3006,7 +3006,7 @@ export class Domains { accept: 'application/json', }; - return this.client.call('put', uri, apiHeaders, payload); + return this.client.call('put', uri, apiHeaders, apiPayload); } /** @@ -3114,18 +3114,18 @@ export class Domains { '{domainId}', encodeURIComponent(String(domainId)), ); - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof name !== 'undefined') { - payload['name'] = name; + apiPayload['name'] = name; } if (typeof value !== 'undefined') { - payload['value'] = value; + apiPayload['value'] = value; } if (typeof ttl !== 'undefined') { - payload['ttl'] = ttl; + apiPayload['ttl'] = ttl; } if (typeof comment !== 'undefined') { - payload['comment'] = comment; + apiPayload['comment'] = comment; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -3135,7 +3135,7 @@ export class Domains { accept: 'application/json', }; - return this.client.call('post', uri, apiHeaders, payload); + return this.client.call('post', uri, apiHeaders, apiPayload); } /** @@ -3258,18 +3258,18 @@ export class Domains { const apiPath = '/domains/{domainId}/records/caa/{recordId}' .replace('{domainId}', encodeURIComponent(String(domainId))) .replace('{recordId}', encodeURIComponent(String(recordId))); - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof name !== 'undefined') { - payload['name'] = name; + apiPayload['name'] = name; } if (typeof value !== 'undefined') { - payload['value'] = value; + apiPayload['value'] = value; } if (typeof ttl !== 'undefined') { - payload['ttl'] = ttl; + apiPayload['ttl'] = ttl; } if (typeof comment !== 'undefined') { - payload['comment'] = comment; + apiPayload['comment'] = comment; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -3279,7 +3279,7 @@ export class Domains { accept: 'application/json', }; - return this.client.call('put', uri, apiHeaders, payload); + return this.client.call('put', uri, apiHeaders, apiPayload); } /** @@ -3393,18 +3393,18 @@ export class Domains { '{domainId}', encodeURIComponent(String(domainId)), ); - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof name !== 'undefined') { - payload['name'] = name; + apiPayload['name'] = name; } if (typeof value !== 'undefined') { - payload['value'] = value; + apiPayload['value'] = value; } if (typeof ttl !== 'undefined') { - payload['ttl'] = ttl; + apiPayload['ttl'] = ttl; } if (typeof comment !== 'undefined') { - payload['comment'] = comment; + apiPayload['comment'] = comment; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -3414,7 +3414,7 @@ export class Domains { accept: 'application/json', }; - return this.client.call('post', uri, apiHeaders, payload); + return this.client.call('post', uri, apiHeaders, apiPayload); } /** @@ -3533,18 +3533,18 @@ export class Domains { const apiPath = '/domains/{domainId}/records/cname/{recordId}' .replace('{domainId}', encodeURIComponent(String(domainId))) .replace('{recordId}', encodeURIComponent(String(recordId))); - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof name !== 'undefined') { - payload['name'] = name; + apiPayload['name'] = name; } if (typeof value !== 'undefined') { - payload['value'] = value; + apiPayload['value'] = value; } if (typeof ttl !== 'undefined') { - payload['ttl'] = ttl; + apiPayload['ttl'] = ttl; } if (typeof comment !== 'undefined') { - payload['comment'] = comment; + apiPayload['comment'] = comment; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -3554,7 +3554,7 @@ export class Domains { accept: 'application/json', }; - return this.client.call('put', uri, apiHeaders, payload); + return this.client.call('put', uri, apiHeaders, apiPayload); } /** @@ -3662,18 +3662,18 @@ export class Domains { '{domainId}', encodeURIComponent(String(domainId)), ); - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof name !== 'undefined') { - payload['name'] = name; + apiPayload['name'] = name; } if (typeof value !== 'undefined') { - payload['value'] = value; + apiPayload['value'] = value; } if (typeof ttl !== 'undefined') { - payload['ttl'] = ttl; + apiPayload['ttl'] = ttl; } if (typeof comment !== 'undefined') { - payload['comment'] = comment; + apiPayload['comment'] = comment; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -3683,7 +3683,7 @@ export class Domains { accept: 'application/json', }; - return this.client.call('post', uri, apiHeaders, payload); + return this.client.call('post', uri, apiHeaders, apiPayload); } /** @@ -3806,18 +3806,18 @@ export class Domains { const apiPath = '/domains/{domainId}/records/https/{recordId}' .replace('{domainId}', encodeURIComponent(String(domainId))) .replace('{recordId}', encodeURIComponent(String(recordId))); - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof name !== 'undefined') { - payload['name'] = name; + apiPayload['name'] = name; } if (typeof value !== 'undefined') { - payload['value'] = value; + apiPayload['value'] = value; } if (typeof ttl !== 'undefined') { - payload['ttl'] = ttl; + apiPayload['ttl'] = ttl; } if (typeof comment !== 'undefined') { - payload['comment'] = comment; + apiPayload['comment'] = comment; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -3827,7 +3827,7 @@ export class Domains { accept: 'application/json', }; - return this.client.call('put', uri, apiHeaders, payload); + return this.client.call('put', uri, apiHeaders, apiPayload); } /** @@ -3953,21 +3953,21 @@ export class Domains { '{domainId}', encodeURIComponent(String(domainId)), ); - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof name !== 'undefined') { - payload['name'] = name; + apiPayload['name'] = name; } if (typeof value !== 'undefined') { - payload['value'] = value; + apiPayload['value'] = value; } if (typeof ttl !== 'undefined') { - payload['ttl'] = ttl; + apiPayload['ttl'] = ttl; } if (typeof priority !== 'undefined') { - payload['priority'] = priority; + apiPayload['priority'] = priority; } if (typeof comment !== 'undefined') { - payload['comment'] = comment; + apiPayload['comment'] = comment; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -3977,7 +3977,7 @@ export class Domains { accept: 'application/json', }; - return this.client.call('post', uri, apiHeaders, payload); + return this.client.call('post', uri, apiHeaders, apiPayload); } /** @@ -4110,21 +4110,21 @@ export class Domains { const apiPath = '/domains/{domainId}/records/mx/{recordId}' .replace('{domainId}', encodeURIComponent(String(domainId))) .replace('{recordId}', encodeURIComponent(String(recordId))); - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof name !== 'undefined') { - payload['name'] = name; + apiPayload['name'] = name; } if (typeof value !== 'undefined') { - payload['value'] = value; + apiPayload['value'] = value; } if (typeof ttl !== 'undefined') { - payload['ttl'] = ttl; + apiPayload['ttl'] = ttl; } if (typeof priority !== 'undefined') { - payload['priority'] = priority; + apiPayload['priority'] = priority; } if (typeof comment !== 'undefined') { - payload['comment'] = comment; + apiPayload['comment'] = comment; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -4134,7 +4134,7 @@ export class Domains { accept: 'application/json', }; - return this.client.call('put', uri, apiHeaders, payload); + return this.client.call('put', uri, apiHeaders, apiPayload); } /** @@ -4242,18 +4242,18 @@ export class Domains { '{domainId}', encodeURIComponent(String(domainId)), ); - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof name !== 'undefined') { - payload['name'] = name; + apiPayload['name'] = name; } if (typeof value !== 'undefined') { - payload['value'] = value; + apiPayload['value'] = value; } if (typeof ttl !== 'undefined') { - payload['ttl'] = ttl; + apiPayload['ttl'] = ttl; } if (typeof comment !== 'undefined') { - payload['comment'] = comment; + apiPayload['comment'] = comment; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -4263,7 +4263,7 @@ export class Domains { accept: 'application/json', }; - return this.client.call('post', uri, apiHeaders, payload); + return this.client.call('post', uri, apiHeaders, apiPayload); } /** @@ -4388,18 +4388,18 @@ export class Domains { const apiPath = '/domains/{domainId}/records/ns/{recordId}' .replace('{domainId}', encodeURIComponent(String(domainId))) .replace('{recordId}', encodeURIComponent(String(recordId))); - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof name !== 'undefined') { - payload['name'] = name; + apiPayload['name'] = name; } if (typeof value !== 'undefined') { - payload['value'] = value; + apiPayload['value'] = value; } if (typeof ttl !== 'undefined') { - payload['ttl'] = ttl; + apiPayload['ttl'] = ttl; } if (typeof comment !== 'undefined') { - payload['comment'] = comment; + apiPayload['comment'] = comment; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -4409,7 +4409,7 @@ export class Domains { accept: 'application/json', }; - return this.client.call('put', uri, apiHeaders, payload); + return this.client.call('put', uri, apiHeaders, apiPayload); } /** @@ -4557,27 +4557,27 @@ export class Domains { '{domainId}', encodeURIComponent(String(domainId)), ); - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof name !== 'undefined') { - payload['name'] = name; + apiPayload['name'] = name; } if (typeof value !== 'undefined') { - payload['value'] = value; + apiPayload['value'] = value; } if (typeof ttl !== 'undefined') { - payload['ttl'] = ttl; + apiPayload['ttl'] = ttl; } if (typeof priority !== 'undefined') { - payload['priority'] = priority; + apiPayload['priority'] = priority; } if (typeof weight !== 'undefined') { - payload['weight'] = weight; + apiPayload['weight'] = weight; } if (typeof port !== 'undefined') { - payload['port'] = port; + apiPayload['port'] = port; } if (typeof comment !== 'undefined') { - payload['comment'] = comment; + apiPayload['comment'] = comment; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -4587,7 +4587,7 @@ export class Domains { accept: 'application/json', }; - return this.client.call('post', uri, apiHeaders, payload); + return this.client.call('post', uri, apiHeaders, apiPayload); } /** @@ -4779,27 +4779,27 @@ export class Domains { const apiPath = '/domains/{domainId}/records/srv/{recordId}' .replace('{domainId}', encodeURIComponent(String(domainId))) .replace('{recordId}', encodeURIComponent(String(recordId))); - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof name !== 'undefined') { - payload['name'] = name; + apiPayload['name'] = name; } if (typeof value !== 'undefined') { - payload['value'] = value; + apiPayload['value'] = value; } if (typeof ttl !== 'undefined') { - payload['ttl'] = ttl; + apiPayload['ttl'] = ttl; } if (typeof priority !== 'undefined') { - payload['priority'] = priority; + apiPayload['priority'] = priority; } if (typeof weight !== 'undefined') { - payload['weight'] = weight; + apiPayload['weight'] = weight; } if (typeof port !== 'undefined') { - payload['port'] = port; + apiPayload['port'] = port; } if (typeof comment !== 'undefined') { - payload['comment'] = comment; + apiPayload['comment'] = comment; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -4809,7 +4809,7 @@ export class Domains { accept: 'application/json', }; - return this.client.call('put', uri, apiHeaders, payload); + return this.client.call('put', uri, apiHeaders, apiPayload); } /** @@ -4916,18 +4916,18 @@ export class Domains { '{domainId}', encodeURIComponent(String(domainId)), ); - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof name !== 'undefined') { - payload['name'] = name; + apiPayload['name'] = name; } if (typeof value !== 'undefined') { - payload['value'] = value; + apiPayload['value'] = value; } if (typeof ttl !== 'undefined') { - payload['ttl'] = ttl; + apiPayload['ttl'] = ttl; } if (typeof comment !== 'undefined') { - payload['comment'] = comment; + apiPayload['comment'] = comment; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -4937,7 +4937,7 @@ export class Domains { accept: 'application/json', }; - return this.client.call('post', uri, apiHeaders, payload); + return this.client.call('post', uri, apiHeaders, apiPayload); } /** @@ -5062,18 +5062,18 @@ export class Domains { const apiPath = '/domains/{domainId}/records/txt/{recordId}' .replace('{domainId}', encodeURIComponent(String(domainId))) .replace('{recordId}', encodeURIComponent(String(recordId))); - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof name !== 'undefined') { - payload['name'] = name; + apiPayload['name'] = name; } if (typeof value !== 'undefined') { - payload['value'] = value; + apiPayload['value'] = value; } if (typeof ttl !== 'undefined') { - payload['ttl'] = ttl; + apiPayload['ttl'] = ttl; } if (typeof comment !== 'undefined') { - payload['comment'] = comment; + apiPayload['comment'] = comment; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -5083,7 +5083,7 @@ export class Domains { accept: 'application/json', }; - return this.client.call('put', uri, apiHeaders, payload); + return this.client.call('put', uri, apiHeaders, apiPayload); } /** @@ -5154,7 +5154,7 @@ export class Domains { const apiPath = '/domains/{domainId}/records/{recordId}' .replace('{domainId}', encodeURIComponent(String(domainId))) .replace('{recordId}', encodeURIComponent(String(recordId))); - const payload: Payload = {}; + const apiPayload: Payload = {}; const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { @@ -5162,7 +5162,7 @@ export class Domains { accept: 'application/json', }; - return this.client.call('get', uri, apiHeaders, payload); + return this.client.call('get', uri, apiHeaders, apiPayload); } /** @@ -5224,7 +5224,7 @@ export class Domains { const apiPath = '/domains/{domainId}/records/{recordId}' .replace('{domainId}', encodeURIComponent(String(domainId))) .replace('{recordId}', encodeURIComponent(String(recordId))); - const payload: Payload = {}; + const apiPayload: Payload = {}; const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { @@ -5233,7 +5233,7 @@ export class Domains { accept: 'application/json', }; - return this.client.call('delete', uri, apiHeaders, payload); + return this.client.call('delete', uri, apiHeaders, apiPayload); } /** @@ -5303,9 +5303,9 @@ export class Domains { '{domainId}', encodeURIComponent(String(domainId)), ); - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof teamId !== 'undefined') { - payload['teamId'] = teamId; + apiPayload['teamId'] = teamId; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -5315,7 +5315,7 @@ export class Domains { accept: 'application/json', }; - return this.client.call('patch', uri, apiHeaders, payload); + return this.client.call('patch', uri, apiHeaders, apiPayload); } /** @@ -5365,7 +5365,7 @@ export class Domains { '{domainId}', encodeURIComponent(String(domainId)), ); - const payload: Payload = {}; + const apiPayload: Payload = {}; const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { @@ -5373,7 +5373,7 @@ export class Domains { accept: 'application/json', }; - return this.client.call('get', uri, apiHeaders, payload); + return this.client.call('get', uri, apiHeaders, apiPayload); } /** @@ -5382,20 +5382,20 @@ export class Domains { * * @param {string} params.domainId - Domain unique ID. * @throws {AppwriteException} - * @returns {Promise<{}>} + * @returns {Promise} */ - getZone(params: { domainId: string }): Promise<{}>; + getZone(params: { domainId: string }): Promise; /** * Retrieve the DNS zone file for the given domain. This endpoint will return the DNS * zone file in a standardized format that can be used to configure DNS servers. * * @param {string} domainId - Domain unique ID. * @throws {AppwriteException} - * @returns {Promise<{}>} + * @returns {Promise} * @deprecated Use the object parameter style method for a better developer experience. */ - getZone(domainId: string): Promise<{}>; - getZone(paramsOrFirst: { domainId: string } | string): Promise<{}> { + getZone(domainId: string): Promise; + getZone(paramsOrFirst: { domainId: string } | string): Promise { let params: { domainId: string }; if ( @@ -5421,7 +5421,7 @@ export class Domains { '{domainId}', encodeURIComponent(String(domainId)), ); - const payload: Payload = {}; + const apiPayload: Payload = {}; const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { @@ -5429,7 +5429,7 @@ export class Domains { accept: 'text/plain', }; - return this.client.call('get', uri, apiHeaders, payload); + return this.client.call('get', uri, apiHeaders, apiPayload, 'text'); } /** @@ -5495,9 +5495,9 @@ export class Domains { '{domainId}', encodeURIComponent(String(domainId)), ); - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof content !== 'undefined') { - payload['content'] = content; + apiPayload['content'] = content; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -5507,6 +5507,6 @@ export class Domains { accept: 'application/json', }; - return this.client.call('put', uri, apiHeaders, payload); + return this.client.call('put', uri, apiHeaders, apiPayload); } } diff --git a/src/services/embeddings.ts b/src/services/embeddings.ts index 29f3f00c..e09a2c34 100644 --- a/src/services/embeddings.ts +++ b/src/services/embeddings.ts @@ -65,12 +65,12 @@ export class Embeddings { throw new AppwriteException('Missing required parameter: "texts"'); } const apiPath = '/embeddings/text'; - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof texts !== 'undefined') { - payload['texts'] = texts; + apiPayload['texts'] = texts; } if (typeof model !== 'undefined') { - payload['model'] = model; + apiPayload['model'] = model; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -80,6 +80,6 @@ export class Embeddings { accept: 'application/json', }; - return this.client.call('post', uri, apiHeaders, payload); + return this.client.call('post', uri, apiHeaders, apiPayload); } } diff --git a/src/services/functions.ts b/src/services/functions.ts index f4f108a7..c802cf58 100644 --- a/src/services/functions.ts +++ b/src/services/functions.ts @@ -81,15 +81,15 @@ export class Functions { const total = params.total; const apiPath = '/functions'; - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof queries !== 'undefined') { - payload['queries'] = queries; + apiPayload['queries'] = queries; } if (typeof search !== 'undefined') { - payload['search'] = search; + apiPayload['search'] = search; } if (typeof total !== 'undefined') { - payload['total'] = total; + apiPayload['total'] = total; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -98,7 +98,7 @@ export class Functions { accept: 'application/json', }; - return this.client.call('get', uri, apiHeaders, payload); + return this.client.call('get', uri, apiHeaders, apiPayload); } /** @@ -375,72 +375,72 @@ export class Functions { ); } const apiPath = '/functions'; - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof functionId !== 'undefined') { - payload['functionId'] = functionId; + apiPayload['functionId'] = functionId; } if (typeof name !== 'undefined') { - payload['name'] = name; + apiPayload['name'] = name; } if (typeof runtime !== 'undefined') { - payload['runtime'] = runtime; + apiPayload['runtime'] = runtime; } if (typeof execute !== 'undefined') { - payload['execute'] = execute; + apiPayload['execute'] = execute; } if (typeof events !== 'undefined') { - payload['events'] = events; + apiPayload['events'] = events; } if (typeof schedule !== 'undefined') { - payload['schedule'] = schedule; + apiPayload['schedule'] = schedule; } if (typeof timeout !== 'undefined') { - payload['timeout'] = timeout; + apiPayload['timeout'] = timeout; } if (typeof enabled !== 'undefined') { - payload['enabled'] = enabled; + apiPayload['enabled'] = enabled; } if (typeof logging !== 'undefined') { - payload['logging'] = logging; + apiPayload['logging'] = logging; } if (typeof entrypoint !== 'undefined') { - payload['entrypoint'] = entrypoint; + apiPayload['entrypoint'] = entrypoint; } if (typeof commands !== 'undefined') { - payload['commands'] = commands; + apiPayload['commands'] = commands; } if (typeof scopes !== 'undefined') { - payload['scopes'] = scopes; + apiPayload['scopes'] = scopes; } if (typeof installationId !== 'undefined') { - payload['installationId'] = installationId; + apiPayload['installationId'] = installationId; } if (typeof providerRepositoryId !== 'undefined') { - payload['providerRepositoryId'] = providerRepositoryId; + apiPayload['providerRepositoryId'] = providerRepositoryId; } if (typeof providerBranch !== 'undefined') { - payload['providerBranch'] = providerBranch; + apiPayload['providerBranch'] = providerBranch; } if (typeof providerSilentMode !== 'undefined') { - payload['providerSilentMode'] = providerSilentMode; + apiPayload['providerSilentMode'] = providerSilentMode; } if (typeof providerRootDirectory !== 'undefined') { - payload['providerRootDirectory'] = providerRootDirectory; + apiPayload['providerRootDirectory'] = providerRootDirectory; } if (typeof providerBranches !== 'undefined') { - payload['providerBranches'] = providerBranches; + apiPayload['providerBranches'] = providerBranches; } if (typeof providerPaths !== 'undefined') { - payload['providerPaths'] = providerPaths; + apiPayload['providerPaths'] = providerPaths; } if (typeof buildSpecification !== 'undefined') { - payload['buildSpecification'] = buildSpecification; + apiPayload['buildSpecification'] = buildSpecification; } if (typeof runtimeSpecification !== 'undefined') { - payload['runtimeSpecification'] = runtimeSpecification; + apiPayload['runtimeSpecification'] = runtimeSpecification; } if (typeof deploymentRetention !== 'undefined') { - payload['deploymentRetention'] = deploymentRetention; + apiPayload['deploymentRetention'] = deploymentRetention; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -450,7 +450,7 @@ export class Functions { accept: 'application/json', }; - return this.client.call('post', uri, apiHeaders, payload); + return this.client.call('post', uri, apiHeaders, apiPayload); } /** @@ -461,7 +461,7 @@ export class Functions { */ listRuntimes(): Promise { const apiPath = '/functions/runtimes'; - const payload: Payload = {}; + const apiPayload: Payload = {}; const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { @@ -469,7 +469,7 @@ export class Functions { accept: 'application/json', }; - return this.client.call('get', uri, apiHeaders, payload); + return this.client.call('get', uri, apiHeaders, apiPayload); } /** @@ -512,9 +512,9 @@ export class Functions { const type = params.type; const apiPath = '/functions/specifications'; - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof type !== 'undefined') { - payload['type'] = type; + apiPayload['type'] = type; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -523,7 +523,7 @@ export class Functions { accept: 'application/json', }; - return this.client.call('get', uri, apiHeaders, payload); + return this.client.call('get', uri, apiHeaders, apiPayload); } /** @@ -618,21 +618,21 @@ export class Functions { const total = params.total; const apiPath = '/functions/templates'; - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof runtimes !== 'undefined') { - payload['runtimes'] = runtimes; + apiPayload['runtimes'] = runtimes; } if (typeof useCases !== 'undefined') { - payload['useCases'] = useCases; + apiPayload['useCases'] = useCases; } if (typeof limit !== 'undefined') { - payload['limit'] = limit; + apiPayload['limit'] = limit; } if (typeof offset !== 'undefined') { - payload['offset'] = offset; + apiPayload['offset'] = offset; } if (typeof total !== 'undefined') { - payload['total'] = total; + apiPayload['total'] = total; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -641,7 +641,7 @@ export class Functions { accept: 'application/json', }; - return this.client.call('get', uri, apiHeaders, payload); + return this.client.call('get', uri, apiHeaders, apiPayload); } /** @@ -691,7 +691,7 @@ export class Functions { '{templateId}', encodeURIComponent(String(templateId)), ); - const payload: Payload = {}; + const apiPayload: Payload = {}; const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { @@ -699,7 +699,7 @@ export class Functions { accept: 'application/json', }; - return this.client.call('get', uri, apiHeaders, payload); + return this.client.call('get', uri, apiHeaders, apiPayload); } /** @@ -747,7 +747,7 @@ export class Functions { '{functionId}', encodeURIComponent(String(functionId)), ); - const payload: Payload = {}; + const apiPayload: Payload = {}; const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { @@ -755,7 +755,7 @@ export class Functions { accept: 'application/json', }; - return this.client.call('get', uri, apiHeaders, payload); + return this.client.call('get', uri, apiHeaders, apiPayload); } /** @@ -1030,69 +1030,69 @@ export class Functions { '{functionId}', encodeURIComponent(String(functionId)), ); - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof name !== 'undefined') { - payload['name'] = name; + apiPayload['name'] = name; } if (typeof runtime !== 'undefined') { - payload['runtime'] = runtime; + apiPayload['runtime'] = runtime; } if (typeof execute !== 'undefined') { - payload['execute'] = execute; + apiPayload['execute'] = execute; } if (typeof events !== 'undefined') { - payload['events'] = events; + apiPayload['events'] = events; } if (typeof schedule !== 'undefined') { - payload['schedule'] = schedule; + apiPayload['schedule'] = schedule; } if (typeof timeout !== 'undefined') { - payload['timeout'] = timeout; + apiPayload['timeout'] = timeout; } if (typeof enabled !== 'undefined') { - payload['enabled'] = enabled; + apiPayload['enabled'] = enabled; } if (typeof logging !== 'undefined') { - payload['logging'] = logging; + apiPayload['logging'] = logging; } if (typeof entrypoint !== 'undefined') { - payload['entrypoint'] = entrypoint; + apiPayload['entrypoint'] = entrypoint; } if (typeof commands !== 'undefined') { - payload['commands'] = commands; + apiPayload['commands'] = commands; } if (typeof scopes !== 'undefined') { - payload['scopes'] = scopes; + apiPayload['scopes'] = scopes; } if (typeof installationId !== 'undefined') { - payload['installationId'] = installationId; + apiPayload['installationId'] = installationId; } if (typeof providerRepositoryId !== 'undefined') { - payload['providerRepositoryId'] = providerRepositoryId; + apiPayload['providerRepositoryId'] = providerRepositoryId; } if (typeof providerBranch !== 'undefined') { - payload['providerBranch'] = providerBranch; + apiPayload['providerBranch'] = providerBranch; } if (typeof providerSilentMode !== 'undefined') { - payload['providerSilentMode'] = providerSilentMode; + apiPayload['providerSilentMode'] = providerSilentMode; } if (typeof providerRootDirectory !== 'undefined') { - payload['providerRootDirectory'] = providerRootDirectory; + apiPayload['providerRootDirectory'] = providerRootDirectory; } if (typeof providerBranches !== 'undefined') { - payload['providerBranches'] = providerBranches; + apiPayload['providerBranches'] = providerBranches; } if (typeof providerPaths !== 'undefined') { - payload['providerPaths'] = providerPaths; + apiPayload['providerPaths'] = providerPaths; } if (typeof buildSpecification !== 'undefined') { - payload['buildSpecification'] = buildSpecification; + apiPayload['buildSpecification'] = buildSpecification; } if (typeof runtimeSpecification !== 'undefined') { - payload['runtimeSpecification'] = runtimeSpecification; + apiPayload['runtimeSpecification'] = runtimeSpecification; } if (typeof deploymentRetention !== 'undefined') { - payload['deploymentRetention'] = deploymentRetention; + apiPayload['deploymentRetention'] = deploymentRetention; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -1102,7 +1102,7 @@ export class Functions { accept: 'application/json', }; - return this.client.call('put', uri, apiHeaders, payload); + return this.client.call('put', uri, apiHeaders, apiPayload); } /** @@ -1148,7 +1148,7 @@ export class Functions { '{functionId}', encodeURIComponent(String(functionId)), ); - const payload: Payload = {}; + const apiPayload: Payload = {}; const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { @@ -1157,7 +1157,7 @@ export class Functions { accept: 'application/json', }; - return this.client.call('delete', uri, apiHeaders, payload); + return this.client.call('delete', uri, apiHeaders, apiPayload); } /** @@ -1224,9 +1224,9 @@ export class Functions { '{functionId}', encodeURIComponent(String(functionId)), ); - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof deploymentId !== 'undefined') { - payload['deploymentId'] = deploymentId; + apiPayload['deploymentId'] = deploymentId; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -1236,7 +1236,7 @@ export class Functions { accept: 'application/json', }; - return this.client.call('patch', uri, apiHeaders, payload); + return this.client.call('patch', uri, apiHeaders, apiPayload); } /** @@ -1324,15 +1324,15 @@ export class Functions { '{functionId}', encodeURIComponent(String(functionId)), ); - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof queries !== 'undefined') { - payload['queries'] = queries; + apiPayload['queries'] = queries; } if (typeof search !== 'undefined') { - payload['search'] = search; + apiPayload['search'] = search; } if (typeof total !== 'undefined') { - payload['total'] = total; + apiPayload['total'] = total; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -1341,7 +1341,7 @@ export class Functions { accept: 'application/json', }; - return this.client.call('get', uri, apiHeaders, payload); + return this.client.call('get', uri, apiHeaders, apiPayload); } /** @@ -1468,18 +1468,18 @@ export class Functions { '{functionId}', encodeURIComponent(String(functionId)), ); - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof entrypoint !== 'undefined') { - payload['entrypoint'] = entrypoint; + apiPayload['entrypoint'] = entrypoint; } if (typeof commands !== 'undefined') { - payload['commands'] = commands; + apiPayload['commands'] = commands; } if (typeof code !== 'undefined') { - payload['code'] = code; + apiPayload['code'] = code; } if (typeof activate !== 'undefined') { - payload['activate'] = activate; + apiPayload['activate'] = activate; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -1493,7 +1493,7 @@ export class Functions { 'post', uri, apiHeaders, - payload, + apiPayload, onProgress, ); } @@ -1575,12 +1575,12 @@ export class Functions { '{functionId}', encodeURIComponent(String(functionId)), ); - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof deploymentId !== 'undefined') { - payload['deploymentId'] = deploymentId; + apiPayload['deploymentId'] = deploymentId; } if (typeof buildId !== 'undefined') { - payload['buildId'] = buildId; + apiPayload['buildId'] = buildId; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -1590,7 +1590,7 @@ export class Functions { accept: 'application/json', }; - return this.client.call('post', uri, apiHeaders, payload); + return this.client.call('post', uri, apiHeaders, apiPayload); } /** @@ -1737,24 +1737,24 @@ export class Functions { '{functionId}', encodeURIComponent(String(functionId)), ); - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof repository !== 'undefined') { - payload['repository'] = repository; + apiPayload['repository'] = repository; } if (typeof owner !== 'undefined') { - payload['owner'] = owner; + apiPayload['owner'] = owner; } if (typeof rootDirectory !== 'undefined') { - payload['rootDirectory'] = rootDirectory; + apiPayload['rootDirectory'] = rootDirectory; } if (typeof type !== 'undefined') { - payload['type'] = type; + apiPayload['type'] = type; } if (typeof reference !== 'undefined') { - payload['reference'] = reference; + apiPayload['reference'] = reference; } if (typeof activate !== 'undefined') { - payload['activate'] = activate; + apiPayload['activate'] = activate; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -1764,7 +1764,7 @@ export class Functions { accept: 'application/json', }; - return this.client.call('post', uri, apiHeaders, payload); + return this.client.call('post', uri, apiHeaders, apiPayload); } /** @@ -1864,15 +1864,15 @@ export class Functions { '{functionId}', encodeURIComponent(String(functionId)), ); - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof type !== 'undefined') { - payload['type'] = type; + apiPayload['type'] = type; } if (typeof reference !== 'undefined') { - payload['reference'] = reference; + apiPayload['reference'] = reference; } if (typeof activate !== 'undefined') { - payload['activate'] = activate; + apiPayload['activate'] = activate; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -1882,7 +1882,7 @@ export class Functions { accept: 'application/json', }; - return this.client.call('post', uri, apiHeaders, payload); + return this.client.call('post', uri, apiHeaders, apiPayload); } /** @@ -1951,7 +1951,7 @@ export class Functions { '{deploymentId}', encodeURIComponent(String(deploymentId)), ); - const payload: Payload = {}; + const apiPayload: Payload = {}; const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { @@ -1959,7 +1959,7 @@ export class Functions { accept: 'application/json', }; - return this.client.call('get', uri, apiHeaders, payload); + return this.client.call('get', uri, apiHeaders, apiPayload); } /** @@ -2025,7 +2025,7 @@ export class Functions { '{deploymentId}', encodeURIComponent(String(deploymentId)), ); - const payload: Payload = {}; + const apiPayload: Payload = {}; const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { @@ -2034,7 +2034,7 @@ export class Functions { accept: 'application/json', }; - return this.client.call('delete', uri, apiHeaders, payload); + return this.client.call('delete', uri, apiHeaders, apiPayload); } /** @@ -2130,19 +2130,21 @@ export class Functions { '{deploymentId}', encodeURIComponent(String(deploymentId)), ); - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof type !== 'undefined') { - payload['type'] = type; + apiPayload['type'] = type; } if (typeof token !== 'undefined') { - payload['token'] = token; + apiPayload['token'] = token; } const uri = new URL(this.client.config.endpoint + apiPath); - payload['project'] = this.client.config.project; - payload['impersonateuserid'] = this.client.config.impersonateuserid; + apiPayload['project'] = this.client.config.project; + apiPayload['impersonateuserid'] = this.client.config.impersonateuserid; - for (const [key, value] of Object.entries(Service.flatten(payload))) { + for (const [key, value] of Object.entries( + Service.flatten(apiPayload), + )) { uri.searchParams.append(key, value); } @@ -2216,7 +2218,7 @@ export class Functions { '{deploymentId}', encodeURIComponent(String(deploymentId)), ); - const payload: Payload = {}; + const apiPayload: Payload = {}; const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { @@ -2225,7 +2227,7 @@ export class Functions { accept: 'application/json', }; - return this.client.call('patch', uri, apiHeaders, payload); + return this.client.call('patch', uri, apiHeaders, apiPayload); } /** @@ -2296,12 +2298,12 @@ export class Functions { '{functionId}', encodeURIComponent(String(functionId)), ); - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof queries !== 'undefined') { - payload['queries'] = queries; + apiPayload['queries'] = queries; } if (typeof total !== 'undefined') { - payload['total'] = total; + apiPayload['total'] = total; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -2310,7 +2312,7 @@ export class Functions { accept: 'application/json', }; - return this.client.call('get', uri, apiHeaders, payload); + return this.client.call('get', uri, apiHeaders, apiPayload); } /** @@ -2432,24 +2434,24 @@ export class Functions { '{functionId}', encodeURIComponent(String(functionId)), ); - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof body !== 'undefined') { - payload['body'] = body; + apiPayload['body'] = body; } if (typeof async !== 'undefined') { - payload['async'] = async; + apiPayload['async'] = async; } if (typeof xpath !== 'undefined') { - payload['path'] = xpath; + apiPayload['path'] = xpath; } if (typeof method !== 'undefined') { - payload['method'] = method; + apiPayload['method'] = method; } if (typeof headers !== 'undefined') { - payload['headers'] = headers; + apiPayload['headers'] = headers; } if (typeof scheduledAt !== 'undefined') { - payload['scheduledAt'] = scheduledAt; + apiPayload['scheduledAt'] = scheduledAt; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -2459,7 +2461,7 @@ export class Functions { accept: 'application/json', }; - return this.client.call('post', uri, apiHeaders, payload); + return this.client.call('post', uri, apiHeaders, apiPayload); } /** @@ -2525,7 +2527,7 @@ export class Functions { const apiPath = '/functions/{functionId}/executions/{executionId}' .replace('{functionId}', encodeURIComponent(String(functionId))) .replace('{executionId}', encodeURIComponent(String(executionId))); - const payload: Payload = {}; + const apiPayload: Payload = {}; const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { @@ -2533,7 +2535,7 @@ export class Functions { accept: 'application/json', }; - return this.client.call('get', uri, apiHeaders, payload); + return this.client.call('get', uri, apiHeaders, apiPayload); } /** @@ -2596,7 +2598,7 @@ export class Functions { const apiPath = '/functions/{functionId}/executions/{executionId}' .replace('{functionId}', encodeURIComponent(String(functionId))) .replace('{executionId}', encodeURIComponent(String(executionId))); - const payload: Payload = {}; + const apiPayload: Payload = {}; const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { @@ -2605,7 +2607,7 @@ export class Functions { accept: 'application/json', }; - return this.client.call('delete', uri, apiHeaders, payload); + return this.client.call('delete', uri, apiHeaders, apiPayload); } /** @@ -2676,12 +2678,12 @@ export class Functions { '{functionId}', encodeURIComponent(String(functionId)), ); - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof queries !== 'undefined') { - payload['queries'] = queries; + apiPayload['queries'] = queries; } if (typeof total !== 'undefined') { - payload['total'] = total; + apiPayload['total'] = total; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -2690,7 +2692,7 @@ export class Functions { accept: 'application/json', }; - return this.client.call('get', uri, apiHeaders, payload); + return this.client.call('get', uri, apiHeaders, apiPayload); } /** @@ -2798,18 +2800,18 @@ export class Functions { '{functionId}', encodeURIComponent(String(functionId)), ); - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof variableId !== 'undefined') { - payload['variableId'] = variableId; + apiPayload['variableId'] = variableId; } if (typeof key !== 'undefined') { - payload['key'] = key; + apiPayload['key'] = key; } if (typeof value !== 'undefined') { - payload['value'] = value; + apiPayload['value'] = value; } if (typeof secret !== 'undefined') { - payload['secret'] = secret; + apiPayload['secret'] = secret; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -2819,7 +2821,7 @@ export class Functions { accept: 'application/json', }; - return this.client.call('post', uri, apiHeaders, payload); + return this.client.call('post', uri, apiHeaders, apiPayload); } /** @@ -2885,7 +2887,7 @@ export class Functions { const apiPath = '/functions/{functionId}/variables/{variableId}' .replace('{functionId}', encodeURIComponent(String(functionId))) .replace('{variableId}', encodeURIComponent(String(variableId))); - const payload: Payload = {}; + const apiPayload: Payload = {}; const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { @@ -2893,7 +2895,7 @@ export class Functions { accept: 'application/json', }; - return this.client.call('get', uri, apiHeaders, payload); + return this.client.call('get', uri, apiHeaders, apiPayload); } /** @@ -2994,15 +2996,15 @@ export class Functions { const apiPath = '/functions/{functionId}/variables/{variableId}' .replace('{functionId}', encodeURIComponent(String(functionId))) .replace('{variableId}', encodeURIComponent(String(variableId))); - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof key !== 'undefined') { - payload['key'] = key; + apiPayload['key'] = key; } if (typeof value !== 'undefined') { - payload['value'] = value; + apiPayload['value'] = value; } if (typeof secret !== 'undefined') { - payload['secret'] = secret; + apiPayload['secret'] = secret; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -3012,7 +3014,7 @@ export class Functions { accept: 'application/json', }; - return this.client.call('put', uri, apiHeaders, payload); + return this.client.call('put', uri, apiHeaders, apiPayload); } /** @@ -3075,7 +3077,7 @@ export class Functions { const apiPath = '/functions/{functionId}/variables/{variableId}' .replace('{functionId}', encodeURIComponent(String(functionId))) .replace('{variableId}', encodeURIComponent(String(variableId))); - const payload: Payload = {}; + const apiPayload: Payload = {}; const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { @@ -3084,6 +3086,6 @@ export class Functions { accept: 'application/json', }; - return this.client.call('delete', uri, apiHeaders, payload); + return this.client.call('delete', uri, apiHeaders, apiPayload); } } diff --git a/src/services/graphql.ts b/src/services/graphql.ts index 819fe851..387518fa 100644 --- a/src/services/graphql.ts +++ b/src/services/graphql.ts @@ -46,9 +46,9 @@ export class Graphql { throw new AppwriteException('Missing required parameter: "query"'); } const apiPath = '/graphql'; - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof query !== 'undefined') { - payload['query'] = query; + apiPayload['query'] = query; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -59,7 +59,7 @@ export class Graphql { accept: 'application/json', }; - return this.client.call('post', uri, apiHeaders, payload); + return this.client.call('post', uri, apiHeaders, apiPayload); } /** @@ -101,9 +101,9 @@ export class Graphql { throw new AppwriteException('Missing required parameter: "query"'); } const apiPath = '/graphql/mutation'; - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof query !== 'undefined') { - payload['query'] = query; + apiPayload['query'] = query; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -114,6 +114,6 @@ export class Graphql { accept: 'application/json', }; - return this.client.call('post', uri, apiHeaders, payload); + return this.client.call('post', uri, apiHeaders, apiPayload); } } diff --git a/src/services/growth.ts b/src/services/growth.ts index 51eaaf3a..bb72c8fe 100644 --- a/src/services/growth.ts +++ b/src/services/growth.ts @@ -167,33 +167,33 @@ export class Growth { throw new AppwriteException('Missing required parameter: "type"'); } const apiPath = '/growth/conversations'; - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof type !== 'undefined') { - payload['type'] = type; + apiPayload['type'] = type; } if (typeof email !== 'undefined') { - payload['email'] = email; + apiPayload['email'] = email; } if (typeof name !== 'undefined') { - payload['name'] = name; + apiPayload['name'] = name; } if (typeof subject !== 'undefined') { - payload['subject'] = subject; + apiPayload['subject'] = subject; } if (typeof message !== 'undefined') { - payload['message'] = message; + apiPayload['message'] = message; } if (typeof organizationId !== 'undefined') { - payload['organizationId'] = organizationId; + apiPayload['organizationId'] = organizationId; } if (typeof projectId !== 'undefined') { - payload['projectId'] = projectId; + apiPayload['projectId'] = projectId; } if (typeof attributes !== 'undefined') { - payload['attributes'] = attributes; + apiPayload['attributes'] = attributes; } if (typeof attachment !== 'undefined') { - payload['attachment'] = attachment; + apiPayload['attachment'] = attachment; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -207,7 +207,7 @@ export class Growth { 'post', uri, apiHeaders, - payload, + apiPayload, onProgress, ); } @@ -364,39 +364,39 @@ export class Growth { const ram = params.ram; const apiPath = '/growth/installations'; - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof email !== 'undefined') { - payload['email'] = email; + apiPayload['email'] = email; } if (typeof name !== 'undefined') { - payload['name'] = name; + apiPayload['name'] = name; } if (typeof version !== 'undefined') { - payload['version'] = version; + apiPayload['version'] = version; } if (typeof domain !== 'undefined') { - payload['domain'] = domain; + apiPayload['domain'] = domain; } if (typeof database !== 'undefined') { - payload['database'] = database; + apiPayload['database'] = database; } if (typeof hostIp !== 'undefined') { - payload['hostIp'] = hostIp; + apiPayload['hostIp'] = hostIp; } if (typeof userAgent !== 'undefined') { - payload['userAgent'] = userAgent; + apiPayload['userAgent'] = userAgent; } if (typeof os !== 'undefined') { - payload['os'] = os; + apiPayload['os'] = os; } if (typeof arch !== 'undefined') { - payload['arch'] = arch; + apiPayload['arch'] = arch; } if (typeof cpus !== 'undefined') { - payload['cpus'] = cpus; + apiPayload['cpus'] = cpus; } if (typeof ram !== 'undefined') { - payload['ram'] = ram; + apiPayload['ram'] = ram; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -406,6 +406,6 @@ export class Growth { accept: 'application/json', }; - return this.client.call('post', uri, apiHeaders, payload); + return this.client.call('post', uri, apiHeaders, apiPayload); } } diff --git a/src/services/locale.ts b/src/services/locale.ts index 04a517f5..85b80390 100644 --- a/src/services/locale.ts +++ b/src/services/locale.ts @@ -18,7 +18,7 @@ export class Locale { */ get(): Promise { const apiPath = '/locale'; - const payload: Payload = {}; + const apiPayload: Payload = {}; const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { @@ -26,7 +26,7 @@ export class Locale { accept: 'application/json', }; - return this.client.call('get', uri, apiHeaders, payload); + return this.client.call('get', uri, apiHeaders, apiPayload); } /** @@ -37,7 +37,7 @@ export class Locale { */ listCodes(): Promise { const apiPath = '/locale/codes'; - const payload: Payload = {}; + const apiPayload: Payload = {}; const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { @@ -45,7 +45,7 @@ export class Locale { accept: 'application/json', }; - return this.client.call('get', uri, apiHeaders, payload); + return this.client.call('get', uri, apiHeaders, apiPayload); } /** @@ -56,7 +56,7 @@ export class Locale { */ listContinents(): Promise { const apiPath = '/locale/continents'; - const payload: Payload = {}; + const apiPayload: Payload = {}; const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { @@ -64,7 +64,7 @@ export class Locale { accept: 'application/json', }; - return this.client.call('get', uri, apiHeaders, payload); + return this.client.call('get', uri, apiHeaders, apiPayload); } /** @@ -75,7 +75,7 @@ export class Locale { */ listCountries(): Promise { const apiPath = '/locale/countries'; - const payload: Payload = {}; + const apiPayload: Payload = {}; const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { @@ -83,7 +83,7 @@ export class Locale { accept: 'application/json', }; - return this.client.call('get', uri, apiHeaders, payload); + return this.client.call('get', uri, apiHeaders, apiPayload); } /** @@ -94,7 +94,7 @@ export class Locale { */ listCountriesEU(): Promise { const apiPath = '/locale/countries/eu'; - const payload: Payload = {}; + const apiPayload: Payload = {}; const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { @@ -102,7 +102,7 @@ export class Locale { accept: 'application/json', }; - return this.client.call('get', uri, apiHeaders, payload); + return this.client.call('get', uri, apiHeaders, apiPayload); } /** @@ -113,7 +113,7 @@ export class Locale { */ listCountriesPhones(): Promise { const apiPath = '/locale/countries/phones'; - const payload: Payload = {}; + const apiPayload: Payload = {}; const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { @@ -121,7 +121,7 @@ export class Locale { accept: 'application/json', }; - return this.client.call('get', uri, apiHeaders, payload); + return this.client.call('get', uri, apiHeaders, apiPayload); } /** @@ -132,7 +132,7 @@ export class Locale { */ listCurrencies(): Promise { const apiPath = '/locale/currencies'; - const payload: Payload = {}; + const apiPayload: Payload = {}; const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { @@ -140,7 +140,7 @@ export class Locale { accept: 'application/json', }; - return this.client.call('get', uri, apiHeaders, payload); + return this.client.call('get', uri, apiHeaders, apiPayload); } /** @@ -151,7 +151,7 @@ export class Locale { */ listLanguages(): Promise { const apiPath = '/locale/languages'; - const payload: Payload = {}; + const apiPayload: Payload = {}; const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { @@ -159,6 +159,6 @@ export class Locale { accept: 'application/json', }; - return this.client.call('get', uri, apiHeaders, payload); + return this.client.call('get', uri, apiHeaders, apiPayload); } } diff --git a/src/services/manager.ts b/src/services/manager.ts index ed58a586..736aff81 100644 --- a/src/services/manager.ts +++ b/src/services/manager.ts @@ -118,24 +118,24 @@ export class Manager { ); } const apiPath = '/manager/blocks'; - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof projectId !== 'undefined') { - payload['projectId'] = projectId; + apiPayload['projectId'] = projectId; } if (typeof resourceType !== 'undefined') { - payload['resourceType'] = resourceType; + apiPayload['resourceType'] = resourceType; } if (typeof resourceId !== 'undefined') { - payload['resourceId'] = resourceId; + apiPayload['resourceId'] = resourceId; } if (typeof mode !== 'undefined') { - payload['mode'] = mode; + apiPayload['mode'] = mode; } if (typeof reason !== 'undefined') { - payload['reason'] = reason; + apiPayload['reason'] = reason; } if (typeof expiredAt !== 'undefined') { - payload['expiredAt'] = expiredAt; + apiPayload['expiredAt'] = expiredAt; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -144,7 +144,7 @@ export class Manager { accept: 'application/json', }; - return this.client.call('post', uri, apiHeaders, payload); + return this.client.call('post', uri, apiHeaders, apiPayload); } /** @@ -225,15 +225,15 @@ export class Manager { ); } const apiPath = '/manager/blocks'; - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof projectId !== 'undefined') { - payload['projectId'] = projectId; + apiPayload['projectId'] = projectId; } if (typeof resourceType !== 'undefined') { - payload['resourceType'] = resourceType; + apiPayload['resourceType'] = resourceType; } if (typeof resourceId !== 'undefined') { - payload['resourceId'] = resourceId; + apiPayload['resourceId'] = resourceId; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -242,7 +242,7 @@ export class Manager { accept: 'application/json', }; - return this.client.call('delete', uri, apiHeaders, payload); + return this.client.call('delete', uri, apiHeaders, apiPayload); } /** @@ -290,14 +290,14 @@ export class Manager { '{projectId}', encodeURIComponent(String(projectId)), ); - const payload: Payload = {}; + const apiPayload: Payload = {}; const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { accept: 'application/json', }; - return this.client.call('get', uri, apiHeaders, payload); + return this.client.call('get', uri, apiHeaders, apiPayload); } /** @@ -419,27 +419,27 @@ export class Manager { const documentId = params.documentId; const apiPath = '/manager/cache'; - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof region !== 'undefined') { - payload['region'] = region; + apiPayload['region'] = region; } if (typeof cache !== 'undefined') { - payload['cache'] = cache; + apiPayload['cache'] = cache; } if (typeof all !== 'undefined') { - payload['all'] = all; + apiPayload['all'] = all; } if (typeof database !== 'undefined') { - payload['database'] = database; + apiPayload['database'] = database; } if (typeof projectId !== 'undefined') { - payload['projectId'] = projectId; + apiPayload['projectId'] = projectId; } if (typeof collectionId !== 'undefined') { - payload['collectionId'] = collectionId; + apiPayload['collectionId'] = collectionId; } if (typeof documentId !== 'undefined') { - payload['documentId'] = documentId; + apiPayload['documentId'] = documentId; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -448,7 +448,7 @@ export class Manager { accept: 'application/json', }; - return this.client.call('delete', uri, apiHeaders, payload); + return this.client.call('delete', uri, apiHeaders, apiPayload); } /** @@ -522,15 +522,15 @@ export class Manager { throw new AppwriteException('Missing required parameter: "status"'); } const apiPath = '/manager/organizations/status'; - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof teamId !== 'undefined') { - payload['teamId'] = teamId; + apiPayload['teamId'] = teamId; } if (typeof status !== 'undefined') { - payload['status'] = status; + apiPayload['status'] = status; } if (typeof reason !== 'undefined') { - payload['reason'] = reason; + apiPayload['reason'] = reason; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -539,7 +539,7 @@ export class Manager { accept: 'application/json', }; - return this.client.call('patch', uri, apiHeaders, payload); + return this.client.call('patch', uri, apiHeaders, apiPayload); } /** @@ -628,18 +628,18 @@ export class Manager { throw new AppwriteException('Missing required parameter: "status"'); } const apiPath = '/manager/users/status'; - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof userId !== 'undefined') { - payload['userId'] = userId; + apiPayload['userId'] = userId; } if (typeof email !== 'undefined') { - payload['email'] = email; + apiPayload['email'] = email; } if (typeof status !== 'undefined') { - payload['status'] = status; + apiPayload['status'] = status; } if (typeof reason !== 'undefined') { - payload['reason'] = reason; + apiPayload['reason'] = reason; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -648,6 +648,6 @@ export class Manager { accept: 'application/json', }; - return this.client.call('patch', uri, apiHeaders, payload); + return this.client.call('patch', uri, apiHeaders, apiPayload); } } diff --git a/src/services/messaging.ts b/src/services/messaging.ts index 664f7220..dba54d51 100644 --- a/src/services/messaging.ts +++ b/src/services/messaging.ts @@ -70,15 +70,15 @@ export class Messaging { const total = params.total; const apiPath = '/messaging/messages'; - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof queries !== 'undefined') { - payload['queries'] = queries; + apiPayload['queries'] = queries; } if (typeof search !== 'undefined') { - payload['search'] = search; + apiPayload['search'] = search; } if (typeof total !== 'undefined') { - payload['total'] = total; + apiPayload['total'] = total; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -87,7 +87,7 @@ export class Messaging { accept: 'application/json', }; - return this.client.call('get', uri, apiHeaders, payload); + return this.client.call('get', uri, apiHeaders, apiPayload); } /** @@ -286,48 +286,48 @@ export class Messaging { ); } const apiPath = '/messaging/messages/email'; - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof messageId !== 'undefined') { - payload['messageId'] = messageId; + apiPayload['messageId'] = messageId; } if (typeof subject !== 'undefined') { - payload['subject'] = subject; + apiPayload['subject'] = subject; } if (typeof content !== 'undefined') { - payload['content'] = content; + apiPayload['content'] = content; } if (typeof topics !== 'undefined') { - payload['topics'] = topics; + apiPayload['topics'] = topics; } if (typeof users !== 'undefined') { - payload['users'] = users; + apiPayload['users'] = users; } if (typeof targets !== 'undefined') { - payload['targets'] = targets; + apiPayload['targets'] = targets; } if (typeof cc !== 'undefined') { - payload['cc'] = cc; + apiPayload['cc'] = cc; } if (typeof bcc !== 'undefined') { - payload['bcc'] = bcc; + apiPayload['bcc'] = bcc; } if (typeof attachments !== 'undefined') { - payload['attachments'] = attachments; + apiPayload['attachments'] = attachments; } if (typeof replyToEmail !== 'undefined') { - payload['replyToEmail'] = replyToEmail; + apiPayload['replyToEmail'] = replyToEmail; } if (typeof replyToName !== 'undefined') { - payload['replyToName'] = replyToName; + apiPayload['replyToName'] = replyToName; } if (typeof draft !== 'undefined') { - payload['draft'] = draft; + apiPayload['draft'] = draft; } if (typeof html !== 'undefined') { - payload['html'] = html; + apiPayload['html'] = html; } if (typeof scheduledAt !== 'undefined') { - payload['scheduledAt'] = scheduledAt; + apiPayload['scheduledAt'] = scheduledAt; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -337,7 +337,7 @@ export class Messaging { accept: 'application/json', }; - return this.client.call('post', uri, apiHeaders, payload); + return this.client.call('post', uri, apiHeaders, apiPayload); } /** @@ -531,45 +531,45 @@ export class Messaging { '{messageId}', encodeURIComponent(String(messageId)), ); - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof topics !== 'undefined') { - payload['topics'] = topics; + apiPayload['topics'] = topics; } if (typeof users !== 'undefined') { - payload['users'] = users; + apiPayload['users'] = users; } if (typeof targets !== 'undefined') { - payload['targets'] = targets; + apiPayload['targets'] = targets; } if (typeof subject !== 'undefined') { - payload['subject'] = subject; + apiPayload['subject'] = subject; } if (typeof content !== 'undefined') { - payload['content'] = content; + apiPayload['content'] = content; } if (typeof draft !== 'undefined') { - payload['draft'] = draft; + apiPayload['draft'] = draft; } if (typeof html !== 'undefined') { - payload['html'] = html; + apiPayload['html'] = html; } if (typeof cc !== 'undefined') { - payload['cc'] = cc; + apiPayload['cc'] = cc; } if (typeof bcc !== 'undefined') { - payload['bcc'] = bcc; + apiPayload['bcc'] = bcc; } if (typeof replyToEmail !== 'undefined') { - payload['replyToEmail'] = replyToEmail; + apiPayload['replyToEmail'] = replyToEmail; } if (typeof replyToName !== 'undefined') { - payload['replyToName'] = replyToName; + apiPayload['replyToName'] = replyToName; } if (typeof scheduledAt !== 'undefined') { - payload['scheduledAt'] = scheduledAt; + apiPayload['scheduledAt'] = scheduledAt; } if (typeof attachments !== 'undefined') { - payload['attachments'] = attachments; + apiPayload['attachments'] = attachments; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -579,7 +579,7 @@ export class Messaging { accept: 'application/json', }; - return this.client.call('patch', uri, apiHeaders, payload); + return this.client.call('patch', uri, apiHeaders, apiPayload); } /** @@ -818,63 +818,63 @@ export class Messaging { ); } const apiPath = '/messaging/messages/push'; - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof messageId !== 'undefined') { - payload['messageId'] = messageId; + apiPayload['messageId'] = messageId; } if (typeof title !== 'undefined') { - payload['title'] = title; + apiPayload['title'] = title; } if (typeof body !== 'undefined') { - payload['body'] = body; + apiPayload['body'] = body; } if (typeof topics !== 'undefined') { - payload['topics'] = topics; + apiPayload['topics'] = topics; } if (typeof users !== 'undefined') { - payload['users'] = users; + apiPayload['users'] = users; } if (typeof targets !== 'undefined') { - payload['targets'] = targets; + apiPayload['targets'] = targets; } if (typeof data !== 'undefined') { - payload['data'] = data; + apiPayload['data'] = data; } if (typeof action !== 'undefined') { - payload['action'] = action; + apiPayload['action'] = action; } if (typeof image !== 'undefined') { - payload['image'] = image; + apiPayload['image'] = image; } if (typeof icon !== 'undefined') { - payload['icon'] = icon; + apiPayload['icon'] = icon; } if (typeof sound !== 'undefined') { - payload['sound'] = sound; + apiPayload['sound'] = sound; } if (typeof color !== 'undefined') { - payload['color'] = color; + apiPayload['color'] = color; } if (typeof tag !== 'undefined') { - payload['tag'] = tag; + apiPayload['tag'] = tag; } if (typeof badge !== 'undefined') { - payload['badge'] = badge; + apiPayload['badge'] = badge; } if (typeof draft !== 'undefined') { - payload['draft'] = draft; + apiPayload['draft'] = draft; } if (typeof scheduledAt !== 'undefined') { - payload['scheduledAt'] = scheduledAt; + apiPayload['scheduledAt'] = scheduledAt; } if (typeof contentAvailable !== 'undefined') { - payload['contentAvailable'] = contentAvailable; + apiPayload['contentAvailable'] = contentAvailable; } if (typeof critical !== 'undefined') { - payload['critical'] = critical; + apiPayload['critical'] = critical; } if (typeof priority !== 'undefined') { - payload['priority'] = priority; + apiPayload['priority'] = priority; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -884,7 +884,7 @@ export class Messaging { accept: 'application/json', }; - return this.client.call('post', uri, apiHeaders, payload); + return this.client.call('post', uri, apiHeaders, apiPayload); } /** @@ -1128,60 +1128,60 @@ export class Messaging { '{messageId}', encodeURIComponent(String(messageId)), ); - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof topics !== 'undefined') { - payload['topics'] = topics; + apiPayload['topics'] = topics; } if (typeof users !== 'undefined') { - payload['users'] = users; + apiPayload['users'] = users; } if (typeof targets !== 'undefined') { - payload['targets'] = targets; + apiPayload['targets'] = targets; } if (typeof title !== 'undefined') { - payload['title'] = title; + apiPayload['title'] = title; } if (typeof body !== 'undefined') { - payload['body'] = body; + apiPayload['body'] = body; } if (typeof data !== 'undefined') { - payload['data'] = data; + apiPayload['data'] = data; } if (typeof action !== 'undefined') { - payload['action'] = action; + apiPayload['action'] = action; } if (typeof image !== 'undefined') { - payload['image'] = image; + apiPayload['image'] = image; } if (typeof icon !== 'undefined') { - payload['icon'] = icon; + apiPayload['icon'] = icon; } if (typeof sound !== 'undefined') { - payload['sound'] = sound; + apiPayload['sound'] = sound; } if (typeof color !== 'undefined') { - payload['color'] = color; + apiPayload['color'] = color; } if (typeof tag !== 'undefined') { - payload['tag'] = tag; + apiPayload['tag'] = tag; } if (typeof badge !== 'undefined') { - payload['badge'] = badge; + apiPayload['badge'] = badge; } if (typeof draft !== 'undefined') { - payload['draft'] = draft; + apiPayload['draft'] = draft; } if (typeof scheduledAt !== 'undefined') { - payload['scheduledAt'] = scheduledAt; + apiPayload['scheduledAt'] = scheduledAt; } if (typeof contentAvailable !== 'undefined') { - payload['contentAvailable'] = contentAvailable; + apiPayload['contentAvailable'] = contentAvailable; } if (typeof critical !== 'undefined') { - payload['critical'] = critical; + apiPayload['critical'] = critical; } if (typeof priority !== 'undefined') { - payload['priority'] = priority; + apiPayload['priority'] = priority; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -1191,7 +1191,7 @@ export class Messaging { accept: 'application/json', }; - return this.client.call('patch', uri, apiHeaders, payload); + return this.client.call('patch', uri, apiHeaders, apiPayload); } /** @@ -1309,27 +1309,27 @@ export class Messaging { ); } const apiPath = '/messaging/messages/sms'; - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof messageId !== 'undefined') { - payload['messageId'] = messageId; + apiPayload['messageId'] = messageId; } if (typeof content !== 'undefined') { - payload['content'] = content; + apiPayload['content'] = content; } if (typeof topics !== 'undefined') { - payload['topics'] = topics; + apiPayload['topics'] = topics; } if (typeof users !== 'undefined') { - payload['users'] = users; + apiPayload['users'] = users; } if (typeof targets !== 'undefined') { - payload['targets'] = targets; + apiPayload['targets'] = targets; } if (typeof draft !== 'undefined') { - payload['draft'] = draft; + apiPayload['draft'] = draft; } if (typeof scheduledAt !== 'undefined') { - payload['scheduledAt'] = scheduledAt; + apiPayload['scheduledAt'] = scheduledAt; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -1339,7 +1339,7 @@ export class Messaging { accept: 'application/json', }; - return this.client.call('post', uri, apiHeaders, payload); + return this.client.call('post', uri, apiHeaders, apiPayload); } /** @@ -1456,27 +1456,27 @@ export class Messaging { ); } const apiPath = '/messaging/messages/sms'; - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof messageId !== 'undefined') { - payload['messageId'] = messageId; + apiPayload['messageId'] = messageId; } if (typeof content !== 'undefined') { - payload['content'] = content; + apiPayload['content'] = content; } if (typeof topics !== 'undefined') { - payload['topics'] = topics; + apiPayload['topics'] = topics; } if (typeof users !== 'undefined') { - payload['users'] = users; + apiPayload['users'] = users; } if (typeof targets !== 'undefined') { - payload['targets'] = targets; + apiPayload['targets'] = targets; } if (typeof draft !== 'undefined') { - payload['draft'] = draft; + apiPayload['draft'] = draft; } if (typeof scheduledAt !== 'undefined') { - payload['scheduledAt'] = scheduledAt; + apiPayload['scheduledAt'] = scheduledAt; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -1486,7 +1486,7 @@ export class Messaging { accept: 'application/json', }; - return this.client.call('post', uri, apiHeaders, payload); + return this.client.call('post', uri, apiHeaders, apiPayload); } /** @@ -1604,24 +1604,24 @@ export class Messaging { '{messageId}', encodeURIComponent(String(messageId)), ); - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof topics !== 'undefined') { - payload['topics'] = topics; + apiPayload['topics'] = topics; } if (typeof users !== 'undefined') { - payload['users'] = users; + apiPayload['users'] = users; } if (typeof targets !== 'undefined') { - payload['targets'] = targets; + apiPayload['targets'] = targets; } if (typeof content !== 'undefined') { - payload['content'] = content; + apiPayload['content'] = content; } if (typeof draft !== 'undefined') { - payload['draft'] = draft; + apiPayload['draft'] = draft; } if (typeof scheduledAt !== 'undefined') { - payload['scheduledAt'] = scheduledAt; + apiPayload['scheduledAt'] = scheduledAt; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -1631,7 +1631,7 @@ export class Messaging { accept: 'application/json', }; - return this.client.call('patch', uri, apiHeaders, payload); + return this.client.call('patch', uri, apiHeaders, apiPayload); } /** @@ -1748,24 +1748,24 @@ export class Messaging { '{messageId}', encodeURIComponent(String(messageId)), ); - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof topics !== 'undefined') { - payload['topics'] = topics; + apiPayload['topics'] = topics; } if (typeof users !== 'undefined') { - payload['users'] = users; + apiPayload['users'] = users; } if (typeof targets !== 'undefined') { - payload['targets'] = targets; + apiPayload['targets'] = targets; } if (typeof content !== 'undefined') { - payload['content'] = content; + apiPayload['content'] = content; } if (typeof draft !== 'undefined') { - payload['draft'] = draft; + apiPayload['draft'] = draft; } if (typeof scheduledAt !== 'undefined') { - payload['scheduledAt'] = scheduledAt; + apiPayload['scheduledAt'] = scheduledAt; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -1775,7 +1775,7 @@ export class Messaging { accept: 'application/json', }; - return this.client.call('patch', uri, apiHeaders, payload); + return this.client.call('patch', uri, apiHeaders, apiPayload); } /** @@ -1825,7 +1825,7 @@ export class Messaging { '{messageId}', encodeURIComponent(String(messageId)), ); - const payload: Payload = {}; + const apiPayload: Payload = {}; const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { @@ -1833,7 +1833,7 @@ export class Messaging { accept: 'application/json', }; - return this.client.call('get', uri, apiHeaders, payload); + return this.client.call('get', uri, apiHeaders, apiPayload); } /** @@ -1879,7 +1879,7 @@ export class Messaging { '{messageId}', encodeURIComponent(String(messageId)), ); - const payload: Payload = {}; + const apiPayload: Payload = {}; const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { @@ -1888,7 +1888,7 @@ export class Messaging { accept: 'application/json', }; - return this.client.call('delete', uri, apiHeaders, payload); + return this.client.call('delete', uri, apiHeaders, apiPayload); } /** @@ -1958,12 +1958,12 @@ export class Messaging { '{messageId}', encodeURIComponent(String(messageId)), ); - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof queries !== 'undefined') { - payload['queries'] = queries; + apiPayload['queries'] = queries; } if (typeof total !== 'undefined') { - payload['total'] = total; + apiPayload['total'] = total; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -1972,7 +1972,7 @@ export class Messaging { accept: 'application/json', }; - return this.client.call('get', uri, apiHeaders, payload); + return this.client.call('get', uri, apiHeaders, apiPayload); } /** @@ -2035,15 +2035,15 @@ export class Messaging { const total = params.total; const apiPath = '/messaging/providers'; - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof queries !== 'undefined') { - payload['queries'] = queries; + apiPayload['queries'] = queries; } if (typeof search !== 'undefined') { - payload['search'] = search; + apiPayload['search'] = search; } if (typeof total !== 'undefined') { - payload['total'] = total; + apiPayload['total'] = total; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -2052,7 +2052,7 @@ export class Messaging { accept: 'application/json', }; - return this.client.call('get', uri, apiHeaders, payload); + return this.client.call('get', uri, apiHeaders, apiPayload); } /** @@ -2185,30 +2185,30 @@ export class Messaging { throw new AppwriteException('Missing required parameter: "name"'); } const apiPath = '/messaging/providers/apns'; - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof providerId !== 'undefined') { - payload['providerId'] = providerId; + apiPayload['providerId'] = providerId; } if (typeof name !== 'undefined') { - payload['name'] = name; + apiPayload['name'] = name; } if (typeof authKey !== 'undefined') { - payload['authKey'] = authKey; + apiPayload['authKey'] = authKey; } if (typeof authKeyId !== 'undefined') { - payload['authKeyId'] = authKeyId; + apiPayload['authKeyId'] = authKeyId; } if (typeof teamId !== 'undefined') { - payload['teamId'] = teamId; + apiPayload['teamId'] = teamId; } if (typeof bundleId !== 'undefined') { - payload['bundleId'] = bundleId; + apiPayload['bundleId'] = bundleId; } if (typeof sandbox !== 'undefined') { - payload['sandbox'] = sandbox; + apiPayload['sandbox'] = sandbox; } if (typeof enabled !== 'undefined') { - payload['enabled'] = enabled; + apiPayload['enabled'] = enabled; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -2218,7 +2218,7 @@ export class Messaging { accept: 'application/json', }; - return this.client.call('post', uri, apiHeaders, payload); + return this.client.call('post', uri, apiHeaders, apiPayload); } /** @@ -2350,30 +2350,30 @@ export class Messaging { throw new AppwriteException('Missing required parameter: "name"'); } const apiPath = '/messaging/providers/apns'; - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof providerId !== 'undefined') { - payload['providerId'] = providerId; + apiPayload['providerId'] = providerId; } if (typeof name !== 'undefined') { - payload['name'] = name; + apiPayload['name'] = name; } if (typeof authKey !== 'undefined') { - payload['authKey'] = authKey; + apiPayload['authKey'] = authKey; } if (typeof authKeyId !== 'undefined') { - payload['authKeyId'] = authKeyId; + apiPayload['authKeyId'] = authKeyId; } if (typeof teamId !== 'undefined') { - payload['teamId'] = teamId; + apiPayload['teamId'] = teamId; } if (typeof bundleId !== 'undefined') { - payload['bundleId'] = bundleId; + apiPayload['bundleId'] = bundleId; } if (typeof sandbox !== 'undefined') { - payload['sandbox'] = sandbox; + apiPayload['sandbox'] = sandbox; } if (typeof enabled !== 'undefined') { - payload['enabled'] = enabled; + apiPayload['enabled'] = enabled; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -2383,7 +2383,7 @@ export class Messaging { accept: 'application/json', }; - return this.client.call('post', uri, apiHeaders, payload); + return this.client.call('post', uri, apiHeaders, apiPayload); } /** @@ -2516,27 +2516,27 @@ export class Messaging { '{providerId}', encodeURIComponent(String(providerId)), ); - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof name !== 'undefined') { - payload['name'] = name; + apiPayload['name'] = name; } if (typeof enabled !== 'undefined') { - payload['enabled'] = enabled; + apiPayload['enabled'] = enabled; } if (typeof authKey !== 'undefined') { - payload['authKey'] = authKey; + apiPayload['authKey'] = authKey; } if (typeof authKeyId !== 'undefined') { - payload['authKeyId'] = authKeyId; + apiPayload['authKeyId'] = authKeyId; } if (typeof teamId !== 'undefined') { - payload['teamId'] = teamId; + apiPayload['teamId'] = teamId; } if (typeof bundleId !== 'undefined') { - payload['bundleId'] = bundleId; + apiPayload['bundleId'] = bundleId; } if (typeof sandbox !== 'undefined') { - payload['sandbox'] = sandbox; + apiPayload['sandbox'] = sandbox; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -2546,7 +2546,7 @@ export class Messaging { accept: 'application/json', }; - return this.client.call('patch', uri, apiHeaders, payload); + return this.client.call('patch', uri, apiHeaders, apiPayload); } /** @@ -2678,27 +2678,27 @@ export class Messaging { '{providerId}', encodeURIComponent(String(providerId)), ); - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof name !== 'undefined') { - payload['name'] = name; + apiPayload['name'] = name; } if (typeof enabled !== 'undefined') { - payload['enabled'] = enabled; + apiPayload['enabled'] = enabled; } if (typeof authKey !== 'undefined') { - payload['authKey'] = authKey; + apiPayload['authKey'] = authKey; } if (typeof authKeyId !== 'undefined') { - payload['authKeyId'] = authKeyId; + apiPayload['authKeyId'] = authKeyId; } if (typeof teamId !== 'undefined') { - payload['teamId'] = teamId; + apiPayload['teamId'] = teamId; } if (typeof bundleId !== 'undefined') { - payload['bundleId'] = bundleId; + apiPayload['bundleId'] = bundleId; } if (typeof sandbox !== 'undefined') { - payload['sandbox'] = sandbox; + apiPayload['sandbox'] = sandbox; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -2708,7 +2708,7 @@ export class Messaging { accept: 'application/json', }; - return this.client.call('patch', uri, apiHeaders, payload); + return this.client.call('patch', uri, apiHeaders, apiPayload); } /** @@ -2805,21 +2805,21 @@ export class Messaging { throw new AppwriteException('Missing required parameter: "name"'); } const apiPath = '/messaging/providers/appwrite'; - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof providerId !== 'undefined') { - payload['providerId'] = providerId; + apiPayload['providerId'] = providerId; } if (typeof name !== 'undefined') { - payload['name'] = name; + apiPayload['name'] = name; } if (typeof enabled !== 'undefined') { - payload['enabled'] = enabled; + apiPayload['enabled'] = enabled; } if (typeof qos !== 'undefined') { - payload['qos'] = qos; + apiPayload['qos'] = qos; } if (typeof expiry !== 'undefined') { - payload['expiry'] = expiry; + apiPayload['expiry'] = expiry; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -2829,7 +2829,7 @@ export class Messaging { accept: 'application/json', }; - return this.client.call('post', uri, apiHeaders, payload); + return this.client.call('post', uri, apiHeaders, apiPayload); } /** @@ -2926,18 +2926,18 @@ export class Messaging { '{providerId}', encodeURIComponent(String(providerId)), ); - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof name !== 'undefined') { - payload['name'] = name; + apiPayload['name'] = name; } if (typeof enabled !== 'undefined') { - payload['enabled'] = enabled; + apiPayload['enabled'] = enabled; } if (typeof qos !== 'undefined') { - payload['qos'] = qos; + apiPayload['qos'] = qos; } if (typeof expiry !== 'undefined') { - payload['expiry'] = expiry; + apiPayload['expiry'] = expiry; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -2947,7 +2947,7 @@ export class Messaging { accept: 'application/json', }; - return this.client.call('patch', uri, apiHeaders, payload); + return this.client.call('patch', uri, apiHeaders, apiPayload); } /** @@ -3036,18 +3036,18 @@ export class Messaging { throw new AppwriteException('Missing required parameter: "name"'); } const apiPath = '/messaging/providers/fcm'; - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof providerId !== 'undefined') { - payload['providerId'] = providerId; + apiPayload['providerId'] = providerId; } if (typeof name !== 'undefined') { - payload['name'] = name; + apiPayload['name'] = name; } if (typeof serviceAccountJSON !== 'undefined') { - payload['serviceAccountJSON'] = serviceAccountJSON; + apiPayload['serviceAccountJSON'] = serviceAccountJSON; } if (typeof enabled !== 'undefined') { - payload['enabled'] = enabled; + apiPayload['enabled'] = enabled; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -3057,7 +3057,7 @@ export class Messaging { accept: 'application/json', }; - return this.client.call('post', uri, apiHeaders, payload); + return this.client.call('post', uri, apiHeaders, apiPayload); } /** @@ -3145,18 +3145,18 @@ export class Messaging { throw new AppwriteException('Missing required parameter: "name"'); } const apiPath = '/messaging/providers/fcm'; - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof providerId !== 'undefined') { - payload['providerId'] = providerId; + apiPayload['providerId'] = providerId; } if (typeof name !== 'undefined') { - payload['name'] = name; + apiPayload['name'] = name; } if (typeof serviceAccountJSON !== 'undefined') { - payload['serviceAccountJSON'] = serviceAccountJSON; + apiPayload['serviceAccountJSON'] = serviceAccountJSON; } if (typeof enabled !== 'undefined') { - payload['enabled'] = enabled; + apiPayload['enabled'] = enabled; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -3166,7 +3166,7 @@ export class Messaging { accept: 'application/json', }; - return this.client.call('post', uri, apiHeaders, payload); + return this.client.call('post', uri, apiHeaders, apiPayload); } /** @@ -3255,15 +3255,15 @@ export class Messaging { '{providerId}', encodeURIComponent(String(providerId)), ); - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof name !== 'undefined') { - payload['name'] = name; + apiPayload['name'] = name; } if (typeof enabled !== 'undefined') { - payload['enabled'] = enabled; + apiPayload['enabled'] = enabled; } if (typeof serviceAccountJSON !== 'undefined') { - payload['serviceAccountJSON'] = serviceAccountJSON; + apiPayload['serviceAccountJSON'] = serviceAccountJSON; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -3273,7 +3273,7 @@ export class Messaging { accept: 'application/json', }; - return this.client.call('patch', uri, apiHeaders, payload); + return this.client.call('patch', uri, apiHeaders, apiPayload); } /** @@ -3361,15 +3361,15 @@ export class Messaging { '{providerId}', encodeURIComponent(String(providerId)), ); - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof name !== 'undefined') { - payload['name'] = name; + apiPayload['name'] = name; } if (typeof enabled !== 'undefined') { - payload['enabled'] = enabled; + apiPayload['enabled'] = enabled; } if (typeof serviceAccountJSON !== 'undefined') { - payload['serviceAccountJSON'] = serviceAccountJSON; + apiPayload['serviceAccountJSON'] = serviceAccountJSON; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -3379,7 +3379,7 @@ export class Messaging { accept: 'application/json', }; - return this.client.call('patch', uri, apiHeaders, payload); + return this.client.call('patch', uri, apiHeaders, apiPayload); } /** @@ -3531,36 +3531,36 @@ export class Messaging { throw new AppwriteException('Missing required parameter: "name"'); } const apiPath = '/messaging/providers/mailgun'; - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof providerId !== 'undefined') { - payload['providerId'] = providerId; + apiPayload['providerId'] = providerId; } if (typeof name !== 'undefined') { - payload['name'] = name; + apiPayload['name'] = name; } if (typeof apiKey !== 'undefined') { - payload['apiKey'] = apiKey; + apiPayload['apiKey'] = apiKey; } if (typeof domain !== 'undefined') { - payload['domain'] = domain; + apiPayload['domain'] = domain; } if (typeof isEuRegion !== 'undefined') { - payload['isEuRegion'] = isEuRegion; + apiPayload['isEuRegion'] = isEuRegion; } if (typeof fromName !== 'undefined') { - payload['fromName'] = fromName; + apiPayload['fromName'] = fromName; } if (typeof fromEmail !== 'undefined') { - payload['fromEmail'] = fromEmail; + apiPayload['fromEmail'] = fromEmail; } if (typeof replyToName !== 'undefined') { - payload['replyToName'] = replyToName; + apiPayload['replyToName'] = replyToName; } if (typeof replyToEmail !== 'undefined') { - payload['replyToEmail'] = replyToEmail; + apiPayload['replyToEmail'] = replyToEmail; } if (typeof enabled !== 'undefined') { - payload['enabled'] = enabled; + apiPayload['enabled'] = enabled; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -3570,7 +3570,7 @@ export class Messaging { accept: 'application/json', }; - return this.client.call('post', uri, apiHeaders, payload); + return this.client.call('post', uri, apiHeaders, apiPayload); } /** @@ -3722,33 +3722,33 @@ export class Messaging { '{providerId}', encodeURIComponent(String(providerId)), ); - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof name !== 'undefined') { - payload['name'] = name; + apiPayload['name'] = name; } if (typeof apiKey !== 'undefined') { - payload['apiKey'] = apiKey; + apiPayload['apiKey'] = apiKey; } if (typeof domain !== 'undefined') { - payload['domain'] = domain; + apiPayload['domain'] = domain; } if (typeof isEuRegion !== 'undefined') { - payload['isEuRegion'] = isEuRegion; + apiPayload['isEuRegion'] = isEuRegion; } if (typeof enabled !== 'undefined') { - payload['enabled'] = enabled; + apiPayload['enabled'] = enabled; } if (typeof fromName !== 'undefined') { - payload['fromName'] = fromName; + apiPayload['fromName'] = fromName; } if (typeof fromEmail !== 'undefined') { - payload['fromEmail'] = fromEmail; + apiPayload['fromEmail'] = fromEmail; } if (typeof replyToName !== 'undefined') { - payload['replyToName'] = replyToName; + apiPayload['replyToName'] = replyToName; } if (typeof replyToEmail !== 'undefined') { - payload['replyToEmail'] = replyToEmail; + apiPayload['replyToEmail'] = replyToEmail; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -3758,7 +3758,7 @@ export class Messaging { accept: 'application/json', }; - return this.client.call('patch', uri, apiHeaders, payload); + return this.client.call('patch', uri, apiHeaders, apiPayload); } /** @@ -3864,24 +3864,24 @@ export class Messaging { throw new AppwriteException('Missing required parameter: "name"'); } const apiPath = '/messaging/providers/msg91'; - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof providerId !== 'undefined') { - payload['providerId'] = providerId; + apiPayload['providerId'] = providerId; } if (typeof name !== 'undefined') { - payload['name'] = name; + apiPayload['name'] = name; } if (typeof templateId !== 'undefined') { - payload['templateId'] = templateId; + apiPayload['templateId'] = templateId; } if (typeof senderId !== 'undefined') { - payload['senderId'] = senderId; + apiPayload['senderId'] = senderId; } if (typeof authKey !== 'undefined') { - payload['authKey'] = authKey; + apiPayload['authKey'] = authKey; } if (typeof enabled !== 'undefined') { - payload['enabled'] = enabled; + apiPayload['enabled'] = enabled; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -3891,7 +3891,7 @@ export class Messaging { accept: 'application/json', }; - return this.client.call('post', uri, apiHeaders, payload); + return this.client.call('post', uri, apiHeaders, apiPayload); } /** @@ -3997,21 +3997,21 @@ export class Messaging { '{providerId}', encodeURIComponent(String(providerId)), ); - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof name !== 'undefined') { - payload['name'] = name; + apiPayload['name'] = name; } if (typeof enabled !== 'undefined') { - payload['enabled'] = enabled; + apiPayload['enabled'] = enabled; } if (typeof templateId !== 'undefined') { - payload['templateId'] = templateId; + apiPayload['templateId'] = templateId; } if (typeof senderId !== 'undefined') { - payload['senderId'] = senderId; + apiPayload['senderId'] = senderId; } if (typeof authKey !== 'undefined') { - payload['authKey'] = authKey; + apiPayload['authKey'] = authKey; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -4021,7 +4021,7 @@ export class Messaging { accept: 'application/json', }; - return this.client.call('patch', uri, apiHeaders, payload); + return this.client.call('patch', uri, apiHeaders, apiPayload); } /** @@ -4153,30 +4153,30 @@ export class Messaging { throw new AppwriteException('Missing required parameter: "name"'); } const apiPath = '/messaging/providers/resend'; - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof providerId !== 'undefined') { - payload['providerId'] = providerId; + apiPayload['providerId'] = providerId; } if (typeof name !== 'undefined') { - payload['name'] = name; + apiPayload['name'] = name; } if (typeof apiKey !== 'undefined') { - payload['apiKey'] = apiKey; + apiPayload['apiKey'] = apiKey; } if (typeof fromName !== 'undefined') { - payload['fromName'] = fromName; + apiPayload['fromName'] = fromName; } if (typeof fromEmail !== 'undefined') { - payload['fromEmail'] = fromEmail; + apiPayload['fromEmail'] = fromEmail; } if (typeof replyToName !== 'undefined') { - payload['replyToName'] = replyToName; + apiPayload['replyToName'] = replyToName; } if (typeof replyToEmail !== 'undefined') { - payload['replyToEmail'] = replyToEmail; + apiPayload['replyToEmail'] = replyToEmail; } if (typeof enabled !== 'undefined') { - payload['enabled'] = enabled; + apiPayload['enabled'] = enabled; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -4186,7 +4186,7 @@ export class Messaging { accept: 'application/json', }; - return this.client.call('post', uri, apiHeaders, payload); + return this.client.call('post', uri, apiHeaders, apiPayload); } /** @@ -4318,27 +4318,27 @@ export class Messaging { '{providerId}', encodeURIComponent(String(providerId)), ); - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof name !== 'undefined') { - payload['name'] = name; + apiPayload['name'] = name; } if (typeof enabled !== 'undefined') { - payload['enabled'] = enabled; + apiPayload['enabled'] = enabled; } if (typeof apiKey !== 'undefined') { - payload['apiKey'] = apiKey; + apiPayload['apiKey'] = apiKey; } if (typeof fromName !== 'undefined') { - payload['fromName'] = fromName; + apiPayload['fromName'] = fromName; } if (typeof fromEmail !== 'undefined') { - payload['fromEmail'] = fromEmail; + apiPayload['fromEmail'] = fromEmail; } if (typeof replyToName !== 'undefined') { - payload['replyToName'] = replyToName; + apiPayload['replyToName'] = replyToName; } if (typeof replyToEmail !== 'undefined') { - payload['replyToEmail'] = replyToEmail; + apiPayload['replyToEmail'] = replyToEmail; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -4348,7 +4348,7 @@ export class Messaging { accept: 'application/json', }; - return this.client.call('patch', uri, apiHeaders, payload); + return this.client.call('patch', uri, apiHeaders, apiPayload); } /** @@ -4480,30 +4480,30 @@ export class Messaging { throw new AppwriteException('Missing required parameter: "name"'); } const apiPath = '/messaging/providers/sendgrid'; - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof providerId !== 'undefined') { - payload['providerId'] = providerId; + apiPayload['providerId'] = providerId; } if (typeof name !== 'undefined') { - payload['name'] = name; + apiPayload['name'] = name; } if (typeof apiKey !== 'undefined') { - payload['apiKey'] = apiKey; + apiPayload['apiKey'] = apiKey; } if (typeof fromName !== 'undefined') { - payload['fromName'] = fromName; + apiPayload['fromName'] = fromName; } if (typeof fromEmail !== 'undefined') { - payload['fromEmail'] = fromEmail; + apiPayload['fromEmail'] = fromEmail; } if (typeof replyToName !== 'undefined') { - payload['replyToName'] = replyToName; + apiPayload['replyToName'] = replyToName; } if (typeof replyToEmail !== 'undefined') { - payload['replyToEmail'] = replyToEmail; + apiPayload['replyToEmail'] = replyToEmail; } if (typeof enabled !== 'undefined') { - payload['enabled'] = enabled; + apiPayload['enabled'] = enabled; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -4513,7 +4513,7 @@ export class Messaging { accept: 'application/json', }; - return this.client.call('post', uri, apiHeaders, payload); + return this.client.call('post', uri, apiHeaders, apiPayload); } /** @@ -4645,27 +4645,27 @@ export class Messaging { '{providerId}', encodeURIComponent(String(providerId)), ); - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof name !== 'undefined') { - payload['name'] = name; + apiPayload['name'] = name; } if (typeof enabled !== 'undefined') { - payload['enabled'] = enabled; + apiPayload['enabled'] = enabled; } if (typeof apiKey !== 'undefined') { - payload['apiKey'] = apiKey; + apiPayload['apiKey'] = apiKey; } if (typeof fromName !== 'undefined') { - payload['fromName'] = fromName; + apiPayload['fromName'] = fromName; } if (typeof fromEmail !== 'undefined') { - payload['fromEmail'] = fromEmail; + apiPayload['fromEmail'] = fromEmail; } if (typeof replyToName !== 'undefined') { - payload['replyToName'] = replyToName; + apiPayload['replyToName'] = replyToName; } if (typeof replyToEmail !== 'undefined') { - payload['replyToEmail'] = replyToEmail; + apiPayload['replyToEmail'] = replyToEmail; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -4675,7 +4675,7 @@ export class Messaging { accept: 'application/json', }; - return this.client.call('patch', uri, apiHeaders, payload); + return this.client.call('patch', uri, apiHeaders, apiPayload); } /** @@ -4827,36 +4827,36 @@ export class Messaging { throw new AppwriteException('Missing required parameter: "name"'); } const apiPath = '/messaging/providers/ses'; - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof providerId !== 'undefined') { - payload['providerId'] = providerId; + apiPayload['providerId'] = providerId; } if (typeof name !== 'undefined') { - payload['name'] = name; + apiPayload['name'] = name; } if (typeof accessKey !== 'undefined') { - payload['accessKey'] = accessKey; + apiPayload['accessKey'] = accessKey; } if (typeof secretKey !== 'undefined') { - payload['secretKey'] = secretKey; + apiPayload['secretKey'] = secretKey; } if (typeof region !== 'undefined') { - payload['region'] = region; + apiPayload['region'] = region; } if (typeof fromName !== 'undefined') { - payload['fromName'] = fromName; + apiPayload['fromName'] = fromName; } if (typeof fromEmail !== 'undefined') { - payload['fromEmail'] = fromEmail; + apiPayload['fromEmail'] = fromEmail; } if (typeof replyToName !== 'undefined') { - payload['replyToName'] = replyToName; + apiPayload['replyToName'] = replyToName; } if (typeof replyToEmail !== 'undefined') { - payload['replyToEmail'] = replyToEmail; + apiPayload['replyToEmail'] = replyToEmail; } if (typeof enabled !== 'undefined') { - payload['enabled'] = enabled; + apiPayload['enabled'] = enabled; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -4866,7 +4866,7 @@ export class Messaging { accept: 'application/json', }; - return this.client.call('post', uri, apiHeaders, payload); + return this.client.call('post', uri, apiHeaders, apiPayload); } /** @@ -5018,33 +5018,33 @@ export class Messaging { '{providerId}', encodeURIComponent(String(providerId)), ); - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof name !== 'undefined') { - payload['name'] = name; + apiPayload['name'] = name; } if (typeof enabled !== 'undefined') { - payload['enabled'] = enabled; + apiPayload['enabled'] = enabled; } if (typeof accessKey !== 'undefined') { - payload['accessKey'] = accessKey; + apiPayload['accessKey'] = accessKey; } if (typeof secretKey !== 'undefined') { - payload['secretKey'] = secretKey; + apiPayload['secretKey'] = secretKey; } if (typeof region !== 'undefined') { - payload['region'] = region; + apiPayload['region'] = region; } if (typeof fromName !== 'undefined') { - payload['fromName'] = fromName; + apiPayload['fromName'] = fromName; } if (typeof fromEmail !== 'undefined') { - payload['fromEmail'] = fromEmail; + apiPayload['fromEmail'] = fromEmail; } if (typeof replyToName !== 'undefined') { - payload['replyToName'] = replyToName; + apiPayload['replyToName'] = replyToName; } if (typeof replyToEmail !== 'undefined') { - payload['replyToEmail'] = replyToEmail; + apiPayload['replyToEmail'] = replyToEmail; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -5054,7 +5054,7 @@ export class Messaging { accept: 'application/json', }; - return this.client.call('patch', uri, apiHeaders, payload); + return this.client.call('patch', uri, apiHeaders, apiPayload); } /** @@ -5250,48 +5250,48 @@ export class Messaging { throw new AppwriteException('Missing required parameter: "host"'); } const apiPath = '/messaging/providers/smtp'; - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof providerId !== 'undefined') { - payload['providerId'] = providerId; + apiPayload['providerId'] = providerId; } if (typeof name !== 'undefined') { - payload['name'] = name; + apiPayload['name'] = name; } if (typeof host !== 'undefined') { - payload['host'] = host; + apiPayload['host'] = host; } if (typeof port !== 'undefined') { - payload['port'] = port; + apiPayload['port'] = port; } if (typeof username !== 'undefined') { - payload['username'] = username; + apiPayload['username'] = username; } if (typeof password !== 'undefined') { - payload['password'] = password; + apiPayload['password'] = password; } if (typeof encryption !== 'undefined') { - payload['encryption'] = encryption; + apiPayload['encryption'] = encryption; } if (typeof autoTLS !== 'undefined') { - payload['autoTLS'] = autoTLS; + apiPayload['autoTLS'] = autoTLS; } if (typeof mailer !== 'undefined') { - payload['mailer'] = mailer; + apiPayload['mailer'] = mailer; } if (typeof fromName !== 'undefined') { - payload['fromName'] = fromName; + apiPayload['fromName'] = fromName; } if (typeof fromEmail !== 'undefined') { - payload['fromEmail'] = fromEmail; + apiPayload['fromEmail'] = fromEmail; } if (typeof replyToName !== 'undefined') { - payload['replyToName'] = replyToName; + apiPayload['replyToName'] = replyToName; } if (typeof replyToEmail !== 'undefined') { - payload['replyToEmail'] = replyToEmail; + apiPayload['replyToEmail'] = replyToEmail; } if (typeof enabled !== 'undefined') { - payload['enabled'] = enabled; + apiPayload['enabled'] = enabled; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -5301,7 +5301,7 @@ export class Messaging { accept: 'application/json', }; - return this.client.call('post', uri, apiHeaders, payload); + return this.client.call('post', uri, apiHeaders, apiPayload); } /** @@ -5496,48 +5496,48 @@ export class Messaging { throw new AppwriteException('Missing required parameter: "host"'); } const apiPath = '/messaging/providers/smtp'; - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof providerId !== 'undefined') { - payload['providerId'] = providerId; + apiPayload['providerId'] = providerId; } if (typeof name !== 'undefined') { - payload['name'] = name; + apiPayload['name'] = name; } if (typeof host !== 'undefined') { - payload['host'] = host; + apiPayload['host'] = host; } if (typeof port !== 'undefined') { - payload['port'] = port; + apiPayload['port'] = port; } if (typeof username !== 'undefined') { - payload['username'] = username; + apiPayload['username'] = username; } if (typeof password !== 'undefined') { - payload['password'] = password; + apiPayload['password'] = password; } if (typeof encryption !== 'undefined') { - payload['encryption'] = encryption; + apiPayload['encryption'] = encryption; } if (typeof autoTLS !== 'undefined') { - payload['autoTLS'] = autoTLS; + apiPayload['autoTLS'] = autoTLS; } if (typeof mailer !== 'undefined') { - payload['mailer'] = mailer; + apiPayload['mailer'] = mailer; } if (typeof fromName !== 'undefined') { - payload['fromName'] = fromName; + apiPayload['fromName'] = fromName; } if (typeof fromEmail !== 'undefined') { - payload['fromEmail'] = fromEmail; + apiPayload['fromEmail'] = fromEmail; } if (typeof replyToName !== 'undefined') { - payload['replyToName'] = replyToName; + apiPayload['replyToName'] = replyToName; } if (typeof replyToEmail !== 'undefined') { - payload['replyToEmail'] = replyToEmail; + apiPayload['replyToEmail'] = replyToEmail; } if (typeof enabled !== 'undefined') { - payload['enabled'] = enabled; + apiPayload['enabled'] = enabled; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -5547,7 +5547,7 @@ export class Messaging { accept: 'application/json', }; - return this.client.call('post', uri, apiHeaders, payload); + return this.client.call('post', uri, apiHeaders, apiPayload); } /** @@ -5740,45 +5740,45 @@ export class Messaging { '{providerId}', encodeURIComponent(String(providerId)), ); - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof name !== 'undefined') { - payload['name'] = name; + apiPayload['name'] = name; } if (typeof host !== 'undefined') { - payload['host'] = host; + apiPayload['host'] = host; } if (typeof port !== 'undefined') { - payload['port'] = port; + apiPayload['port'] = port; } if (typeof username !== 'undefined') { - payload['username'] = username; + apiPayload['username'] = username; } if (typeof password !== 'undefined') { - payload['password'] = password; + apiPayload['password'] = password; } if (typeof encryption !== 'undefined') { - payload['encryption'] = encryption; + apiPayload['encryption'] = encryption; } if (typeof autoTLS !== 'undefined') { - payload['autoTLS'] = autoTLS; + apiPayload['autoTLS'] = autoTLS; } if (typeof mailer !== 'undefined') { - payload['mailer'] = mailer; + apiPayload['mailer'] = mailer; } if (typeof fromName !== 'undefined') { - payload['fromName'] = fromName; + apiPayload['fromName'] = fromName; } if (typeof fromEmail !== 'undefined') { - payload['fromEmail'] = fromEmail; + apiPayload['fromEmail'] = fromEmail; } if (typeof replyToName !== 'undefined') { - payload['replyToName'] = replyToName; + apiPayload['replyToName'] = replyToName; } if (typeof replyToEmail !== 'undefined') { - payload['replyToEmail'] = replyToEmail; + apiPayload['replyToEmail'] = replyToEmail; } if (typeof enabled !== 'undefined') { - payload['enabled'] = enabled; + apiPayload['enabled'] = enabled; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -5788,7 +5788,7 @@ export class Messaging { accept: 'application/json', }; - return this.client.call('patch', uri, apiHeaders, payload); + return this.client.call('patch', uri, apiHeaders, apiPayload); } /** @@ -5980,45 +5980,45 @@ export class Messaging { '{providerId}', encodeURIComponent(String(providerId)), ); - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof name !== 'undefined') { - payload['name'] = name; + apiPayload['name'] = name; } if (typeof host !== 'undefined') { - payload['host'] = host; + apiPayload['host'] = host; } if (typeof port !== 'undefined') { - payload['port'] = port; + apiPayload['port'] = port; } if (typeof username !== 'undefined') { - payload['username'] = username; + apiPayload['username'] = username; } if (typeof password !== 'undefined') { - payload['password'] = password; + apiPayload['password'] = password; } if (typeof encryption !== 'undefined') { - payload['encryption'] = encryption; + apiPayload['encryption'] = encryption; } if (typeof autoTLS !== 'undefined') { - payload['autoTLS'] = autoTLS; + apiPayload['autoTLS'] = autoTLS; } if (typeof mailer !== 'undefined') { - payload['mailer'] = mailer; + apiPayload['mailer'] = mailer; } if (typeof fromName !== 'undefined') { - payload['fromName'] = fromName; + apiPayload['fromName'] = fromName; } if (typeof fromEmail !== 'undefined') { - payload['fromEmail'] = fromEmail; + apiPayload['fromEmail'] = fromEmail; } if (typeof replyToName !== 'undefined') { - payload['replyToName'] = replyToName; + apiPayload['replyToName'] = replyToName; } if (typeof replyToEmail !== 'undefined') { - payload['replyToEmail'] = replyToEmail; + apiPayload['replyToEmail'] = replyToEmail; } if (typeof enabled !== 'undefined') { - payload['enabled'] = enabled; + apiPayload['enabled'] = enabled; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -6028,7 +6028,7 @@ export class Messaging { accept: 'application/json', }; - return this.client.call('patch', uri, apiHeaders, payload); + return this.client.call('patch', uri, apiHeaders, apiPayload); } /** @@ -6134,24 +6134,24 @@ export class Messaging { throw new AppwriteException('Missing required parameter: "name"'); } const apiPath = '/messaging/providers/telesign'; - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof providerId !== 'undefined') { - payload['providerId'] = providerId; + apiPayload['providerId'] = providerId; } if (typeof name !== 'undefined') { - payload['name'] = name; + apiPayload['name'] = name; } if (typeof from !== 'undefined') { - payload['from'] = from; + apiPayload['from'] = from; } if (typeof customerId !== 'undefined') { - payload['customerId'] = customerId; + apiPayload['customerId'] = customerId; } if (typeof apiKey !== 'undefined') { - payload['apiKey'] = apiKey; + apiPayload['apiKey'] = apiKey; } if (typeof enabled !== 'undefined') { - payload['enabled'] = enabled; + apiPayload['enabled'] = enabled; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -6161,7 +6161,7 @@ export class Messaging { accept: 'application/json', }; - return this.client.call('post', uri, apiHeaders, payload); + return this.client.call('post', uri, apiHeaders, apiPayload); } /** @@ -6267,21 +6267,21 @@ export class Messaging { '{providerId}', encodeURIComponent(String(providerId)), ); - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof name !== 'undefined') { - payload['name'] = name; + apiPayload['name'] = name; } if (typeof enabled !== 'undefined') { - payload['enabled'] = enabled; + apiPayload['enabled'] = enabled; } if (typeof customerId !== 'undefined') { - payload['customerId'] = customerId; + apiPayload['customerId'] = customerId; } if (typeof apiKey !== 'undefined') { - payload['apiKey'] = apiKey; + apiPayload['apiKey'] = apiKey; } if (typeof from !== 'undefined') { - payload['from'] = from; + apiPayload['from'] = from; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -6291,7 +6291,7 @@ export class Messaging { accept: 'application/json', }; - return this.client.call('patch', uri, apiHeaders, payload); + return this.client.call('patch', uri, apiHeaders, apiPayload); } /** @@ -6397,24 +6397,24 @@ export class Messaging { throw new AppwriteException('Missing required parameter: "name"'); } const apiPath = '/messaging/providers/textmagic'; - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof providerId !== 'undefined') { - payload['providerId'] = providerId; + apiPayload['providerId'] = providerId; } if (typeof name !== 'undefined') { - payload['name'] = name; + apiPayload['name'] = name; } if (typeof from !== 'undefined') { - payload['from'] = from; + apiPayload['from'] = from; } if (typeof username !== 'undefined') { - payload['username'] = username; + apiPayload['username'] = username; } if (typeof apiKey !== 'undefined') { - payload['apiKey'] = apiKey; + apiPayload['apiKey'] = apiKey; } if (typeof enabled !== 'undefined') { - payload['enabled'] = enabled; + apiPayload['enabled'] = enabled; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -6424,7 +6424,7 @@ export class Messaging { accept: 'application/json', }; - return this.client.call('post', uri, apiHeaders, payload); + return this.client.call('post', uri, apiHeaders, apiPayload); } /** @@ -6530,21 +6530,21 @@ export class Messaging { '{providerId}', encodeURIComponent(String(providerId)), ); - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof name !== 'undefined') { - payload['name'] = name; + apiPayload['name'] = name; } if (typeof enabled !== 'undefined') { - payload['enabled'] = enabled; + apiPayload['enabled'] = enabled; } if (typeof username !== 'undefined') { - payload['username'] = username; + apiPayload['username'] = username; } if (typeof apiKey !== 'undefined') { - payload['apiKey'] = apiKey; + apiPayload['apiKey'] = apiKey; } if (typeof from !== 'undefined') { - payload['from'] = from; + apiPayload['from'] = from; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -6554,7 +6554,7 @@ export class Messaging { accept: 'application/json', }; - return this.client.call('patch', uri, apiHeaders, payload); + return this.client.call('patch', uri, apiHeaders, apiPayload); } /** @@ -6660,24 +6660,24 @@ export class Messaging { throw new AppwriteException('Missing required parameter: "name"'); } const apiPath = '/messaging/providers/twilio'; - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof providerId !== 'undefined') { - payload['providerId'] = providerId; + apiPayload['providerId'] = providerId; } if (typeof name !== 'undefined') { - payload['name'] = name; + apiPayload['name'] = name; } if (typeof from !== 'undefined') { - payload['from'] = from; + apiPayload['from'] = from; } if (typeof accountSid !== 'undefined') { - payload['accountSid'] = accountSid; + apiPayload['accountSid'] = accountSid; } if (typeof authToken !== 'undefined') { - payload['authToken'] = authToken; + apiPayload['authToken'] = authToken; } if (typeof enabled !== 'undefined') { - payload['enabled'] = enabled; + apiPayload['enabled'] = enabled; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -6687,7 +6687,7 @@ export class Messaging { accept: 'application/json', }; - return this.client.call('post', uri, apiHeaders, payload); + return this.client.call('post', uri, apiHeaders, apiPayload); } /** @@ -6793,21 +6793,21 @@ export class Messaging { '{providerId}', encodeURIComponent(String(providerId)), ); - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof name !== 'undefined') { - payload['name'] = name; + apiPayload['name'] = name; } if (typeof enabled !== 'undefined') { - payload['enabled'] = enabled; + apiPayload['enabled'] = enabled; } if (typeof accountSid !== 'undefined') { - payload['accountSid'] = accountSid; + apiPayload['accountSid'] = accountSid; } if (typeof authToken !== 'undefined') { - payload['authToken'] = authToken; + apiPayload['authToken'] = authToken; } if (typeof from !== 'undefined') { - payload['from'] = from; + apiPayload['from'] = from; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -6817,7 +6817,7 @@ export class Messaging { accept: 'application/json', }; - return this.client.call('patch', uri, apiHeaders, payload); + return this.client.call('patch', uri, apiHeaders, apiPayload); } /** @@ -6923,24 +6923,24 @@ export class Messaging { throw new AppwriteException('Missing required parameter: "name"'); } const apiPath = '/messaging/providers/vonage'; - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof providerId !== 'undefined') { - payload['providerId'] = providerId; + apiPayload['providerId'] = providerId; } if (typeof name !== 'undefined') { - payload['name'] = name; + apiPayload['name'] = name; } if (typeof from !== 'undefined') { - payload['from'] = from; + apiPayload['from'] = from; } if (typeof apiKey !== 'undefined') { - payload['apiKey'] = apiKey; + apiPayload['apiKey'] = apiKey; } if (typeof apiSecret !== 'undefined') { - payload['apiSecret'] = apiSecret; + apiPayload['apiSecret'] = apiSecret; } if (typeof enabled !== 'undefined') { - payload['enabled'] = enabled; + apiPayload['enabled'] = enabled; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -6950,7 +6950,7 @@ export class Messaging { accept: 'application/json', }; - return this.client.call('post', uri, apiHeaders, payload); + return this.client.call('post', uri, apiHeaders, apiPayload); } /** @@ -7056,21 +7056,21 @@ export class Messaging { '{providerId}', encodeURIComponent(String(providerId)), ); - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof name !== 'undefined') { - payload['name'] = name; + apiPayload['name'] = name; } if (typeof enabled !== 'undefined') { - payload['enabled'] = enabled; + apiPayload['enabled'] = enabled; } if (typeof apiKey !== 'undefined') { - payload['apiKey'] = apiKey; + apiPayload['apiKey'] = apiKey; } if (typeof apiSecret !== 'undefined') { - payload['apiSecret'] = apiSecret; + apiPayload['apiSecret'] = apiSecret; } if (typeof from !== 'undefined') { - payload['from'] = from; + apiPayload['from'] = from; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -7080,7 +7080,7 @@ export class Messaging { accept: 'application/json', }; - return this.client.call('patch', uri, apiHeaders, payload); + return this.client.call('patch', uri, apiHeaders, apiPayload); } /** @@ -7130,7 +7130,7 @@ export class Messaging { '{providerId}', encodeURIComponent(String(providerId)), ); - const payload: Payload = {}; + const apiPayload: Payload = {}; const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { @@ -7138,7 +7138,7 @@ export class Messaging { accept: 'application/json', }; - return this.client.call('get', uri, apiHeaders, payload); + return this.client.call('get', uri, apiHeaders, apiPayload); } /** @@ -7186,7 +7186,7 @@ export class Messaging { '{providerId}', encodeURIComponent(String(providerId)), ); - const payload: Payload = {}; + const apiPayload: Payload = {}; const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { @@ -7195,7 +7195,7 @@ export class Messaging { accept: 'application/json', }; - return this.client.call('delete', uri, apiHeaders, payload); + return this.client.call('delete', uri, apiHeaders, apiPayload); } /** @@ -7258,15 +7258,15 @@ export class Messaging { const total = params.total; const apiPath = '/messaging/topics'; - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof queries !== 'undefined') { - payload['queries'] = queries; + apiPayload['queries'] = queries; } if (typeof search !== 'undefined') { - payload['search'] = search; + apiPayload['search'] = search; } if (typeof total !== 'undefined') { - payload['total'] = total; + apiPayload['total'] = total; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -7275,7 +7275,7 @@ export class Messaging { accept: 'application/json', }; - return this.client.call('get', uri, apiHeaders, payload); + return this.client.call('get', uri, apiHeaders, apiPayload); } /** @@ -7372,21 +7372,21 @@ export class Messaging { throw new AppwriteException('Missing required parameter: "name"'); } const apiPath = '/messaging/topics'; - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof topicId !== 'undefined') { - payload['topicId'] = topicId; + apiPayload['topicId'] = topicId; } if (typeof name !== 'undefined') { - payload['name'] = name; + apiPayload['name'] = name; } if (typeof subscribe !== 'undefined') { - payload['subscribe'] = subscribe; + apiPayload['subscribe'] = subscribe; } if (typeof qos !== 'undefined') { - payload['qos'] = qos; + apiPayload['qos'] = qos; } if (typeof expiry !== 'undefined') { - payload['expiry'] = expiry; + apiPayload['expiry'] = expiry; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -7396,7 +7396,7 @@ export class Messaging { accept: 'application/json', }; - return this.client.call('post', uri, apiHeaders, payload); + return this.client.call('post', uri, apiHeaders, apiPayload); } /** @@ -7446,7 +7446,7 @@ export class Messaging { '{topicId}', encodeURIComponent(String(topicId)), ); - const payload: Payload = {}; + const apiPayload: Payload = {}; const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { @@ -7454,7 +7454,7 @@ export class Messaging { accept: 'application/json', }; - return this.client.call('get', uri, apiHeaders, payload); + return this.client.call('get', uri, apiHeaders, apiPayload); } /** @@ -7553,18 +7553,18 @@ export class Messaging { '{topicId}', encodeURIComponent(String(topicId)), ); - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof name !== 'undefined') { - payload['name'] = name; + apiPayload['name'] = name; } if (typeof subscribe !== 'undefined') { - payload['subscribe'] = subscribe; + apiPayload['subscribe'] = subscribe; } if (typeof qos !== 'undefined') { - payload['qos'] = qos; + apiPayload['qos'] = qos; } if (typeof expiry !== 'undefined') { - payload['expiry'] = expiry; + apiPayload['expiry'] = expiry; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -7574,7 +7574,7 @@ export class Messaging { accept: 'application/json', }; - return this.client.call('patch', uri, apiHeaders, payload); + return this.client.call('patch', uri, apiHeaders, apiPayload); } /** @@ -7620,7 +7620,7 @@ export class Messaging { '{topicId}', encodeURIComponent(String(topicId)), ); - const payload: Payload = {}; + const apiPayload: Payload = {}; const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { @@ -7629,7 +7629,7 @@ export class Messaging { accept: 'application/json', }; - return this.client.call('delete', uri, apiHeaders, payload); + return this.client.call('delete', uri, apiHeaders, apiPayload); } /** @@ -7717,15 +7717,15 @@ export class Messaging { '{topicId}', encodeURIComponent(String(topicId)), ); - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof queries !== 'undefined') { - payload['queries'] = queries; + apiPayload['queries'] = queries; } if (typeof search !== 'undefined') { - payload['search'] = search; + apiPayload['search'] = search; } if (typeof total !== 'undefined') { - payload['total'] = total; + apiPayload['total'] = total; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -7734,7 +7734,7 @@ export class Messaging { accept: 'application/json', }; - return this.client.call('get', uri, apiHeaders, payload); + return this.client.call('get', uri, apiHeaders, apiPayload); } /** @@ -7815,12 +7815,12 @@ export class Messaging { '{topicId}', encodeURIComponent(String(topicId)), ); - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof subscriberId !== 'undefined') { - payload['subscriberId'] = subscriberId; + apiPayload['subscriberId'] = subscriberId; } if (typeof targetId !== 'undefined') { - payload['targetId'] = targetId; + apiPayload['targetId'] = targetId; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -7830,7 +7830,7 @@ export class Messaging { accept: 'application/json', }; - return this.client.call('post', uri, apiHeaders, payload); + return this.client.call('post', uri, apiHeaders, apiPayload); } /** @@ -7901,7 +7901,7 @@ export class Messaging { '{subscriberId}', encodeURIComponent(String(subscriberId)), ); - const payload: Payload = {}; + const apiPayload: Payload = {}; const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { @@ -7909,7 +7909,7 @@ export class Messaging { accept: 'application/json', }; - return this.client.call('get', uri, apiHeaders, payload); + return this.client.call('get', uri, apiHeaders, apiPayload); } /** @@ -7975,7 +7975,7 @@ export class Messaging { '{subscriberId}', encodeURIComponent(String(subscriberId)), ); - const payload: Payload = {}; + const apiPayload: Payload = {}; const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { @@ -7984,6 +7984,6 @@ export class Messaging { accept: 'application/json', }; - return this.client.call('delete', uri, apiHeaders, payload); + return this.client.call('delete', uri, apiHeaders, apiPayload); } } diff --git a/src/services/migrations.ts b/src/services/migrations.ts index 92dd613b..b3cccc14 100644 --- a/src/services/migrations.ts +++ b/src/services/migrations.ts @@ -73,15 +73,15 @@ export class Migrations { const total = params.total; const apiPath = '/migrations'; - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof queries !== 'undefined') { - payload['queries'] = queries; + apiPayload['queries'] = queries; } if (typeof search !== 'undefined') { - payload['search'] = search; + apiPayload['search'] = search; } if (typeof total !== 'undefined') { - payload['total'] = total; + apiPayload['total'] = total; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -90,7 +90,7 @@ export class Migrations { accept: 'application/json', }; - return this.client.call('get', uri, apiHeaders, payload); + return this.client.call('get', uri, apiHeaders, apiPayload); } /** @@ -202,21 +202,21 @@ export class Migrations { throw new AppwriteException('Missing required parameter: "apiKey"'); } const apiPath = '/migrations/appwrite'; - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof resources !== 'undefined') { - payload['resources'] = resources; + apiPayload['resources'] = resources; } if (typeof endpoint !== 'undefined') { - payload['endpoint'] = endpoint; + apiPayload['endpoint'] = endpoint; } if (typeof projectId !== 'undefined') { - payload['projectId'] = projectId; + apiPayload['projectId'] = projectId; } if (typeof apiKey !== 'undefined') { - payload['apiKey'] = apiKey; + apiPayload['apiKey'] = apiKey; } if (typeof onDuplicate !== 'undefined') { - payload['onDuplicate'] = onDuplicate; + apiPayload['onDuplicate'] = onDuplicate; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -226,7 +226,7 @@ export class Migrations { accept: 'application/json', }; - return this.client.call('post', uri, apiHeaders, payload); + return this.client.call('post', uri, apiHeaders, apiPayload); } /** @@ -328,18 +328,18 @@ export class Migrations { throw new AppwriteException('Missing required parameter: "key"'); } const apiPath = '/migrations/appwrite/report'; - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof resources !== 'undefined') { - payload['resources'] = resources; + apiPayload['resources'] = resources; } if (typeof endpoint !== 'undefined') { - payload['endpoint'] = endpoint; + apiPayload['endpoint'] = endpoint; } if (typeof projectID !== 'undefined') { - payload['projectID'] = projectID; + apiPayload['projectID'] = projectID; } if (typeof key !== 'undefined') { - payload['key'] = key; + apiPayload['key'] = key; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -348,7 +348,7 @@ export class Migrations { accept: 'application/json', }; - return this.client.call('get', uri, apiHeaders, payload); + return this.client.call('get', uri, apiHeaders, apiPayload); } /** @@ -507,36 +507,36 @@ export class Migrations { ); } const apiPath = '/migrations/csv/exports'; - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof databaseId !== 'undefined') { - payload['databaseId'] = databaseId; + apiPayload['databaseId'] = databaseId; } if (typeof collectionId !== 'undefined') { - payload['collectionId'] = collectionId; + apiPayload['collectionId'] = collectionId; } if (typeof filename !== 'undefined') { - payload['filename'] = filename; + apiPayload['filename'] = filename; } if (typeof columns !== 'undefined') { - payload['columns'] = columns; + apiPayload['columns'] = columns; } if (typeof queries !== 'undefined') { - payload['queries'] = queries; + apiPayload['queries'] = queries; } if (typeof delimiter !== 'undefined') { - payload['delimiter'] = delimiter; + apiPayload['delimiter'] = delimiter; } if (typeof enclosure !== 'undefined') { - payload['enclosure'] = enclosure; + apiPayload['enclosure'] = enclosure; } if (typeof escape !== 'undefined') { - payload['escape'] = escape; + apiPayload['escape'] = escape; } if (typeof header !== 'undefined') { - payload['header'] = header; + apiPayload['header'] = header; } if (typeof notify !== 'undefined') { - payload['notify'] = notify; + apiPayload['notify'] = notify; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -546,7 +546,7 @@ export class Migrations { accept: 'application/json', }; - return this.client.call('post', uri, apiHeaders, payload); + return this.client.call('post', uri, apiHeaders, apiPayload); } /** @@ -662,24 +662,24 @@ export class Migrations { ); } const apiPath = '/migrations/csv/imports'; - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof bucketId !== 'undefined') { - payload['bucketId'] = bucketId; + apiPayload['bucketId'] = bucketId; } if (typeof fileId !== 'undefined') { - payload['fileId'] = fileId; + apiPayload['fileId'] = fileId; } if (typeof databaseId !== 'undefined') { - payload['databaseId'] = databaseId; + apiPayload['databaseId'] = databaseId; } if (typeof collectionId !== 'undefined') { - payload['collectionId'] = collectionId; + apiPayload['collectionId'] = collectionId; } if (typeof internalFile !== 'undefined') { - payload['internalFile'] = internalFile; + apiPayload['internalFile'] = internalFile; } if (typeof onDuplicate !== 'undefined') { - payload['onDuplicate'] = onDuplicate; + apiPayload['onDuplicate'] = onDuplicate; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -689,7 +689,7 @@ export class Migrations { accept: 'application/json', }; - return this.client.call('post', uri, apiHeaders, payload); + return this.client.call('post', uri, apiHeaders, apiPayload); } /** @@ -759,12 +759,12 @@ export class Migrations { ); } const apiPath = '/migrations/firebase'; - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof resources !== 'undefined') { - payload['resources'] = resources; + apiPayload['resources'] = resources; } if (typeof serviceAccount !== 'undefined') { - payload['serviceAccount'] = serviceAccount; + apiPayload['serviceAccount'] = serviceAccount; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -774,7 +774,7 @@ export class Migrations { accept: 'application/json', }; - return this.client.call('post', uri, apiHeaders, payload); + return this.client.call('post', uri, apiHeaders, apiPayload); } /** @@ -844,12 +844,12 @@ export class Migrations { ); } const apiPath = '/migrations/firebase/report'; - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof resources !== 'undefined') { - payload['resources'] = resources; + apiPayload['resources'] = resources; } if (typeof serviceAccount !== 'undefined') { - payload['serviceAccount'] = serviceAccount; + apiPayload['serviceAccount'] = serviceAccount; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -858,7 +858,7 @@ export class Migrations { accept: 'application/json', }; - return this.client.call('get', uri, apiHeaders, payload); + return this.client.call('get', uri, apiHeaders, apiPayload); } /** @@ -973,24 +973,24 @@ export class Migrations { ); } const apiPath = '/migrations/json/exports'; - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof databaseId !== 'undefined') { - payload['databaseId'] = databaseId; + apiPayload['databaseId'] = databaseId; } if (typeof collectionId !== 'undefined') { - payload['collectionId'] = collectionId; + apiPayload['collectionId'] = collectionId; } if (typeof filename !== 'undefined') { - payload['filename'] = filename; + apiPayload['filename'] = filename; } if (typeof columns !== 'undefined') { - payload['columns'] = columns; + apiPayload['columns'] = columns; } if (typeof queries !== 'undefined') { - payload['queries'] = queries; + apiPayload['queries'] = queries; } if (typeof notify !== 'undefined') { - payload['notify'] = notify; + apiPayload['notify'] = notify; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -1000,7 +1000,7 @@ export class Migrations { accept: 'application/json', }; - return this.client.call('post', uri, apiHeaders, payload); + return this.client.call('post', uri, apiHeaders, apiPayload); } /** @@ -1118,24 +1118,24 @@ export class Migrations { ); } const apiPath = '/migrations/json/imports'; - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof bucketId !== 'undefined') { - payload['bucketId'] = bucketId; + apiPayload['bucketId'] = bucketId; } if (typeof fileId !== 'undefined') { - payload['fileId'] = fileId; + apiPayload['fileId'] = fileId; } if (typeof databaseId !== 'undefined') { - payload['databaseId'] = databaseId; + apiPayload['databaseId'] = databaseId; } if (typeof collectionId !== 'undefined') { - payload['collectionId'] = collectionId; + apiPayload['collectionId'] = collectionId; } if (typeof internalFile !== 'undefined') { - payload['internalFile'] = internalFile; + apiPayload['internalFile'] = internalFile; } if (typeof onDuplicate !== 'undefined') { - payload['onDuplicate'] = onDuplicate; + apiPayload['onDuplicate'] = onDuplicate; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -1145,7 +1145,7 @@ export class Migrations { accept: 'application/json', }; - return this.client.call('post', uri, apiHeaders, payload); + return this.client.call('post', uri, apiHeaders, apiPayload); } /** @@ -1302,30 +1302,30 @@ export class Migrations { ); } const apiPath = '/migrations/nhost'; - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof resources !== 'undefined') { - payload['resources'] = resources; + apiPayload['resources'] = resources; } if (typeof subdomain !== 'undefined') { - payload['subdomain'] = subdomain; + apiPayload['subdomain'] = subdomain; } if (typeof region !== 'undefined') { - payload['region'] = region; + apiPayload['region'] = region; } if (typeof adminSecret !== 'undefined') { - payload['adminSecret'] = adminSecret; + apiPayload['adminSecret'] = adminSecret; } if (typeof database !== 'undefined') { - payload['database'] = database; + apiPayload['database'] = database; } if (typeof username !== 'undefined') { - payload['username'] = username; + apiPayload['username'] = username; } if (typeof password !== 'undefined') { - payload['password'] = password; + apiPayload['password'] = password; } if (typeof port !== 'undefined') { - payload['port'] = port; + apiPayload['port'] = port; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -1335,7 +1335,7 @@ export class Migrations { accept: 'application/json', }; - return this.client.call('post', uri, apiHeaders, payload); + return this.client.call('post', uri, apiHeaders, apiPayload); } /** @@ -1492,30 +1492,30 @@ export class Migrations { ); } const apiPath = '/migrations/nhost/report'; - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof resources !== 'undefined') { - payload['resources'] = resources; + apiPayload['resources'] = resources; } if (typeof subdomain !== 'undefined') { - payload['subdomain'] = subdomain; + apiPayload['subdomain'] = subdomain; } if (typeof region !== 'undefined') { - payload['region'] = region; + apiPayload['region'] = region; } if (typeof adminSecret !== 'undefined') { - payload['adminSecret'] = adminSecret; + apiPayload['adminSecret'] = adminSecret; } if (typeof database !== 'undefined') { - payload['database'] = database; + apiPayload['database'] = database; } if (typeof username !== 'undefined') { - payload['username'] = username; + apiPayload['username'] = username; } if (typeof password !== 'undefined') { - payload['password'] = password; + apiPayload['password'] = password; } if (typeof port !== 'undefined') { - payload['port'] = port; + apiPayload['port'] = port; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -1524,7 +1524,7 @@ export class Migrations { accept: 'application/json', }; - return this.client.call('get', uri, apiHeaders, payload); + return this.client.call('get', uri, apiHeaders, apiPayload); } /** @@ -1666,27 +1666,27 @@ export class Migrations { ); } const apiPath = '/migrations/supabase'; - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof resources !== 'undefined') { - payload['resources'] = resources; + apiPayload['resources'] = resources; } if (typeof endpoint !== 'undefined') { - payload['endpoint'] = endpoint; + apiPayload['endpoint'] = endpoint; } if (typeof apiKey !== 'undefined') { - payload['apiKey'] = apiKey; + apiPayload['apiKey'] = apiKey; } if (typeof databaseHost !== 'undefined') { - payload['databaseHost'] = databaseHost; + apiPayload['databaseHost'] = databaseHost; } if (typeof username !== 'undefined') { - payload['username'] = username; + apiPayload['username'] = username; } if (typeof password !== 'undefined') { - payload['password'] = password; + apiPayload['password'] = password; } if (typeof port !== 'undefined') { - payload['port'] = port; + apiPayload['port'] = port; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -1696,7 +1696,7 @@ export class Migrations { accept: 'application/json', }; - return this.client.call('post', uri, apiHeaders, payload); + return this.client.call('post', uri, apiHeaders, apiPayload); } /** @@ -1838,27 +1838,27 @@ export class Migrations { ); } const apiPath = '/migrations/supabase/report'; - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof resources !== 'undefined') { - payload['resources'] = resources; + apiPayload['resources'] = resources; } if (typeof endpoint !== 'undefined') { - payload['endpoint'] = endpoint; + apiPayload['endpoint'] = endpoint; } if (typeof apiKey !== 'undefined') { - payload['apiKey'] = apiKey; + apiPayload['apiKey'] = apiKey; } if (typeof databaseHost !== 'undefined') { - payload['databaseHost'] = databaseHost; + apiPayload['databaseHost'] = databaseHost; } if (typeof username !== 'undefined') { - payload['username'] = username; + apiPayload['username'] = username; } if (typeof password !== 'undefined') { - payload['password'] = password; + apiPayload['password'] = password; } if (typeof port !== 'undefined') { - payload['port'] = port; + apiPayload['port'] = port; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -1867,7 +1867,7 @@ export class Migrations { accept: 'application/json', }; - return this.client.call('get', uri, apiHeaders, payload); + return this.client.call('get', uri, apiHeaders, apiPayload); } /** @@ -1915,7 +1915,7 @@ export class Migrations { '{migrationId}', encodeURIComponent(String(migrationId)), ); - const payload: Payload = {}; + const apiPayload: Payload = {}; const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { @@ -1923,7 +1923,7 @@ export class Migrations { accept: 'application/json', }; - return this.client.call('get', uri, apiHeaders, payload); + return this.client.call('get', uri, apiHeaders, apiPayload); } /** @@ -1971,7 +1971,7 @@ export class Migrations { '{migrationId}', encodeURIComponent(String(migrationId)), ); - const payload: Payload = {}; + const apiPayload: Payload = {}; const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { @@ -1980,7 +1980,7 @@ export class Migrations { accept: 'application/json', }; - return this.client.call('patch', uri, apiHeaders, payload); + return this.client.call('patch', uri, apiHeaders, apiPayload); } /** @@ -2026,7 +2026,7 @@ export class Migrations { '{migrationId}', encodeURIComponent(String(migrationId)), ); - const payload: Payload = {}; + const apiPayload: Payload = {}; const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { @@ -2035,6 +2035,6 @@ export class Migrations { accept: 'application/json', }; - return this.client.call('delete', uri, apiHeaders, payload); + return this.client.call('delete', uri, apiHeaders, apiPayload); } } diff --git a/src/services/mongo.ts b/src/services/mongo.ts index 06435ef5..119803fa 100644 --- a/src/services/mongo.ts +++ b/src/services/mongo.ts @@ -48,9 +48,9 @@ export class Mongo { const queries = params.queries; const apiPath = '/mongo'; - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof queries !== 'undefined') { - payload['queries'] = queries; + apiPayload['queries'] = queries; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -59,7 +59,7 @@ export class Mongo { accept: 'application/json', }; - return this.client.call('get', uri, apiHeaders, payload); + return this.client.call('get', uri, apiHeaders, apiPayload); } /** @@ -252,49 +252,49 @@ export class Mongo { throw new AppwriteException('Missing required parameter: "name"'); } const apiPath = '/mongo'; - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof databaseId !== 'undefined') { - payload['databaseId'] = databaseId; + apiPayload['databaseId'] = databaseId; } if (typeof name !== 'undefined') { - payload['name'] = name; + apiPayload['name'] = name; } if (typeof version !== 'undefined') { - payload['version'] = version; + apiPayload['version'] = version; } if (typeof specification !== 'undefined') { - payload['specification'] = specification; + apiPayload['specification'] = specification; } if (typeof replicas !== 'undefined') { - payload['replicas'] = replicas; + apiPayload['replicas'] = replicas; } if (typeof syncMode !== 'undefined') { - payload['syncMode'] = syncMode; + apiPayload['syncMode'] = syncMode; } if (typeof networkIdleTimeoutSeconds !== 'undefined') { - payload['networkIdleTimeoutSeconds'] = networkIdleTimeoutSeconds; + apiPayload['networkIdleTimeoutSeconds'] = networkIdleTimeoutSeconds; } if (typeof networkIPAllowlist !== 'undefined') { - payload['networkIPAllowlist'] = networkIPAllowlist; + apiPayload['networkIPAllowlist'] = networkIPAllowlist; } if (typeof idleTimeoutMinutes !== 'undefined') { - payload['idleTimeoutMinutes'] = idleTimeoutMinutes; + apiPayload['idleTimeoutMinutes'] = idleTimeoutMinutes; } if (typeof pitr !== 'undefined') { - payload['pitr'] = pitr; + apiPayload['pitr'] = pitr; } if (typeof pitrRetentionDays !== 'undefined') { - payload['pitrRetentionDays'] = pitrRetentionDays; + apiPayload['pitrRetentionDays'] = pitrRetentionDays; } if (typeof storageAutoscaling !== 'undefined') { - payload['storageAutoscaling'] = storageAutoscaling; + apiPayload['storageAutoscaling'] = storageAutoscaling; } if (typeof storageAutoscalingThresholdPercent !== 'undefined') { - payload['storageAutoscalingThresholdPercent'] = + apiPayload['storageAutoscalingThresholdPercent'] = storageAutoscalingThresholdPercent; } if (typeof storageAutoscalingMaxGb !== 'undefined') { - payload['storageAutoscalingMaxGb'] = storageAutoscalingMaxGb; + apiPayload['storageAutoscalingMaxGb'] = storageAutoscalingMaxGb; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -304,7 +304,7 @@ export class Mongo { accept: 'application/json', }; - return this.client.call('post', uri, apiHeaders, payload); + return this.client.call('post', uri, apiHeaders, apiPayload); } /** @@ -315,7 +315,7 @@ export class Mongo { */ listSpecifications(): Promise { const apiPath = '/mongo/specifications'; - const payload: Payload = {}; + const apiPayload: Payload = {}; const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { @@ -323,7 +323,7 @@ export class Mongo { accept: 'application/json', }; - return this.client.call('get', uri, apiHeaders, payload); + return this.client.call('get', uri, apiHeaders, apiPayload); } /** @@ -371,7 +371,7 @@ export class Mongo { '{databaseId}', encodeURIComponent(String(databaseId)), ); - const payload: Payload = {}; + const apiPayload: Payload = {}; const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { @@ -379,7 +379,7 @@ export class Mongo { accept: 'application/json', }; - return this.client.call('get', uri, apiHeaders, payload); + return this.client.call('get', uri, apiHeaders, apiPayload); } /** @@ -643,68 +643,68 @@ export class Mongo { '{databaseId}', encodeURIComponent(String(databaseId)), ); - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof name !== 'undefined') { - payload['name'] = name; + apiPayload['name'] = name; } if (typeof status !== 'undefined') { - payload['status'] = status; + apiPayload['status'] = status; } if (typeof specification !== 'undefined') { - payload['specification'] = specification; + apiPayload['specification'] = specification; } if (typeof replicas !== 'undefined') { - payload['replicas'] = replicas; + apiPayload['replicas'] = replicas; } if (typeof syncMode !== 'undefined') { - payload['syncMode'] = syncMode; + apiPayload['syncMode'] = syncMode; } if (typeof networkIdleTimeoutSeconds !== 'undefined') { - payload['networkIdleTimeoutSeconds'] = networkIdleTimeoutSeconds; + apiPayload['networkIdleTimeoutSeconds'] = networkIdleTimeoutSeconds; } if (typeof networkIPAllowlist !== 'undefined') { - payload['networkIPAllowlist'] = networkIPAllowlist; + apiPayload['networkIPAllowlist'] = networkIPAllowlist; } if (typeof idleTimeoutMinutes !== 'undefined') { - payload['idleTimeoutMinutes'] = idleTimeoutMinutes; + apiPayload['idleTimeoutMinutes'] = idleTimeoutMinutes; } if (typeof pitr !== 'undefined') { - payload['pitr'] = pitr; + apiPayload['pitr'] = pitr; } if (typeof pitrRetentionDays !== 'undefined') { - payload['pitrRetentionDays'] = pitrRetentionDays; + apiPayload['pitrRetentionDays'] = pitrRetentionDays; } if (typeof storageAutoscaling !== 'undefined') { - payload['storageAutoscaling'] = storageAutoscaling; + apiPayload['storageAutoscaling'] = storageAutoscaling; } if (typeof storageAutoscalingThresholdPercent !== 'undefined') { - payload['storageAutoscalingThresholdPercent'] = + apiPayload['storageAutoscalingThresholdPercent'] = storageAutoscalingThresholdPercent; } if (typeof storageAutoscalingMaxGb !== 'undefined') { - payload['storageAutoscalingMaxGb'] = storageAutoscalingMaxGb; + apiPayload['storageAutoscalingMaxGb'] = storageAutoscalingMaxGb; } if (typeof metricsTraceSampleRate !== 'undefined') { - payload['metricsTraceSampleRate'] = metricsTraceSampleRate; + apiPayload['metricsTraceSampleRate'] = metricsTraceSampleRate; } if (typeof metricsSlowQueryLogThresholdMs !== 'undefined') { - payload['metricsSlowQueryLogThresholdMs'] = + apiPayload['metricsSlowQueryLogThresholdMs'] = metricsSlowQueryLogThresholdMs; } if (typeof sqlApiEnabled !== 'undefined') { - payload['sqlApiEnabled'] = sqlApiEnabled; + apiPayload['sqlApiEnabled'] = sqlApiEnabled; } if (typeof sqlApiAllowedStatements !== 'undefined') { - payload['sqlApiAllowedStatements'] = sqlApiAllowedStatements; + apiPayload['sqlApiAllowedStatements'] = sqlApiAllowedStatements; } if (typeof sqlApiMaxRows !== 'undefined') { - payload['sqlApiMaxRows'] = sqlApiMaxRows; + apiPayload['sqlApiMaxRows'] = sqlApiMaxRows; } if (typeof sqlApiMaxBytes !== 'undefined') { - payload['sqlApiMaxBytes'] = sqlApiMaxBytes; + apiPayload['sqlApiMaxBytes'] = sqlApiMaxBytes; } if (typeof sqlApiTimeoutSeconds !== 'undefined') { - payload['sqlApiTimeoutSeconds'] = sqlApiTimeoutSeconds; + apiPayload['sqlApiTimeoutSeconds'] = sqlApiTimeoutSeconds; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -714,7 +714,7 @@ export class Mongo { accept: 'application/json', }; - return this.client.call('patch', uri, apiHeaders, payload); + return this.client.call('patch', uri, apiHeaders, apiPayload); } /** @@ -760,7 +760,7 @@ export class Mongo { '{databaseId}', encodeURIComponent(String(databaseId)), ); - const payload: Payload = {}; + const apiPayload: Payload = {}; const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { @@ -769,7 +769,7 @@ export class Mongo { accept: 'application/json', }; - return this.client.call('delete', uri, apiHeaders, payload); + return this.client.call('delete', uri, apiHeaders, apiPayload); } /** @@ -831,9 +831,9 @@ export class Mongo { '{databaseId}', encodeURIComponent(String(databaseId)), ); - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof queries !== 'undefined') { - payload['queries'] = queries; + apiPayload['queries'] = queries; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -842,7 +842,7 @@ export class Mongo { accept: 'application/json', }; - return this.client.call('get', uri, apiHeaders, payload); + return this.client.call('get', uri, apiHeaders, apiPayload); } /** @@ -904,9 +904,9 @@ export class Mongo { '{databaseId}', encodeURIComponent(String(databaseId)), ); - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof type !== 'undefined') { - payload['type'] = type; + apiPayload['type'] = type; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -916,7 +916,7 @@ export class Mongo { accept: 'application/json', }; - return this.client.call('post', uri, apiHeaders, payload); + return this.client.call('post', uri, apiHeaders, apiPayload); } /** @@ -978,9 +978,9 @@ export class Mongo { '{databaseId}', encodeURIComponent(String(databaseId)), ); - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof queries !== 'undefined') { - payload['queries'] = queries; + apiPayload['queries'] = queries; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -989,7 +989,7 @@ export class Mongo { accept: 'application/json', }; - return this.client.call('get', uri, apiHeaders, payload); + return this.client.call('get', uri, apiHeaders, apiPayload); } /** @@ -1122,24 +1122,24 @@ export class Mongo { '{databaseId}', encodeURIComponent(String(databaseId)), ); - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof policyId !== 'undefined') { - payload['policyId'] = policyId; + apiPayload['policyId'] = policyId; } if (typeof name !== 'undefined') { - payload['name'] = name; + apiPayload['name'] = name; } if (typeof schedule !== 'undefined') { - payload['schedule'] = schedule; + apiPayload['schedule'] = schedule; } if (typeof retention !== 'undefined') { - payload['retention'] = retention; + apiPayload['retention'] = retention; } if (typeof type !== 'undefined') { - payload['type'] = type; + apiPayload['type'] = type; } if (typeof enabled !== 'undefined') { - payload['enabled'] = enabled; + apiPayload['enabled'] = enabled; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -1149,7 +1149,7 @@ export class Mongo { accept: 'application/json', }; - return this.client.call('post', uri, apiHeaders, payload); + return this.client.call('post', uri, apiHeaders, apiPayload); } /** @@ -1215,7 +1215,7 @@ export class Mongo { const apiPath = '/mongo/{databaseId}/backups/policies/{policyId}' .replace('{databaseId}', encodeURIComponent(String(databaseId))) .replace('{policyId}', encodeURIComponent(String(policyId))); - const payload: Payload = {}; + const apiPayload: Payload = {}; const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { @@ -1223,7 +1223,7 @@ export class Mongo { accept: 'application/json', }; - return this.client.call('get', uri, apiHeaders, payload); + return this.client.call('get', uri, apiHeaders, apiPayload); } /** @@ -1333,18 +1333,18 @@ export class Mongo { const apiPath = '/mongo/{databaseId}/backups/policies/{policyId}' .replace('{databaseId}', encodeURIComponent(String(databaseId))) .replace('{policyId}', encodeURIComponent(String(policyId))); - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof name !== 'undefined') { - payload['name'] = name; + apiPayload['name'] = name; } if (typeof schedule !== 'undefined') { - payload['schedule'] = schedule; + apiPayload['schedule'] = schedule; } if (typeof retention !== 'undefined') { - payload['retention'] = retention; + apiPayload['retention'] = retention; } if (typeof enabled !== 'undefined') { - payload['enabled'] = enabled; + apiPayload['enabled'] = enabled; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -1354,7 +1354,7 @@ export class Mongo { accept: 'application/json', }; - return this.client.call('patch', uri, apiHeaders, payload); + return this.client.call('patch', uri, apiHeaders, apiPayload); } /** @@ -1417,7 +1417,7 @@ export class Mongo { const apiPath = '/mongo/{databaseId}/backups/policies/{policyId}' .replace('{databaseId}', encodeURIComponent(String(databaseId))) .replace('{policyId}', encodeURIComponent(String(policyId))); - const payload: Payload = {}; + const apiPayload: Payload = {}; const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { @@ -1426,7 +1426,7 @@ export class Mongo { accept: 'application/json', }; - return this.client.call('delete', uri, apiHeaders, payload); + return this.client.call('delete', uri, apiHeaders, apiPayload); } /** @@ -1568,27 +1568,27 @@ export class Mongo { '{databaseId}', encodeURIComponent(String(databaseId)), ); - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof provider !== 'undefined') { - payload['provider'] = provider; + apiPayload['provider'] = provider; } if (typeof bucket !== 'undefined') { - payload['bucket'] = bucket; + apiPayload['bucket'] = bucket; } if (typeof region !== 'undefined') { - payload['region'] = region; + apiPayload['region'] = region; } if (typeof prefix !== 'undefined') { - payload['prefix'] = prefix; + apiPayload['prefix'] = prefix; } if (typeof endpoint !== 'undefined') { - payload['endpoint'] = endpoint; + apiPayload['endpoint'] = endpoint; } if (typeof accessKey !== 'undefined') { - payload['accessKey'] = accessKey; + apiPayload['accessKey'] = accessKey; } if (typeof secretKey !== 'undefined') { - payload['secretKey'] = secretKey; + apiPayload['secretKey'] = secretKey; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -1598,7 +1598,7 @@ export class Mongo { accept: 'application/json', }; - return this.client.call('put', uri, apiHeaders, payload); + return this.client.call('put', uri, apiHeaders, apiPayload); } /** @@ -1664,7 +1664,7 @@ export class Mongo { const apiPath = '/mongo/{databaseId}/backups/{backupId}' .replace('{databaseId}', encodeURIComponent(String(databaseId))) .replace('{backupId}', encodeURIComponent(String(backupId))); - const payload: Payload = {}; + const apiPayload: Payload = {}; const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { @@ -1672,7 +1672,7 @@ export class Mongo { accept: 'application/json', }; - return this.client.call('get', uri, apiHeaders, payload); + return this.client.call('get', uri, apiHeaders, apiPayload); } /** @@ -1732,7 +1732,7 @@ export class Mongo { const apiPath = '/mongo/{databaseId}/backups/{backupId}' .replace('{databaseId}', encodeURIComponent(String(databaseId))) .replace('{backupId}', encodeURIComponent(String(backupId))); - const payload: Payload = {}; + const apiPayload: Payload = {}; const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { @@ -1741,7 +1741,7 @@ export class Mongo { accept: 'application/json', }; - return this.client.call('delete', uri, apiHeaders, payload); + return this.client.call('delete', uri, apiHeaders, apiPayload); } /** @@ -1793,7 +1793,7 @@ export class Mongo { '{databaseId}', encodeURIComponent(String(databaseId)), ); - const payload: Payload = {}; + const apiPayload: Payload = {}; const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { @@ -1801,7 +1801,7 @@ export class Mongo { accept: 'application/json', }; - return this.client.call('get', uri, apiHeaders, payload); + return this.client.call('get', uri, apiHeaders, apiPayload); } /** @@ -1871,12 +1871,12 @@ export class Mongo { '{databaseId}', encodeURIComponent(String(databaseId)), ); - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof branchId !== 'undefined') { - payload['branchId'] = branchId; + apiPayload['branchId'] = branchId; } if (typeof ttl !== 'undefined') { - payload['ttl'] = ttl; + apiPayload['ttl'] = ttl; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -1886,7 +1886,7 @@ export class Mongo { accept: 'application/json', }; - return this.client.call('post', uri, apiHeaders, payload); + return this.client.call('post', uri, apiHeaders, apiPayload); } /** @@ -1952,7 +1952,7 @@ export class Mongo { const apiPath = '/mongo/{databaseId}/branches/{branchId}' .replace('{databaseId}', encodeURIComponent(String(databaseId))) .replace('{branchId}', encodeURIComponent(String(branchId))); - const payload: Payload = {}; + const apiPayload: Payload = {}; const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { @@ -1961,7 +1961,7 @@ export class Mongo { accept: 'application/json', }; - return this.client.call('delete', uri, apiHeaders, payload); + return this.client.call('delete', uri, apiHeaders, apiPayload); } /** @@ -2013,7 +2013,7 @@ export class Mongo { '{databaseId}', encodeURIComponent(String(databaseId)), ); - const payload: Payload = {}; + const apiPayload: Payload = {}; const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { @@ -2022,7 +2022,7 @@ export class Mongo { accept: 'application/json', }; - return this.client.call('patch', uri, apiHeaders, payload); + return this.client.call('patch', uri, apiHeaders, apiPayload); } /** @@ -2085,9 +2085,9 @@ export class Mongo { '{databaseId}', encodeURIComponent(String(databaseId)), ); - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof targetReplicaId !== 'undefined') { - payload['targetReplicaId'] = targetReplicaId; + apiPayload['targetReplicaId'] = targetReplicaId; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -2097,7 +2097,7 @@ export class Mongo { accept: 'application/json', }; - return this.client.call('post', uri, apiHeaders, payload); + return this.client.call('post', uri, apiHeaders, apiPayload); } /** @@ -2175,12 +2175,12 @@ export class Mongo { '{databaseId}', encodeURIComponent(String(databaseId)), ); - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof day !== 'undefined') { - payload['day'] = day; + apiPayload['day'] = day; } if (typeof hourUtc !== 'undefined') { - payload['hourUtc'] = hourUtc; + apiPayload['hourUtc'] = hourUtc; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -2190,7 +2190,7 @@ export class Mongo { accept: 'application/json', }; - return this.client.call('patch', uri, apiHeaders, payload); + return this.client.call('patch', uri, apiHeaders, apiPayload); } /** @@ -2270,12 +2270,12 @@ export class Mongo { '{databaseId}', encodeURIComponent(String(databaseId)), ); - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof targetType !== 'undefined') { - payload['targetType'] = targetType; + apiPayload['targetType'] = targetType; } if (typeof specification !== 'undefined') { - payload['specification'] = specification; + apiPayload['specification'] = specification; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -2285,7 +2285,7 @@ export class Mongo { accept: 'application/json', }; - return this.client.call('post', uri, apiHeaders, payload); + return this.client.call('post', uri, apiHeaders, apiPayload); } /** @@ -2373,15 +2373,15 @@ export class Mongo { '{databaseId}', encodeURIComponent(String(databaseId)), ); - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof status !== 'undefined') { - payload['status'] = status; + apiPayload['status'] = status; } if (typeof limit !== 'undefined') { - payload['limit'] = limit; + apiPayload['limit'] = limit; } if (typeof offset !== 'undefined') { - payload['offset'] = offset; + apiPayload['offset'] = offset; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -2390,7 +2390,7 @@ export class Mongo { accept: 'application/json', }; - return this.client.call('get', uri, apiHeaders, payload); + return this.client.call('get', uri, apiHeaders, apiPayload); } /** @@ -2440,7 +2440,7 @@ export class Mongo { '{databaseId}', encodeURIComponent(String(databaseId)), ); - const payload: Payload = {}; + const apiPayload: Payload = {}; const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { @@ -2448,7 +2448,7 @@ export class Mongo { accept: 'application/json', }; - return this.client.call('get', uri, apiHeaders, payload); + return this.client.call('get', uri, apiHeaders, apiPayload); } /** @@ -2498,7 +2498,7 @@ export class Mongo { '{databaseId}', encodeURIComponent(String(databaseId)), ); - const payload: Payload = {}; + const apiPayload: Payload = {}; const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { @@ -2506,7 +2506,7 @@ export class Mongo { accept: 'application/json', }; - return this.client.call('get', uri, apiHeaders, payload); + return this.client.call('get', uri, apiHeaders, apiPayload); } /** @@ -2603,18 +2603,18 @@ export class Mongo { '{databaseId}', encodeURIComponent(String(databaseId)), ); - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof status !== 'undefined') { - payload['status'] = status; + apiPayload['status'] = status; } if (typeof type !== 'undefined') { - payload['type'] = type; + apiPayload['type'] = type; } if (typeof limit !== 'undefined') { - payload['limit'] = limit; + apiPayload['limit'] = limit; } if (typeof offset !== 'undefined') { - payload['offset'] = offset; + apiPayload['offset'] = offset; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -2623,7 +2623,7 @@ export class Mongo { accept: 'application/json', }; - return this.client.call('get', uri, apiHeaders, payload); + return this.client.call('get', uri, apiHeaders, apiPayload); } /** @@ -2720,18 +2720,18 @@ export class Mongo { '{databaseId}', encodeURIComponent(String(databaseId)), ); - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof type !== 'undefined') { - payload['type'] = type; + apiPayload['type'] = type; } if (typeof backupId !== 'undefined') { - payload['backupId'] = backupId; + apiPayload['backupId'] = backupId; } if (typeof targetDatabaseId !== 'undefined') { - payload['targetDatabaseId'] = targetDatabaseId; + apiPayload['targetDatabaseId'] = targetDatabaseId; } if (typeof targetTime !== 'undefined') { - payload['targetTime'] = targetTime; + apiPayload['targetTime'] = targetTime; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -2741,7 +2741,7 @@ export class Mongo { accept: 'application/json', }; - return this.client.call('post', uri, apiHeaders, payload); + return this.client.call('post', uri, apiHeaders, apiPayload); } /** @@ -2810,7 +2810,7 @@ export class Mongo { '{restorationId}', encodeURIComponent(String(restorationId)), ); - const payload: Payload = {}; + const apiPayload: Payload = {}; const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { @@ -2818,7 +2818,7 @@ export class Mongo { accept: 'application/json', }; - return this.client.call('get', uri, apiHeaders, payload); + return this.client.call('get', uri, apiHeaders, apiPayload); } /** @@ -2866,7 +2866,7 @@ export class Mongo { '{databaseId}', encodeURIComponent(String(databaseId)), ); - const payload: Payload = {}; + const apiPayload: Payload = {}; const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { @@ -2874,7 +2874,7 @@ export class Mongo { accept: 'application/json', }; - return this.client.call('get', uri, apiHeaders, payload); + return this.client.call('get', uri, apiHeaders, apiPayload); } /** @@ -2941,9 +2941,9 @@ export class Mongo { '{databaseId}', encodeURIComponent(String(databaseId)), ); - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof targetVersion !== 'undefined') { - payload['targetVersion'] = targetVersion; + apiPayload['targetVersion'] = targetVersion; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -2953,6 +2953,6 @@ export class Mongo { accept: 'application/json', }; - return this.client.call('post', uri, apiHeaders, payload); + return this.client.call('post', uri, apiHeaders, apiPayload); } } diff --git a/src/services/mysql.ts b/src/services/mysql.ts index 2e09c583..d685f575 100644 --- a/src/services/mysql.ts +++ b/src/services/mysql.ts @@ -48,9 +48,9 @@ export class Mysql { const queries = params.queries; const apiPath = '/mysql'; - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof queries !== 'undefined') { - payload['queries'] = queries; + apiPayload['queries'] = queries; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -59,7 +59,7 @@ export class Mysql { accept: 'application/json', }; - return this.client.call('get', uri, apiHeaders, payload); + return this.client.call('get', uri, apiHeaders, apiPayload); } /** @@ -252,49 +252,49 @@ export class Mysql { throw new AppwriteException('Missing required parameter: "name"'); } const apiPath = '/mysql'; - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof databaseId !== 'undefined') { - payload['databaseId'] = databaseId; + apiPayload['databaseId'] = databaseId; } if (typeof name !== 'undefined') { - payload['name'] = name; + apiPayload['name'] = name; } if (typeof version !== 'undefined') { - payload['version'] = version; + apiPayload['version'] = version; } if (typeof specification !== 'undefined') { - payload['specification'] = specification; + apiPayload['specification'] = specification; } if (typeof replicas !== 'undefined') { - payload['replicas'] = replicas; + apiPayload['replicas'] = replicas; } if (typeof syncMode !== 'undefined') { - payload['syncMode'] = syncMode; + apiPayload['syncMode'] = syncMode; } if (typeof networkIdleTimeoutSeconds !== 'undefined') { - payload['networkIdleTimeoutSeconds'] = networkIdleTimeoutSeconds; + apiPayload['networkIdleTimeoutSeconds'] = networkIdleTimeoutSeconds; } if (typeof networkIPAllowlist !== 'undefined') { - payload['networkIPAllowlist'] = networkIPAllowlist; + apiPayload['networkIPAllowlist'] = networkIPAllowlist; } if (typeof idleTimeoutMinutes !== 'undefined') { - payload['idleTimeoutMinutes'] = idleTimeoutMinutes; + apiPayload['idleTimeoutMinutes'] = idleTimeoutMinutes; } if (typeof pitr !== 'undefined') { - payload['pitr'] = pitr; + apiPayload['pitr'] = pitr; } if (typeof pitrRetentionDays !== 'undefined') { - payload['pitrRetentionDays'] = pitrRetentionDays; + apiPayload['pitrRetentionDays'] = pitrRetentionDays; } if (typeof storageAutoscaling !== 'undefined') { - payload['storageAutoscaling'] = storageAutoscaling; + apiPayload['storageAutoscaling'] = storageAutoscaling; } if (typeof storageAutoscalingThresholdPercent !== 'undefined') { - payload['storageAutoscalingThresholdPercent'] = + apiPayload['storageAutoscalingThresholdPercent'] = storageAutoscalingThresholdPercent; } if (typeof storageAutoscalingMaxGb !== 'undefined') { - payload['storageAutoscalingMaxGb'] = storageAutoscalingMaxGb; + apiPayload['storageAutoscalingMaxGb'] = storageAutoscalingMaxGb; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -304,7 +304,7 @@ export class Mysql { accept: 'application/json', }; - return this.client.call('post', uri, apiHeaders, payload); + return this.client.call('post', uri, apiHeaders, apiPayload); } /** @@ -315,7 +315,7 @@ export class Mysql { */ listSpecifications(): Promise { const apiPath = '/mysql/specifications'; - const payload: Payload = {}; + const apiPayload: Payload = {}; const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { @@ -323,7 +323,7 @@ export class Mysql { accept: 'application/json', }; - return this.client.call('get', uri, apiHeaders, payload); + return this.client.call('get', uri, apiHeaders, apiPayload); } /** @@ -371,7 +371,7 @@ export class Mysql { '{databaseId}', encodeURIComponent(String(databaseId)), ); - const payload: Payload = {}; + const apiPayload: Payload = {}; const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { @@ -379,7 +379,7 @@ export class Mysql { accept: 'application/json', }; - return this.client.call('get', uri, apiHeaders, payload); + return this.client.call('get', uri, apiHeaders, apiPayload); } /** @@ -643,68 +643,68 @@ export class Mysql { '{databaseId}', encodeURIComponent(String(databaseId)), ); - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof name !== 'undefined') { - payload['name'] = name; + apiPayload['name'] = name; } if (typeof status !== 'undefined') { - payload['status'] = status; + apiPayload['status'] = status; } if (typeof specification !== 'undefined') { - payload['specification'] = specification; + apiPayload['specification'] = specification; } if (typeof replicas !== 'undefined') { - payload['replicas'] = replicas; + apiPayload['replicas'] = replicas; } if (typeof syncMode !== 'undefined') { - payload['syncMode'] = syncMode; + apiPayload['syncMode'] = syncMode; } if (typeof networkIdleTimeoutSeconds !== 'undefined') { - payload['networkIdleTimeoutSeconds'] = networkIdleTimeoutSeconds; + apiPayload['networkIdleTimeoutSeconds'] = networkIdleTimeoutSeconds; } if (typeof networkIPAllowlist !== 'undefined') { - payload['networkIPAllowlist'] = networkIPAllowlist; + apiPayload['networkIPAllowlist'] = networkIPAllowlist; } if (typeof idleTimeoutMinutes !== 'undefined') { - payload['idleTimeoutMinutes'] = idleTimeoutMinutes; + apiPayload['idleTimeoutMinutes'] = idleTimeoutMinutes; } if (typeof pitr !== 'undefined') { - payload['pitr'] = pitr; + apiPayload['pitr'] = pitr; } if (typeof pitrRetentionDays !== 'undefined') { - payload['pitrRetentionDays'] = pitrRetentionDays; + apiPayload['pitrRetentionDays'] = pitrRetentionDays; } if (typeof storageAutoscaling !== 'undefined') { - payload['storageAutoscaling'] = storageAutoscaling; + apiPayload['storageAutoscaling'] = storageAutoscaling; } if (typeof storageAutoscalingThresholdPercent !== 'undefined') { - payload['storageAutoscalingThresholdPercent'] = + apiPayload['storageAutoscalingThresholdPercent'] = storageAutoscalingThresholdPercent; } if (typeof storageAutoscalingMaxGb !== 'undefined') { - payload['storageAutoscalingMaxGb'] = storageAutoscalingMaxGb; + apiPayload['storageAutoscalingMaxGb'] = storageAutoscalingMaxGb; } if (typeof metricsTraceSampleRate !== 'undefined') { - payload['metricsTraceSampleRate'] = metricsTraceSampleRate; + apiPayload['metricsTraceSampleRate'] = metricsTraceSampleRate; } if (typeof metricsSlowQueryLogThresholdMs !== 'undefined') { - payload['metricsSlowQueryLogThresholdMs'] = + apiPayload['metricsSlowQueryLogThresholdMs'] = metricsSlowQueryLogThresholdMs; } if (typeof sqlApiEnabled !== 'undefined') { - payload['sqlApiEnabled'] = sqlApiEnabled; + apiPayload['sqlApiEnabled'] = sqlApiEnabled; } if (typeof sqlApiAllowedStatements !== 'undefined') { - payload['sqlApiAllowedStatements'] = sqlApiAllowedStatements; + apiPayload['sqlApiAllowedStatements'] = sqlApiAllowedStatements; } if (typeof sqlApiMaxRows !== 'undefined') { - payload['sqlApiMaxRows'] = sqlApiMaxRows; + apiPayload['sqlApiMaxRows'] = sqlApiMaxRows; } if (typeof sqlApiMaxBytes !== 'undefined') { - payload['sqlApiMaxBytes'] = sqlApiMaxBytes; + apiPayload['sqlApiMaxBytes'] = sqlApiMaxBytes; } if (typeof sqlApiTimeoutSeconds !== 'undefined') { - payload['sqlApiTimeoutSeconds'] = sqlApiTimeoutSeconds; + apiPayload['sqlApiTimeoutSeconds'] = sqlApiTimeoutSeconds; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -714,7 +714,7 @@ export class Mysql { accept: 'application/json', }; - return this.client.call('patch', uri, apiHeaders, payload); + return this.client.call('patch', uri, apiHeaders, apiPayload); } /** @@ -760,7 +760,7 @@ export class Mysql { '{databaseId}', encodeURIComponent(String(databaseId)), ); - const payload: Payload = {}; + const apiPayload: Payload = {}; const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { @@ -769,7 +769,7 @@ export class Mysql { accept: 'application/json', }; - return this.client.call('delete', uri, apiHeaders, payload); + return this.client.call('delete', uri, apiHeaders, apiPayload); } /** @@ -831,9 +831,9 @@ export class Mysql { '{databaseId}', encodeURIComponent(String(databaseId)), ); - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof queries !== 'undefined') { - payload['queries'] = queries; + apiPayload['queries'] = queries; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -842,7 +842,7 @@ export class Mysql { accept: 'application/json', }; - return this.client.call('get', uri, apiHeaders, payload); + return this.client.call('get', uri, apiHeaders, apiPayload); } /** @@ -904,9 +904,9 @@ export class Mysql { '{databaseId}', encodeURIComponent(String(databaseId)), ); - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof type !== 'undefined') { - payload['type'] = type; + apiPayload['type'] = type; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -916,7 +916,7 @@ export class Mysql { accept: 'application/json', }; - return this.client.call('post', uri, apiHeaders, payload); + return this.client.call('post', uri, apiHeaders, apiPayload); } /** @@ -978,9 +978,9 @@ export class Mysql { '{databaseId}', encodeURIComponent(String(databaseId)), ); - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof queries !== 'undefined') { - payload['queries'] = queries; + apiPayload['queries'] = queries; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -989,7 +989,7 @@ export class Mysql { accept: 'application/json', }; - return this.client.call('get', uri, apiHeaders, payload); + return this.client.call('get', uri, apiHeaders, apiPayload); } /** @@ -1122,24 +1122,24 @@ export class Mysql { '{databaseId}', encodeURIComponent(String(databaseId)), ); - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof policyId !== 'undefined') { - payload['policyId'] = policyId; + apiPayload['policyId'] = policyId; } if (typeof name !== 'undefined') { - payload['name'] = name; + apiPayload['name'] = name; } if (typeof schedule !== 'undefined') { - payload['schedule'] = schedule; + apiPayload['schedule'] = schedule; } if (typeof retention !== 'undefined') { - payload['retention'] = retention; + apiPayload['retention'] = retention; } if (typeof type !== 'undefined') { - payload['type'] = type; + apiPayload['type'] = type; } if (typeof enabled !== 'undefined') { - payload['enabled'] = enabled; + apiPayload['enabled'] = enabled; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -1149,7 +1149,7 @@ export class Mysql { accept: 'application/json', }; - return this.client.call('post', uri, apiHeaders, payload); + return this.client.call('post', uri, apiHeaders, apiPayload); } /** @@ -1215,7 +1215,7 @@ export class Mysql { const apiPath = '/mysql/{databaseId}/backups/policies/{policyId}' .replace('{databaseId}', encodeURIComponent(String(databaseId))) .replace('{policyId}', encodeURIComponent(String(policyId))); - const payload: Payload = {}; + const apiPayload: Payload = {}; const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { @@ -1223,7 +1223,7 @@ export class Mysql { accept: 'application/json', }; - return this.client.call('get', uri, apiHeaders, payload); + return this.client.call('get', uri, apiHeaders, apiPayload); } /** @@ -1333,18 +1333,18 @@ export class Mysql { const apiPath = '/mysql/{databaseId}/backups/policies/{policyId}' .replace('{databaseId}', encodeURIComponent(String(databaseId))) .replace('{policyId}', encodeURIComponent(String(policyId))); - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof name !== 'undefined') { - payload['name'] = name; + apiPayload['name'] = name; } if (typeof schedule !== 'undefined') { - payload['schedule'] = schedule; + apiPayload['schedule'] = schedule; } if (typeof retention !== 'undefined') { - payload['retention'] = retention; + apiPayload['retention'] = retention; } if (typeof enabled !== 'undefined') { - payload['enabled'] = enabled; + apiPayload['enabled'] = enabled; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -1354,7 +1354,7 @@ export class Mysql { accept: 'application/json', }; - return this.client.call('patch', uri, apiHeaders, payload); + return this.client.call('patch', uri, apiHeaders, apiPayload); } /** @@ -1417,7 +1417,7 @@ export class Mysql { const apiPath = '/mysql/{databaseId}/backups/policies/{policyId}' .replace('{databaseId}', encodeURIComponent(String(databaseId))) .replace('{policyId}', encodeURIComponent(String(policyId))); - const payload: Payload = {}; + const apiPayload: Payload = {}; const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { @@ -1426,7 +1426,7 @@ export class Mysql { accept: 'application/json', }; - return this.client.call('delete', uri, apiHeaders, payload); + return this.client.call('delete', uri, apiHeaders, apiPayload); } /** @@ -1568,27 +1568,27 @@ export class Mysql { '{databaseId}', encodeURIComponent(String(databaseId)), ); - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof provider !== 'undefined') { - payload['provider'] = provider; + apiPayload['provider'] = provider; } if (typeof bucket !== 'undefined') { - payload['bucket'] = bucket; + apiPayload['bucket'] = bucket; } if (typeof region !== 'undefined') { - payload['region'] = region; + apiPayload['region'] = region; } if (typeof prefix !== 'undefined') { - payload['prefix'] = prefix; + apiPayload['prefix'] = prefix; } if (typeof endpoint !== 'undefined') { - payload['endpoint'] = endpoint; + apiPayload['endpoint'] = endpoint; } if (typeof accessKey !== 'undefined') { - payload['accessKey'] = accessKey; + apiPayload['accessKey'] = accessKey; } if (typeof secretKey !== 'undefined') { - payload['secretKey'] = secretKey; + apiPayload['secretKey'] = secretKey; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -1598,7 +1598,7 @@ export class Mysql { accept: 'application/json', }; - return this.client.call('put', uri, apiHeaders, payload); + return this.client.call('put', uri, apiHeaders, apiPayload); } /** @@ -1664,7 +1664,7 @@ export class Mysql { const apiPath = '/mysql/{databaseId}/backups/{backupId}' .replace('{databaseId}', encodeURIComponent(String(databaseId))) .replace('{backupId}', encodeURIComponent(String(backupId))); - const payload: Payload = {}; + const apiPayload: Payload = {}; const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { @@ -1672,7 +1672,7 @@ export class Mysql { accept: 'application/json', }; - return this.client.call('get', uri, apiHeaders, payload); + return this.client.call('get', uri, apiHeaders, apiPayload); } /** @@ -1732,7 +1732,7 @@ export class Mysql { const apiPath = '/mysql/{databaseId}/backups/{backupId}' .replace('{databaseId}', encodeURIComponent(String(databaseId))) .replace('{backupId}', encodeURIComponent(String(backupId))); - const payload: Payload = {}; + const apiPayload: Payload = {}; const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { @@ -1741,7 +1741,7 @@ export class Mysql { accept: 'application/json', }; - return this.client.call('delete', uri, apiHeaders, payload); + return this.client.call('delete', uri, apiHeaders, apiPayload); } /** @@ -1793,7 +1793,7 @@ export class Mysql { '{databaseId}', encodeURIComponent(String(databaseId)), ); - const payload: Payload = {}; + const apiPayload: Payload = {}; const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { @@ -1801,7 +1801,7 @@ export class Mysql { accept: 'application/json', }; - return this.client.call('get', uri, apiHeaders, payload); + return this.client.call('get', uri, apiHeaders, apiPayload); } /** @@ -1871,12 +1871,12 @@ export class Mysql { '{databaseId}', encodeURIComponent(String(databaseId)), ); - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof branchId !== 'undefined') { - payload['branchId'] = branchId; + apiPayload['branchId'] = branchId; } if (typeof ttl !== 'undefined') { - payload['ttl'] = ttl; + apiPayload['ttl'] = ttl; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -1886,7 +1886,7 @@ export class Mysql { accept: 'application/json', }; - return this.client.call('post', uri, apiHeaders, payload); + return this.client.call('post', uri, apiHeaders, apiPayload); } /** @@ -1952,7 +1952,7 @@ export class Mysql { const apiPath = '/mysql/{databaseId}/branches/{branchId}' .replace('{databaseId}', encodeURIComponent(String(databaseId))) .replace('{branchId}', encodeURIComponent(String(branchId))); - const payload: Payload = {}; + const apiPayload: Payload = {}; const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { @@ -1961,7 +1961,7 @@ export class Mysql { accept: 'application/json', }; - return this.client.call('delete', uri, apiHeaders, payload); + return this.client.call('delete', uri, apiHeaders, apiPayload); } /** @@ -2013,7 +2013,7 @@ export class Mysql { '{databaseId}', encodeURIComponent(String(databaseId)), ); - const payload: Payload = {}; + const apiPayload: Payload = {}; const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { @@ -2022,7 +2022,7 @@ export class Mysql { accept: 'application/json', }; - return this.client.call('patch', uri, apiHeaders, payload); + return this.client.call('patch', uri, apiHeaders, apiPayload); } /** @@ -2113,15 +2113,15 @@ export class Mysql { '{databaseId}', encodeURIComponent(String(databaseId)), ); - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof sql !== 'undefined') { - payload['sql'] = sql; + apiPayload['sql'] = sql; } if (typeof bindings !== 'undefined') { - payload['bindings'] = bindings; + apiPayload['bindings'] = bindings; } if (typeof timeoutSeconds !== 'undefined') { - payload['timeoutSeconds'] = timeoutSeconds; + apiPayload['timeoutSeconds'] = timeoutSeconds; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -2131,7 +2131,7 @@ export class Mysql { accept: 'application/json', }; - return this.client.call('post', uri, apiHeaders, payload); + return this.client.call('post', uri, apiHeaders, apiPayload); } /** @@ -2194,9 +2194,9 @@ export class Mysql { '{databaseId}', encodeURIComponent(String(databaseId)), ); - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof targetReplicaId !== 'undefined') { - payload['targetReplicaId'] = targetReplicaId; + apiPayload['targetReplicaId'] = targetReplicaId; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -2206,7 +2206,7 @@ export class Mysql { accept: 'application/json', }; - return this.client.call('post', uri, apiHeaders, payload); + return this.client.call('post', uri, apiHeaders, apiPayload); } /** @@ -2284,12 +2284,12 @@ export class Mysql { '{databaseId}', encodeURIComponent(String(databaseId)), ); - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof day !== 'undefined') { - payload['day'] = day; + apiPayload['day'] = day; } if (typeof hourUtc !== 'undefined') { - payload['hourUtc'] = hourUtc; + apiPayload['hourUtc'] = hourUtc; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -2299,7 +2299,7 @@ export class Mysql { accept: 'application/json', }; - return this.client.call('patch', uri, apiHeaders, payload); + return this.client.call('patch', uri, apiHeaders, apiPayload); } /** @@ -2379,12 +2379,12 @@ export class Mysql { '{databaseId}', encodeURIComponent(String(databaseId)), ); - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof targetType !== 'undefined') { - payload['targetType'] = targetType; + apiPayload['targetType'] = targetType; } if (typeof specification !== 'undefined') { - payload['specification'] = specification; + apiPayload['specification'] = specification; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -2394,7 +2394,7 @@ export class Mysql { accept: 'application/json', }; - return this.client.call('post', uri, apiHeaders, payload); + return this.client.call('post', uri, apiHeaders, apiPayload); } /** @@ -2482,15 +2482,15 @@ export class Mysql { '{databaseId}', encodeURIComponent(String(databaseId)), ); - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof status !== 'undefined') { - payload['status'] = status; + apiPayload['status'] = status; } if (typeof limit !== 'undefined') { - payload['limit'] = limit; + apiPayload['limit'] = limit; } if (typeof offset !== 'undefined') { - payload['offset'] = offset; + apiPayload['offset'] = offset; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -2499,7 +2499,7 @@ export class Mysql { accept: 'application/json', }; - return this.client.call('get', uri, apiHeaders, payload); + return this.client.call('get', uri, apiHeaders, apiPayload); } /** @@ -2549,7 +2549,7 @@ export class Mysql { '{databaseId}', encodeURIComponent(String(databaseId)), ); - const payload: Payload = {}; + const apiPayload: Payload = {}; const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { @@ -2557,7 +2557,7 @@ export class Mysql { accept: 'application/json', }; - return this.client.call('get', uri, apiHeaders, payload); + return this.client.call('get', uri, apiHeaders, apiPayload); } /** @@ -2607,7 +2607,7 @@ export class Mysql { '{databaseId}', encodeURIComponent(String(databaseId)), ); - const payload: Payload = {}; + const apiPayload: Payload = {}; const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { @@ -2615,7 +2615,7 @@ export class Mysql { accept: 'application/json', }; - return this.client.call('get', uri, apiHeaders, payload); + return this.client.call('get', uri, apiHeaders, apiPayload); } /** @@ -2757,30 +2757,30 @@ export class Mysql { '{databaseId}', encodeURIComponent(String(databaseId)), ); - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof mode !== 'undefined') { - payload['mode'] = mode; + apiPayload['mode'] = mode; } if (typeof maxConnections !== 'undefined') { - payload['maxConnections'] = maxConnections; + apiPayload['maxConnections'] = maxConnections; } if (typeof defaultPoolSize !== 'undefined') { - payload['defaultPoolSize'] = defaultPoolSize; + apiPayload['defaultPoolSize'] = defaultPoolSize; } if (typeof readWriteSplitting !== 'undefined') { - payload['readWriteSplitting'] = readWriteSplitting; + apiPayload['readWriteSplitting'] = readWriteSplitting; } if (typeof poolerCpuRequest !== 'undefined') { - payload['poolerCpuRequest'] = poolerCpuRequest; + apiPayload['poolerCpuRequest'] = poolerCpuRequest; } if (typeof poolerCpuLimit !== 'undefined') { - payload['poolerCpuLimit'] = poolerCpuLimit; + apiPayload['poolerCpuLimit'] = poolerCpuLimit; } if (typeof poolerMemoryRequest !== 'undefined') { - payload['poolerMemoryRequest'] = poolerMemoryRequest; + apiPayload['poolerMemoryRequest'] = poolerMemoryRequest; } if (typeof poolerMemoryLimit !== 'undefined') { - payload['poolerMemoryLimit'] = poolerMemoryLimit; + apiPayload['poolerMemoryLimit'] = poolerMemoryLimit; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -2790,7 +2790,7 @@ export class Mysql { accept: 'application/json', }; - return this.client.call('patch', uri, apiHeaders, payload); + return this.client.call('patch', uri, apiHeaders, apiPayload); } /** @@ -2840,7 +2840,7 @@ export class Mysql { '{databaseId}', encodeURIComponent(String(databaseId)), ); - const payload: Payload = {}; + const apiPayload: Payload = {}; const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { @@ -2848,7 +2848,7 @@ export class Mysql { accept: 'application/json', }; - return this.client.call('get', uri, apiHeaders, payload); + return this.client.call('get', uri, apiHeaders, apiPayload); } /** @@ -2945,18 +2945,18 @@ export class Mysql { '{databaseId}', encodeURIComponent(String(databaseId)), ); - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof status !== 'undefined') { - payload['status'] = status; + apiPayload['status'] = status; } if (typeof type !== 'undefined') { - payload['type'] = type; + apiPayload['type'] = type; } if (typeof limit !== 'undefined') { - payload['limit'] = limit; + apiPayload['limit'] = limit; } if (typeof offset !== 'undefined') { - payload['offset'] = offset; + apiPayload['offset'] = offset; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -2965,7 +2965,7 @@ export class Mysql { accept: 'application/json', }; - return this.client.call('get', uri, apiHeaders, payload); + return this.client.call('get', uri, apiHeaders, apiPayload); } /** @@ -3062,18 +3062,18 @@ export class Mysql { '{databaseId}', encodeURIComponent(String(databaseId)), ); - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof type !== 'undefined') { - payload['type'] = type; + apiPayload['type'] = type; } if (typeof backupId !== 'undefined') { - payload['backupId'] = backupId; + apiPayload['backupId'] = backupId; } if (typeof targetDatabaseId !== 'undefined') { - payload['targetDatabaseId'] = targetDatabaseId; + apiPayload['targetDatabaseId'] = targetDatabaseId; } if (typeof targetTime !== 'undefined') { - payload['targetTime'] = targetTime; + apiPayload['targetTime'] = targetTime; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -3083,7 +3083,7 @@ export class Mysql { accept: 'application/json', }; - return this.client.call('post', uri, apiHeaders, payload); + return this.client.call('post', uri, apiHeaders, apiPayload); } /** @@ -3152,7 +3152,7 @@ export class Mysql { '{restorationId}', encodeURIComponent(String(restorationId)), ); - const payload: Payload = {}; + const apiPayload: Payload = {}; const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { @@ -3160,7 +3160,7 @@ export class Mysql { accept: 'application/json', }; - return this.client.call('get', uri, apiHeaders, payload); + return this.client.call('get', uri, apiHeaders, apiPayload); } /** @@ -3208,7 +3208,7 @@ export class Mysql { '{databaseId}', encodeURIComponent(String(databaseId)), ); - const payload: Payload = {}; + const apiPayload: Payload = {}; const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { @@ -3216,7 +3216,7 @@ export class Mysql { accept: 'application/json', }; - return this.client.call('get', uri, apiHeaders, payload); + return this.client.call('get', uri, apiHeaders, apiPayload); } /** @@ -3283,9 +3283,9 @@ export class Mysql { '{databaseId}', encodeURIComponent(String(databaseId)), ); - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof targetVersion !== 'undefined') { - payload['targetVersion'] = targetVersion; + apiPayload['targetVersion'] = targetVersion; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -3295,6 +3295,6 @@ export class Mysql { accept: 'application/json', }; - return this.client.call('post', uri, apiHeaders, payload); + return this.client.call('post', uri, apiHeaders, apiPayload); } } diff --git a/src/services/notifications.ts b/src/services/notifications.ts index 70e75f29..861d532f 100644 --- a/src/services/notifications.ts +++ b/src/services/notifications.ts @@ -48,9 +48,9 @@ export class Notifications { const queries = params.queries; const apiPath = '/notifications'; - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof queries !== 'undefined') { - payload['queries'] = queries; + apiPayload['queries'] = queries; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -59,7 +59,7 @@ export class Notifications { accept: 'application/json', }; - return this.client.call('get', uri, apiHeaders, payload); + return this.client.call('get', uri, apiHeaders, apiPayload); } /** @@ -123,9 +123,9 @@ export class Notifications { '{notificationId}', encodeURIComponent(String(notificationId)), ); - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof read !== 'undefined') { - payload['read'] = read; + apiPayload['read'] = read; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -135,6 +135,6 @@ export class Notifications { accept: 'application/json', }; - return this.client.call('patch', uri, apiHeaders, payload); + return this.client.call('patch', uri, apiHeaders, apiPayload); } } diff --git a/src/services/oauth-2.ts b/src/services/oauth-2.ts index 921f6903..0cb439cf 100644 --- a/src/services/oauth-2.ts +++ b/src/services/oauth-2.ts @@ -80,15 +80,15 @@ export class Oauth2 { '{project_id}', encodeURIComponent(String(this.client.config.project)), ); - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof grantId !== 'undefined') { - payload['grant_id'] = grantId; + apiPayload['grant_id'] = grantId; } if (typeof authorizationDetails !== 'undefined') { - payload['authorization_details'] = authorizationDetails; + apiPayload['authorization_details'] = authorizationDetails; } if (typeof scope !== 'undefined') { - payload['scope'] = scope; + apiPayload['scope'] = scope; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -97,7 +97,7 @@ export class Oauth2 { accept: 'application/json', }; - return this.client.call('post', uri, apiHeaders, payload); + return this.client.call('post', uri, apiHeaders, apiPayload); } /** @@ -285,48 +285,48 @@ export class Oauth2 { '{project_id}', encodeURIComponent(String(this.client.config.project)), ); - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof clientId !== 'undefined') { - payload['client_id'] = clientId; + apiPayload['client_id'] = clientId; } if (typeof redirectUri !== 'undefined') { - payload['redirect_uri'] = redirectUri; + apiPayload['redirect_uri'] = redirectUri; } if (typeof responseType !== 'undefined') { - payload['response_type'] = responseType; + apiPayload['response_type'] = responseType; } if (typeof scope !== 'undefined') { - payload['scope'] = scope; + apiPayload['scope'] = scope; } if (typeof state !== 'undefined') { - payload['state'] = state; + apiPayload['state'] = state; } if (typeof nonce !== 'undefined') { - payload['nonce'] = nonce; + apiPayload['nonce'] = nonce; } if (typeof codeChallenge !== 'undefined') { - payload['code_challenge'] = codeChallenge; + apiPayload['code_challenge'] = codeChallenge; } if (typeof codeChallengeMethod !== 'undefined') { - payload['code_challenge_method'] = codeChallengeMethod; + apiPayload['code_challenge_method'] = codeChallengeMethod; } if (typeof prompt !== 'undefined') { - payload['prompt'] = prompt; + apiPayload['prompt'] = prompt; } if (typeof maxAge !== 'undefined') { - payload['max_age'] = maxAge; + apiPayload['max_age'] = maxAge; } if (typeof authorizationDetails !== 'undefined') { - payload['authorization_details'] = authorizationDetails; + apiPayload['authorization_details'] = authorizationDetails; } if (typeof resource !== 'undefined') { - payload['resource'] = resource; + apiPayload['resource'] = resource; } if (typeof audience !== 'undefined') { - payload['audience'] = audience; + apiPayload['audience'] = audience; } if (typeof requestUri !== 'undefined') { - payload['request_uri'] = requestUri; + apiPayload['request_uri'] = requestUri; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -334,7 +334,7 @@ export class Oauth2 { accept: 'application/json', }; - return this.client.call('get', uri, apiHeaders, payload); + return this.client.call('get', uri, apiHeaders, apiPayload); } /** @@ -522,48 +522,48 @@ export class Oauth2 { '{project_id}', encodeURIComponent(String(this.client.config.project)), ); - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof clientId !== 'undefined') { - payload['client_id'] = clientId; + apiPayload['client_id'] = clientId; } if (typeof redirectUri !== 'undefined') { - payload['redirect_uri'] = redirectUri; + apiPayload['redirect_uri'] = redirectUri; } if (typeof responseType !== 'undefined') { - payload['response_type'] = responseType; + apiPayload['response_type'] = responseType; } if (typeof scope !== 'undefined') { - payload['scope'] = scope; + apiPayload['scope'] = scope; } if (typeof state !== 'undefined') { - payload['state'] = state; + apiPayload['state'] = state; } if (typeof nonce !== 'undefined') { - payload['nonce'] = nonce; + apiPayload['nonce'] = nonce; } if (typeof codeChallenge !== 'undefined') { - payload['code_challenge'] = codeChallenge; + apiPayload['code_challenge'] = codeChallenge; } if (typeof codeChallengeMethod !== 'undefined') { - payload['code_challenge_method'] = codeChallengeMethod; + apiPayload['code_challenge_method'] = codeChallengeMethod; } if (typeof prompt !== 'undefined') { - payload['prompt'] = prompt; + apiPayload['prompt'] = prompt; } if (typeof maxAge !== 'undefined') { - payload['max_age'] = maxAge; + apiPayload['max_age'] = maxAge; } if (typeof authorizationDetails !== 'undefined') { - payload['authorization_details'] = authorizationDetails; + apiPayload['authorization_details'] = authorizationDetails; } if (typeof resource !== 'undefined') { - payload['resource'] = resource; + apiPayload['resource'] = resource; } if (typeof audience !== 'undefined') { - payload['audience'] = audience; + apiPayload['audience'] = audience; } if (typeof requestUri !== 'undefined') { - payload['request_uri'] = requestUri; + apiPayload['request_uri'] = requestUri; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -572,7 +572,7 @@ export class Oauth2 { accept: 'application/json', }; - return this.client.call('post', uri, apiHeaders, payload); + return this.client.call('post', uri, apiHeaders, apiPayload); } /** @@ -665,21 +665,21 @@ export class Oauth2 { '{project_id}', encodeURIComponent(String(this.client.config.project)), ); - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof clientId !== 'undefined') { - payload['client_id'] = clientId; + apiPayload['client_id'] = clientId; } if (typeof scope !== 'undefined') { - payload['scope'] = scope; + apiPayload['scope'] = scope; } if (typeof authorizationDetails !== 'undefined') { - payload['authorization_details'] = authorizationDetails; + apiPayload['authorization_details'] = authorizationDetails; } if (typeof resource !== 'undefined') { - payload['resource'] = resource; + apiPayload['resource'] = resource; } if (typeof audience !== 'undefined') { - payload['audience'] = audience; + apiPayload['audience'] = audience; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -688,7 +688,7 @@ export class Oauth2 { accept: 'application/json', }; - return this.client.call('post', uri, apiHeaders, payload); + return this.client.call('post', uri, apiHeaders, apiPayload); } /** @@ -736,9 +736,9 @@ export class Oauth2 { '{project_id}', encodeURIComponent(String(this.client.config.project)), ); - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof userCode !== 'undefined') { - payload['user_code'] = userCode; + apiPayload['user_code'] = userCode; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -747,7 +747,7 @@ export class Oauth2 { accept: 'application/json', }; - return this.client.call('post', uri, apiHeaders, payload); + return this.client.call('post', uri, apiHeaders, apiPayload); } /** @@ -797,14 +797,14 @@ export class Oauth2 { encodeURIComponent(String(this.client.config.project)), ) .replace('{grant_id}', encodeURIComponent(String(grantId))); - const payload: Payload = {}; + const apiPayload: Payload = {}; const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { accept: 'application/json', }; - return this.client.call('get', uri, apiHeaders, payload); + return this.client.call('get', uri, apiHeaders, apiPayload); } /** @@ -906,24 +906,24 @@ export class Oauth2 { '{project_id}', encodeURIComponent(String(this.client.config.project)), ); - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof idTokenHint !== 'undefined') { - payload['id_token_hint'] = idTokenHint; + apiPayload['id_token_hint'] = idTokenHint; } if (typeof logoutHint !== 'undefined') { - payload['logout_hint'] = logoutHint; + apiPayload['logout_hint'] = logoutHint; } if (typeof clientId !== 'undefined') { - payload['client_id'] = clientId; + apiPayload['client_id'] = clientId; } if (typeof postLogoutRedirectUri !== 'undefined') { - payload['post_logout_redirect_uri'] = postLogoutRedirectUri; + apiPayload['post_logout_redirect_uri'] = postLogoutRedirectUri; } if (typeof state !== 'undefined') { - payload['state'] = state; + apiPayload['state'] = state; } if (typeof uiLocales !== 'undefined') { - payload['ui_locales'] = uiLocales; + apiPayload['ui_locales'] = uiLocales; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -931,7 +931,7 @@ export class Oauth2 { accept: 'application/json', }; - return this.client.call('get', uri, apiHeaders, payload); + return this.client.call('get', uri, apiHeaders, apiPayload); } /** @@ -1033,24 +1033,24 @@ export class Oauth2 { '{project_id}', encodeURIComponent(String(this.client.config.project)), ); - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof idTokenHint !== 'undefined') { - payload['id_token_hint'] = idTokenHint; + apiPayload['id_token_hint'] = idTokenHint; } if (typeof logoutHint !== 'undefined') { - payload['logout_hint'] = logoutHint; + apiPayload['logout_hint'] = logoutHint; } if (typeof clientId !== 'undefined') { - payload['client_id'] = clientId; + apiPayload['client_id'] = clientId; } if (typeof postLogoutRedirectUri !== 'undefined') { - payload['post_logout_redirect_uri'] = postLogoutRedirectUri; + apiPayload['post_logout_redirect_uri'] = postLogoutRedirectUri; } if (typeof state !== 'undefined') { - payload['state'] = state; + apiPayload['state'] = state; } if (typeof uiLocales !== 'undefined') { - payload['ui_locales'] = uiLocales; + apiPayload['ui_locales'] = uiLocales; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -1059,7 +1059,7 @@ export class Oauth2 { accept: 'application/json', }; - return this.client.call('post', uri, apiHeaders, payload); + return this.client.call('post', uri, apiHeaders, apiPayload); } /** @@ -1125,15 +1125,15 @@ export class Oauth2 { '{project_id}', encodeURIComponent(String(this.client.config.project)), ); - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof limit !== 'undefined') { - payload['limit'] = limit; + apiPayload['limit'] = limit; } if (typeof offset !== 'undefined') { - payload['offset'] = offset; + apiPayload['offset'] = offset; } if (typeof search !== 'undefined') { - payload['search'] = search; + apiPayload['search'] = search; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -1141,7 +1141,7 @@ export class Oauth2 { accept: 'application/json', }; - return this.client.call('get', uri, apiHeaders, payload); + return this.client.call('get', uri, apiHeaders, apiPayload); } /** @@ -1333,45 +1333,45 @@ export class Oauth2 { '{project_id}', encodeURIComponent(String(this.client.config.project)), ); - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof clientId !== 'undefined') { - payload['client_id'] = clientId; + apiPayload['client_id'] = clientId; } if (typeof redirectUri !== 'undefined') { - payload['redirect_uri'] = redirectUri; + apiPayload['redirect_uri'] = redirectUri; } if (typeof responseType !== 'undefined') { - payload['response_type'] = responseType; + apiPayload['response_type'] = responseType; } if (typeof scope !== 'undefined') { - payload['scope'] = scope; + apiPayload['scope'] = scope; } if (typeof state !== 'undefined') { - payload['state'] = state; + apiPayload['state'] = state; } if (typeof nonce !== 'undefined') { - payload['nonce'] = nonce; + apiPayload['nonce'] = nonce; } if (typeof codeChallenge !== 'undefined') { - payload['code_challenge'] = codeChallenge; + apiPayload['code_challenge'] = codeChallenge; } if (typeof codeChallengeMethod !== 'undefined') { - payload['code_challenge_method'] = codeChallengeMethod; + apiPayload['code_challenge_method'] = codeChallengeMethod; } if (typeof prompt !== 'undefined') { - payload['prompt'] = prompt; + apiPayload['prompt'] = prompt; } if (typeof maxAge !== 'undefined') { - payload['max_age'] = maxAge; + apiPayload['max_age'] = maxAge; } if (typeof authorizationDetails !== 'undefined') { - payload['authorization_details'] = authorizationDetails; + apiPayload['authorization_details'] = authorizationDetails; } if (typeof resource !== 'undefined') { - payload['resource'] = resource; + apiPayload['resource'] = resource; } if (typeof audience !== 'undefined') { - payload['audience'] = audience; + apiPayload['audience'] = audience; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -1380,7 +1380,7 @@ export class Oauth2 { accept: 'application/json', }; - return this.client.call('post', uri, apiHeaders, payload); + return this.client.call('post', uri, apiHeaders, apiPayload); } /** @@ -1446,15 +1446,15 @@ export class Oauth2 { '{project_id}', encodeURIComponent(String(this.client.config.project)), ); - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof limit !== 'undefined') { - payload['limit'] = limit; + apiPayload['limit'] = limit; } if (typeof offset !== 'undefined') { - payload['offset'] = offset; + apiPayload['offset'] = offset; } if (typeof search !== 'undefined') { - payload['search'] = search; + apiPayload['search'] = search; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -1462,7 +1462,7 @@ export class Oauth2 { accept: 'application/json', }; - return this.client.call('get', uri, apiHeaders, payload); + return this.client.call('get', uri, apiHeaders, apiPayload); } /** @@ -1510,9 +1510,9 @@ export class Oauth2 { '{project_id}', encodeURIComponent(String(this.client.config.project)), ); - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof grantId !== 'undefined') { - payload['grant_id'] = grantId; + apiPayload['grant_id'] = grantId; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -1521,7 +1521,7 @@ export class Oauth2 { accept: 'application/json', }; - return this.client.call('post', uri, apiHeaders, payload); + return this.client.call('post', uri, apiHeaders, apiPayload); } /** @@ -1607,18 +1607,18 @@ export class Oauth2 { '{project_id}', encodeURIComponent(String(this.client.config.project)), ); - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof token !== 'undefined') { - payload['token'] = token; + apiPayload['token'] = token; } if (typeof tokenTypeHint !== 'undefined') { - payload['token_type_hint'] = tokenTypeHint; + apiPayload['token_type_hint'] = tokenTypeHint; } if (typeof clientId !== 'undefined') { - payload['client_id'] = clientId; + apiPayload['client_id'] = clientId; } if (typeof clientSecret !== 'undefined') { - payload['client_secret'] = clientSecret; + apiPayload['client_secret'] = clientSecret; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -1627,7 +1627,7 @@ export class Oauth2 { accept: 'application/json', }; - return this.client.call('post', uri, apiHeaders, payload); + return this.client.call('post', uri, apiHeaders, apiPayload); } /** @@ -1779,36 +1779,36 @@ export class Oauth2 { '{project_id}', encodeURIComponent(String(this.client.config.project)), ); - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof grantType !== 'undefined') { - payload['grant_type'] = grantType; + apiPayload['grant_type'] = grantType; } if (typeof code !== 'undefined') { - payload['code'] = code; + apiPayload['code'] = code; } if (typeof refreshToken !== 'undefined') { - payload['refresh_token'] = refreshToken; + apiPayload['refresh_token'] = refreshToken; } if (typeof deviceCode !== 'undefined') { - payload['device_code'] = deviceCode; + apiPayload['device_code'] = deviceCode; } if (typeof clientId !== 'undefined') { - payload['client_id'] = clientId; + apiPayload['client_id'] = clientId; } if (typeof clientSecret !== 'undefined') { - payload['client_secret'] = clientSecret; + apiPayload['client_secret'] = clientSecret; } if (typeof codeVerifier !== 'undefined') { - payload['code_verifier'] = codeVerifier; + apiPayload['code_verifier'] = codeVerifier; } if (typeof redirectUri !== 'undefined') { - payload['redirect_uri'] = redirectUri; + apiPayload['redirect_uri'] = redirectUri; } if (typeof resource !== 'undefined') { - payload['resource'] = resource; + apiPayload['resource'] = resource; } if (typeof audience !== 'undefined') { - payload['audience'] = audience; + apiPayload['audience'] = audience; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -1817,6 +1817,6 @@ export class Oauth2 { accept: 'application/json', }; - return this.client.call('post', uri, apiHeaders, payload); + return this.client.call('post', uri, apiHeaders, apiPayload); } } diff --git a/src/services/organization.ts b/src/services/organization.ts index 88f6b127..5ed0543e 100644 --- a/src/services/organization.ts +++ b/src/services/organization.ts @@ -21,7 +21,7 @@ export class Organization { Preferences extends Models.Preferences = Models.DefaultPreferences, >(): Promise> { const apiPath = '/organization'; - const payload: Payload = {}; + const apiPayload: Payload = {}; const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { @@ -29,7 +29,7 @@ export class Organization { accept: 'application/json', }; - return this.client.call('get', uri, apiHeaders, payload); + return this.client.call('get', uri, apiHeaders, apiPayload); } /** @@ -76,9 +76,9 @@ export class Organization { throw new AppwriteException('Missing required parameter: "name"'); } const apiPath = '/organization'; - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof name !== 'undefined') { - payload['name'] = name; + apiPayload['name'] = name; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -88,7 +88,7 @@ export class Organization { accept: 'application/json', }; - return this.client.call('put', uri, apiHeaders, payload); + return this.client.call('put', uri, apiHeaders, apiPayload); } /** @@ -99,7 +99,7 @@ export class Organization { */ delete(): Promise<{}> { const apiPath = '/organization'; - const payload: Payload = {}; + const apiPayload: Payload = {}; const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { @@ -108,7 +108,7 @@ export class Organization { accept: 'application/json', }; - return this.client.call('delete', uri, apiHeaders, payload); + return this.client.call('delete', uri, apiHeaders, apiPayload); } /** @@ -163,12 +163,12 @@ export class Organization { const total = params.total; const apiPath = '/organization/installations'; - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof queries !== 'undefined') { - payload['queries'] = queries; + apiPayload['queries'] = queries; } if (typeof total !== 'undefined') { - payload['total'] = total; + apiPayload['total'] = total; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -177,7 +177,7 @@ export class Organization { accept: 'application/json', }; - return this.client.call('get', uri, apiHeaders, payload); + return this.client.call('get', uri, apiHeaders, apiPayload); } /** @@ -235,12 +235,12 @@ export class Organization { throw new AppwriteException('Missing required parameter: "appId"'); } const apiPath = '/organization/installations'; - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof appId !== 'undefined') { - payload['appId'] = appId; + apiPayload['appId'] = appId; } if (typeof authorizationDetails !== 'undefined') { - payload['authorizationDetails'] = authorizationDetails; + apiPayload['authorizationDetails'] = authorizationDetails; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -250,7 +250,7 @@ export class Organization { accept: 'application/json', }; - return this.client.call('post', uri, apiHeaders, payload); + return this.client.call('post', uri, apiHeaders, apiPayload); } /** @@ -300,7 +300,7 @@ export class Organization { '{installationId}', encodeURIComponent(String(installationId)), ); - const payload: Payload = {}; + const apiPayload: Payload = {}; const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { @@ -308,7 +308,7 @@ export class Organization { accept: 'application/json', }; - return this.client.call('get', uri, apiHeaders, payload); + return this.client.call('get', uri, apiHeaders, apiPayload); } /** @@ -371,9 +371,9 @@ export class Organization { '{installationId}', encodeURIComponent(String(installationId)), ); - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof authorizationDetails !== 'undefined') { - payload['authorizationDetails'] = authorizationDetails; + apiPayload['authorizationDetails'] = authorizationDetails; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -383,7 +383,7 @@ export class Organization { accept: 'application/json', }; - return this.client.call('put', uri, apiHeaders, payload); + return this.client.call('put', uri, apiHeaders, apiPayload); } /** @@ -431,7 +431,7 @@ export class Organization { '{installationId}', encodeURIComponent(String(installationId)), ); - const payload: Payload = {}; + const apiPayload: Payload = {}; const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { @@ -440,7 +440,7 @@ export class Organization { accept: 'application/json', }; - return this.client.call('delete', uri, apiHeaders, payload); + return this.client.call('delete', uri, apiHeaders, apiPayload); } /** @@ -492,12 +492,12 @@ export class Organization { const total = params.total; const apiPath = '/organization/keys'; - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof queries !== 'undefined') { - payload['queries'] = queries; + apiPayload['queries'] = queries; } if (typeof total !== 'undefined') { - payload['total'] = total; + apiPayload['total'] = total; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -506,7 +506,7 @@ export class Organization { accept: 'application/json', }; - return this.client.call('get', uri, apiHeaders, payload); + return this.client.call('get', uri, apiHeaders, apiPayload); } /** @@ -595,18 +595,18 @@ export class Organization { throw new AppwriteException('Missing required parameter: "scopes"'); } const apiPath = '/organization/keys'; - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof keyId !== 'undefined') { - payload['keyId'] = keyId; + apiPayload['keyId'] = keyId; } if (typeof name !== 'undefined') { - payload['name'] = name; + apiPayload['name'] = name; } if (typeof scopes !== 'undefined') { - payload['scopes'] = scopes; + apiPayload['scopes'] = scopes; } if (typeof expire !== 'undefined') { - payload['expire'] = expire; + apiPayload['expire'] = expire; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -616,7 +616,7 @@ export class Organization { accept: 'application/json', }; - return this.client.call('post', uri, apiHeaders, payload); + return this.client.call('post', uri, apiHeaders, apiPayload); } /** @@ -660,7 +660,7 @@ export class Organization { '{keyId}', encodeURIComponent(String(keyId)), ); - const payload: Payload = {}; + const apiPayload: Payload = {}; const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { @@ -668,7 +668,7 @@ export class Organization { accept: 'application/json', }; - return this.client.call('get', uri, apiHeaders, payload); + return this.client.call('get', uri, apiHeaders, apiPayload); } /** @@ -760,15 +760,15 @@ export class Organization { '{keyId}', encodeURIComponent(String(keyId)), ); - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof name !== 'undefined') { - payload['name'] = name; + apiPayload['name'] = name; } if (typeof scopes !== 'undefined') { - payload['scopes'] = scopes; + apiPayload['scopes'] = scopes; } if (typeof expire !== 'undefined') { - payload['expire'] = expire; + apiPayload['expire'] = expire; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -778,7 +778,7 @@ export class Organization { accept: 'application/json', }; - return this.client.call('put', uri, apiHeaders, payload); + return this.client.call('put', uri, apiHeaders, apiPayload); } /** @@ -822,7 +822,7 @@ export class Organization { '{keyId}', encodeURIComponent(String(keyId)), ); - const payload: Payload = {}; + const apiPayload: Payload = {}; const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { @@ -831,7 +831,7 @@ export class Organization { accept: 'application/json', }; - return this.client.call('delete', uri, apiHeaders, payload); + return this.client.call('delete', uri, apiHeaders, apiPayload); } /** @@ -894,15 +894,15 @@ export class Organization { const total = params.total; const apiPath = '/organization/memberships'; - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof queries !== 'undefined') { - payload['queries'] = queries; + apiPayload['queries'] = queries; } if (typeof search !== 'undefined') { - payload['search'] = search; + apiPayload['search'] = search; } if (typeof total !== 'undefined') { - payload['total'] = total; + apiPayload['total'] = total; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -911,7 +911,7 @@ export class Organization { accept: 'application/json', }; - return this.client.call('get', uri, apiHeaders, payload); + return this.client.call('get', uri, apiHeaders, apiPayload); } /** @@ -1012,24 +1012,24 @@ export class Organization { throw new AppwriteException('Missing required parameter: "roles"'); } const apiPath = '/organization/memberships'; - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof email !== 'undefined') { - payload['email'] = email; + apiPayload['email'] = email; } if (typeof userId !== 'undefined') { - payload['userId'] = userId; + apiPayload['userId'] = userId; } if (typeof phone !== 'undefined') { - payload['phone'] = phone; + apiPayload['phone'] = phone; } if (typeof roles !== 'undefined') { - payload['roles'] = roles; + apiPayload['roles'] = roles; } if (typeof url !== 'undefined') { - payload['url'] = url; + apiPayload['url'] = url; } if (typeof name !== 'undefined') { - payload['name'] = name; + apiPayload['name'] = name; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -1039,7 +1039,7 @@ export class Organization { accept: 'application/json', }; - return this.client.call('post', uri, apiHeaders, payload); + return this.client.call('post', uri, apiHeaders, apiPayload); } /** @@ -1087,7 +1087,7 @@ export class Organization { '{membershipId}', encodeURIComponent(String(membershipId)), ); - const payload: Payload = {}; + const apiPayload: Payload = {}; const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { @@ -1095,7 +1095,7 @@ export class Organization { accept: 'application/json', }; - return this.client.call('get', uri, apiHeaders, payload); + return this.client.call('get', uri, apiHeaders, apiPayload); } /** @@ -1160,9 +1160,9 @@ export class Organization { '{membershipId}', encodeURIComponent(String(membershipId)), ); - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof roles !== 'undefined') { - payload['roles'] = roles; + apiPayload['roles'] = roles; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -1172,7 +1172,7 @@ export class Organization { accept: 'application/json', }; - return this.client.call('patch', uri, apiHeaders, payload); + return this.client.call('patch', uri, apiHeaders, apiPayload); } /** @@ -1220,7 +1220,7 @@ export class Organization { '{membershipId}', encodeURIComponent(String(membershipId)), ); - const payload: Payload = {}; + const apiPayload: Payload = {}; const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { @@ -1229,7 +1229,7 @@ export class Organization { accept: 'application/json', }; - return this.client.call('delete', uri, apiHeaders, payload); + return this.client.call('delete', uri, apiHeaders, apiPayload); } /** @@ -1292,15 +1292,15 @@ export class Organization { const total = params.total; const apiPath = '/organization/projects'; - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof queries !== 'undefined') { - payload['queries'] = queries; + apiPayload['queries'] = queries; } if (typeof search !== 'undefined') { - payload['search'] = search; + apiPayload['search'] = search; } if (typeof total !== 'undefined') { - payload['total'] = total; + apiPayload['total'] = total; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -1309,7 +1309,7 @@ export class Organization { accept: 'application/json', }; - return this.client.call('get', uri, apiHeaders, payload); + return this.client.call('get', uri, apiHeaders, apiPayload); } /** @@ -1379,15 +1379,15 @@ export class Organization { throw new AppwriteException('Missing required parameter: "name"'); } const apiPath = '/organization/projects'; - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof projectId !== 'undefined') { - payload['projectId'] = projectId; + apiPayload['projectId'] = projectId; } if (typeof name !== 'undefined') { - payload['name'] = name; + apiPayload['name'] = name; } if (typeof region !== 'undefined') { - payload['region'] = region; + apiPayload['region'] = region; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -1397,7 +1397,7 @@ export class Organization { accept: 'application/json', }; - return this.client.call('post', uri, apiHeaders, payload); + return this.client.call('post', uri, apiHeaders, apiPayload); } /** @@ -1445,7 +1445,7 @@ export class Organization { '{projectId}', encodeURIComponent(String(projectId)), ); - const payload: Payload = {}; + const apiPayload: Payload = {}; const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { @@ -1453,7 +1453,7 @@ export class Organization { accept: 'application/json', }; - return this.client.call('get', uri, apiHeaders, payload); + return this.client.call('get', uri, apiHeaders, apiPayload); } /** @@ -1515,9 +1515,9 @@ export class Organization { '{projectId}', encodeURIComponent(String(projectId)), ); - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof name !== 'undefined') { - payload['name'] = name; + apiPayload['name'] = name; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -1527,7 +1527,7 @@ export class Organization { accept: 'application/json', }; - return this.client.call('patch', uri, apiHeaders, payload); + return this.client.call('patch', uri, apiHeaders, apiPayload); } /** @@ -1573,7 +1573,7 @@ export class Organization { '{projectId}', encodeURIComponent(String(projectId)), ); - const payload: Payload = {}; + const apiPayload: Payload = {}; const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { @@ -1582,7 +1582,7 @@ export class Organization { accept: 'application/json', }; - return this.client.call('delete', uri, apiHeaders, payload); + return this.client.call('delete', uri, apiHeaders, apiPayload); } /** @@ -1652,12 +1652,12 @@ export class Organization { '{projectId}', encodeURIComponent(String(projectId)), ); - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof queries !== 'undefined') { - payload['queries'] = queries; + apiPayload['queries'] = queries; } if (typeof total !== 'undefined') { - payload['total'] = total; + apiPayload['total'] = total; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -1666,7 +1666,7 @@ export class Organization { accept: 'application/json', }; - return this.client.call('get', uri, apiHeaders, payload); + return this.client.call('get', uri, apiHeaders, apiPayload); } /** @@ -1776,18 +1776,18 @@ export class Organization { '{projectId}', encodeURIComponent(String(projectId)), ); - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof keyId !== 'undefined') { - payload['keyId'] = keyId; + apiPayload['keyId'] = keyId; } if (typeof name !== 'undefined') { - payload['name'] = name; + apiPayload['name'] = name; } if (typeof scopes !== 'undefined') { - payload['scopes'] = scopes; + apiPayload['scopes'] = scopes; } if (typeof expire !== 'undefined') { - payload['expire'] = expire; + apiPayload['expire'] = expire; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -1797,7 +1797,7 @@ export class Organization { accept: 'application/json', }; - return this.client.call('post', uri, apiHeaders, payload); + return this.client.call('post', uri, apiHeaders, apiPayload); } /** @@ -1889,12 +1889,12 @@ export class Organization { '{projectId}', encodeURIComponent(String(projectId)), ); - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof scopes !== 'undefined') { - payload['scopes'] = scopes; + apiPayload['scopes'] = scopes; } if (typeof duration !== 'undefined') { - payload['duration'] = duration; + apiPayload['duration'] = duration; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -1904,7 +1904,7 @@ export class Organization { accept: 'application/json', }; - return this.client.call('post', uri, apiHeaders, payload); + return this.client.call('post', uri, apiHeaders, apiPayload); } /** @@ -1965,7 +1965,7 @@ export class Organization { const apiPath = '/organization/projects/{projectId}/keys/{keyId}' .replace('{projectId}', encodeURIComponent(String(projectId))) .replace('{keyId}', encodeURIComponent(String(keyId))); - const payload: Payload = {}; + const apiPayload: Payload = {}; const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { @@ -1973,7 +1973,7 @@ export class Organization { accept: 'application/json', }; - return this.client.call('get', uri, apiHeaders, payload); + return this.client.call('get', uri, apiHeaders, apiPayload); } /** @@ -2078,15 +2078,15 @@ export class Organization { const apiPath = '/organization/projects/{projectId}/keys/{keyId}' .replace('{projectId}', encodeURIComponent(String(projectId))) .replace('{keyId}', encodeURIComponent(String(keyId))); - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof name !== 'undefined') { - payload['name'] = name; + apiPayload['name'] = name; } if (typeof scopes !== 'undefined') { - payload['scopes'] = scopes; + apiPayload['scopes'] = scopes; } if (typeof expire !== 'undefined') { - payload['expire'] = expire; + apiPayload['expire'] = expire; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -2096,7 +2096,7 @@ export class Organization { accept: 'application/json', }; - return this.client.call('put', uri, apiHeaders, payload); + return this.client.call('put', uri, apiHeaders, apiPayload); } /** @@ -2154,7 +2154,7 @@ export class Organization { const apiPath = '/organization/projects/{projectId}/keys/{keyId}' .replace('{projectId}', encodeURIComponent(String(projectId))) .replace('{keyId}', encodeURIComponent(String(keyId))); - const payload: Payload = {}; + const apiPayload: Payload = {}; const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { @@ -2163,6 +2163,6 @@ export class Organization { accept: 'application/json', }; - return this.client.call('delete', uri, apiHeaders, payload); + return this.client.call('delete', uri, apiHeaders, apiPayload); } } diff --git a/src/services/organizations.ts b/src/services/organizations.ts index 17ac4dd7..b0b03447 100644 --- a/src/services/organizations.ts +++ b/src/services/organizations.ts @@ -65,12 +65,12 @@ export class Organizations { const search = params.search; const apiPath = '/organizations'; - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof queries !== 'undefined') { - payload['queries'] = queries; + apiPayload['queries'] = queries; } if (typeof search !== 'undefined') { - payload['search'] = search; + apiPayload['search'] = search; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -79,7 +79,7 @@ export class Organizations { accept: 'application/json', }; - return this.client.call('get', uri, apiHeaders, payload); + return this.client.call('get', uri, apiHeaders, apiPayload); } /** @@ -244,36 +244,36 @@ export class Organizations { ); } const apiPath = '/organizations'; - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof organizationId !== 'undefined') { - payload['organizationId'] = organizationId; + apiPayload['organizationId'] = organizationId; } if (typeof name !== 'undefined') { - payload['name'] = name; + apiPayload['name'] = name; } if (typeof billingPlan !== 'undefined') { - payload['billingPlan'] = billingPlan; + apiPayload['billingPlan'] = billingPlan; } if (typeof paymentMethodId !== 'undefined') { - payload['paymentMethodId'] = paymentMethodId; + apiPayload['paymentMethodId'] = paymentMethodId; } if (typeof billingAddressId !== 'undefined') { - payload['billingAddressId'] = billingAddressId; + apiPayload['billingAddressId'] = billingAddressId; } if (typeof invites !== 'undefined') { - payload['invites'] = invites; + apiPayload['invites'] = invites; } if (typeof couponId !== 'undefined') { - payload['couponId'] = couponId; + apiPayload['couponId'] = couponId; } if (typeof taxId !== 'undefined') { - payload['taxId'] = taxId; + apiPayload['taxId'] = taxId; } if (typeof budget !== 'undefined') { - payload['budget'] = budget; + apiPayload['budget'] = budget; } if (typeof platform !== 'undefined') { - payload['platform'] = platform; + apiPayload['platform'] = platform; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -283,7 +283,7 @@ export class Organizations { accept: 'application/json', }; - return this.client.call('post', uri, apiHeaders, payload); + return this.client.call('post', uri, apiHeaders, apiPayload); } /** @@ -377,21 +377,21 @@ export class Organizations { ); } const apiPath = '/organizations/estimations/create-organization'; - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof billingPlan !== 'undefined') { - payload['billingPlan'] = billingPlan; + apiPayload['billingPlan'] = billingPlan; } if (typeof paymentMethodId !== 'undefined') { - payload['paymentMethodId'] = paymentMethodId; + apiPayload['paymentMethodId'] = paymentMethodId; } if (typeof invites !== 'undefined') { - payload['invites'] = invites; + apiPayload['invites'] = invites; } if (typeof couponId !== 'undefined') { - payload['couponId'] = couponId; + apiPayload['couponId'] = couponId; } if (typeof platform !== 'undefined') { - payload['platform'] = platform; + apiPayload['platform'] = platform; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -401,7 +401,7 @@ export class Organizations { accept: 'application/json', }; - return this.client.call('patch', uri, apiHeaders, payload); + return this.client.call('patch', uri, apiHeaders, apiPayload); } /** @@ -447,7 +447,7 @@ export class Organizations { '{organizationId}', encodeURIComponent(String(organizationId)), ); - const payload: Payload = {}; + const apiPayload: Payload = {}; const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { @@ -456,7 +456,7 @@ export class Organizations { accept: 'application/json', }; - return this.client.call('delete', uri, apiHeaders, payload); + return this.client.call('delete', uri, apiHeaders, apiPayload); } /** @@ -506,7 +506,7 @@ export class Organizations { '{organizationId}', encodeURIComponent(String(organizationId)), ); - const payload: Payload = {}; + const apiPayload: Payload = {}; const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { @@ -514,7 +514,7 @@ export class Organizations { accept: 'application/json', }; - return this.client.call('get', uri, apiHeaders, payload); + return this.client.call('get', uri, apiHeaders, apiPayload); } /** @@ -564,7 +564,7 @@ export class Organizations { '{organizationId}', encodeURIComponent(String(organizationId)), ); - const payload: Payload = {}; + const apiPayload: Payload = {}; const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { @@ -573,7 +573,7 @@ export class Organizations { accept: 'application/json', }; - return this.client.call('post', uri, apiHeaders, payload); + return this.client.call('post', uri, apiHeaders, apiPayload); } /** @@ -626,7 +626,7 @@ export class Organizations { '{organizationId}', encodeURIComponent(String(organizationId)), ); - const payload: Payload = {}; + const apiPayload: Payload = {}; const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { @@ -635,7 +635,7 @@ export class Organizations { accept: 'application/json', }; - return this.client.call('post', uri, apiHeaders, payload); + return this.client.call('post', uri, apiHeaders, apiPayload); } /** @@ -703,7 +703,7 @@ export class Organizations { encodeURIComponent(String(organizationId)), ) .replace('{addonId}', encodeURIComponent(String(addonId))); - const payload: Payload = {}; + const apiPayload: Payload = {}; const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { @@ -711,7 +711,7 @@ export class Organizations { accept: 'application/json', }; - return this.client.call('get', uri, apiHeaders, payload); + return this.client.call('get', uri, apiHeaders, apiPayload); } /** @@ -779,7 +779,7 @@ export class Organizations { encodeURIComponent(String(organizationId)), ) .replace('{addonId}', encodeURIComponent(String(addonId))); - const payload: Payload = {}; + const apiPayload: Payload = {}; const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { @@ -788,7 +788,7 @@ export class Organizations { accept: 'application/json', }; - return this.client.call('delete', uri, apiHeaders, payload); + return this.client.call('delete', uri, apiHeaders, apiPayload); } /** @@ -860,7 +860,7 @@ export class Organizations { encodeURIComponent(String(organizationId)), ) .replace('{addonId}', encodeURIComponent(String(addonId))); - const payload: Payload = {}; + const apiPayload: Payload = {}; const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { @@ -869,7 +869,7 @@ export class Organizations { accept: 'application/json', }; - return this.client.call('post', uri, apiHeaders, payload); + return this.client.call('post', uri, apiHeaders, apiPayload); } /** @@ -938,7 +938,7 @@ export class Organizations { encodeURIComponent(String(organizationId)), ) .replace('{addon}', encodeURIComponent(String(addon))); - const payload: Payload = {}; + const apiPayload: Payload = {}; const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { @@ -946,7 +946,7 @@ export class Organizations { accept: 'application/json', }; - return this.client.call('get', uri, apiHeaders, payload); + return this.client.call('get', uri, apiHeaders, apiPayload); } /** @@ -1008,9 +1008,9 @@ export class Organizations { '{organizationId}', encodeURIComponent(String(organizationId)), ); - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof queries !== 'undefined') { - payload['queries'] = queries; + apiPayload['queries'] = queries; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -1019,7 +1019,7 @@ export class Organizations { accept: 'application/json', }; - return this.client.call('get', uri, apiHeaders, payload); + return this.client.call('get', uri, apiHeaders, apiPayload); } /** @@ -1118,12 +1118,12 @@ export class Organizations { '{aggregationId}', encodeURIComponent(String(aggregationId)), ); - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof limit !== 'undefined') { - payload['limit'] = limit; + apiPayload['limit'] = limit; } if (typeof offset !== 'undefined') { - payload['offset'] = offset; + apiPayload['offset'] = offset; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -1132,7 +1132,7 @@ export class Organizations { accept: 'application/json', }; - return this.client.call('get', uri, apiHeaders, payload); + return this.client.call('get', uri, apiHeaders, apiPayload); } /** @@ -1207,9 +1207,9 @@ export class Organizations { '{organizationId}', encodeURIComponent(String(organizationId)), ); - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof billingAddressId !== 'undefined') { - payload['billingAddressId'] = billingAddressId; + apiPayload['billingAddressId'] = billingAddressId; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -1219,7 +1219,7 @@ export class Organizations { accept: 'application/json', }; - return this.client.call('patch', uri, apiHeaders, payload); + return this.client.call('patch', uri, apiHeaders, apiPayload); } /** @@ -1268,7 +1268,7 @@ export class Organizations { '{organizationId}', encodeURIComponent(String(organizationId)), ); - const payload: Payload = {}; + const apiPayload: Payload = {}; const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { @@ -1277,7 +1277,7 @@ export class Organizations { accept: 'application/json', }; - return this.client.call('delete', uri, apiHeaders, payload); + return this.client.call('delete', uri, apiHeaders, apiPayload); } /** @@ -1354,7 +1354,7 @@ export class Organizations { '{billingAddressId}', encodeURIComponent(String(billingAddressId)), ); - const payload: Payload = {}; + const apiPayload: Payload = {}; const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { @@ -1362,7 +1362,7 @@ export class Organizations { accept: 'application/json', }; - return this.client.call('get', uri, apiHeaders, payload); + return this.client.call('get', uri, apiHeaders, apiPayload); } /** @@ -1436,9 +1436,9 @@ export class Organizations { '{organizationId}', encodeURIComponent(String(organizationId)), ); - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof billingEmail !== 'undefined') { - payload['billingEmail'] = billingEmail; + apiPayload['billingEmail'] = billingEmail; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -1448,7 +1448,7 @@ export class Organizations { accept: 'application/json', }; - return this.client.call('patch', uri, apiHeaders, payload); + return this.client.call('patch', uri, apiHeaders, apiPayload); } /** @@ -1532,12 +1532,12 @@ export class Organizations { '{organizationId}', encodeURIComponent(String(organizationId)), ); - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof budget !== 'undefined') { - payload['budget'] = budget; + apiPayload['budget'] = budget; } if (typeof alerts !== 'undefined') { - payload['alerts'] = alerts; + apiPayload['alerts'] = alerts; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -1547,7 +1547,7 @@ export class Organizations { accept: 'application/json', }; - return this.client.call('patch', uri, apiHeaders, payload); + return this.client.call('patch', uri, apiHeaders, apiPayload); } /** @@ -1611,9 +1611,9 @@ export class Organizations { '{organizationId}', encodeURIComponent(String(organizationId)), ); - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof queries !== 'undefined') { - payload['queries'] = queries; + apiPayload['queries'] = queries; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -1622,7 +1622,7 @@ export class Organizations { accept: 'application/json', }; - return this.client.call('get', uri, apiHeaders, payload); + return this.client.call('get', uri, apiHeaders, apiPayload); } /** @@ -1686,9 +1686,9 @@ export class Organizations { '{organizationId}', encodeURIComponent(String(organizationId)), ); - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof couponId !== 'undefined') { - payload['couponId'] = couponId; + apiPayload['couponId'] = couponId; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -1698,7 +1698,7 @@ export class Organizations { accept: 'application/json', }; - return this.client.call('post', uri, apiHeaders, payload); + return this.client.call('post', uri, apiHeaders, apiPayload); } /** @@ -1751,7 +1751,7 @@ export class Organizations { '{organizationId}', encodeURIComponent(String(organizationId)), ); - const payload: Payload = {}; + const apiPayload: Payload = {}; const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { @@ -1759,7 +1759,7 @@ export class Organizations { accept: 'application/json', }; - return this.client.call('get', uri, apiHeaders, payload); + return this.client.call('get', uri, apiHeaders, apiPayload); } /** @@ -1825,7 +1825,7 @@ export class Organizations { encodeURIComponent(String(organizationId)), ) .replace('{creditId}', encodeURIComponent(String(creditId))); - const payload: Payload = {}; + const apiPayload: Payload = {}; const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { @@ -1833,7 +1833,7 @@ export class Organizations { accept: 'application/json', }; - return this.client.call('get', uri, apiHeaders, payload); + return this.client.call('get', uri, apiHeaders, apiPayload); } /** @@ -1886,7 +1886,7 @@ export class Organizations { '{organizationId}', encodeURIComponent(String(organizationId)), ); - const payload: Payload = {}; + const apiPayload: Payload = {}; const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { @@ -1895,7 +1895,7 @@ export class Organizations { accept: 'application/json', }; - return this.client.call('patch', uri, apiHeaders, payload); + return this.client.call('patch', uri, apiHeaders, apiPayload); } /** @@ -1989,15 +1989,15 @@ export class Organizations { '{organizationId}', encodeURIComponent(String(organizationId)), ); - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof billingPlan !== 'undefined') { - payload['billingPlan'] = billingPlan; + apiPayload['billingPlan'] = billingPlan; } if (typeof invites !== 'undefined') { - payload['invites'] = invites; + apiPayload['invites'] = invites; } if (typeof couponId !== 'undefined') { - payload['couponId'] = couponId; + apiPayload['couponId'] = couponId; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -2007,7 +2007,7 @@ export class Organizations { accept: 'application/json', }; - return this.client.call('patch', uri, apiHeaders, payload); + return this.client.call('patch', uri, apiHeaders, apiPayload); } /** @@ -2125,18 +2125,18 @@ export class Organizations { '{organizationId}', encodeURIComponent(String(organizationId)), ); - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof reason !== 'undefined') { - payload['reason'] = reason; + apiPayload['reason'] = reason; } if (typeof message !== 'undefined') { - payload['message'] = message; + apiPayload['message'] = message; } if (typeof fromPlanId !== 'undefined') { - payload['fromPlanId'] = fromPlanId; + apiPayload['fromPlanId'] = fromPlanId; } if (typeof toPlanId !== 'undefined') { - payload['toPlanId'] = toPlanId; + apiPayload['toPlanId'] = toPlanId; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -2146,7 +2146,7 @@ export class Organizations { accept: 'application/json', }; - return this.client.call('post', uri, apiHeaders, payload); + return this.client.call('post', uri, apiHeaders, apiPayload); } /** @@ -2208,9 +2208,9 @@ export class Organizations { '{organizationId}', encodeURIComponent(String(organizationId)), ); - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof queries !== 'undefined') { - payload['queries'] = queries; + apiPayload['queries'] = queries; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -2219,7 +2219,7 @@ export class Organizations { accept: 'application/json', }; - return this.client.call('get', uri, apiHeaders, payload); + return this.client.call('get', uri, apiHeaders, apiPayload); } /** @@ -2288,7 +2288,7 @@ export class Organizations { encodeURIComponent(String(organizationId)), ) .replace('{invoiceId}', encodeURIComponent(String(invoiceId))); - const payload: Payload = {}; + const apiPayload: Payload = {}; const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { @@ -2296,7 +2296,7 @@ export class Organizations { accept: 'application/json', }; - return this.client.call('get', uri, apiHeaders, payload); + return this.client.call('get', uri, apiHeaders, apiPayload); } /** @@ -2363,13 +2363,15 @@ export class Organizations { encodeURIComponent(String(organizationId)), ) .replace('{invoiceId}', encodeURIComponent(String(invoiceId))); - const payload: Payload = {}; + const apiPayload: Payload = {}; const uri = new URL(this.client.config.endpoint + apiPath); - payload['project'] = this.client.config.project; - payload['impersonateuserid'] = this.client.config.impersonateuserid; + apiPayload['project'] = this.client.config.project; + apiPayload['impersonateuserid'] = this.client.config.impersonateuserid; - for (const [key, value] of Object.entries(Service.flatten(payload))) { + for (const [key, value] of Object.entries( + Service.flatten(apiPayload), + )) { uri.searchParams.append(key, value); } @@ -2465,9 +2467,9 @@ export class Organizations { encodeURIComponent(String(organizationId)), ) .replace('{invoiceId}', encodeURIComponent(String(invoiceId))); - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof paymentMethodId !== 'undefined') { - payload['paymentMethodId'] = paymentMethodId; + apiPayload['paymentMethodId'] = paymentMethodId; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -2477,7 +2479,7 @@ export class Organizations { accept: 'application/json', }; - return this.client.call('post', uri, apiHeaders, payload); + return this.client.call('post', uri, apiHeaders, apiPayload); } /** @@ -2547,7 +2549,7 @@ export class Organizations { encodeURIComponent(String(organizationId)), ) .replace('{invoiceId}', encodeURIComponent(String(invoiceId))); - const payload: Payload = {}; + const apiPayload: Payload = {}; const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { @@ -2556,7 +2558,7 @@ export class Organizations { accept: 'application/json', }; - return this.client.call('patch', uri, apiHeaders, payload); + return this.client.call('patch', uri, apiHeaders, apiPayload); } /** @@ -2623,13 +2625,15 @@ export class Organizations { encodeURIComponent(String(organizationId)), ) .replace('{invoiceId}', encodeURIComponent(String(invoiceId))); - const payload: Payload = {}; + const apiPayload: Payload = {}; const uri = new URL(this.client.config.endpoint + apiPath); - payload['project'] = this.client.config.project; - payload['impersonateuserid'] = this.client.config.impersonateuserid; + apiPayload['project'] = this.client.config.project; + apiPayload['impersonateuserid'] = this.client.config.impersonateuserid; - for (const [key, value] of Object.entries(Service.flatten(payload))) { + for (const [key, value] of Object.entries( + Service.flatten(apiPayload), + )) { uri.searchParams.append(key, value); } @@ -2708,9 +2712,9 @@ export class Organizations { '{organizationId}', encodeURIComponent(String(organizationId)), ); - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof paymentMethodId !== 'undefined') { - payload['paymentMethodId'] = paymentMethodId; + apiPayload['paymentMethodId'] = paymentMethodId; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -2720,7 +2724,7 @@ export class Organizations { accept: 'application/json', }; - return this.client.call('patch', uri, apiHeaders, payload); + return this.client.call('patch', uri, apiHeaders, apiPayload); } /** @@ -2777,7 +2781,7 @@ export class Organizations { '{organizationId}', encodeURIComponent(String(organizationId)), ); - const payload: Payload = {}; + const apiPayload: Payload = {}; const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { @@ -2786,7 +2790,7 @@ export class Organizations { accept: 'application/json', }; - return this.client.call('delete', uri, apiHeaders, payload); + return this.client.call('delete', uri, apiHeaders, apiPayload); } /** @@ -2863,9 +2867,9 @@ export class Organizations { '{organizationId}', encodeURIComponent(String(organizationId)), ); - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof paymentMethodId !== 'undefined') { - payload['paymentMethodId'] = paymentMethodId; + apiPayload['paymentMethodId'] = paymentMethodId; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -2875,7 +2879,7 @@ export class Organizations { accept: 'application/json', }; - return this.client.call('patch', uri, apiHeaders, payload); + return this.client.call('patch', uri, apiHeaders, apiPayload); } /** @@ -2932,7 +2936,7 @@ export class Organizations { '{organizationId}', encodeURIComponent(String(organizationId)), ); - const payload: Payload = {}; + const apiPayload: Payload = {}; const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { @@ -2941,7 +2945,7 @@ export class Organizations { accept: 'application/json', }; - return this.client.call('delete', uri, apiHeaders, payload); + return this.client.call('delete', uri, apiHeaders, apiPayload); } /** @@ -3015,7 +3019,7 @@ export class Organizations { '{paymentMethodId}', encodeURIComponent(String(paymentMethodId)), ); - const payload: Payload = {}; + const apiPayload: Payload = {}; const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { @@ -3023,7 +3027,7 @@ export class Organizations { accept: 'application/json', }; - return this.client.call('get', uri, apiHeaders, payload); + return this.client.call('get', uri, apiHeaders, apiPayload); } /** @@ -3071,7 +3075,7 @@ export class Organizations { '{organizationId}', encodeURIComponent(String(organizationId)), ); - const payload: Payload = {}; + const apiPayload: Payload = {}; const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { @@ -3079,7 +3083,7 @@ export class Organizations { accept: 'application/json', }; - return this.client.call('get', uri, apiHeaders, payload); + return this.client.call('get', uri, apiHeaders, apiPayload); } /** @@ -3222,27 +3226,27 @@ export class Organizations { '{organizationId}', encodeURIComponent(String(organizationId)), ); - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof billingPlan !== 'undefined') { - payload['billingPlan'] = billingPlan; + apiPayload['billingPlan'] = billingPlan; } if (typeof paymentMethodId !== 'undefined') { - payload['paymentMethodId'] = paymentMethodId; + apiPayload['paymentMethodId'] = paymentMethodId; } if (typeof billingAddressId !== 'undefined') { - payload['billingAddressId'] = billingAddressId; + apiPayload['billingAddressId'] = billingAddressId; } if (typeof invites !== 'undefined') { - payload['invites'] = invites; + apiPayload['invites'] = invites; } if (typeof couponId !== 'undefined') { - payload['couponId'] = couponId; + apiPayload['couponId'] = couponId; } if (typeof taxId !== 'undefined') { - payload['taxId'] = taxId; + apiPayload['taxId'] = taxId; } if (typeof budget !== 'undefined') { - payload['budget'] = budget; + apiPayload['budget'] = budget; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -3252,7 +3256,7 @@ export class Organizations { accept: 'application/json', }; - return this.client.call('patch', uri, apiHeaders, payload); + return this.client.call('patch', uri, apiHeaders, apiPayload); } /** @@ -3348,15 +3352,15 @@ export class Organizations { '{organizationId}', encodeURIComponent(String(organizationId)), ); - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof billingPlan !== 'undefined') { - payload['billingPlan'] = billingPlan; + apiPayload['billingPlan'] = billingPlan; } if (typeof invites !== 'undefined') { - payload['invites'] = invites; + apiPayload['invites'] = invites; } if (typeof couponId !== 'undefined') { - payload['couponId'] = couponId; + apiPayload['couponId'] = couponId; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -3366,7 +3370,7 @@ export class Organizations { accept: 'application/json', }; - return this.client.call('post', uri, apiHeaders, payload); + return this.client.call('post', uri, apiHeaders, apiPayload); } /** @@ -3416,7 +3420,7 @@ export class Organizations { '{organizationId}', encodeURIComponent(String(organizationId)), ); - const payload: Payload = {}; + const apiPayload: Payload = {}; const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { @@ -3424,7 +3428,7 @@ export class Organizations { accept: 'application/json', }; - return this.client.call('get', uri, apiHeaders, payload); + return this.client.call('get', uri, apiHeaders, apiPayload); } /** @@ -3486,9 +3490,9 @@ export class Organizations { '{organizationId}', encodeURIComponent(String(organizationId)), ); - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof projectId !== 'undefined') { - payload['projectId'] = projectId; + apiPayload['projectId'] = projectId; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -3497,7 +3501,7 @@ export class Organizations { accept: 'application/json', }; - return this.client.call('get', uri, apiHeaders, payload); + return this.client.call('get', uri, apiHeaders, apiPayload); } /** @@ -3568,9 +3572,9 @@ export class Organizations { '{organizationId}', encodeURIComponent(String(organizationId)), ); - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof taxId !== 'undefined') { - payload['taxId'] = taxId; + apiPayload['taxId'] = taxId; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -3580,7 +3584,7 @@ export class Organizations { accept: 'application/json', }; - return this.client.call('patch', uri, apiHeaders, payload); + return this.client.call('patch', uri, apiHeaders, apiPayload); } /** @@ -3655,12 +3659,12 @@ export class Organizations { '{organizationId}', encodeURIComponent(String(organizationId)), ); - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof startDate !== 'undefined') { - payload['startDate'] = startDate; + apiPayload['startDate'] = startDate; } if (typeof endDate !== 'undefined') { - payload['endDate'] = endDate; + apiPayload['endDate'] = endDate; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -3669,7 +3673,7 @@ export class Organizations { accept: 'application/json', }; - return this.client.call('get', uri, apiHeaders, payload); + return this.client.call('get', uri, apiHeaders, apiPayload); } /** @@ -3737,9 +3741,9 @@ export class Organizations { '{organizationId}', encodeURIComponent(String(organizationId)), ); - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof invites !== 'undefined') { - payload['invites'] = invites; + apiPayload['invites'] = invites; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -3749,6 +3753,6 @@ export class Organizations { accept: 'application/json', }; - return this.client.call('patch', uri, apiHeaders, payload); + return this.client.call('patch', uri, apiHeaders, apiPayload); } } diff --git a/src/services/postgresql.ts b/src/services/postgresql.ts index a0870687..11a04974 100644 --- a/src/services/postgresql.ts +++ b/src/services/postgresql.ts @@ -48,9 +48,9 @@ export class Postgresql { const queries = params.queries; const apiPath = '/postgresql'; - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof queries !== 'undefined') { - payload['queries'] = queries; + apiPayload['queries'] = queries; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -59,7 +59,7 @@ export class Postgresql { accept: 'application/json', }; - return this.client.call('get', uri, apiHeaders, payload); + return this.client.call('get', uri, apiHeaders, apiPayload); } /** @@ -252,49 +252,49 @@ export class Postgresql { throw new AppwriteException('Missing required parameter: "name"'); } const apiPath = '/postgresql'; - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof databaseId !== 'undefined') { - payload['databaseId'] = databaseId; + apiPayload['databaseId'] = databaseId; } if (typeof name !== 'undefined') { - payload['name'] = name; + apiPayload['name'] = name; } if (typeof version !== 'undefined') { - payload['version'] = version; + apiPayload['version'] = version; } if (typeof specification !== 'undefined') { - payload['specification'] = specification; + apiPayload['specification'] = specification; } if (typeof replicas !== 'undefined') { - payload['replicas'] = replicas; + apiPayload['replicas'] = replicas; } if (typeof syncMode !== 'undefined') { - payload['syncMode'] = syncMode; + apiPayload['syncMode'] = syncMode; } if (typeof networkIdleTimeoutSeconds !== 'undefined') { - payload['networkIdleTimeoutSeconds'] = networkIdleTimeoutSeconds; + apiPayload['networkIdleTimeoutSeconds'] = networkIdleTimeoutSeconds; } if (typeof networkIPAllowlist !== 'undefined') { - payload['networkIPAllowlist'] = networkIPAllowlist; + apiPayload['networkIPAllowlist'] = networkIPAllowlist; } if (typeof idleTimeoutMinutes !== 'undefined') { - payload['idleTimeoutMinutes'] = idleTimeoutMinutes; + apiPayload['idleTimeoutMinutes'] = idleTimeoutMinutes; } if (typeof pitr !== 'undefined') { - payload['pitr'] = pitr; + apiPayload['pitr'] = pitr; } if (typeof pitrRetentionDays !== 'undefined') { - payload['pitrRetentionDays'] = pitrRetentionDays; + apiPayload['pitrRetentionDays'] = pitrRetentionDays; } if (typeof storageAutoscaling !== 'undefined') { - payload['storageAutoscaling'] = storageAutoscaling; + apiPayload['storageAutoscaling'] = storageAutoscaling; } if (typeof storageAutoscalingThresholdPercent !== 'undefined') { - payload['storageAutoscalingThresholdPercent'] = + apiPayload['storageAutoscalingThresholdPercent'] = storageAutoscalingThresholdPercent; } if (typeof storageAutoscalingMaxGb !== 'undefined') { - payload['storageAutoscalingMaxGb'] = storageAutoscalingMaxGb; + apiPayload['storageAutoscalingMaxGb'] = storageAutoscalingMaxGb; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -304,7 +304,7 @@ export class Postgresql { accept: 'application/json', }; - return this.client.call('post', uri, apiHeaders, payload); + return this.client.call('post', uri, apiHeaders, apiPayload); } /** @@ -315,7 +315,7 @@ export class Postgresql { */ listSpecifications(): Promise { const apiPath = '/postgresql/specifications'; - const payload: Payload = {}; + const apiPayload: Payload = {}; const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { @@ -323,7 +323,7 @@ export class Postgresql { accept: 'application/json', }; - return this.client.call('get', uri, apiHeaders, payload); + return this.client.call('get', uri, apiHeaders, apiPayload); } /** @@ -371,7 +371,7 @@ export class Postgresql { '{databaseId}', encodeURIComponent(String(databaseId)), ); - const payload: Payload = {}; + const apiPayload: Payload = {}; const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { @@ -379,7 +379,7 @@ export class Postgresql { accept: 'application/json', }; - return this.client.call('get', uri, apiHeaders, payload); + return this.client.call('get', uri, apiHeaders, apiPayload); } /** @@ -643,68 +643,68 @@ export class Postgresql { '{databaseId}', encodeURIComponent(String(databaseId)), ); - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof name !== 'undefined') { - payload['name'] = name; + apiPayload['name'] = name; } if (typeof status !== 'undefined') { - payload['status'] = status; + apiPayload['status'] = status; } if (typeof specification !== 'undefined') { - payload['specification'] = specification; + apiPayload['specification'] = specification; } if (typeof replicas !== 'undefined') { - payload['replicas'] = replicas; + apiPayload['replicas'] = replicas; } if (typeof syncMode !== 'undefined') { - payload['syncMode'] = syncMode; + apiPayload['syncMode'] = syncMode; } if (typeof networkIdleTimeoutSeconds !== 'undefined') { - payload['networkIdleTimeoutSeconds'] = networkIdleTimeoutSeconds; + apiPayload['networkIdleTimeoutSeconds'] = networkIdleTimeoutSeconds; } if (typeof networkIPAllowlist !== 'undefined') { - payload['networkIPAllowlist'] = networkIPAllowlist; + apiPayload['networkIPAllowlist'] = networkIPAllowlist; } if (typeof idleTimeoutMinutes !== 'undefined') { - payload['idleTimeoutMinutes'] = idleTimeoutMinutes; + apiPayload['idleTimeoutMinutes'] = idleTimeoutMinutes; } if (typeof pitr !== 'undefined') { - payload['pitr'] = pitr; + apiPayload['pitr'] = pitr; } if (typeof pitrRetentionDays !== 'undefined') { - payload['pitrRetentionDays'] = pitrRetentionDays; + apiPayload['pitrRetentionDays'] = pitrRetentionDays; } if (typeof storageAutoscaling !== 'undefined') { - payload['storageAutoscaling'] = storageAutoscaling; + apiPayload['storageAutoscaling'] = storageAutoscaling; } if (typeof storageAutoscalingThresholdPercent !== 'undefined') { - payload['storageAutoscalingThresholdPercent'] = + apiPayload['storageAutoscalingThresholdPercent'] = storageAutoscalingThresholdPercent; } if (typeof storageAutoscalingMaxGb !== 'undefined') { - payload['storageAutoscalingMaxGb'] = storageAutoscalingMaxGb; + apiPayload['storageAutoscalingMaxGb'] = storageAutoscalingMaxGb; } if (typeof metricsTraceSampleRate !== 'undefined') { - payload['metricsTraceSampleRate'] = metricsTraceSampleRate; + apiPayload['metricsTraceSampleRate'] = metricsTraceSampleRate; } if (typeof metricsSlowQueryLogThresholdMs !== 'undefined') { - payload['metricsSlowQueryLogThresholdMs'] = + apiPayload['metricsSlowQueryLogThresholdMs'] = metricsSlowQueryLogThresholdMs; } if (typeof sqlApiEnabled !== 'undefined') { - payload['sqlApiEnabled'] = sqlApiEnabled; + apiPayload['sqlApiEnabled'] = sqlApiEnabled; } if (typeof sqlApiAllowedStatements !== 'undefined') { - payload['sqlApiAllowedStatements'] = sqlApiAllowedStatements; + apiPayload['sqlApiAllowedStatements'] = sqlApiAllowedStatements; } if (typeof sqlApiMaxRows !== 'undefined') { - payload['sqlApiMaxRows'] = sqlApiMaxRows; + apiPayload['sqlApiMaxRows'] = sqlApiMaxRows; } if (typeof sqlApiMaxBytes !== 'undefined') { - payload['sqlApiMaxBytes'] = sqlApiMaxBytes; + apiPayload['sqlApiMaxBytes'] = sqlApiMaxBytes; } if (typeof sqlApiTimeoutSeconds !== 'undefined') { - payload['sqlApiTimeoutSeconds'] = sqlApiTimeoutSeconds; + apiPayload['sqlApiTimeoutSeconds'] = sqlApiTimeoutSeconds; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -714,7 +714,7 @@ export class Postgresql { accept: 'application/json', }; - return this.client.call('patch', uri, apiHeaders, payload); + return this.client.call('patch', uri, apiHeaders, apiPayload); } /** @@ -760,7 +760,7 @@ export class Postgresql { '{databaseId}', encodeURIComponent(String(databaseId)), ); - const payload: Payload = {}; + const apiPayload: Payload = {}; const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { @@ -769,7 +769,7 @@ export class Postgresql { accept: 'application/json', }; - return this.client.call('delete', uri, apiHeaders, payload); + return this.client.call('delete', uri, apiHeaders, apiPayload); } /** @@ -831,9 +831,9 @@ export class Postgresql { '{databaseId}', encodeURIComponent(String(databaseId)), ); - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof queries !== 'undefined') { - payload['queries'] = queries; + apiPayload['queries'] = queries; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -842,7 +842,7 @@ export class Postgresql { accept: 'application/json', }; - return this.client.call('get', uri, apiHeaders, payload); + return this.client.call('get', uri, apiHeaders, apiPayload); } /** @@ -904,9 +904,9 @@ export class Postgresql { '{databaseId}', encodeURIComponent(String(databaseId)), ); - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof type !== 'undefined') { - payload['type'] = type; + apiPayload['type'] = type; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -916,7 +916,7 @@ export class Postgresql { accept: 'application/json', }; - return this.client.call('post', uri, apiHeaders, payload); + return this.client.call('post', uri, apiHeaders, apiPayload); } /** @@ -978,9 +978,9 @@ export class Postgresql { '{databaseId}', encodeURIComponent(String(databaseId)), ); - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof queries !== 'undefined') { - payload['queries'] = queries; + apiPayload['queries'] = queries; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -989,7 +989,7 @@ export class Postgresql { accept: 'application/json', }; - return this.client.call('get', uri, apiHeaders, payload); + return this.client.call('get', uri, apiHeaders, apiPayload); } /** @@ -1122,24 +1122,24 @@ export class Postgresql { '{databaseId}', encodeURIComponent(String(databaseId)), ); - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof policyId !== 'undefined') { - payload['policyId'] = policyId; + apiPayload['policyId'] = policyId; } if (typeof name !== 'undefined') { - payload['name'] = name; + apiPayload['name'] = name; } if (typeof schedule !== 'undefined') { - payload['schedule'] = schedule; + apiPayload['schedule'] = schedule; } if (typeof retention !== 'undefined') { - payload['retention'] = retention; + apiPayload['retention'] = retention; } if (typeof type !== 'undefined') { - payload['type'] = type; + apiPayload['type'] = type; } if (typeof enabled !== 'undefined') { - payload['enabled'] = enabled; + apiPayload['enabled'] = enabled; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -1149,7 +1149,7 @@ export class Postgresql { accept: 'application/json', }; - return this.client.call('post', uri, apiHeaders, payload); + return this.client.call('post', uri, apiHeaders, apiPayload); } /** @@ -1215,7 +1215,7 @@ export class Postgresql { const apiPath = '/postgresql/{databaseId}/backups/policies/{policyId}' .replace('{databaseId}', encodeURIComponent(String(databaseId))) .replace('{policyId}', encodeURIComponent(String(policyId))); - const payload: Payload = {}; + const apiPayload: Payload = {}; const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { @@ -1223,7 +1223,7 @@ export class Postgresql { accept: 'application/json', }; - return this.client.call('get', uri, apiHeaders, payload); + return this.client.call('get', uri, apiHeaders, apiPayload); } /** @@ -1333,18 +1333,18 @@ export class Postgresql { const apiPath = '/postgresql/{databaseId}/backups/policies/{policyId}' .replace('{databaseId}', encodeURIComponent(String(databaseId))) .replace('{policyId}', encodeURIComponent(String(policyId))); - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof name !== 'undefined') { - payload['name'] = name; + apiPayload['name'] = name; } if (typeof schedule !== 'undefined') { - payload['schedule'] = schedule; + apiPayload['schedule'] = schedule; } if (typeof retention !== 'undefined') { - payload['retention'] = retention; + apiPayload['retention'] = retention; } if (typeof enabled !== 'undefined') { - payload['enabled'] = enabled; + apiPayload['enabled'] = enabled; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -1354,7 +1354,7 @@ export class Postgresql { accept: 'application/json', }; - return this.client.call('patch', uri, apiHeaders, payload); + return this.client.call('patch', uri, apiHeaders, apiPayload); } /** @@ -1417,7 +1417,7 @@ export class Postgresql { const apiPath = '/postgresql/{databaseId}/backups/policies/{policyId}' .replace('{databaseId}', encodeURIComponent(String(databaseId))) .replace('{policyId}', encodeURIComponent(String(policyId))); - const payload: Payload = {}; + const apiPayload: Payload = {}; const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { @@ -1426,7 +1426,7 @@ export class Postgresql { accept: 'application/json', }; - return this.client.call('delete', uri, apiHeaders, payload); + return this.client.call('delete', uri, apiHeaders, apiPayload); } /** @@ -1568,27 +1568,27 @@ export class Postgresql { '{databaseId}', encodeURIComponent(String(databaseId)), ); - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof provider !== 'undefined') { - payload['provider'] = provider; + apiPayload['provider'] = provider; } if (typeof bucket !== 'undefined') { - payload['bucket'] = bucket; + apiPayload['bucket'] = bucket; } if (typeof region !== 'undefined') { - payload['region'] = region; + apiPayload['region'] = region; } if (typeof prefix !== 'undefined') { - payload['prefix'] = prefix; + apiPayload['prefix'] = prefix; } if (typeof endpoint !== 'undefined') { - payload['endpoint'] = endpoint; + apiPayload['endpoint'] = endpoint; } if (typeof accessKey !== 'undefined') { - payload['accessKey'] = accessKey; + apiPayload['accessKey'] = accessKey; } if (typeof secretKey !== 'undefined') { - payload['secretKey'] = secretKey; + apiPayload['secretKey'] = secretKey; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -1598,7 +1598,7 @@ export class Postgresql { accept: 'application/json', }; - return this.client.call('put', uri, apiHeaders, payload); + return this.client.call('put', uri, apiHeaders, apiPayload); } /** @@ -1664,7 +1664,7 @@ export class Postgresql { const apiPath = '/postgresql/{databaseId}/backups/{backupId}' .replace('{databaseId}', encodeURIComponent(String(databaseId))) .replace('{backupId}', encodeURIComponent(String(backupId))); - const payload: Payload = {}; + const apiPayload: Payload = {}; const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { @@ -1672,7 +1672,7 @@ export class Postgresql { accept: 'application/json', }; - return this.client.call('get', uri, apiHeaders, payload); + return this.client.call('get', uri, apiHeaders, apiPayload); } /** @@ -1732,7 +1732,7 @@ export class Postgresql { const apiPath = '/postgresql/{databaseId}/backups/{backupId}' .replace('{databaseId}', encodeURIComponent(String(databaseId))) .replace('{backupId}', encodeURIComponent(String(backupId))); - const payload: Payload = {}; + const apiPayload: Payload = {}; const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { @@ -1741,7 +1741,7 @@ export class Postgresql { accept: 'application/json', }; - return this.client.call('delete', uri, apiHeaders, payload); + return this.client.call('delete', uri, apiHeaders, apiPayload); } /** @@ -1793,7 +1793,7 @@ export class Postgresql { '{databaseId}', encodeURIComponent(String(databaseId)), ); - const payload: Payload = {}; + const apiPayload: Payload = {}; const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { @@ -1801,7 +1801,7 @@ export class Postgresql { accept: 'application/json', }; - return this.client.call('get', uri, apiHeaders, payload); + return this.client.call('get', uri, apiHeaders, apiPayload); } /** @@ -1871,12 +1871,12 @@ export class Postgresql { '{databaseId}', encodeURIComponent(String(databaseId)), ); - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof branchId !== 'undefined') { - payload['branchId'] = branchId; + apiPayload['branchId'] = branchId; } if (typeof ttl !== 'undefined') { - payload['ttl'] = ttl; + apiPayload['ttl'] = ttl; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -1886,7 +1886,7 @@ export class Postgresql { accept: 'application/json', }; - return this.client.call('post', uri, apiHeaders, payload); + return this.client.call('post', uri, apiHeaders, apiPayload); } /** @@ -1952,7 +1952,7 @@ export class Postgresql { const apiPath = '/postgresql/{databaseId}/branches/{branchId}' .replace('{databaseId}', encodeURIComponent(String(databaseId))) .replace('{branchId}', encodeURIComponent(String(branchId))); - const payload: Payload = {}; + const apiPayload: Payload = {}; const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { @@ -1961,7 +1961,7 @@ export class Postgresql { accept: 'application/json', }; - return this.client.call('delete', uri, apiHeaders, payload); + return this.client.call('delete', uri, apiHeaders, apiPayload); } /** @@ -2013,7 +2013,7 @@ export class Postgresql { '{databaseId}', encodeURIComponent(String(databaseId)), ); - const payload: Payload = {}; + const apiPayload: Payload = {}; const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { @@ -2022,7 +2022,7 @@ export class Postgresql { accept: 'application/json', }; - return this.client.call('patch', uri, apiHeaders, payload); + return this.client.call('patch', uri, apiHeaders, apiPayload); } /** @@ -2113,15 +2113,15 @@ export class Postgresql { '{databaseId}', encodeURIComponent(String(databaseId)), ); - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof sql !== 'undefined') { - payload['sql'] = sql; + apiPayload['sql'] = sql; } if (typeof bindings !== 'undefined') { - payload['bindings'] = bindings; + apiPayload['bindings'] = bindings; } if (typeof timeoutSeconds !== 'undefined') { - payload['timeoutSeconds'] = timeoutSeconds; + apiPayload['timeoutSeconds'] = timeoutSeconds; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -2131,7 +2131,7 @@ export class Postgresql { accept: 'application/json', }; - return this.client.call('post', uri, apiHeaders, payload); + return this.client.call('post', uri, apiHeaders, apiPayload); } /** @@ -2183,7 +2183,7 @@ export class Postgresql { '{databaseId}', encodeURIComponent(String(databaseId)), ); - const payload: Payload = {}; + const apiPayload: Payload = {}; const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { @@ -2191,7 +2191,7 @@ export class Postgresql { accept: 'application/json', }; - return this.client.call('get', uri, apiHeaders, payload); + return this.client.call('get', uri, apiHeaders, apiPayload); } /** @@ -2256,9 +2256,9 @@ export class Postgresql { '{databaseId}', encodeURIComponent(String(databaseId)), ); - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof name !== 'undefined') { - payload['name'] = name; + apiPayload['name'] = name; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -2268,7 +2268,7 @@ export class Postgresql { accept: 'application/json', }; - return this.client.call('post', uri, apiHeaders, payload); + return this.client.call('post', uri, apiHeaders, apiPayload); } /** @@ -2337,7 +2337,7 @@ export class Postgresql { '{extensionName}', encodeURIComponent(String(extensionName)), ); - const payload: Payload = {}; + const apiPayload: Payload = {}; const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { @@ -2346,7 +2346,7 @@ export class Postgresql { accept: 'application/json', }; - return this.client.call('delete', uri, apiHeaders, payload); + return this.client.call('delete', uri, apiHeaders, apiPayload); } /** @@ -2409,9 +2409,9 @@ export class Postgresql { '{databaseId}', encodeURIComponent(String(databaseId)), ); - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof targetReplicaId !== 'undefined') { - payload['targetReplicaId'] = targetReplicaId; + apiPayload['targetReplicaId'] = targetReplicaId; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -2421,7 +2421,7 @@ export class Postgresql { accept: 'application/json', }; - return this.client.call('post', uri, apiHeaders, payload); + return this.client.call('post', uri, apiHeaders, apiPayload); } /** @@ -2499,12 +2499,12 @@ export class Postgresql { '{databaseId}', encodeURIComponent(String(databaseId)), ); - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof day !== 'undefined') { - payload['day'] = day; + apiPayload['day'] = day; } if (typeof hourUtc !== 'undefined') { - payload['hourUtc'] = hourUtc; + apiPayload['hourUtc'] = hourUtc; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -2514,7 +2514,7 @@ export class Postgresql { accept: 'application/json', }; - return this.client.call('patch', uri, apiHeaders, payload); + return this.client.call('patch', uri, apiHeaders, apiPayload); } /** @@ -2594,12 +2594,12 @@ export class Postgresql { '{databaseId}', encodeURIComponent(String(databaseId)), ); - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof targetType !== 'undefined') { - payload['targetType'] = targetType; + apiPayload['targetType'] = targetType; } if (typeof specification !== 'undefined') { - payload['specification'] = specification; + apiPayload['specification'] = specification; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -2609,7 +2609,7 @@ export class Postgresql { accept: 'application/json', }; - return this.client.call('post', uri, apiHeaders, payload); + return this.client.call('post', uri, apiHeaders, apiPayload); } /** @@ -2697,15 +2697,15 @@ export class Postgresql { '{databaseId}', encodeURIComponent(String(databaseId)), ); - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof status !== 'undefined') { - payload['status'] = status; + apiPayload['status'] = status; } if (typeof limit !== 'undefined') { - payload['limit'] = limit; + apiPayload['limit'] = limit; } if (typeof offset !== 'undefined') { - payload['offset'] = offset; + apiPayload['offset'] = offset; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -2714,7 +2714,7 @@ export class Postgresql { accept: 'application/json', }; - return this.client.call('get', uri, apiHeaders, payload); + return this.client.call('get', uri, apiHeaders, apiPayload); } /** @@ -2764,7 +2764,7 @@ export class Postgresql { '{databaseId}', encodeURIComponent(String(databaseId)), ); - const payload: Payload = {}; + const apiPayload: Payload = {}; const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { @@ -2772,7 +2772,7 @@ export class Postgresql { accept: 'application/json', }; - return this.client.call('get', uri, apiHeaders, payload); + return this.client.call('get', uri, apiHeaders, apiPayload); } /** @@ -2822,7 +2822,7 @@ export class Postgresql { '{databaseId}', encodeURIComponent(String(databaseId)), ); - const payload: Payload = {}; + const apiPayload: Payload = {}; const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { @@ -2830,7 +2830,7 @@ export class Postgresql { accept: 'application/json', }; - return this.client.call('get', uri, apiHeaders, payload); + return this.client.call('get', uri, apiHeaders, apiPayload); } /** @@ -2972,30 +2972,30 @@ export class Postgresql { '{databaseId}', encodeURIComponent(String(databaseId)), ); - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof mode !== 'undefined') { - payload['mode'] = mode; + apiPayload['mode'] = mode; } if (typeof maxConnections !== 'undefined') { - payload['maxConnections'] = maxConnections; + apiPayload['maxConnections'] = maxConnections; } if (typeof defaultPoolSize !== 'undefined') { - payload['defaultPoolSize'] = defaultPoolSize; + apiPayload['defaultPoolSize'] = defaultPoolSize; } if (typeof readWriteSplitting !== 'undefined') { - payload['readWriteSplitting'] = readWriteSplitting; + apiPayload['readWriteSplitting'] = readWriteSplitting; } if (typeof poolerCpuRequest !== 'undefined') { - payload['poolerCpuRequest'] = poolerCpuRequest; + apiPayload['poolerCpuRequest'] = poolerCpuRequest; } if (typeof poolerCpuLimit !== 'undefined') { - payload['poolerCpuLimit'] = poolerCpuLimit; + apiPayload['poolerCpuLimit'] = poolerCpuLimit; } if (typeof poolerMemoryRequest !== 'undefined') { - payload['poolerMemoryRequest'] = poolerMemoryRequest; + apiPayload['poolerMemoryRequest'] = poolerMemoryRequest; } if (typeof poolerMemoryLimit !== 'undefined') { - payload['poolerMemoryLimit'] = poolerMemoryLimit; + apiPayload['poolerMemoryLimit'] = poolerMemoryLimit; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -3005,7 +3005,7 @@ export class Postgresql { accept: 'application/json', }; - return this.client.call('patch', uri, apiHeaders, payload); + return this.client.call('patch', uri, apiHeaders, apiPayload); } /** @@ -3055,7 +3055,7 @@ export class Postgresql { '{databaseId}', encodeURIComponent(String(databaseId)), ); - const payload: Payload = {}; + const apiPayload: Payload = {}; const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { @@ -3063,7 +3063,7 @@ export class Postgresql { accept: 'application/json', }; - return this.client.call('get', uri, apiHeaders, payload); + return this.client.call('get', uri, apiHeaders, apiPayload); } /** @@ -3160,18 +3160,18 @@ export class Postgresql { '{databaseId}', encodeURIComponent(String(databaseId)), ); - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof status !== 'undefined') { - payload['status'] = status; + apiPayload['status'] = status; } if (typeof type !== 'undefined') { - payload['type'] = type; + apiPayload['type'] = type; } if (typeof limit !== 'undefined') { - payload['limit'] = limit; + apiPayload['limit'] = limit; } if (typeof offset !== 'undefined') { - payload['offset'] = offset; + apiPayload['offset'] = offset; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -3180,7 +3180,7 @@ export class Postgresql { accept: 'application/json', }; - return this.client.call('get', uri, apiHeaders, payload); + return this.client.call('get', uri, apiHeaders, apiPayload); } /** @@ -3277,18 +3277,18 @@ export class Postgresql { '{databaseId}', encodeURIComponent(String(databaseId)), ); - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof type !== 'undefined') { - payload['type'] = type; + apiPayload['type'] = type; } if (typeof backupId !== 'undefined') { - payload['backupId'] = backupId; + apiPayload['backupId'] = backupId; } if (typeof targetDatabaseId !== 'undefined') { - payload['targetDatabaseId'] = targetDatabaseId; + apiPayload['targetDatabaseId'] = targetDatabaseId; } if (typeof targetTime !== 'undefined') { - payload['targetTime'] = targetTime; + apiPayload['targetTime'] = targetTime; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -3298,7 +3298,7 @@ export class Postgresql { accept: 'application/json', }; - return this.client.call('post', uri, apiHeaders, payload); + return this.client.call('post', uri, apiHeaders, apiPayload); } /** @@ -3367,7 +3367,7 @@ export class Postgresql { '{restorationId}', encodeURIComponent(String(restorationId)), ); - const payload: Payload = {}; + const apiPayload: Payload = {}; const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { @@ -3375,7 +3375,7 @@ export class Postgresql { accept: 'application/json', }; - return this.client.call('get', uri, apiHeaders, payload); + return this.client.call('get', uri, apiHeaders, apiPayload); } /** @@ -3423,7 +3423,7 @@ export class Postgresql { '{databaseId}', encodeURIComponent(String(databaseId)), ); - const payload: Payload = {}; + const apiPayload: Payload = {}; const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { @@ -3431,7 +3431,7 @@ export class Postgresql { accept: 'application/json', }; - return this.client.call('get', uri, apiHeaders, payload); + return this.client.call('get', uri, apiHeaders, apiPayload); } /** @@ -3498,9 +3498,9 @@ export class Postgresql { '{databaseId}', encodeURIComponent(String(databaseId)), ); - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof targetVersion !== 'undefined') { - payload['targetVersion'] = targetVersion; + apiPayload['targetVersion'] = targetVersion; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -3510,6 +3510,6 @@ export class Postgresql { accept: 'application/json', }; - return this.client.call('post', uri, apiHeaders, payload); + return this.client.call('post', uri, apiHeaders, apiPayload); } } diff --git a/src/services/presences.ts b/src/services/presences.ts index e0691d8f..61a10d8e 100644 --- a/src/services/presences.ts +++ b/src/services/presences.ts @@ -71,15 +71,15 @@ export class Presences { const ttl = params.ttl; const apiPath = '/presences'; - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof queries !== 'undefined') { - payload['queries'] = queries; + apiPayload['queries'] = queries; } if (typeof total !== 'undefined') { - payload['total'] = total; + apiPayload['total'] = total; } if (typeof ttl !== 'undefined') { - payload['ttl'] = ttl; + apiPayload['ttl'] = ttl; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -88,7 +88,7 @@ export class Presences { accept: 'application/json', }; - return this.client.call('get', uri, apiHeaders, payload); + return this.client.call('get', uri, apiHeaders, apiPayload); } /** @@ -132,9 +132,9 @@ export class Presences { const range = params.range; const apiPath = '/presences/usage'; - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof range !== 'undefined') { - payload['range'] = range; + apiPayload['range'] = range; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -143,7 +143,7 @@ export class Presences { accept: 'application/json', }; - return this.client.call('get', uri, apiHeaders, payload); + return this.client.call('get', uri, apiHeaders, apiPayload); } /** @@ -193,7 +193,7 @@ export class Presences { '{presenceId}', encodeURIComponent(String(presenceId)), ); - const payload: Payload = {}; + const apiPayload: Payload = {}; const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { @@ -201,7 +201,7 @@ export class Presences { accept: 'application/json', }; - return this.client.call('get', uri, apiHeaders, payload); + return this.client.call('get', uri, apiHeaders, apiPayload); } /** @@ -303,18 +303,18 @@ export class Presences { '{presenceId}', encodeURIComponent(String(presenceId)), ); - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof status !== 'undefined') { - payload['status'] = status; + apiPayload['status'] = status; } if (typeof permissions !== 'undefined') { - payload['permissions'] = permissions; + apiPayload['permissions'] = permissions; } if (typeof expiresAt !== 'undefined') { - payload['expiresAt'] = expiresAt; + apiPayload['expiresAt'] = expiresAt; } if (typeof metadata !== 'undefined') { - payload['metadata'] = metadata; + apiPayload['metadata'] = metadata; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -324,7 +324,7 @@ export class Presences { accept: 'application/json', }; - return this.client.call('put', uri, apiHeaders, payload); + return this.client.call('put', uri, apiHeaders, apiPayload); } /** @@ -432,21 +432,21 @@ export class Presences { '{presenceId}', encodeURIComponent(String(presenceId)), ); - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof status !== 'undefined') { - payload['status'] = status; + apiPayload['status'] = status; } if (typeof expiresAt !== 'undefined') { - payload['expiresAt'] = expiresAt; + apiPayload['expiresAt'] = expiresAt; } if (typeof metadata !== 'undefined') { - payload['metadata'] = metadata; + apiPayload['metadata'] = metadata; } if (typeof permissions !== 'undefined') { - payload['permissions'] = permissions; + apiPayload['permissions'] = permissions; } if (typeof purge !== 'undefined') { - payload['purge'] = purge; + apiPayload['purge'] = purge; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -456,7 +456,7 @@ export class Presences { accept: 'application/json', }; - return this.client.call('patch', uri, apiHeaders, payload); + return this.client.call('patch', uri, apiHeaders, apiPayload); } /** @@ -504,7 +504,7 @@ export class Presences { '{presenceId}', encodeURIComponent(String(presenceId)), ); - const payload: Payload = {}; + const apiPayload: Payload = {}; const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { @@ -513,6 +513,6 @@ export class Presences { accept: 'application/json', }; - return this.client.call('delete', uri, apiHeaders, payload); + return this.client.call('delete', uri, apiHeaders, apiPayload); } } diff --git a/src/services/project.ts b/src/services/project.ts index c843de32..6d02017e 100644 --- a/src/services/project.ts +++ b/src/services/project.ts @@ -35,7 +35,7 @@ export class Project { */ get(): Promise { const apiPath = '/project'; - const payload: Payload = {}; + const apiPayload: Payload = {}; const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { @@ -43,7 +43,7 @@ export class Project { accept: 'application/json', }; - return this.client.call('get', uri, apiHeaders, payload); + return this.client.call('get', uri, apiHeaders, apiPayload); } /** @@ -54,7 +54,7 @@ export class Project { */ delete(): Promise<{}> { const apiPath = '/project'; - const payload: Payload = {}; + const apiPayload: Payload = {}; const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { @@ -63,7 +63,7 @@ export class Project { accept: 'application/json', }; - return this.client.call('delete', uri, apiHeaders, payload); + return this.client.call('delete', uri, apiHeaders, apiPayload); } /** @@ -133,9 +133,9 @@ export class Project { '{methodId}', encodeURIComponent(String(methodId)), ); - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof enabled !== 'undefined') { - payload['enabled'] = enabled; + apiPayload['enabled'] = enabled; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -145,7 +145,7 @@ export class Project { accept: 'application/json', }; - return this.client.call('patch', uri, apiHeaders, payload); + return this.client.call('patch', uri, apiHeaders, apiPayload); } /** @@ -197,12 +197,12 @@ export class Project { const total = params.total; const apiPath = '/project/keys'; - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof queries !== 'undefined') { - payload['queries'] = queries; + apiPayload['queries'] = queries; } if (typeof total !== 'undefined') { - payload['total'] = total; + apiPayload['total'] = total; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -211,7 +211,7 @@ export class Project { accept: 'application/json', }; - return this.client.call('get', uri, apiHeaders, payload); + return this.client.call('get', uri, apiHeaders, apiPayload); } /** @@ -304,18 +304,18 @@ export class Project { throw new AppwriteException('Missing required parameter: "scopes"'); } const apiPath = '/project/keys'; - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof keyId !== 'undefined') { - payload['keyId'] = keyId; + apiPayload['keyId'] = keyId; } if (typeof name !== 'undefined') { - payload['name'] = name; + apiPayload['name'] = name; } if (typeof scopes !== 'undefined') { - payload['scopes'] = scopes; + apiPayload['scopes'] = scopes; } if (typeof expire !== 'undefined') { - payload['expire'] = expire; + apiPayload['expire'] = expire; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -325,7 +325,7 @@ export class Project { accept: 'application/json', }; - return this.client.call('post', uri, apiHeaders, payload); + return this.client.call('post', uri, apiHeaders, apiPayload); } /** @@ -394,12 +394,12 @@ export class Project { ); } const apiPath = '/project/keys/ephemeral'; - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof scopes !== 'undefined') { - payload['scopes'] = scopes; + apiPayload['scopes'] = scopes; } if (typeof duration !== 'undefined') { - payload['duration'] = duration; + apiPayload['duration'] = duration; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -409,7 +409,7 @@ export class Project { accept: 'application/json', }; - return this.client.call('post', uri, apiHeaders, payload); + return this.client.call('post', uri, apiHeaders, apiPayload); } /** @@ -453,7 +453,7 @@ export class Project { '{keyId}', encodeURIComponent(String(keyId)), ); - const payload: Payload = {}; + const apiPayload: Payload = {}; const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { @@ -461,7 +461,7 @@ export class Project { accept: 'application/json', }; - return this.client.call('get', uri, apiHeaders, payload); + return this.client.call('get', uri, apiHeaders, apiPayload); } /** @@ -553,15 +553,15 @@ export class Project { '{keyId}', encodeURIComponent(String(keyId)), ); - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof name !== 'undefined') { - payload['name'] = name; + apiPayload['name'] = name; } if (typeof scopes !== 'undefined') { - payload['scopes'] = scopes; + apiPayload['scopes'] = scopes; } if (typeof expire !== 'undefined') { - payload['expire'] = expire; + apiPayload['expire'] = expire; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -571,7 +571,7 @@ export class Project { accept: 'application/json', }; - return this.client.call('put', uri, apiHeaders, payload); + return this.client.call('put', uri, apiHeaders, apiPayload); } /** @@ -615,7 +615,7 @@ export class Project { '{keyId}', encodeURIComponent(String(keyId)), ); - const payload: Payload = {}; + const apiPayload: Payload = {}; const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { @@ -624,7 +624,7 @@ export class Project { accept: 'application/json', }; - return this.client.call('delete', uri, apiHeaders, payload); + return this.client.call('delete', uri, apiHeaders, apiPayload); } /** @@ -667,9 +667,9 @@ export class Project { throw new AppwriteException('Missing required parameter: "labels"'); } const apiPath = '/project/labels'; - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof labels !== 'undefined') { - payload['labels'] = labels; + apiPayload['labels'] = labels; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -679,7 +679,7 @@ export class Project { accept: 'application/json', }; - return this.client.call('put', uri, apiHeaders, payload); + return this.client.call('put', uri, apiHeaders, apiPayload); } /** @@ -734,12 +734,12 @@ export class Project { const total = params.total; const apiPath = '/project/mock-phones'; - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof queries !== 'undefined') { - payload['queries'] = queries; + apiPayload['queries'] = queries; } if (typeof total !== 'undefined') { - payload['total'] = total; + apiPayload['total'] = total; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -748,7 +748,7 @@ export class Project { accept: 'application/json', }; - return this.client.call('get', uri, apiHeaders, payload); + return this.client.call('get', uri, apiHeaders, apiPayload); } /** @@ -802,12 +802,12 @@ export class Project { throw new AppwriteException('Missing required parameter: "otp"'); } const apiPath = '/project/mock-phones'; - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof number !== 'undefined') { - payload['number'] = number; + apiPayload['number'] = number; } if (typeof otp !== 'undefined') { - payload['otp'] = otp; + apiPayload['otp'] = otp; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -817,7 +817,7 @@ export class Project { accept: 'application/json', }; - return this.client.call('post', uri, apiHeaders, payload); + return this.client.call('post', uri, apiHeaders, apiPayload); } /** @@ -863,7 +863,7 @@ export class Project { '{number}', encodeURIComponent(String(number)), ); - const payload: Payload = {}; + const apiPayload: Payload = {}; const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { @@ -871,7 +871,7 @@ export class Project { accept: 'application/json', }; - return this.client.call('get', uri, apiHeaders, payload); + return this.client.call('get', uri, apiHeaders, apiPayload); } /** @@ -928,9 +928,9 @@ export class Project { '{number}', encodeURIComponent(String(number)), ); - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof otp !== 'undefined') { - payload['otp'] = otp; + apiPayload['otp'] = otp; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -940,7 +940,7 @@ export class Project { accept: 'application/json', }; - return this.client.call('put', uri, apiHeaders, payload); + return this.client.call('put', uri, apiHeaders, apiPayload); } /** @@ -984,7 +984,7 @@ export class Project { '{number}', encodeURIComponent(String(number)), ); - const payload: Payload = {}; + const apiPayload: Payload = {}; const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { @@ -993,7 +993,7 @@ export class Project { accept: 'application/json', }; - return this.client.call('delete', uri, apiHeaders, payload); + return this.client.call('delete', uri, apiHeaders, apiPayload); } /** @@ -1048,12 +1048,12 @@ export class Project { const total = params.total; const apiPath = '/project/oauth2'; - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof queries !== 'undefined') { - payload['queries'] = queries; + apiPayload['queries'] = queries; } if (typeof total !== 'undefined') { - payload['total'] = total; + apiPayload['total'] = total; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -1062,7 +1062,7 @@ export class Project { accept: 'application/json', }; - return this.client.call('get', uri, apiHeaders, payload); + return this.client.call('get', uri, apiHeaders, apiPayload); } /** @@ -1277,55 +1277,56 @@ export class Project { ); } const apiPath = '/project/oauth2-server'; - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof enabled !== 'undefined') { - payload['enabled'] = enabled; + apiPayload['enabled'] = enabled; } if (typeof authorizationUrl !== 'undefined') { - payload['authorizationUrl'] = authorizationUrl; + apiPayload['authorizationUrl'] = authorizationUrl; } if (typeof scopes !== 'undefined') { - payload['scopes'] = scopes; + apiPayload['scopes'] = scopes; } if (typeof authorizationDetailsTypes !== 'undefined') { - payload['authorizationDetailsTypes'] = authorizationDetailsTypes; + apiPayload['authorizationDetailsTypes'] = authorizationDetailsTypes; } if (typeof accessTokenDuration !== 'undefined') { - payload['accessTokenDuration'] = accessTokenDuration; + apiPayload['accessTokenDuration'] = accessTokenDuration; } if (typeof refreshTokenDuration !== 'undefined') { - payload['refreshTokenDuration'] = refreshTokenDuration; + apiPayload['refreshTokenDuration'] = refreshTokenDuration; } if (typeof publicAccessTokenDuration !== 'undefined') { - payload['publicAccessTokenDuration'] = publicAccessTokenDuration; + apiPayload['publicAccessTokenDuration'] = publicAccessTokenDuration; } if (typeof publicRefreshTokenDuration !== 'undefined') { - payload['publicRefreshTokenDuration'] = publicRefreshTokenDuration; + apiPayload['publicRefreshTokenDuration'] = + publicRefreshTokenDuration; } if (typeof installationAccessTokenDuration !== 'undefined') { - payload['installationAccessTokenDuration'] = + apiPayload['installationAccessTokenDuration'] = installationAccessTokenDuration; } if (typeof confidentialPkce !== 'undefined') { - payload['confidentialPkce'] = confidentialPkce; + apiPayload['confidentialPkce'] = confidentialPkce; } if (typeof verificationUrl !== 'undefined') { - payload['verificationUrl'] = verificationUrl; + apiPayload['verificationUrl'] = verificationUrl; } if (typeof userCodeLength !== 'undefined') { - payload['userCodeLength'] = userCodeLength; + apiPayload['userCodeLength'] = userCodeLength; } if (typeof userCodeFormat !== 'undefined') { - payload['userCodeFormat'] = userCodeFormat; + apiPayload['userCodeFormat'] = userCodeFormat; } if (typeof deviceCodeDuration !== 'undefined') { - payload['deviceCodeDuration'] = deviceCodeDuration; + apiPayload['deviceCodeDuration'] = deviceCodeDuration; } if (typeof defaultScopes !== 'undefined') { - payload['defaultScopes'] = defaultScopes; + apiPayload['defaultScopes'] = defaultScopes; } if (typeof installationScopes !== 'undefined') { - payload['installationScopes'] = installationScopes; + apiPayload['installationScopes'] = installationScopes; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -1335,7 +1336,7 @@ export class Project { accept: 'application/json', }; - return this.client.call('put', uri, apiHeaders, payload); + return this.client.call('put', uri, apiHeaders, apiPayload); } /** @@ -1403,15 +1404,15 @@ export class Project { const enabled = params.enabled; const apiPath = '/project/oauth2/amazon'; - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof clientId !== 'undefined') { - payload['clientId'] = clientId; + apiPayload['clientId'] = clientId; } if (typeof clientSecret !== 'undefined') { - payload['clientSecret'] = clientSecret; + apiPayload['clientSecret'] = clientSecret; } if (typeof enabled !== 'undefined') { - payload['enabled'] = enabled; + apiPayload['enabled'] = enabled; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -1421,7 +1422,7 @@ export class Project { accept: 'application/json', }; - return this.client.call('patch', uri, apiHeaders, payload); + return this.client.call('patch', uri, apiHeaders, apiPayload); } /** @@ -1529,27 +1530,27 @@ export class Project { const nativeEnabled = params.nativeEnabled; const apiPath = '/project/oauth2/apple'; - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof serviceId !== 'undefined') { - payload['serviceId'] = serviceId; + apiPayload['serviceId'] = serviceId; } if (typeof keyId !== 'undefined') { - payload['keyId'] = keyId; + apiPayload['keyId'] = keyId; } if (typeof teamId !== 'undefined') { - payload['teamId'] = teamId; + apiPayload['teamId'] = teamId; } if (typeof p8File !== 'undefined') { - payload['p8File'] = p8File; + apiPayload['p8File'] = p8File; } if (typeof nativeClientIds !== 'undefined') { - payload['nativeClientIds'] = nativeClientIds; + apiPayload['nativeClientIds'] = nativeClientIds; } if (typeof enabled !== 'undefined') { - payload['enabled'] = enabled; + apiPayload['enabled'] = enabled; } if (typeof nativeEnabled !== 'undefined') { - payload['nativeEnabled'] = nativeEnabled; + apiPayload['nativeEnabled'] = nativeEnabled; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -1559,7 +1560,7 @@ export class Project { accept: 'application/json', }; - return this.client.call('patch', uri, apiHeaders, payload); + return this.client.call('patch', uri, apiHeaders, apiPayload); } /** @@ -1627,15 +1628,15 @@ export class Project { const enabled = params.enabled; const apiPath = '/project/oauth2/appwrite'; - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof clientId !== 'undefined') { - payload['clientId'] = clientId; + apiPayload['clientId'] = clientId; } if (typeof clientSecret !== 'undefined') { - payload['clientSecret'] = clientSecret; + apiPayload['clientSecret'] = clientSecret; } if (typeof enabled !== 'undefined') { - payload['enabled'] = enabled; + apiPayload['enabled'] = enabled; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -1645,7 +1646,7 @@ export class Project { accept: 'application/json', }; - return this.client.call('patch', uri, apiHeaders, payload); + return this.client.call('patch', uri, apiHeaders, apiPayload); } /** @@ -1735,21 +1736,21 @@ export class Project { const enabled = params.enabled; const apiPath = '/project/oauth2/auth0'; - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof clientId !== 'undefined') { - payload['clientId'] = clientId; + apiPayload['clientId'] = clientId; } if (typeof clientSecret !== 'undefined') { - payload['clientSecret'] = clientSecret; + apiPayload['clientSecret'] = clientSecret; } if (typeof endpoint !== 'undefined') { - payload['endpoint'] = endpoint; + apiPayload['endpoint'] = endpoint; } if (typeof prompt !== 'undefined') { - payload['prompt'] = prompt; + apiPayload['prompt'] = prompt; } if (typeof enabled !== 'undefined') { - payload['enabled'] = enabled; + apiPayload['enabled'] = enabled; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -1759,7 +1760,7 @@ export class Project { accept: 'application/json', }; - return this.client.call('patch', uri, apiHeaders, payload); + return this.client.call('patch', uri, apiHeaders, apiPayload); } /** @@ -1840,18 +1841,18 @@ export class Project { const enabled = params.enabled; const apiPath = '/project/oauth2/authentik'; - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof clientId !== 'undefined') { - payload['clientId'] = clientId; + apiPayload['clientId'] = clientId; } if (typeof clientSecret !== 'undefined') { - payload['clientSecret'] = clientSecret; + apiPayload['clientSecret'] = clientSecret; } if (typeof endpoint !== 'undefined') { - payload['endpoint'] = endpoint; + apiPayload['endpoint'] = endpoint; } if (typeof enabled !== 'undefined') { - payload['enabled'] = enabled; + apiPayload['enabled'] = enabled; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -1861,7 +1862,7 @@ export class Project { accept: 'application/json', }; - return this.client.call('patch', uri, apiHeaders, payload); + return this.client.call('patch', uri, apiHeaders, apiPayload); } /** @@ -1929,15 +1930,15 @@ export class Project { const enabled = params.enabled; const apiPath = '/project/oauth2/autodesk'; - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof clientId !== 'undefined') { - payload['clientId'] = clientId; + apiPayload['clientId'] = clientId; } if (typeof clientSecret !== 'undefined') { - payload['clientSecret'] = clientSecret; + apiPayload['clientSecret'] = clientSecret; } if (typeof enabled !== 'undefined') { - payload['enabled'] = enabled; + apiPayload['enabled'] = enabled; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -1947,7 +1948,7 @@ export class Project { accept: 'application/json', }; - return this.client.call('patch', uri, apiHeaders, payload); + return this.client.call('patch', uri, apiHeaders, apiPayload); } /** @@ -2010,15 +2011,15 @@ export class Project { const enabled = params.enabled; const apiPath = '/project/oauth2/bitbucket'; - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof key !== 'undefined') { - payload['key'] = key; + apiPayload['key'] = key; } if (typeof secret !== 'undefined') { - payload['secret'] = secret; + apiPayload['secret'] = secret; } if (typeof enabled !== 'undefined') { - payload['enabled'] = enabled; + apiPayload['enabled'] = enabled; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -2028,7 +2029,7 @@ export class Project { accept: 'application/json', }; - return this.client.call('patch', uri, apiHeaders, payload); + return this.client.call('patch', uri, apiHeaders, apiPayload); } /** @@ -2096,15 +2097,15 @@ export class Project { const enabled = params.enabled; const apiPath = '/project/oauth2/bitly'; - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof clientId !== 'undefined') { - payload['clientId'] = clientId; + apiPayload['clientId'] = clientId; } if (typeof clientSecret !== 'undefined') { - payload['clientSecret'] = clientSecret; + apiPayload['clientSecret'] = clientSecret; } if (typeof enabled !== 'undefined') { - payload['enabled'] = enabled; + apiPayload['enabled'] = enabled; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -2114,7 +2115,7 @@ export class Project { accept: 'application/json', }; - return this.client.call('patch', uri, apiHeaders, payload); + return this.client.call('patch', uri, apiHeaders, apiPayload); } /** @@ -2182,15 +2183,15 @@ export class Project { const enabled = params.enabled; const apiPath = '/project/oauth2/box'; - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof clientId !== 'undefined') { - payload['clientId'] = clientId; + apiPayload['clientId'] = clientId; } if (typeof clientSecret !== 'undefined') { - payload['clientSecret'] = clientSecret; + apiPayload['clientSecret'] = clientSecret; } if (typeof enabled !== 'undefined') { - payload['enabled'] = enabled; + apiPayload['enabled'] = enabled; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -2200,7 +2201,7 @@ export class Project { accept: 'application/json', }; - return this.client.call('patch', uri, apiHeaders, payload); + return this.client.call('patch', uri, apiHeaders, apiPayload); } /** @@ -2268,15 +2269,15 @@ export class Project { const enabled = params.enabled; const apiPath = '/project/oauth2/cloudflare'; - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof clientId !== 'undefined') { - payload['clientId'] = clientId; + apiPayload['clientId'] = clientId; } if (typeof clientSecret !== 'undefined') { - payload['clientSecret'] = clientSecret; + apiPayload['clientSecret'] = clientSecret; } if (typeof enabled !== 'undefined') { - payload['enabled'] = enabled; + apiPayload['enabled'] = enabled; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -2286,7 +2287,7 @@ export class Project { accept: 'application/json', }; - return this.client.call('patch', uri, apiHeaders, payload); + return this.client.call('patch', uri, apiHeaders, apiPayload); } /** @@ -2349,15 +2350,15 @@ export class Project { const enabled = params.enabled; const apiPath = '/project/oauth2/dailymotion'; - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof apiKey !== 'undefined') { - payload['apiKey'] = apiKey; + apiPayload['apiKey'] = apiKey; } if (typeof apiSecret !== 'undefined') { - payload['apiSecret'] = apiSecret; + apiPayload['apiSecret'] = apiSecret; } if (typeof enabled !== 'undefined') { - payload['enabled'] = enabled; + apiPayload['enabled'] = enabled; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -2367,7 +2368,7 @@ export class Project { accept: 'application/json', }; - return this.client.call('patch', uri, apiHeaders, payload); + return this.client.call('patch', uri, apiHeaders, apiPayload); } /** @@ -2448,18 +2449,18 @@ export class Project { const enabled = params.enabled; const apiPath = '/project/oauth2/discord'; - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof clientId !== 'undefined') { - payload['clientId'] = clientId; + apiPayload['clientId'] = clientId; } if (typeof clientSecret !== 'undefined') { - payload['clientSecret'] = clientSecret; + apiPayload['clientSecret'] = clientSecret; } if (typeof prompt !== 'undefined') { - payload['prompt'] = prompt; + apiPayload['prompt'] = prompt; } if (typeof enabled !== 'undefined') { - payload['enabled'] = enabled; + apiPayload['enabled'] = enabled; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -2469,7 +2470,7 @@ export class Project { accept: 'application/json', }; - return this.client.call('patch', uri, apiHeaders, payload); + return this.client.call('patch', uri, apiHeaders, apiPayload); } /** @@ -2537,15 +2538,15 @@ export class Project { const enabled = params.enabled; const apiPath = '/project/oauth2/disqus'; - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof publicKey !== 'undefined') { - payload['publicKey'] = publicKey; + apiPayload['publicKey'] = publicKey; } if (typeof secretKey !== 'undefined') { - payload['secretKey'] = secretKey; + apiPayload['secretKey'] = secretKey; } if (typeof enabled !== 'undefined') { - payload['enabled'] = enabled; + apiPayload['enabled'] = enabled; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -2555,7 +2556,7 @@ export class Project { accept: 'application/json', }; - return this.client.call('patch', uri, apiHeaders, payload); + return this.client.call('patch', uri, apiHeaders, apiPayload); } /** @@ -2618,15 +2619,15 @@ export class Project { const enabled = params.enabled; const apiPath = '/project/oauth2/dropbox'; - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof appKey !== 'undefined') { - payload['appKey'] = appKey; + apiPayload['appKey'] = appKey; } if (typeof appSecret !== 'undefined') { - payload['appSecret'] = appSecret; + apiPayload['appSecret'] = appSecret; } if (typeof enabled !== 'undefined') { - payload['enabled'] = enabled; + apiPayload['enabled'] = enabled; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -2636,7 +2637,7 @@ export class Project { accept: 'application/json', }; - return this.client.call('patch', uri, apiHeaders, payload); + return this.client.call('patch', uri, apiHeaders, apiPayload); } /** @@ -2704,15 +2705,15 @@ export class Project { const enabled = params.enabled; const apiPath = '/project/oauth2/etsy'; - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof keyString !== 'undefined') { - payload['keyString'] = keyString; + apiPayload['keyString'] = keyString; } if (typeof sharedSecret !== 'undefined') { - payload['sharedSecret'] = sharedSecret; + apiPayload['sharedSecret'] = sharedSecret; } if (typeof enabled !== 'undefined') { - payload['enabled'] = enabled; + apiPayload['enabled'] = enabled; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -2722,7 +2723,7 @@ export class Project { accept: 'application/json', }; - return this.client.call('patch', uri, apiHeaders, payload); + return this.client.call('patch', uri, apiHeaders, apiPayload); } /** @@ -2785,15 +2786,15 @@ export class Project { const enabled = params.enabled; const apiPath = '/project/oauth2/facebook'; - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof appId !== 'undefined') { - payload['appId'] = appId; + apiPayload['appId'] = appId; } if (typeof appSecret !== 'undefined') { - payload['appSecret'] = appSecret; + apiPayload['appSecret'] = appSecret; } if (typeof enabled !== 'undefined') { - payload['enabled'] = enabled; + apiPayload['enabled'] = enabled; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -2803,7 +2804,7 @@ export class Project { accept: 'application/json', }; - return this.client.call('patch', uri, apiHeaders, payload); + return this.client.call('patch', uri, apiHeaders, apiPayload); } /** @@ -2871,15 +2872,15 @@ export class Project { const enabled = params.enabled; const apiPath = '/project/oauth2/figma'; - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof clientId !== 'undefined') { - payload['clientId'] = clientId; + apiPayload['clientId'] = clientId; } if (typeof clientSecret !== 'undefined') { - payload['clientSecret'] = clientSecret; + apiPayload['clientSecret'] = clientSecret; } if (typeof enabled !== 'undefined') { - payload['enabled'] = enabled; + apiPayload['enabled'] = enabled; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -2889,7 +2890,7 @@ export class Project { accept: 'application/json', }; - return this.client.call('patch', uri, apiHeaders, payload); + return this.client.call('patch', uri, apiHeaders, apiPayload); } /** @@ -2970,18 +2971,18 @@ export class Project { const enabled = params.enabled; const apiPath = '/project/oauth2/fusionauth'; - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof clientId !== 'undefined') { - payload['clientId'] = clientId; + apiPayload['clientId'] = clientId; } if (typeof clientSecret !== 'undefined') { - payload['clientSecret'] = clientSecret; + apiPayload['clientSecret'] = clientSecret; } if (typeof endpoint !== 'undefined') { - payload['endpoint'] = endpoint; + apiPayload['endpoint'] = endpoint; } if (typeof enabled !== 'undefined') { - payload['enabled'] = enabled; + apiPayload['enabled'] = enabled; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -2991,7 +2992,7 @@ export class Project { accept: 'application/json', }; - return this.client.call('patch', uri, apiHeaders, payload); + return this.client.call('patch', uri, apiHeaders, apiPayload); } /** @@ -3072,18 +3073,18 @@ export class Project { const enabled = params.enabled; const apiPath = '/project/oauth2/github'; - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof clientId !== 'undefined') { - payload['clientId'] = clientId; + apiPayload['clientId'] = clientId; } if (typeof clientSecret !== 'undefined') { - payload['clientSecret'] = clientSecret; + apiPayload['clientSecret'] = clientSecret; } if (typeof prompt !== 'undefined') { - payload['prompt'] = prompt; + apiPayload['prompt'] = prompt; } if (typeof enabled !== 'undefined') { - payload['enabled'] = enabled; + apiPayload['enabled'] = enabled; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -3093,7 +3094,7 @@ export class Project { accept: 'application/json', }; - return this.client.call('patch', uri, apiHeaders, payload); + return this.client.call('patch', uri, apiHeaders, apiPayload); } /** @@ -3174,18 +3175,18 @@ export class Project { const enabled = params.enabled; const apiPath = '/project/oauth2/gitlab'; - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof applicationId !== 'undefined') { - payload['applicationId'] = applicationId; + apiPayload['applicationId'] = applicationId; } if (typeof secret !== 'undefined') { - payload['secret'] = secret; + apiPayload['secret'] = secret; } if (typeof endpoint !== 'undefined') { - payload['endpoint'] = endpoint; + apiPayload['endpoint'] = endpoint; } if (typeof enabled !== 'undefined') { - payload['enabled'] = enabled; + apiPayload['enabled'] = enabled; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -3195,7 +3196,7 @@ export class Project { accept: 'application/json', }; - return this.client.call('patch', uri, apiHeaders, payload); + return this.client.call('patch', uri, apiHeaders, apiPayload); } /** @@ -3300,24 +3301,24 @@ export class Project { const nativeEnabled = params.nativeEnabled; const apiPath = '/project/oauth2/google'; - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof clientId !== 'undefined') { - payload['clientId'] = clientId; + apiPayload['clientId'] = clientId; } if (typeof clientSecret !== 'undefined') { - payload['clientSecret'] = clientSecret; + apiPayload['clientSecret'] = clientSecret; } if (typeof prompt !== 'undefined') { - payload['prompt'] = prompt; + apiPayload['prompt'] = prompt; } if (typeof nativeClientIds !== 'undefined') { - payload['nativeClientIds'] = nativeClientIds; + apiPayload['nativeClientIds'] = nativeClientIds; } if (typeof enabled !== 'undefined') { - payload['enabled'] = enabled; + apiPayload['enabled'] = enabled; } if (typeof nativeEnabled !== 'undefined') { - payload['nativeEnabled'] = nativeEnabled; + apiPayload['nativeEnabled'] = nativeEnabled; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -3327,7 +3328,7 @@ export class Project { accept: 'application/json', }; - return this.client.call('patch', uri, apiHeaders, payload); + return this.client.call('patch', uri, apiHeaders, apiPayload); } /** @@ -3395,15 +3396,15 @@ export class Project { const enabled = params.enabled; const apiPath = '/project/oauth2/huggingface'; - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof clientId !== 'undefined') { - payload['clientId'] = clientId; + apiPayload['clientId'] = clientId; } if (typeof clientSecret !== 'undefined') { - payload['clientSecret'] = clientSecret; + apiPayload['clientSecret'] = clientSecret; } if (typeof enabled !== 'undefined') { - payload['enabled'] = enabled; + apiPayload['enabled'] = enabled; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -3413,7 +3414,7 @@ export class Project { accept: 'application/json', }; - return this.client.call('patch', uri, apiHeaders, payload); + return this.client.call('patch', uri, apiHeaders, apiPayload); } /** @@ -3494,18 +3495,18 @@ export class Project { const enabled = params.enabled; const apiPath = '/project/oauth2/kakao'; - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof clientId !== 'undefined') { - payload['clientId'] = clientId; + apiPayload['clientId'] = clientId; } if (typeof clientSecret !== 'undefined') { - payload['clientSecret'] = clientSecret; + apiPayload['clientSecret'] = clientSecret; } if (typeof prompt !== 'undefined') { - payload['prompt'] = prompt; + apiPayload['prompt'] = prompt; } if (typeof enabled !== 'undefined') { - payload['enabled'] = enabled; + apiPayload['enabled'] = enabled; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -3515,7 +3516,7 @@ export class Project { accept: 'application/json', }; - return this.client.call('patch', uri, apiHeaders, payload); + return this.client.call('patch', uri, apiHeaders, apiPayload); } /** @@ -3605,21 +3606,21 @@ export class Project { const enabled = params.enabled; const apiPath = '/project/oauth2/keycloak'; - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof clientId !== 'undefined') { - payload['clientId'] = clientId; + apiPayload['clientId'] = clientId; } if (typeof clientSecret !== 'undefined') { - payload['clientSecret'] = clientSecret; + apiPayload['clientSecret'] = clientSecret; } if (typeof endpoint !== 'undefined') { - payload['endpoint'] = endpoint; + apiPayload['endpoint'] = endpoint; } if (typeof realmName !== 'undefined') { - payload['realmName'] = realmName; + apiPayload['realmName'] = realmName; } if (typeof enabled !== 'undefined') { - payload['enabled'] = enabled; + apiPayload['enabled'] = enabled; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -3629,7 +3630,7 @@ export class Project { accept: 'application/json', }; - return this.client.call('patch', uri, apiHeaders, payload); + return this.client.call('patch', uri, apiHeaders, apiPayload); } /** @@ -3697,15 +3698,15 @@ export class Project { const enabled = params.enabled; const apiPath = '/project/oauth2/kick'; - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof clientId !== 'undefined') { - payload['clientId'] = clientId; + apiPayload['clientId'] = clientId; } if (typeof clientSecret !== 'undefined') { - payload['clientSecret'] = clientSecret; + apiPayload['clientSecret'] = clientSecret; } if (typeof enabled !== 'undefined') { - payload['enabled'] = enabled; + apiPayload['enabled'] = enabled; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -3715,7 +3716,7 @@ export class Project { accept: 'application/json', }; - return this.client.call('patch', uri, apiHeaders, payload); + return this.client.call('patch', uri, apiHeaders, apiPayload); } /** @@ -3787,15 +3788,15 @@ export class Project { const enabled = params.enabled; const apiPath = '/project/oauth2/linkedin'; - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof clientId !== 'undefined') { - payload['clientId'] = clientId; + apiPayload['clientId'] = clientId; } if (typeof primaryClientSecret !== 'undefined') { - payload['primaryClientSecret'] = primaryClientSecret; + apiPayload['primaryClientSecret'] = primaryClientSecret; } if (typeof enabled !== 'undefined') { - payload['enabled'] = enabled; + apiPayload['enabled'] = enabled; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -3805,7 +3806,7 @@ export class Project { accept: 'application/json', }; - return this.client.call('patch', uri, apiHeaders, payload); + return this.client.call('patch', uri, apiHeaders, apiPayload); } /** @@ -3895,21 +3896,21 @@ export class Project { const enabled = params.enabled; const apiPath = '/project/oauth2/microsoft'; - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof applicationId !== 'undefined') { - payload['applicationId'] = applicationId; + apiPayload['applicationId'] = applicationId; } if (typeof applicationSecret !== 'undefined') { - payload['applicationSecret'] = applicationSecret; + apiPayload['applicationSecret'] = applicationSecret; } if (typeof tenant !== 'undefined') { - payload['tenant'] = tenant; + apiPayload['tenant'] = tenant; } if (typeof prompt !== 'undefined') { - payload['prompt'] = prompt; + apiPayload['prompt'] = prompt; } if (typeof enabled !== 'undefined') { - payload['enabled'] = enabled; + apiPayload['enabled'] = enabled; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -3919,7 +3920,7 @@ export class Project { accept: 'application/json', }; - return this.client.call('patch', uri, apiHeaders, payload); + return this.client.call('patch', uri, apiHeaders, apiPayload); } /** @@ -3991,15 +3992,15 @@ export class Project { const enabled = params.enabled; const apiPath = '/project/oauth2/notion'; - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof oauthClientId !== 'undefined') { - payload['oauthClientId'] = oauthClientId; + apiPayload['oauthClientId'] = oauthClientId; } if (typeof oauthClientSecret !== 'undefined') { - payload['oauthClientSecret'] = oauthClientSecret; + apiPayload['oauthClientSecret'] = oauthClientSecret; } if (typeof enabled !== 'undefined') { - payload['enabled'] = enabled; + apiPayload['enabled'] = enabled; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -4009,7 +4010,7 @@ export class Project { accept: 'application/json', }; - return this.client.call('patch', uri, apiHeaders, payload); + return this.client.call('patch', uri, apiHeaders, apiPayload); } /** @@ -4144,33 +4145,33 @@ export class Project { const enabled = params.enabled; const apiPath = '/project/oauth2/oidc'; - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof clientId !== 'undefined') { - payload['clientId'] = clientId; + apiPayload['clientId'] = clientId; } if (typeof clientSecret !== 'undefined') { - payload['clientSecret'] = clientSecret; + apiPayload['clientSecret'] = clientSecret; } if (typeof wellKnownURL !== 'undefined') { - payload['wellKnownURL'] = wellKnownURL; + apiPayload['wellKnownURL'] = wellKnownURL; } if (typeof authorizationURL !== 'undefined') { - payload['authorizationURL'] = authorizationURL; + apiPayload['authorizationURL'] = authorizationURL; } if (typeof tokenURL !== 'undefined') { - payload['tokenURL'] = tokenURL; + apiPayload['tokenURL'] = tokenURL; } if (typeof userInfoURL !== 'undefined') { - payload['userInfoURL'] = userInfoURL; + apiPayload['userInfoURL'] = userInfoURL; } if (typeof prompt !== 'undefined') { - payload['prompt'] = prompt; + apiPayload['prompt'] = prompt; } if (typeof maxAge !== 'undefined') { - payload['maxAge'] = maxAge; + apiPayload['maxAge'] = maxAge; } if (typeof enabled !== 'undefined') { - payload['enabled'] = enabled; + apiPayload['enabled'] = enabled; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -4180,7 +4181,7 @@ export class Project { accept: 'application/json', }; - return this.client.call('patch', uri, apiHeaders, payload); + return this.client.call('patch', uri, apiHeaders, apiPayload); } /** @@ -4285,24 +4286,24 @@ export class Project { const enabled = params.enabled; const apiPath = '/project/oauth2/okta'; - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof clientId !== 'undefined') { - payload['clientId'] = clientId; + apiPayload['clientId'] = clientId; } if (typeof clientSecret !== 'undefined') { - payload['clientSecret'] = clientSecret; + apiPayload['clientSecret'] = clientSecret; } if (typeof domain !== 'undefined') { - payload['domain'] = domain; + apiPayload['domain'] = domain; } if (typeof authorizationServerId !== 'undefined') { - payload['authorizationServerId'] = authorizationServerId; + apiPayload['authorizationServerId'] = authorizationServerId; } if (typeof prompt !== 'undefined') { - payload['prompt'] = prompt; + apiPayload['prompt'] = prompt; } if (typeof enabled !== 'undefined') { - payload['enabled'] = enabled; + apiPayload['enabled'] = enabled; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -4312,7 +4313,7 @@ export class Project { accept: 'application/json', }; - return this.client.call('patch', uri, apiHeaders, payload); + return this.client.call('patch', uri, apiHeaders, apiPayload); } /** @@ -4380,15 +4381,15 @@ export class Project { const enabled = params.enabled; const apiPath = '/project/oauth2/paypal'; - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof clientId !== 'undefined') { - payload['clientId'] = clientId; + apiPayload['clientId'] = clientId; } if (typeof secretKey !== 'undefined') { - payload['secretKey'] = secretKey; + apiPayload['secretKey'] = secretKey; } if (typeof enabled !== 'undefined') { - payload['enabled'] = enabled; + apiPayload['enabled'] = enabled; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -4398,7 +4399,7 @@ export class Project { accept: 'application/json', }; - return this.client.call('patch', uri, apiHeaders, payload); + return this.client.call('patch', uri, apiHeaders, apiPayload); } /** @@ -4466,15 +4467,15 @@ export class Project { const enabled = params.enabled; const apiPath = '/project/oauth2/paypalSandbox'; - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof clientId !== 'undefined') { - payload['clientId'] = clientId; + apiPayload['clientId'] = clientId; } if (typeof secretKey !== 'undefined') { - payload['secretKey'] = secretKey; + apiPayload['secretKey'] = secretKey; } if (typeof enabled !== 'undefined') { - payload['enabled'] = enabled; + apiPayload['enabled'] = enabled; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -4484,7 +4485,7 @@ export class Project { accept: 'application/json', }; - return this.client.call('patch', uri, apiHeaders, payload); + return this.client.call('patch', uri, apiHeaders, apiPayload); } /** @@ -4552,15 +4553,15 @@ export class Project { const enabled = params.enabled; const apiPath = '/project/oauth2/podio'; - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof clientId !== 'undefined') { - payload['clientId'] = clientId; + apiPayload['clientId'] = clientId; } if (typeof clientSecret !== 'undefined') { - payload['clientSecret'] = clientSecret; + apiPayload['clientSecret'] = clientSecret; } if (typeof enabled !== 'undefined') { - payload['enabled'] = enabled; + apiPayload['enabled'] = enabled; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -4570,7 +4571,7 @@ export class Project { accept: 'application/json', }; - return this.client.call('patch', uri, apiHeaders, payload); + return this.client.call('patch', uri, apiHeaders, apiPayload); } /** @@ -4638,15 +4639,15 @@ export class Project { const enabled = params.enabled; const apiPath = '/project/oauth2/resend'; - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof clientId !== 'undefined') { - payload['clientId'] = clientId; + apiPayload['clientId'] = clientId; } if (typeof clientSecret !== 'undefined') { - payload['clientSecret'] = clientSecret; + apiPayload['clientSecret'] = clientSecret; } if (typeof enabled !== 'undefined') { - payload['enabled'] = enabled; + apiPayload['enabled'] = enabled; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -4656,7 +4657,7 @@ export class Project { accept: 'application/json', }; - return this.client.call('patch', uri, apiHeaders, payload); + return this.client.call('patch', uri, apiHeaders, apiPayload); } /** @@ -4737,18 +4738,18 @@ export class Project { const enabled = params.enabled; const apiPath = '/project/oauth2/salesforce'; - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof customerKey !== 'undefined') { - payload['customerKey'] = customerKey; + apiPayload['customerKey'] = customerKey; } if (typeof customerSecret !== 'undefined') { - payload['customerSecret'] = customerSecret; + apiPayload['customerSecret'] = customerSecret; } if (typeof prompt !== 'undefined') { - payload['prompt'] = prompt; + apiPayload['prompt'] = prompt; } if (typeof enabled !== 'undefined') { - payload['enabled'] = enabled; + apiPayload['enabled'] = enabled; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -4758,7 +4759,7 @@ export class Project { accept: 'application/json', }; - return this.client.call('patch', uri, apiHeaders, payload); + return this.client.call('patch', uri, apiHeaders, apiPayload); } /** @@ -4826,15 +4827,15 @@ export class Project { const enabled = params.enabled; const apiPath = '/project/oauth2/slack'; - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof clientId !== 'undefined') { - payload['clientId'] = clientId; + apiPayload['clientId'] = clientId; } if (typeof clientSecret !== 'undefined') { - payload['clientSecret'] = clientSecret; + apiPayload['clientSecret'] = clientSecret; } if (typeof enabled !== 'undefined') { - payload['enabled'] = enabled; + apiPayload['enabled'] = enabled; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -4844,7 +4845,7 @@ export class Project { accept: 'application/json', }; - return this.client.call('patch', uri, apiHeaders, payload); + return this.client.call('patch', uri, apiHeaders, apiPayload); } /** @@ -4912,15 +4913,15 @@ export class Project { const enabled = params.enabled; const apiPath = '/project/oauth2/spotify'; - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof clientId !== 'undefined') { - payload['clientId'] = clientId; + apiPayload['clientId'] = clientId; } if (typeof clientSecret !== 'undefined') { - payload['clientSecret'] = clientSecret; + apiPayload['clientSecret'] = clientSecret; } if (typeof enabled !== 'undefined') { - payload['enabled'] = enabled; + apiPayload['enabled'] = enabled; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -4930,7 +4931,7 @@ export class Project { accept: 'application/json', }; - return this.client.call('patch', uri, apiHeaders, payload); + return this.client.call('patch', uri, apiHeaders, apiPayload); } /** @@ -4998,15 +4999,15 @@ export class Project { const enabled = params.enabled; const apiPath = '/project/oauth2/stripe'; - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof clientId !== 'undefined') { - payload['clientId'] = clientId; + apiPayload['clientId'] = clientId; } if (typeof apiSecretKey !== 'undefined') { - payload['apiSecretKey'] = apiSecretKey; + apiPayload['apiSecretKey'] = apiSecretKey; } if (typeof enabled !== 'undefined') { - payload['enabled'] = enabled; + apiPayload['enabled'] = enabled; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -5016,7 +5017,7 @@ export class Project { accept: 'application/json', }; - return this.client.call('patch', uri, apiHeaders, payload); + return this.client.call('patch', uri, apiHeaders, apiPayload); } /** @@ -5084,15 +5085,15 @@ export class Project { const enabled = params.enabled; const apiPath = '/project/oauth2/tiktok'; - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof clientId !== 'undefined') { - payload['clientId'] = clientId; + apiPayload['clientId'] = clientId; } if (typeof clientSecret !== 'undefined') { - payload['clientSecret'] = clientSecret; + apiPayload['clientSecret'] = clientSecret; } if (typeof enabled !== 'undefined') { - payload['enabled'] = enabled; + apiPayload['enabled'] = enabled; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -5102,7 +5103,7 @@ export class Project { accept: 'application/json', }; - return this.client.call('patch', uri, apiHeaders, payload); + return this.client.call('patch', uri, apiHeaders, apiPayload); } /** @@ -5174,15 +5175,15 @@ export class Project { const enabled = params.enabled; const apiPath = '/project/oauth2/tradeshift'; - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof oauth2ClientId !== 'undefined') { - payload['oauth2ClientId'] = oauth2ClientId; + apiPayload['oauth2ClientId'] = oauth2ClientId; } if (typeof oauth2ClientSecret !== 'undefined') { - payload['oauth2ClientSecret'] = oauth2ClientSecret; + apiPayload['oauth2ClientSecret'] = oauth2ClientSecret; } if (typeof enabled !== 'undefined') { - payload['enabled'] = enabled; + apiPayload['enabled'] = enabled; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -5192,7 +5193,7 @@ export class Project { accept: 'application/json', }; - return this.client.call('patch', uri, apiHeaders, payload); + return this.client.call('patch', uri, apiHeaders, apiPayload); } /** @@ -5264,15 +5265,15 @@ export class Project { const enabled = params.enabled; const apiPath = '/project/oauth2/tradeshiftBox'; - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof oauth2ClientId !== 'undefined') { - payload['oauth2ClientId'] = oauth2ClientId; + apiPayload['oauth2ClientId'] = oauth2ClientId; } if (typeof oauth2ClientSecret !== 'undefined') { - payload['oauth2ClientSecret'] = oauth2ClientSecret; + apiPayload['oauth2ClientSecret'] = oauth2ClientSecret; } if (typeof enabled !== 'undefined') { - payload['enabled'] = enabled; + apiPayload['enabled'] = enabled; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -5282,7 +5283,7 @@ export class Project { accept: 'application/json', }; - return this.client.call('patch', uri, apiHeaders, payload); + return this.client.call('patch', uri, apiHeaders, apiPayload); } /** @@ -5350,15 +5351,15 @@ export class Project { const enabled = params.enabled; const apiPath = '/project/oauth2/twitch'; - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof clientId !== 'undefined') { - payload['clientId'] = clientId; + apiPayload['clientId'] = clientId; } if (typeof clientSecret !== 'undefined') { - payload['clientSecret'] = clientSecret; + apiPayload['clientSecret'] = clientSecret; } if (typeof enabled !== 'undefined') { - payload['enabled'] = enabled; + apiPayload['enabled'] = enabled; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -5368,7 +5369,7 @@ export class Project { accept: 'application/json', }; - return this.client.call('patch', uri, apiHeaders, payload); + return this.client.call('patch', uri, apiHeaders, apiPayload); } /** @@ -5436,15 +5437,15 @@ export class Project { const enabled = params.enabled; const apiPath = '/project/oauth2/wordpress'; - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof clientId !== 'undefined') { - payload['clientId'] = clientId; + apiPayload['clientId'] = clientId; } if (typeof clientSecret !== 'undefined') { - payload['clientSecret'] = clientSecret; + apiPayload['clientSecret'] = clientSecret; } if (typeof enabled !== 'undefined') { - payload['enabled'] = enabled; + apiPayload['enabled'] = enabled; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -5454,7 +5455,7 @@ export class Project { accept: 'application/json', }; - return this.client.call('patch', uri, apiHeaders, payload); + return this.client.call('patch', uri, apiHeaders, apiPayload); } /** @@ -5522,15 +5523,15 @@ export class Project { const enabled = params.enabled; const apiPath = '/project/oauth2/x'; - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof customerKey !== 'undefined') { - payload['customerKey'] = customerKey; + apiPayload['customerKey'] = customerKey; } if (typeof secretKey !== 'undefined') { - payload['secretKey'] = secretKey; + apiPayload['secretKey'] = secretKey; } if (typeof enabled !== 'undefined') { - payload['enabled'] = enabled; + apiPayload['enabled'] = enabled; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -5540,7 +5541,7 @@ export class Project { accept: 'application/json', }; - return this.client.call('patch', uri, apiHeaders, payload); + return this.client.call('patch', uri, apiHeaders, apiPayload); } /** @@ -5608,15 +5609,15 @@ export class Project { const enabled = params.enabled; const apiPath = '/project/oauth2/yahoo'; - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof clientId !== 'undefined') { - payload['clientId'] = clientId; + apiPayload['clientId'] = clientId; } if (typeof clientSecret !== 'undefined') { - payload['clientSecret'] = clientSecret; + apiPayload['clientSecret'] = clientSecret; } if (typeof enabled !== 'undefined') { - payload['enabled'] = enabled; + apiPayload['enabled'] = enabled; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -5626,7 +5627,7 @@ export class Project { accept: 'application/json', }; - return this.client.call('patch', uri, apiHeaders, payload); + return this.client.call('patch', uri, apiHeaders, apiPayload); } /** @@ -5694,15 +5695,15 @@ export class Project { const enabled = params.enabled; const apiPath = '/project/oauth2/yandex'; - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof clientId !== 'undefined') { - payload['clientId'] = clientId; + apiPayload['clientId'] = clientId; } if (typeof clientSecret !== 'undefined') { - payload['clientSecret'] = clientSecret; + apiPayload['clientSecret'] = clientSecret; } if (typeof enabled !== 'undefined') { - payload['enabled'] = enabled; + apiPayload['enabled'] = enabled; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -5712,7 +5713,7 @@ export class Project { accept: 'application/json', }; - return this.client.call('patch', uri, apiHeaders, payload); + return this.client.call('patch', uri, apiHeaders, apiPayload); } /** @@ -5793,18 +5794,18 @@ export class Project { const enabled = params.enabled; const apiPath = '/project/oauth2/zoho'; - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof clientId !== 'undefined') { - payload['clientId'] = clientId; + apiPayload['clientId'] = clientId; } if (typeof clientSecret !== 'undefined') { - payload['clientSecret'] = clientSecret; + apiPayload['clientSecret'] = clientSecret; } if (typeof prompt !== 'undefined') { - payload['prompt'] = prompt; + apiPayload['prompt'] = prompt; } if (typeof enabled !== 'undefined') { - payload['enabled'] = enabled; + apiPayload['enabled'] = enabled; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -5814,7 +5815,7 @@ export class Project { accept: 'application/json', }; - return this.client.call('patch', uri, apiHeaders, payload); + return this.client.call('patch', uri, apiHeaders, apiPayload); } /** @@ -5882,15 +5883,15 @@ export class Project { const enabled = params.enabled; const apiPath = '/project/oauth2/zoom'; - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof clientId !== 'undefined') { - payload['clientId'] = clientId; + apiPayload['clientId'] = clientId; } if (typeof clientSecret !== 'undefined') { - payload['clientSecret'] = clientSecret; + apiPayload['clientSecret'] = clientSecret; } if (typeof enabled !== 'undefined') { - payload['enabled'] = enabled; + apiPayload['enabled'] = enabled; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -5900,7 +5901,7 @@ export class Project { accept: 'application/json', }; - return this.client.call('patch', uri, apiHeaders, payload); + return this.client.call('patch', uri, apiHeaders, apiPayload); } /** @@ -6094,7 +6095,7 @@ export class Project { '{providerId}', encodeURIComponent(String(providerId)), ); - const payload: Payload = {}; + const apiPayload: Payload = {}; const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { @@ -6102,7 +6103,7 @@ export class Project { accept: 'application/json', }; - return this.client.call('get', uri, apiHeaders, payload); + return this.client.call('get', uri, apiHeaders, apiPayload); } /** @@ -6157,12 +6158,12 @@ export class Project { const total = params.total; const apiPath = '/project/platforms'; - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof queries !== 'undefined') { - payload['queries'] = queries; + apiPayload['queries'] = queries; } if (typeof total !== 'undefined') { - payload['total'] = total; + apiPayload['total'] = total; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -6171,7 +6172,7 @@ export class Project { accept: 'application/json', }; - return this.client.call('get', uri, apiHeaders, payload); + return this.client.call('get', uri, apiHeaders, apiPayload); } /** @@ -6247,15 +6248,15 @@ export class Project { ); } const apiPath = '/project/platforms/android'; - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof platformId !== 'undefined') { - payload['platformId'] = platformId; + apiPayload['platformId'] = platformId; } if (typeof name !== 'undefined') { - payload['name'] = name; + apiPayload['name'] = name; } if (typeof applicationId !== 'undefined') { - payload['applicationId'] = applicationId; + apiPayload['applicationId'] = applicationId; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -6265,7 +6266,7 @@ export class Project { accept: 'application/json', }; - return this.client.call('post', uri, apiHeaders, payload); + return this.client.call('post', uri, apiHeaders, apiPayload); } /** @@ -6344,12 +6345,12 @@ export class Project { '{platformId}', encodeURIComponent(String(platformId)), ); - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof name !== 'undefined') { - payload['name'] = name; + apiPayload['name'] = name; } if (typeof applicationId !== 'undefined') { - payload['applicationId'] = applicationId; + apiPayload['applicationId'] = applicationId; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -6359,7 +6360,7 @@ export class Project { accept: 'application/json', }; - return this.client.call('put', uri, apiHeaders, payload); + return this.client.call('put', uri, apiHeaders, apiPayload); } /** @@ -6439,15 +6440,15 @@ export class Project { ); } const apiPath = '/project/platforms/apple'; - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof platformId !== 'undefined') { - payload['platformId'] = platformId; + apiPayload['platformId'] = platformId; } if (typeof name !== 'undefined') { - payload['name'] = name; + apiPayload['name'] = name; } if (typeof bundleIdentifier !== 'undefined') { - payload['bundleIdentifier'] = bundleIdentifier; + apiPayload['bundleIdentifier'] = bundleIdentifier; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -6457,7 +6458,7 @@ export class Project { accept: 'application/json', }; - return this.client.call('post', uri, apiHeaders, payload); + return this.client.call('post', uri, apiHeaders, apiPayload); } /** @@ -6540,12 +6541,12 @@ export class Project { '{platformId}', encodeURIComponent(String(platformId)), ); - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof name !== 'undefined') { - payload['name'] = name; + apiPayload['name'] = name; } if (typeof bundleIdentifier !== 'undefined') { - payload['bundleIdentifier'] = bundleIdentifier; + apiPayload['bundleIdentifier'] = bundleIdentifier; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -6555,7 +6556,7 @@ export class Project { accept: 'application/json', }; - return this.client.call('put', uri, apiHeaders, payload); + return this.client.call('put', uri, apiHeaders, apiPayload); } /** @@ -6630,15 +6631,15 @@ export class Project { ); } const apiPath = '/project/platforms/linux'; - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof platformId !== 'undefined') { - payload['platformId'] = platformId; + apiPayload['platformId'] = platformId; } if (typeof name !== 'undefined') { - payload['name'] = name; + apiPayload['name'] = name; } if (typeof packageName !== 'undefined') { - payload['packageName'] = packageName; + apiPayload['packageName'] = packageName; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -6648,7 +6649,7 @@ export class Project { accept: 'application/json', }; - return this.client.call('post', uri, apiHeaders, payload); + return this.client.call('post', uri, apiHeaders, apiPayload); } /** @@ -6726,12 +6727,12 @@ export class Project { '{platformId}', encodeURIComponent(String(platformId)), ); - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof name !== 'undefined') { - payload['name'] = name; + apiPayload['name'] = name; } if (typeof packageName !== 'undefined') { - payload['packageName'] = packageName; + apiPayload['packageName'] = packageName; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -6741,7 +6742,7 @@ export class Project { accept: 'application/json', }; - return this.client.call('put', uri, apiHeaders, payload); + return this.client.call('put', uri, apiHeaders, apiPayload); } /** @@ -6816,15 +6817,15 @@ export class Project { ); } const apiPath = '/project/platforms/web'; - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof platformId !== 'undefined') { - payload['platformId'] = platformId; + apiPayload['platformId'] = platformId; } if (typeof name !== 'undefined') { - payload['name'] = name; + apiPayload['name'] = name; } if (typeof hostname !== 'undefined') { - payload['hostname'] = hostname; + apiPayload['hostname'] = hostname; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -6834,7 +6835,7 @@ export class Project { accept: 'application/json', }; - return this.client.call('post', uri, apiHeaders, payload); + return this.client.call('post', uri, apiHeaders, apiPayload); } /** @@ -6912,12 +6913,12 @@ export class Project { '{platformId}', encodeURIComponent(String(platformId)), ); - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof name !== 'undefined') { - payload['name'] = name; + apiPayload['name'] = name; } if (typeof hostname !== 'undefined') { - payload['hostname'] = hostname; + apiPayload['hostname'] = hostname; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -6927,7 +6928,7 @@ export class Project { accept: 'application/json', }; - return this.client.call('put', uri, apiHeaders, payload); + return this.client.call('put', uri, apiHeaders, apiPayload); } /** @@ -7011,15 +7012,15 @@ export class Project { ); } const apiPath = '/project/platforms/windows'; - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof platformId !== 'undefined') { - payload['platformId'] = platformId; + apiPayload['platformId'] = platformId; } if (typeof name !== 'undefined') { - payload['name'] = name; + apiPayload['name'] = name; } if (typeof packageIdentifierName !== 'undefined') { - payload['packageIdentifierName'] = packageIdentifierName; + apiPayload['packageIdentifierName'] = packageIdentifierName; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -7029,7 +7030,7 @@ export class Project { accept: 'application/json', }; - return this.client.call('post', uri, apiHeaders, payload); + return this.client.call('post', uri, apiHeaders, apiPayload); } /** @@ -7116,12 +7117,12 @@ export class Project { '{platformId}', encodeURIComponent(String(platformId)), ); - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof name !== 'undefined') { - payload['name'] = name; + apiPayload['name'] = name; } if (typeof packageIdentifierName !== 'undefined') { - payload['packageIdentifierName'] = packageIdentifierName; + apiPayload['packageIdentifierName'] = packageIdentifierName; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -7131,7 +7132,7 @@ export class Project { accept: 'application/json', }; - return this.client.call('put', uri, apiHeaders, payload); + return this.client.call('put', uri, apiHeaders, apiPayload); } /** @@ -7201,7 +7202,7 @@ export class Project { '{platformId}', encodeURIComponent(String(platformId)), ); - const payload: Payload = {}; + const apiPayload: Payload = {}; const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { @@ -7209,7 +7210,7 @@ export class Project { accept: 'application/json', }; - return this.client.call('get', uri, apiHeaders, payload); + return this.client.call('get', uri, apiHeaders, apiPayload); } /** @@ -7257,7 +7258,7 @@ export class Project { '{platformId}', encodeURIComponent(String(platformId)), ); - const payload: Payload = {}; + const apiPayload: Payload = {}; const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { @@ -7266,7 +7267,7 @@ export class Project { accept: 'application/json', }; - return this.client.call('delete', uri, apiHeaders, payload); + return this.client.call('delete', uri, apiHeaders, apiPayload); } /** @@ -7321,12 +7322,12 @@ export class Project { const total = params.total; const apiPath = '/project/policies'; - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof queries !== 'undefined') { - payload['queries'] = queries; + apiPayload['queries'] = queries; } if (typeof total !== 'undefined') { - payload['total'] = total; + apiPayload['total'] = total; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -7335,7 +7336,7 @@ export class Project { accept: 'application/json', }; - return this.client.call('get', uri, apiHeaders, payload); + return this.client.call('get', uri, apiHeaders, apiPayload); } /** @@ -7382,9 +7383,9 @@ export class Project { ); } const apiPath = '/project/policies/deny-aliased-email'; - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof enabled !== 'undefined') { - payload['enabled'] = enabled; + apiPayload['enabled'] = enabled; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -7394,7 +7395,7 @@ export class Project { accept: 'application/json', }; - return this.client.call('patch', uri, apiHeaders, payload); + return this.client.call('patch', uri, apiHeaders, apiPayload); } /** @@ -7441,9 +7442,9 @@ export class Project { ); } const apiPath = '/project/policies/deny-corporate-email'; - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof enabled !== 'undefined') { - payload['enabled'] = enabled; + apiPayload['enabled'] = enabled; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -7453,7 +7454,7 @@ export class Project { accept: 'application/json', }; - return this.client.call('patch', uri, apiHeaders, payload); + return this.client.call('patch', uri, apiHeaders, apiPayload); } /** @@ -7500,9 +7501,9 @@ export class Project { ); } const apiPath = '/project/policies/deny-disposable-email'; - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof enabled !== 'undefined') { - payload['enabled'] = enabled; + apiPayload['enabled'] = enabled; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -7512,7 +7513,7 @@ export class Project { accept: 'application/json', }; - return this.client.call('patch', uri, apiHeaders, payload); + return this.client.call('patch', uri, apiHeaders, apiPayload); } /** @@ -7559,9 +7560,9 @@ export class Project { ); } const apiPath = '/project/policies/deny-free-email'; - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof enabled !== 'undefined') { - payload['enabled'] = enabled; + apiPayload['enabled'] = enabled; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -7571,7 +7572,7 @@ export class Project { accept: 'application/json', }; - return this.client.call('patch', uri, apiHeaders, payload); + return this.client.call('patch', uri, apiHeaders, apiPayload); } /** @@ -7670,24 +7671,24 @@ export class Project { const userAccessedAt = params.userAccessedAt; const apiPath = '/project/policies/membership-privacy'; - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof userId !== 'undefined') { - payload['userId'] = userId; + apiPayload['userId'] = userId; } if (typeof userEmail !== 'undefined') { - payload['userEmail'] = userEmail; + apiPayload['userEmail'] = userEmail; } if (typeof userPhone !== 'undefined') { - payload['userPhone'] = userPhone; + apiPayload['userPhone'] = userPhone; } if (typeof userName !== 'undefined') { - payload['userName'] = userName; + apiPayload['userName'] = userName; } if (typeof userMFA !== 'undefined') { - payload['userMFA'] = userMFA; + apiPayload['userMFA'] = userMFA; } if (typeof userAccessedAt !== 'undefined') { - payload['userAccessedAt'] = userAccessedAt; + apiPayload['userAccessedAt'] = userAccessedAt; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -7697,7 +7698,7 @@ export class Project { accept: 'application/json', }; - return this.client.call('patch', uri, apiHeaders, payload); + return this.client.call('patch', uri, apiHeaders, apiPayload); } /** @@ -7778,18 +7779,18 @@ export class Project { const custom = params.custom; const apiPath = '/project/policies/mfa-factors'; - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof totp !== 'undefined') { - payload['totp'] = totp; + apiPayload['totp'] = totp; } if (typeof email !== 'undefined') { - payload['email'] = email; + apiPayload['email'] = email; } if (typeof phone !== 'undefined') { - payload['phone'] = phone; + apiPayload['phone'] = phone; } if (typeof custom !== 'undefined') { - payload['custom'] = custom; + apiPayload['custom'] = custom; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -7799,7 +7800,7 @@ export class Project { accept: 'application/json', }; - return this.client.call('patch', uri, apiHeaders, payload); + return this.client.call('patch', uri, apiHeaders, apiPayload); } /** @@ -7846,9 +7847,9 @@ export class Project { ); } const apiPath = '/project/policies/password-dictionary'; - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof enabled !== 'undefined') { - payload['enabled'] = enabled; + apiPayload['enabled'] = enabled; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -7858,7 +7859,7 @@ export class Project { accept: 'application/json', }; - return this.client.call('patch', uri, apiHeaders, payload); + return this.client.call('patch', uri, apiHeaders, apiPayload); } /** @@ -7907,9 +7908,9 @@ export class Project { throw new AppwriteException('Missing required parameter: "total"'); } const apiPath = '/project/policies/password-history'; - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof total !== 'undefined') { - payload['total'] = total; + apiPayload['total'] = total; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -7919,7 +7920,7 @@ export class Project { accept: 'application/json', }; - return this.client.call('patch', uri, apiHeaders, payload); + return this.client.call('patch', uri, apiHeaders, apiPayload); } /** @@ -7966,9 +7967,9 @@ export class Project { ); } const apiPath = '/project/policies/password-personal-data'; - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof enabled !== 'undefined') { - payload['enabled'] = enabled; + apiPayload['enabled'] = enabled; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -7978,7 +7979,7 @@ export class Project { accept: 'application/json', }; - return this.client.call('patch', uri, apiHeaders, payload); + return this.client.call('patch', uri, apiHeaders, apiPayload); } /** @@ -8042,15 +8043,15 @@ export class Project { const users = params.users; const apiPath = '/project/policies/password-pwned'; - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof enabled !== 'undefined') { - payload['enabled'] = enabled; + apiPayload['enabled'] = enabled; } if (typeof sessions !== 'undefined') { - payload['sessions'] = sessions; + apiPayload['sessions'] = sessions; } if (typeof users !== 'undefined') { - payload['users'] = users; + apiPayload['users'] = users; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -8060,7 +8061,7 @@ export class Project { accept: 'application/json', }; - return this.client.call('patch', uri, apiHeaders, payload); + return this.client.call('patch', uri, apiHeaders, apiPayload); } /** @@ -8150,21 +8151,21 @@ export class Project { const symbols = params.symbols; const apiPath = '/project/policies/password-strength'; - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof min !== 'undefined') { - payload['min'] = min; + apiPayload['min'] = min; } if (typeof uppercase !== 'undefined') { - payload['uppercase'] = uppercase; + apiPayload['uppercase'] = uppercase; } if (typeof lowercase !== 'undefined') { - payload['lowercase'] = lowercase; + apiPayload['lowercase'] = lowercase; } if (typeof number !== 'undefined') { - payload['number'] = number; + apiPayload['number'] = number; } if (typeof symbols !== 'undefined') { - payload['symbols'] = symbols; + apiPayload['symbols'] = symbols; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -8174,7 +8175,7 @@ export class Project { accept: 'application/json', }; - return this.client.call('patch', uri, apiHeaders, payload); + return this.client.call('patch', uri, apiHeaders, apiPayload); } /** @@ -8221,9 +8222,9 @@ export class Project { ); } const apiPath = '/project/policies/session-alert'; - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof enabled !== 'undefined') { - payload['enabled'] = enabled; + apiPayload['enabled'] = enabled; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -8233,7 +8234,7 @@ export class Project { accept: 'application/json', }; - return this.client.call('patch', uri, apiHeaders, payload); + return this.client.call('patch', uri, apiHeaders, apiPayload); } /** @@ -8280,9 +8281,9 @@ export class Project { ); } const apiPath = '/project/policies/session-duration'; - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof duration !== 'undefined') { - payload['duration'] = duration; + apiPayload['duration'] = duration; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -8292,7 +8293,7 @@ export class Project { accept: 'application/json', }; - return this.client.call('patch', uri, apiHeaders, payload); + return this.client.call('patch', uri, apiHeaders, apiPayload); } /** @@ -8339,9 +8340,9 @@ export class Project { ); } const apiPath = '/project/policies/session-invalidation'; - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof enabled !== 'undefined') { - payload['enabled'] = enabled; + apiPayload['enabled'] = enabled; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -8351,7 +8352,7 @@ export class Project { accept: 'application/json', }; - return this.client.call('patch', uri, apiHeaders, payload); + return this.client.call('patch', uri, apiHeaders, apiPayload); } /** @@ -8396,9 +8397,9 @@ export class Project { throw new AppwriteException('Missing required parameter: "total"'); } const apiPath = '/project/policies/session-limit'; - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof total !== 'undefined') { - payload['total'] = total; + apiPayload['total'] = total; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -8408,7 +8409,7 @@ export class Project { accept: 'application/json', }; - return this.client.call('patch', uri, apiHeaders, payload); + return this.client.call('patch', uri, apiHeaders, apiPayload); } /** @@ -8451,9 +8452,9 @@ export class Project { throw new AppwriteException('Missing required parameter: "total"'); } const apiPath = '/project/policies/user-limit'; - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof total !== 'undefined') { - payload['total'] = total; + apiPayload['total'] = total; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -8463,7 +8464,7 @@ export class Project { accept: 'application/json', }; - return this.client.call('patch', uri, apiHeaders, payload); + return this.client.call('patch', uri, apiHeaders, apiPayload); } /** @@ -8567,7 +8568,7 @@ export class Project { '{policyId}', encodeURIComponent(String(policyId)), ); - const payload: Payload = {}; + const apiPayload: Payload = {}; const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { @@ -8575,7 +8576,7 @@ export class Project { accept: 'application/json', }; - return this.client.call('get', uri, apiHeaders, payload); + return this.client.call('get', uri, apiHeaders, apiPayload); } /** @@ -8645,9 +8646,9 @@ export class Project { '{protocolId}', encodeURIComponent(String(protocolId)), ); - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof enabled !== 'undefined') { - payload['enabled'] = enabled; + apiPayload['enabled'] = enabled; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -8657,7 +8658,7 @@ export class Project { accept: 'application/json', }; - return this.client.call('patch', uri, apiHeaders, payload); + return this.client.call('patch', uri, apiHeaders, apiPayload); } /** @@ -8727,9 +8728,9 @@ export class Project { '{serviceId}', encodeURIComponent(String(serviceId)), ); - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof enabled !== 'undefined') { - payload['enabled'] = enabled; + apiPayload['enabled'] = enabled; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -8739,7 +8740,7 @@ export class Project { accept: 'application/json', }; - return this.client.call('patch', uri, apiHeaders, payload); + return this.client.call('patch', uri, apiHeaders, apiPayload); } /** @@ -8884,36 +8885,36 @@ export class Project { const enabled = params.enabled; const apiPath = '/project/smtp'; - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof host !== 'undefined') { - payload['host'] = host; + apiPayload['host'] = host; } if (typeof port !== 'undefined') { - payload['port'] = port; + apiPayload['port'] = port; } if (typeof username !== 'undefined') { - payload['username'] = username; + apiPayload['username'] = username; } if (typeof password !== 'undefined') { - payload['password'] = password; + apiPayload['password'] = password; } if (typeof senderEmail !== 'undefined') { - payload['senderEmail'] = senderEmail; + apiPayload['senderEmail'] = senderEmail; } if (typeof senderName !== 'undefined') { - payload['senderName'] = senderName; + apiPayload['senderName'] = senderName; } if (typeof replyToEmail !== 'undefined') { - payload['replyToEmail'] = replyToEmail; + apiPayload['replyToEmail'] = replyToEmail; } if (typeof replyToName !== 'undefined') { - payload['replyToName'] = replyToName; + apiPayload['replyToName'] = replyToName; } if (typeof secure !== 'undefined') { - payload['secure'] = secure; + apiPayload['secure'] = secure; } if (typeof enabled !== 'undefined') { - payload['enabled'] = enabled; + apiPayload['enabled'] = enabled; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -8923,7 +8924,7 @@ export class Project { accept: 'application/json', }; - return this.client.call('patch', uri, apiHeaders, payload); + return this.client.call('patch', uri, apiHeaders, apiPayload); } /** @@ -8966,9 +8967,9 @@ export class Project { throw new AppwriteException('Missing required parameter: "emails"'); } const apiPath = '/project/smtp/tests'; - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof emails !== 'undefined') { - payload['emails'] = emails; + apiPayload['emails'] = emails; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -8978,7 +8979,7 @@ export class Project { accept: 'application/json', }; - return this.client.call('post', uri, apiHeaders, payload); + return this.client.call('post', uri, apiHeaders, apiPayload); } /** @@ -9033,12 +9034,12 @@ export class Project { const total = params.total; const apiPath = '/project/templates/email'; - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof queries !== 'undefined') { - payload['queries'] = queries; + apiPayload['queries'] = queries; } if (typeof total !== 'undefined') { - payload['total'] = total; + apiPayload['total'] = total; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -9047,7 +9048,7 @@ export class Project { accept: 'application/json', }; - return this.client.call('get', uri, apiHeaders, payload); + return this.client.call('get', uri, apiHeaders, apiPayload); } /** @@ -9184,30 +9185,30 @@ export class Project { ); } const apiPath = '/project/templates/email'; - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof templateId !== 'undefined') { - payload['templateId'] = templateId; + apiPayload['templateId'] = templateId; } if (typeof locale !== 'undefined') { - payload['locale'] = locale; + apiPayload['locale'] = locale; } if (typeof subject !== 'undefined') { - payload['subject'] = subject; + apiPayload['subject'] = subject; } if (typeof message !== 'undefined') { - payload['message'] = message; + apiPayload['message'] = message; } if (typeof senderName !== 'undefined') { - payload['senderName'] = senderName; + apiPayload['senderName'] = senderName; } if (typeof senderEmail !== 'undefined') { - payload['senderEmail'] = senderEmail; + apiPayload['senderEmail'] = senderEmail; } if (typeof replyToEmail !== 'undefined') { - payload['replyToEmail'] = replyToEmail; + apiPayload['replyToEmail'] = replyToEmail; } if (typeof replyToName !== 'undefined') { - payload['replyToName'] = replyToName; + apiPayload['replyToName'] = replyToName; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -9217,7 +9218,7 @@ export class Project { accept: 'application/json', }; - return this.client.call('patch', uri, apiHeaders, payload); + return this.client.call('patch', uri, apiHeaders, apiPayload); } /** @@ -9288,9 +9289,9 @@ export class Project { '{templateId}', encodeURIComponent(String(templateId)), ); - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof locale !== 'undefined') { - payload['locale'] = locale; + apiPayload['locale'] = locale; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -9299,7 +9300,7 @@ export class Project { accept: 'application/json', }; - return this.client.call('get', uri, apiHeaders, payload); + return this.client.call('get', uri, apiHeaders, apiPayload); } /** @@ -9354,12 +9355,12 @@ export class Project { const total = params.total; const apiPath = '/project/variables'; - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof queries !== 'undefined') { - payload['queries'] = queries; + apiPayload['queries'] = queries; } if (typeof total !== 'undefined') { - payload['total'] = total; + apiPayload['total'] = total; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -9368,7 +9369,7 @@ export class Project { accept: 'application/json', }; - return this.client.call('get', uri, apiHeaders, payload); + return this.client.call('get', uri, apiHeaders, apiPayload); } /** @@ -9459,18 +9460,18 @@ export class Project { throw new AppwriteException('Missing required parameter: "value"'); } const apiPath = '/project/variables'; - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof variableId !== 'undefined') { - payload['variableId'] = variableId; + apiPayload['variableId'] = variableId; } if (typeof key !== 'undefined') { - payload['key'] = key; + apiPayload['key'] = key; } if (typeof value !== 'undefined') { - payload['value'] = value; + apiPayload['value'] = value; } if (typeof secret !== 'undefined') { - payload['secret'] = secret; + apiPayload['secret'] = secret; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -9480,7 +9481,7 @@ export class Project { accept: 'application/json', }; - return this.client.call('post', uri, apiHeaders, payload); + return this.client.call('post', uri, apiHeaders, apiPayload); } /** @@ -9528,7 +9529,7 @@ export class Project { '{variableId}', encodeURIComponent(String(variableId)), ); - const payload: Payload = {}; + const apiPayload: Payload = {}; const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { @@ -9536,7 +9537,7 @@ export class Project { accept: 'application/json', }; - return this.client.call('get', uri, apiHeaders, payload); + return this.client.call('get', uri, apiHeaders, apiPayload); } /** @@ -9624,15 +9625,15 @@ export class Project { '{variableId}', encodeURIComponent(String(variableId)), ); - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof key !== 'undefined') { - payload['key'] = key; + apiPayload['key'] = key; } if (typeof value !== 'undefined') { - payload['value'] = value; + apiPayload['value'] = value; } if (typeof secret !== 'undefined') { - payload['secret'] = secret; + apiPayload['secret'] = secret; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -9642,7 +9643,7 @@ export class Project { accept: 'application/json', }; - return this.client.call('put', uri, apiHeaders, payload); + return this.client.call('put', uri, apiHeaders, apiPayload); } /** @@ -9690,7 +9691,7 @@ export class Project { '{variableId}', encodeURIComponent(String(variableId)), ); - const payload: Payload = {}; + const apiPayload: Payload = {}; const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { @@ -9699,6 +9700,6 @@ export class Project { accept: 'application/json', }; - return this.client.call('delete', uri, apiHeaders, payload); + return this.client.call('delete', uri, apiHeaders, apiPayload); } } diff --git a/src/services/projects.ts b/src/services/projects.ts index f12af384..1b0b4e84 100644 --- a/src/services/projects.ts +++ b/src/services/projects.ts @@ -57,7 +57,7 @@ export class Projects { '{projectId}', encodeURIComponent(String(projectId)), ); - const payload: Payload = {}; + const apiPayload: Payload = {}; const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { @@ -65,7 +65,7 @@ export class Projects { accept: 'application/json', }; - return this.client.call('get', uri, apiHeaders, payload); + return this.client.call('get', uri, apiHeaders, apiPayload); } /** @@ -117,7 +117,7 @@ export class Projects { '{projectId}', encodeURIComponent(String(projectId)), ); - const payload: Payload = {}; + const apiPayload: Payload = {}; const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { @@ -126,7 +126,7 @@ export class Projects { accept: 'application/json', }; - return this.client.call('post', uri, apiHeaders, payload); + return this.client.call('post', uri, apiHeaders, apiPayload); } /** @@ -191,7 +191,7 @@ export class Projects { const apiPath = '/projects/{projectId}/addons/{addonId}' .replace('{projectId}', encodeURIComponent(String(projectId))) .replace('{addonId}', encodeURIComponent(String(addonId))); - const payload: Payload = {}; + const apiPayload: Payload = {}; const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { @@ -199,7 +199,7 @@ export class Projects { accept: 'application/json', }; - return this.client.call('get', uri, apiHeaders, payload); + return this.client.call('get', uri, apiHeaders, apiPayload); } /** @@ -261,7 +261,7 @@ export class Projects { const apiPath = '/projects/{projectId}/addons/{addonId}' .replace('{projectId}', encodeURIComponent(String(projectId))) .replace('{addonId}', encodeURIComponent(String(addonId))); - const payload: Payload = {}; + const apiPayload: Payload = {}; const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { @@ -270,7 +270,7 @@ export class Projects { accept: 'application/json', }; - return this.client.call('delete', uri, apiHeaders, payload); + return this.client.call('delete', uri, apiHeaders, apiPayload); } /** @@ -338,7 +338,7 @@ export class Projects { const apiPath = '/projects/{projectId}/addons/{addonId}/confirmations' .replace('{projectId}', encodeURIComponent(String(projectId))) .replace('{addonId}', encodeURIComponent(String(addonId))); - const payload: Payload = {}; + const apiPayload: Payload = {}; const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { @@ -347,7 +347,7 @@ export class Projects { accept: 'application/json', }; - return this.client.call('post', uri, apiHeaders, payload); + return this.client.call('post', uri, apiHeaders, apiPayload); } /** @@ -410,7 +410,7 @@ export class Projects { const apiPath = '/projects/{projectId}/addons/{addon}/price' .replace('{projectId}', encodeURIComponent(String(projectId))) .replace('{addon}', encodeURIComponent(String(addon))); - const payload: Payload = {}; + const apiPayload: Payload = {}; const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { @@ -418,7 +418,7 @@ export class Projects { accept: 'application/json', }; - return this.client.call('get', uri, apiHeaders, payload); + return this.client.call('get', uri, apiHeaders, apiPayload); } /** @@ -468,7 +468,7 @@ export class Projects { '{projectId}', encodeURIComponent(String(projectId)), ); - const payload: Payload = {}; + const apiPayload: Payload = {}; const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { @@ -477,7 +477,7 @@ export class Projects { accept: 'application/json', }; - return this.client.call('patch', uri, apiHeaders, payload); + return this.client.call('patch', uri, apiHeaders, apiPayload); } /** @@ -547,12 +547,12 @@ export class Projects { '{projectId}', encodeURIComponent(String(projectId)), ); - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof queries !== 'undefined') { - payload['queries'] = queries; + apiPayload['queries'] = queries; } if (typeof total !== 'undefined') { - payload['total'] = total; + apiPayload['total'] = total; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -561,7 +561,7 @@ export class Projects { accept: 'application/json', }; - return this.client.call('get', uri, apiHeaders, payload); + return this.client.call('get', uri, apiHeaders, apiPayload); } /** @@ -682,21 +682,21 @@ export class Projects { '{projectId}', encodeURIComponent(String(projectId)), ); - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof resourceType !== 'undefined') { - payload['resourceType'] = resourceType; + apiPayload['resourceType'] = resourceType; } if (typeof resourceId !== 'undefined') { - payload['resourceId'] = resourceId; + apiPayload['resourceId'] = resourceId; } if (typeof schedule !== 'undefined') { - payload['schedule'] = schedule; + apiPayload['schedule'] = schedule; } if (typeof active !== 'undefined') { - payload['active'] = active; + apiPayload['active'] = active; } if (typeof data !== 'undefined') { - payload['data'] = data; + apiPayload['data'] = data; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -706,7 +706,7 @@ export class Projects { accept: 'application/json', }; - return this.client.call('post', uri, apiHeaders, payload); + return this.client.call('post', uri, apiHeaders, apiPayload); } /** @@ -772,7 +772,7 @@ export class Projects { const apiPath = '/projects/{projectId}/schedules/{scheduleId}' .replace('{projectId}', encodeURIComponent(String(projectId))) .replace('{scheduleId}', encodeURIComponent(String(scheduleId))); - const payload: Payload = {}; + const apiPayload: Payload = {}; const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { @@ -780,7 +780,7 @@ export class Projects { accept: 'application/json', }; - return this.client.call('get', uri, apiHeaders, payload); + return this.client.call('get', uri, apiHeaders, apiPayload); } /** @@ -830,7 +830,7 @@ export class Projects { '{projectId}', encodeURIComponent(String(projectId)), ); - const payload: Payload = {}; + const apiPayload: Payload = {}; const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { @@ -838,7 +838,7 @@ export class Projects { accept: 'application/json', }; - return this.client.call('get', uri, apiHeaders, payload); + return this.client.call('get', uri, apiHeaders, apiPayload); } /** @@ -914,9 +914,9 @@ export class Projects { const apiPath = '/projects/{projectId}/stages/{stageId}' .replace('{projectId}', encodeURIComponent(String(projectId))) .replace('{stageId}', encodeURIComponent(String(stageId))); - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof skip !== 'undefined') { - payload['skip'] = skip; + apiPayload['skip'] = skip; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -926,7 +926,7 @@ export class Projects { accept: 'application/json', }; - return this.client.call('patch', uri, apiHeaders, payload); + return this.client.call('patch', uri, apiHeaders, apiPayload); } /** @@ -987,9 +987,9 @@ export class Projects { '{projectId}', encodeURIComponent(String(projectId)), ); - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof status !== 'undefined') { - payload['status'] = status; + apiPayload['status'] = status; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -999,7 +999,7 @@ export class Projects { accept: 'application/json', }; - return this.client.call('patch', uri, apiHeaders, payload); + return this.client.call('patch', uri, apiHeaders, apiPayload); } /** @@ -1061,9 +1061,9 @@ export class Projects { '{projectId}', encodeURIComponent(String(projectId)), ); - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof teamId !== 'undefined') { - payload['teamId'] = teamId; + apiPayload['teamId'] = teamId; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -1073,6 +1073,6 @@ export class Projects { accept: 'application/json', }; - return this.client.call('patch', uri, apiHeaders, payload); + return this.client.call('patch', uri, apiHeaders, apiPayload); } } diff --git a/src/services/proxy.ts b/src/services/proxy.ts index 714a25b8..bd63c43a 100644 --- a/src/services/proxy.ts +++ b/src/services/proxy.ts @@ -85,15 +85,15 @@ export class Proxy { throw new AppwriteException('Missing required parameter: "type"'); } const apiPath = '/proxy/invalidations'; - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof domain !== 'undefined') { - payload['domain'] = domain; + apiPayload['domain'] = domain; } if (typeof type !== 'undefined') { - payload['type'] = type; + apiPayload['type'] = type; } if (typeof reference !== 'undefined') { - payload['reference'] = reference; + apiPayload['reference'] = reference; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -103,7 +103,7 @@ export class Proxy { accept: 'application/json', }; - return this.client.call('post', uri, apiHeaders, payload); + return this.client.call('post', uri, apiHeaders, apiPayload); } /** @@ -158,12 +158,12 @@ export class Proxy { const total = params.total; const apiPath = '/proxy/rules'; - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof queries !== 'undefined') { - payload['queries'] = queries; + apiPayload['queries'] = queries; } if (typeof total !== 'undefined') { - payload['total'] = total; + apiPayload['total'] = total; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -172,7 +172,7 @@ export class Proxy { accept: 'application/json', }; - return this.client.call('get', uri, apiHeaders, payload); + return this.client.call('get', uri, apiHeaders, apiPayload); } /** @@ -219,9 +219,9 @@ export class Proxy { throw new AppwriteException('Missing required parameter: "domain"'); } const apiPath = '/proxy/rules/api'; - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof domain !== 'undefined') { - payload['domain'] = domain; + apiPayload['domain'] = domain; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -231,7 +231,7 @@ export class Proxy { accept: 'application/json', }; - return this.client.call('post', uri, apiHeaders, payload); + return this.client.call('post', uri, apiHeaders, apiPayload); } /** @@ -305,15 +305,15 @@ export class Proxy { ); } const apiPath = '/proxy/rules/function'; - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof domain !== 'undefined') { - payload['domain'] = domain; + apiPayload['domain'] = domain; } if (typeof functionId !== 'undefined') { - payload['functionId'] = functionId; + apiPayload['functionId'] = functionId; } if (typeof branch !== 'undefined') { - payload['branch'] = branch; + apiPayload['branch'] = branch; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -323,7 +323,7 @@ export class Proxy { accept: 'application/json', }; - return this.client.call('post', uri, apiHeaders, payload); + return this.client.call('post', uri, apiHeaders, apiPayload); } /** @@ -437,21 +437,21 @@ export class Proxy { ); } const apiPath = '/proxy/rules/redirect'; - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof domain !== 'undefined') { - payload['domain'] = domain; + apiPayload['domain'] = domain; } if (typeof url !== 'undefined') { - payload['url'] = url; + apiPayload['url'] = url; } if (typeof statusCode !== 'undefined') { - payload['statusCode'] = statusCode; + apiPayload['statusCode'] = statusCode; } if (typeof resourceId !== 'undefined') { - payload['resourceId'] = resourceId; + apiPayload['resourceId'] = resourceId; } if (typeof resourceType !== 'undefined') { - payload['resourceType'] = resourceType; + apiPayload['resourceType'] = resourceType; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -461,7 +461,7 @@ export class Proxy { accept: 'application/json', }; - return this.client.call('post', uri, apiHeaders, payload); + return this.client.call('post', uri, apiHeaders, apiPayload); } /** @@ -533,15 +533,15 @@ export class Proxy { throw new AppwriteException('Missing required parameter: "siteId"'); } const apiPath = '/proxy/rules/site'; - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof domain !== 'undefined') { - payload['domain'] = domain; + apiPayload['domain'] = domain; } if (typeof siteId !== 'undefined') { - payload['siteId'] = siteId; + apiPayload['siteId'] = siteId; } if (typeof branch !== 'undefined') { - payload['branch'] = branch; + apiPayload['branch'] = branch; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -551,7 +551,7 @@ export class Proxy { accept: 'application/json', }; - return this.client.call('post', uri, apiHeaders, payload); + return this.client.call('post', uri, apiHeaders, apiPayload); } /** @@ -597,7 +597,7 @@ export class Proxy { '{ruleId}', encodeURIComponent(String(ruleId)), ); - const payload: Payload = {}; + const apiPayload: Payload = {}; const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { @@ -605,7 +605,7 @@ export class Proxy { accept: 'application/json', }; - return this.client.call('get', uri, apiHeaders, payload); + return this.client.call('get', uri, apiHeaders, apiPayload); } /** @@ -649,7 +649,7 @@ export class Proxy { '{ruleId}', encodeURIComponent(String(ruleId)), ); - const payload: Payload = {}; + const apiPayload: Payload = {}; const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { @@ -658,7 +658,7 @@ export class Proxy { accept: 'application/json', }; - return this.client.call('delete', uri, apiHeaders, payload); + return this.client.call('delete', uri, apiHeaders, apiPayload); } /** @@ -704,7 +704,7 @@ export class Proxy { '{ruleId}', encodeURIComponent(String(ruleId)), ); - const payload: Payload = {}; + const apiPayload: Payload = {}; const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { @@ -713,6 +713,6 @@ export class Proxy { accept: 'application/json', }; - return this.client.call('patch', uri, apiHeaders, payload); + return this.client.call('patch', uri, apiHeaders, apiPayload); } } diff --git a/src/services/sites.ts b/src/services/sites.ts index bd459dc5..fa850f11 100644 --- a/src/services/sites.ts +++ b/src/services/sites.ts @@ -82,15 +82,15 @@ export class Sites { const total = params.total; const apiPath = '/sites'; - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof queries !== 'undefined') { - payload['queries'] = queries; + apiPayload['queries'] = queries; } if (typeof search !== 'undefined') { - payload['search'] = search; + apiPayload['search'] = search; } if (typeof total !== 'undefined') { - payload['total'] = total; + apiPayload['total'] = total; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -99,7 +99,7 @@ export class Sites { accept: 'application/json', }; - return this.client.call('get', uri, apiHeaders, payload); + return this.client.call('get', uri, apiHeaders, apiPayload); } /** @@ -399,78 +399,78 @@ export class Sites { ); } const apiPath = '/sites'; - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof siteId !== 'undefined') { - payload['siteId'] = siteId; + apiPayload['siteId'] = siteId; } if (typeof name !== 'undefined') { - payload['name'] = name; + apiPayload['name'] = name; } if (typeof framework !== 'undefined') { - payload['framework'] = framework; + apiPayload['framework'] = framework; } if (typeof enabled !== 'undefined') { - payload['enabled'] = enabled; + apiPayload['enabled'] = enabled; } if (typeof logging !== 'undefined') { - payload['logging'] = logging; + apiPayload['logging'] = logging; } if (typeof timeout !== 'undefined') { - payload['timeout'] = timeout; + apiPayload['timeout'] = timeout; } if (typeof installCommand !== 'undefined') { - payload['installCommand'] = installCommand; + apiPayload['installCommand'] = installCommand; } if (typeof buildCommand !== 'undefined') { - payload['buildCommand'] = buildCommand; + apiPayload['buildCommand'] = buildCommand; } if (typeof startCommand !== 'undefined') { - payload['startCommand'] = startCommand; + apiPayload['startCommand'] = startCommand; } if (typeof outputDirectory !== 'undefined') { - payload['outputDirectory'] = outputDirectory; + apiPayload['outputDirectory'] = outputDirectory; } if (typeof buildRuntime !== 'undefined') { - payload['buildRuntime'] = buildRuntime; + apiPayload['buildRuntime'] = buildRuntime; } if (typeof adapter !== 'undefined') { - payload['adapter'] = adapter; + apiPayload['adapter'] = adapter; } if (typeof installationId !== 'undefined') { - payload['installationId'] = installationId; + apiPayload['installationId'] = installationId; } if (typeof fallbackFile !== 'undefined') { - payload['fallbackFile'] = fallbackFile; + apiPayload['fallbackFile'] = fallbackFile; } if (typeof providerRepositoryId !== 'undefined') { - payload['providerRepositoryId'] = providerRepositoryId; + apiPayload['providerRepositoryId'] = providerRepositoryId; } if (typeof providerBranch !== 'undefined') { - payload['providerBranch'] = providerBranch; + apiPayload['providerBranch'] = providerBranch; } if (typeof providerSilentMode !== 'undefined') { - payload['providerSilentMode'] = providerSilentMode; + apiPayload['providerSilentMode'] = providerSilentMode; } if (typeof providerRootDirectory !== 'undefined') { - payload['providerRootDirectory'] = providerRootDirectory; + apiPayload['providerRootDirectory'] = providerRootDirectory; } if (typeof providerBranches !== 'undefined') { - payload['providerBranches'] = providerBranches; + apiPayload['providerBranches'] = providerBranches; } if (typeof providerPaths !== 'undefined') { - payload['providerPaths'] = providerPaths; + apiPayload['providerPaths'] = providerPaths; } if (typeof buildSpecification !== 'undefined') { - payload['buildSpecification'] = buildSpecification; + apiPayload['buildSpecification'] = buildSpecification; } if (typeof runtimeSpecification !== 'undefined') { - payload['runtimeSpecification'] = runtimeSpecification; + apiPayload['runtimeSpecification'] = runtimeSpecification; } if (typeof deploymentRetention !== 'undefined') { - payload['deploymentRetention'] = deploymentRetention; + apiPayload['deploymentRetention'] = deploymentRetention; } if (typeof scopes !== 'undefined') { - payload['scopes'] = scopes; + apiPayload['scopes'] = scopes; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -480,7 +480,7 @@ export class Sites { accept: 'application/json', }; - return this.client.call('post', uri, apiHeaders, payload); + return this.client.call('post', uri, apiHeaders, apiPayload); } /** @@ -491,7 +491,7 @@ export class Sites { */ listFrameworks(): Promise { const apiPath = '/sites/frameworks'; - const payload: Payload = {}; + const apiPayload: Payload = {}; const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { @@ -499,7 +499,7 @@ export class Sites { accept: 'application/json', }; - return this.client.call('get', uri, apiHeaders, payload); + return this.client.call('get', uri, apiHeaders, apiPayload); } /** @@ -542,9 +542,9 @@ export class Sites { const type = params.type; const apiPath = '/sites/specifications'; - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof type !== 'undefined') { - payload['type'] = type; + apiPayload['type'] = type; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -553,7 +553,7 @@ export class Sites { accept: 'application/json', }; - return this.client.call('get', uri, apiHeaders, payload); + return this.client.call('get', uri, apiHeaders, apiPayload); } /** @@ -638,18 +638,18 @@ export class Sites { const offset = params.offset; const apiPath = '/sites/templates'; - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof frameworks !== 'undefined') { - payload['frameworks'] = frameworks; + apiPayload['frameworks'] = frameworks; } if (typeof useCases !== 'undefined') { - payload['useCases'] = useCases; + apiPayload['useCases'] = useCases; } if (typeof limit !== 'undefined') { - payload['limit'] = limit; + apiPayload['limit'] = limit; } if (typeof offset !== 'undefined') { - payload['offset'] = offset; + apiPayload['offset'] = offset; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -658,7 +658,7 @@ export class Sites { accept: 'application/json', }; - return this.client.call('get', uri, apiHeaders, payload); + return this.client.call('get', uri, apiHeaders, apiPayload); } /** @@ -706,7 +706,7 @@ export class Sites { '{templateId}', encodeURIComponent(String(templateId)), ); - const payload: Payload = {}; + const apiPayload: Payload = {}; const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { @@ -714,7 +714,7 @@ export class Sites { accept: 'application/json', }; - return this.client.call('get', uri, apiHeaders, payload); + return this.client.call('get', uri, apiHeaders, apiPayload); } /** @@ -758,7 +758,7 @@ export class Sites { '{siteId}', encodeURIComponent(String(siteId)), ); - const payload: Payload = {}; + const apiPayload: Payload = {}; const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { @@ -766,7 +766,7 @@ export class Sites { accept: 'application/json', }; - return this.client.call('get', uri, apiHeaders, payload); + return this.client.call('get', uri, apiHeaders, apiPayload); } /** @@ -1064,75 +1064,75 @@ export class Sites { '{siteId}', encodeURIComponent(String(siteId)), ); - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof name !== 'undefined') { - payload['name'] = name; + apiPayload['name'] = name; } if (typeof framework !== 'undefined') { - payload['framework'] = framework; + apiPayload['framework'] = framework; } if (typeof enabled !== 'undefined') { - payload['enabled'] = enabled; + apiPayload['enabled'] = enabled; } if (typeof logging !== 'undefined') { - payload['logging'] = logging; + apiPayload['logging'] = logging; } if (typeof timeout !== 'undefined') { - payload['timeout'] = timeout; + apiPayload['timeout'] = timeout; } if (typeof installCommand !== 'undefined') { - payload['installCommand'] = installCommand; + apiPayload['installCommand'] = installCommand; } if (typeof buildCommand !== 'undefined') { - payload['buildCommand'] = buildCommand; + apiPayload['buildCommand'] = buildCommand; } if (typeof startCommand !== 'undefined') { - payload['startCommand'] = startCommand; + apiPayload['startCommand'] = startCommand; } if (typeof outputDirectory !== 'undefined') { - payload['outputDirectory'] = outputDirectory; + apiPayload['outputDirectory'] = outputDirectory; } if (typeof buildRuntime !== 'undefined') { - payload['buildRuntime'] = buildRuntime; + apiPayload['buildRuntime'] = buildRuntime; } if (typeof adapter !== 'undefined') { - payload['adapter'] = adapter; + apiPayload['adapter'] = adapter; } if (typeof fallbackFile !== 'undefined') { - payload['fallbackFile'] = fallbackFile; + apiPayload['fallbackFile'] = fallbackFile; } if (typeof installationId !== 'undefined') { - payload['installationId'] = installationId; + apiPayload['installationId'] = installationId; } if (typeof providerRepositoryId !== 'undefined') { - payload['providerRepositoryId'] = providerRepositoryId; + apiPayload['providerRepositoryId'] = providerRepositoryId; } if (typeof providerBranch !== 'undefined') { - payload['providerBranch'] = providerBranch; + apiPayload['providerBranch'] = providerBranch; } if (typeof providerSilentMode !== 'undefined') { - payload['providerSilentMode'] = providerSilentMode; + apiPayload['providerSilentMode'] = providerSilentMode; } if (typeof providerRootDirectory !== 'undefined') { - payload['providerRootDirectory'] = providerRootDirectory; + apiPayload['providerRootDirectory'] = providerRootDirectory; } if (typeof providerBranches !== 'undefined') { - payload['providerBranches'] = providerBranches; + apiPayload['providerBranches'] = providerBranches; } if (typeof providerPaths !== 'undefined') { - payload['providerPaths'] = providerPaths; + apiPayload['providerPaths'] = providerPaths; } if (typeof buildSpecification !== 'undefined') { - payload['buildSpecification'] = buildSpecification; + apiPayload['buildSpecification'] = buildSpecification; } if (typeof runtimeSpecification !== 'undefined') { - payload['runtimeSpecification'] = runtimeSpecification; + apiPayload['runtimeSpecification'] = runtimeSpecification; } if (typeof deploymentRetention !== 'undefined') { - payload['deploymentRetention'] = deploymentRetention; + apiPayload['deploymentRetention'] = deploymentRetention; } if (typeof scopes !== 'undefined') { - payload['scopes'] = scopes; + apiPayload['scopes'] = scopes; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -1142,7 +1142,7 @@ export class Sites { accept: 'application/json', }; - return this.client.call('put', uri, apiHeaders, payload); + return this.client.call('put', uri, apiHeaders, apiPayload); } /** @@ -1186,7 +1186,7 @@ export class Sites { '{siteId}', encodeURIComponent(String(siteId)), ); - const payload: Payload = {}; + const apiPayload: Payload = {}; const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { @@ -1195,7 +1195,7 @@ export class Sites { accept: 'application/json', }; - return this.client.call('delete', uri, apiHeaders, payload); + return this.client.call('delete', uri, apiHeaders, apiPayload); } /** @@ -1260,9 +1260,9 @@ export class Sites { '{siteId}', encodeURIComponent(String(siteId)), ); - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof deploymentId !== 'undefined') { - payload['deploymentId'] = deploymentId; + apiPayload['deploymentId'] = deploymentId; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -1272,7 +1272,7 @@ export class Sites { accept: 'application/json', }; - return this.client.call('patch', uri, apiHeaders, payload); + return this.client.call('patch', uri, apiHeaders, apiPayload); } /** @@ -1358,15 +1358,15 @@ export class Sites { '{siteId}', encodeURIComponent(String(siteId)), ); - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof queries !== 'undefined') { - payload['queries'] = queries; + apiPayload['queries'] = queries; } if (typeof search !== 'undefined') { - payload['search'] = search; + apiPayload['search'] = search; } if (typeof total !== 'undefined') { - payload['total'] = total; + apiPayload['total'] = total; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -1375,7 +1375,7 @@ export class Sites { accept: 'application/json', }; - return this.client.call('get', uri, apiHeaders, payload); + return this.client.call('get', uri, apiHeaders, apiPayload); } /** @@ -1497,21 +1497,21 @@ export class Sites { '{siteId}', encodeURIComponent(String(siteId)), ); - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof installCommand !== 'undefined') { - payload['installCommand'] = installCommand; + apiPayload['installCommand'] = installCommand; } if (typeof buildCommand !== 'undefined') { - payload['buildCommand'] = buildCommand; + apiPayload['buildCommand'] = buildCommand; } if (typeof outputDirectory !== 'undefined') { - payload['outputDirectory'] = outputDirectory; + apiPayload['outputDirectory'] = outputDirectory; } if (typeof code !== 'undefined') { - payload['code'] = code; + apiPayload['code'] = code; } if (typeof activate !== 'undefined') { - payload['activate'] = activate; + apiPayload['activate'] = activate; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -1525,7 +1525,7 @@ export class Sites { 'post', uri, apiHeaders, - payload, + apiPayload, onProgress, ); } @@ -1592,9 +1592,9 @@ export class Sites { '{siteId}', encodeURIComponent(String(siteId)), ); - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof deploymentId !== 'undefined') { - payload['deploymentId'] = deploymentId; + apiPayload['deploymentId'] = deploymentId; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -1604,7 +1604,7 @@ export class Sites { accept: 'application/json', }; - return this.client.call('post', uri, apiHeaders, payload); + return this.client.call('post', uri, apiHeaders, apiPayload); } /** @@ -1749,24 +1749,24 @@ export class Sites { '{siteId}', encodeURIComponent(String(siteId)), ); - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof repository !== 'undefined') { - payload['repository'] = repository; + apiPayload['repository'] = repository; } if (typeof owner !== 'undefined') { - payload['owner'] = owner; + apiPayload['owner'] = owner; } if (typeof rootDirectory !== 'undefined') { - payload['rootDirectory'] = rootDirectory; + apiPayload['rootDirectory'] = rootDirectory; } if (typeof type !== 'undefined') { - payload['type'] = type; + apiPayload['type'] = type; } if (typeof reference !== 'undefined') { - payload['reference'] = reference; + apiPayload['reference'] = reference; } if (typeof activate !== 'undefined') { - payload['activate'] = activate; + apiPayload['activate'] = activate; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -1776,7 +1776,7 @@ export class Sites { accept: 'application/json', }; - return this.client.call('post', uri, apiHeaders, payload); + return this.client.call('post', uri, apiHeaders, apiPayload); } /** @@ -1874,15 +1874,15 @@ export class Sites { '{siteId}', encodeURIComponent(String(siteId)), ); - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof type !== 'undefined') { - payload['type'] = type; + apiPayload['type'] = type; } if (typeof reference !== 'undefined') { - payload['reference'] = reference; + apiPayload['reference'] = reference; } if (typeof activate !== 'undefined') { - payload['activate'] = activate; + apiPayload['activate'] = activate; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -1892,7 +1892,7 @@ export class Sites { accept: 'application/json', }; - return this.client.call('post', uri, apiHeaders, payload); + return this.client.call('post', uri, apiHeaders, apiPayload); } /** @@ -1959,7 +1959,7 @@ export class Sites { '{deploymentId}', encodeURIComponent(String(deploymentId)), ); - const payload: Payload = {}; + const apiPayload: Payload = {}; const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { @@ -1967,7 +1967,7 @@ export class Sites { accept: 'application/json', }; - return this.client.call('get', uri, apiHeaders, payload); + return this.client.call('get', uri, apiHeaders, apiPayload); } /** @@ -2031,7 +2031,7 @@ export class Sites { '{deploymentId}', encodeURIComponent(String(deploymentId)), ); - const payload: Payload = {}; + const apiPayload: Payload = {}; const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { @@ -2040,7 +2040,7 @@ export class Sites { accept: 'application/json', }; - return this.client.call('delete', uri, apiHeaders, payload); + return this.client.call('delete', uri, apiHeaders, apiPayload); } /** @@ -2133,19 +2133,21 @@ export class Sites { '{deploymentId}', encodeURIComponent(String(deploymentId)), ); - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof type !== 'undefined') { - payload['type'] = type; + apiPayload['type'] = type; } if (typeof token !== 'undefined') { - payload['token'] = token; + apiPayload['token'] = token; } const uri = new URL(this.client.config.endpoint + apiPath); - payload['project'] = this.client.config.project; - payload['impersonateuserid'] = this.client.config.impersonateuserid; + apiPayload['project'] = this.client.config.project; + apiPayload['impersonateuserid'] = this.client.config.impersonateuserid; - for (const [key, value] of Object.entries(Service.flatten(payload))) { + for (const [key, value] of Object.entries( + Service.flatten(apiPayload), + )) { uri.searchParams.append(key, value); } @@ -2216,7 +2218,7 @@ export class Sites { '{deploymentId}', encodeURIComponent(String(deploymentId)), ); - const payload: Payload = {}; + const apiPayload: Payload = {}; const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { @@ -2225,7 +2227,7 @@ export class Sites { accept: 'application/json', }; - return this.client.call('patch', uri, apiHeaders, payload); + return this.client.call('patch', uri, apiHeaders, apiPayload); } /** @@ -2293,12 +2295,12 @@ export class Sites { '{siteId}', encodeURIComponent(String(siteId)), ); - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof queries !== 'undefined') { - payload['queries'] = queries; + apiPayload['queries'] = queries; } if (typeof total !== 'undefined') { - payload['total'] = total; + apiPayload['total'] = total; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -2307,7 +2309,7 @@ export class Sites { accept: 'application/json', }; - return this.client.call('get', uri, apiHeaders, payload); + return this.client.call('get', uri, apiHeaders, apiPayload); } /** @@ -2363,7 +2365,7 @@ export class Sites { const apiPath = '/sites/{siteId}/logs/{logId}' .replace('{siteId}', encodeURIComponent(String(siteId))) .replace('{logId}', encodeURIComponent(String(logId))); - const payload: Payload = {}; + const apiPayload: Payload = {}; const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { @@ -2371,7 +2373,7 @@ export class Sites { accept: 'application/json', }; - return this.client.call('get', uri, apiHeaders, payload); + return this.client.call('get', uri, apiHeaders, apiPayload); } /** @@ -2424,7 +2426,7 @@ export class Sites { const apiPath = '/sites/{siteId}/logs/{logId}' .replace('{siteId}', encodeURIComponent(String(siteId))) .replace('{logId}', encodeURIComponent(String(logId))); - const payload: Payload = {}; + const apiPayload: Payload = {}; const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { @@ -2433,7 +2435,7 @@ export class Sites { accept: 'application/json', }; - return this.client.call('delete', uri, apiHeaders, payload); + return this.client.call('delete', uri, apiHeaders, apiPayload); } /** @@ -2501,12 +2503,12 @@ export class Sites { '{siteId}', encodeURIComponent(String(siteId)), ); - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof queries !== 'undefined') { - payload['queries'] = queries; + apiPayload['queries'] = queries; } if (typeof total !== 'undefined') { - payload['total'] = total; + apiPayload['total'] = total; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -2515,7 +2517,7 @@ export class Sites { accept: 'application/json', }; - return this.client.call('get', uri, apiHeaders, payload); + return this.client.call('get', uri, apiHeaders, apiPayload); } /** @@ -2621,18 +2623,18 @@ export class Sites { '{siteId}', encodeURIComponent(String(siteId)), ); - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof variableId !== 'undefined') { - payload['variableId'] = variableId; + apiPayload['variableId'] = variableId; } if (typeof key !== 'undefined') { - payload['key'] = key; + apiPayload['key'] = key; } if (typeof value !== 'undefined') { - payload['value'] = value; + apiPayload['value'] = value; } if (typeof secret !== 'undefined') { - payload['secret'] = secret; + apiPayload['secret'] = secret; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -2642,7 +2644,7 @@ export class Sites { accept: 'application/json', }; - return this.client.call('post', uri, apiHeaders, payload); + return this.client.call('post', uri, apiHeaders, apiPayload); } /** @@ -2703,7 +2705,7 @@ export class Sites { const apiPath = '/sites/{siteId}/variables/{variableId}' .replace('{siteId}', encodeURIComponent(String(siteId))) .replace('{variableId}', encodeURIComponent(String(variableId))); - const payload: Payload = {}; + const apiPayload: Payload = {}; const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { @@ -2711,7 +2713,7 @@ export class Sites { accept: 'application/json', }; - return this.client.call('get', uri, apiHeaders, payload); + return this.client.call('get', uri, apiHeaders, apiPayload); } /** @@ -2810,15 +2812,15 @@ export class Sites { const apiPath = '/sites/{siteId}/variables/{variableId}' .replace('{siteId}', encodeURIComponent(String(siteId))) .replace('{variableId}', encodeURIComponent(String(variableId))); - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof key !== 'undefined') { - payload['key'] = key; + apiPayload['key'] = key; } if (typeof value !== 'undefined') { - payload['value'] = value; + apiPayload['value'] = value; } if (typeof secret !== 'undefined') { - payload['secret'] = secret; + apiPayload['secret'] = secret; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -2828,7 +2830,7 @@ export class Sites { accept: 'application/json', }; - return this.client.call('put', uri, apiHeaders, payload); + return this.client.call('put', uri, apiHeaders, apiPayload); } /** @@ -2886,7 +2888,7 @@ export class Sites { const apiPath = '/sites/{siteId}/variables/{variableId}' .replace('{siteId}', encodeURIComponent(String(siteId))) .replace('{variableId}', encodeURIComponent(String(variableId))); - const payload: Payload = {}; + const apiPayload: Payload = {}; const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { @@ -2895,6 +2897,6 @@ export class Sites { accept: 'application/json', }; - return this.client.call('delete', uri, apiHeaders, payload); + return this.client.call('delete', uri, apiHeaders, apiPayload); } } diff --git a/src/services/storage.ts b/src/services/storage.ts index 55efaa67..63612948 100644 --- a/src/services/storage.ts +++ b/src/services/storage.ts @@ -77,15 +77,15 @@ export class Storage { const total = params.total; const apiPath = '/storage/buckets'; - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof queries !== 'undefined') { - payload['queries'] = queries; + apiPayload['queries'] = queries; } if (typeof search !== 'undefined') { - payload['search'] = search; + apiPayload['search'] = search; } if (typeof total !== 'undefined') { - payload['total'] = total; + apiPayload['total'] = total; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -94,7 +94,7 @@ export class Storage { accept: 'application/json', }; - return this.client.call('get', uri, apiHeaders, payload); + return this.client.call('get', uri, apiHeaders, apiPayload); } /** @@ -256,39 +256,39 @@ export class Storage { throw new AppwriteException('Missing required parameter: "name"'); } const apiPath = '/storage/buckets'; - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof bucketId !== 'undefined') { - payload['bucketId'] = bucketId; + apiPayload['bucketId'] = bucketId; } if (typeof name !== 'undefined') { - payload['name'] = name; + apiPayload['name'] = name; } if (typeof permissions !== 'undefined') { - payload['permissions'] = permissions; + apiPayload['permissions'] = permissions; } if (typeof fileSecurity !== 'undefined') { - payload['fileSecurity'] = fileSecurity; + apiPayload['fileSecurity'] = fileSecurity; } if (typeof enabled !== 'undefined') { - payload['enabled'] = enabled; + apiPayload['enabled'] = enabled; } if (typeof maximumFileSize !== 'undefined') { - payload['maximumFileSize'] = maximumFileSize; + apiPayload['maximumFileSize'] = maximumFileSize; } if (typeof allowedFileExtensions !== 'undefined') { - payload['allowedFileExtensions'] = allowedFileExtensions; + apiPayload['allowedFileExtensions'] = allowedFileExtensions; } if (typeof compression !== 'undefined') { - payload['compression'] = compression; + apiPayload['compression'] = compression; } if (typeof encryption !== 'undefined') { - payload['encryption'] = encryption; + apiPayload['encryption'] = encryption; } if (typeof antivirus !== 'undefined') { - payload['antivirus'] = antivirus; + apiPayload['antivirus'] = antivirus; } if (typeof transformations !== 'undefined') { - payload['transformations'] = transformations; + apiPayload['transformations'] = transformations; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -298,7 +298,7 @@ export class Storage { accept: 'application/json', }; - return this.client.call('post', uri, apiHeaders, payload); + return this.client.call('post', uri, apiHeaders, apiPayload); } /** @@ -346,7 +346,7 @@ export class Storage { '{bucketId}', encodeURIComponent(String(bucketId)), ); - const payload: Payload = {}; + const apiPayload: Payload = {}; const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { @@ -354,7 +354,7 @@ export class Storage { accept: 'application/json', }; - return this.client.call('get', uri, apiHeaders, payload); + return this.client.call('get', uri, apiHeaders, apiPayload); } /** @@ -519,36 +519,36 @@ export class Storage { '{bucketId}', encodeURIComponent(String(bucketId)), ); - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof name !== 'undefined') { - payload['name'] = name; + apiPayload['name'] = name; } if (typeof permissions !== 'undefined') { - payload['permissions'] = permissions; + apiPayload['permissions'] = permissions; } if (typeof fileSecurity !== 'undefined') { - payload['fileSecurity'] = fileSecurity; + apiPayload['fileSecurity'] = fileSecurity; } if (typeof enabled !== 'undefined') { - payload['enabled'] = enabled; + apiPayload['enabled'] = enabled; } if (typeof maximumFileSize !== 'undefined') { - payload['maximumFileSize'] = maximumFileSize; + apiPayload['maximumFileSize'] = maximumFileSize; } if (typeof allowedFileExtensions !== 'undefined') { - payload['allowedFileExtensions'] = allowedFileExtensions; + apiPayload['allowedFileExtensions'] = allowedFileExtensions; } if (typeof compression !== 'undefined') { - payload['compression'] = compression; + apiPayload['compression'] = compression; } if (typeof encryption !== 'undefined') { - payload['encryption'] = encryption; + apiPayload['encryption'] = encryption; } if (typeof antivirus !== 'undefined') { - payload['antivirus'] = antivirus; + apiPayload['antivirus'] = antivirus; } if (typeof transformations !== 'undefined') { - payload['transformations'] = transformations; + apiPayload['transformations'] = transformations; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -558,7 +558,7 @@ export class Storage { accept: 'application/json', }; - return this.client.call('put', uri, apiHeaders, payload); + return this.client.call('put', uri, apiHeaders, apiPayload); } /** @@ -604,7 +604,7 @@ export class Storage { '{bucketId}', encodeURIComponent(String(bucketId)), ); - const payload: Payload = {}; + const apiPayload: Payload = {}; const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { @@ -613,7 +613,7 @@ export class Storage { accept: 'application/json', }; - return this.client.call('delete', uri, apiHeaders, payload); + return this.client.call('delete', uri, apiHeaders, apiPayload); } /** @@ -701,15 +701,15 @@ export class Storage { '{bucketId}', encodeURIComponent(String(bucketId)), ); - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof queries !== 'undefined') { - payload['queries'] = queries; + apiPayload['queries'] = queries; } if (typeof search !== 'undefined') { - payload['search'] = search; + apiPayload['search'] = search; } if (typeof total !== 'undefined') { - payload['total'] = total; + apiPayload['total'] = total; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -718,7 +718,7 @@ export class Storage { accept: 'application/json', }; - return this.client.call('get', uri, apiHeaders, payload); + return this.client.call('get', uri, apiHeaders, apiPayload); } /** @@ -849,18 +849,18 @@ export class Storage { '{bucketId}', encodeURIComponent(String(bucketId)), ); - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof fileId !== 'undefined') { - payload['fileId'] = fileId; + apiPayload['fileId'] = fileId; } if (typeof file !== 'undefined') { - payload['file'] = file; + apiPayload['file'] = file; } if (typeof permissions !== 'undefined') { - payload['permissions'] = permissions; + apiPayload['permissions'] = permissions; } if (typeof folder !== 'undefined') { - payload['folder'] = folder; + apiPayload['folder'] = folder; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -874,7 +874,7 @@ export class Storage { 'post', uri, apiHeaders, - payload, + apiPayload, onProgress, ); } @@ -934,7 +934,7 @@ export class Storage { const apiPath = '/storage/buckets/{bucketId}/files/{fileId}' .replace('{bucketId}', encodeURIComponent(String(bucketId))) .replace('{fileId}', encodeURIComponent(String(fileId))); - const payload: Payload = {}; + const apiPayload: Payload = {}; const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { @@ -942,7 +942,7 @@ export class Storage { accept: 'application/json', }; - return this.client.call('get', uri, apiHeaders, payload); + return this.client.call('get', uri, apiHeaders, apiPayload); } /** @@ -1032,12 +1032,12 @@ export class Storage { const apiPath = '/storage/buckets/{bucketId}/files/{fileId}' .replace('{bucketId}', encodeURIComponent(String(bucketId))) .replace('{fileId}', encodeURIComponent(String(fileId))); - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof name !== 'undefined') { - payload['name'] = name; + apiPayload['name'] = name; } if (typeof permissions !== 'undefined') { - payload['permissions'] = permissions; + apiPayload['permissions'] = permissions; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -1047,7 +1047,7 @@ export class Storage { accept: 'application/json', }; - return this.client.call('put', uri, apiHeaders, payload); + return this.client.call('put', uri, apiHeaders, apiPayload); } /** @@ -1105,7 +1105,7 @@ export class Storage { const apiPath = '/storage/buckets/{bucketId}/files/{fileId}' .replace('{bucketId}', encodeURIComponent(String(bucketId))) .replace('{fileId}', encodeURIComponent(String(fileId))); - const payload: Payload = {}; + const apiPayload: Payload = {}; const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { @@ -1114,7 +1114,7 @@ export class Storage { accept: 'application/json', }; - return this.client.call('delete', uri, apiHeaders, payload); + return this.client.call('delete', uri, apiHeaders, apiPayload); } /** @@ -1182,16 +1182,18 @@ export class Storage { const apiPath = '/storage/buckets/{bucketId}/files/{fileId}/download' .replace('{bucketId}', encodeURIComponent(String(bucketId))) .replace('{fileId}', encodeURIComponent(String(fileId))); - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof token !== 'undefined') { - payload['token'] = token; + apiPayload['token'] = token; } const uri = new URL(this.client.config.endpoint + apiPath); - payload['project'] = this.client.config.project; - payload['impersonateuserid'] = this.client.config.impersonateuserid; + apiPayload['project'] = this.client.config.project; + apiPayload['impersonateuserid'] = this.client.config.impersonateuserid; - for (const [key, value] of Object.entries(Service.flatten(payload))) { + for (const [key, value] of Object.entries( + Service.flatten(apiPayload), + )) { uri.searchParams.append(key, value); } @@ -1389,49 +1391,51 @@ export class Storage { const apiPath = '/storage/buckets/{bucketId}/files/{fileId}/preview' .replace('{bucketId}', encodeURIComponent(String(bucketId))) .replace('{fileId}', encodeURIComponent(String(fileId))); - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof width !== 'undefined') { - payload['width'] = width; + apiPayload['width'] = width; } if (typeof height !== 'undefined') { - payload['height'] = height; + apiPayload['height'] = height; } if (typeof gravity !== 'undefined') { - payload['gravity'] = gravity; + apiPayload['gravity'] = gravity; } if (typeof quality !== 'undefined') { - payload['quality'] = quality; + apiPayload['quality'] = quality; } if (typeof borderWidth !== 'undefined') { - payload['borderWidth'] = borderWidth; + apiPayload['borderWidth'] = borderWidth; } if (typeof borderColor !== 'undefined') { - payload['borderColor'] = borderColor; + apiPayload['borderColor'] = borderColor; } if (typeof borderRadius !== 'undefined') { - payload['borderRadius'] = borderRadius; + apiPayload['borderRadius'] = borderRadius; } if (typeof opacity !== 'undefined') { - payload['opacity'] = opacity; + apiPayload['opacity'] = opacity; } if (typeof rotation !== 'undefined') { - payload['rotation'] = rotation; + apiPayload['rotation'] = rotation; } if (typeof background !== 'undefined') { - payload['background'] = background; + apiPayload['background'] = background; } if (typeof output !== 'undefined') { - payload['output'] = output; + apiPayload['output'] = output; } if (typeof token !== 'undefined') { - payload['token'] = token; + apiPayload['token'] = token; } const uri = new URL(this.client.config.endpoint + apiPath); - payload['project'] = this.client.config.project; - payload['impersonateuserid'] = this.client.config.impersonateuserid; + apiPayload['project'] = this.client.config.project; + apiPayload['impersonateuserid'] = this.client.config.impersonateuserid; - for (const [key, value] of Object.entries(Service.flatten(payload))) { + for (const [key, value] of Object.entries( + Service.flatten(apiPayload), + )) { uri.searchParams.append(key, value); } @@ -1503,16 +1507,18 @@ export class Storage { const apiPath = '/storage/buckets/{bucketId}/files/{fileId}/view' .replace('{bucketId}', encodeURIComponent(String(bucketId))) .replace('{fileId}', encodeURIComponent(String(fileId))); - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof token !== 'undefined') { - payload['token'] = token; + apiPayload['token'] = token; } const uri = new URL(this.client.config.endpoint + apiPath); - payload['project'] = this.client.config.project; - payload['impersonateuserid'] = this.client.config.impersonateuserid; + apiPayload['project'] = this.client.config.project; + apiPayload['impersonateuserid'] = this.client.config.impersonateuserid; - for (const [key, value] of Object.entries(Service.flatten(payload))) { + for (const [key, value] of Object.entries( + Service.flatten(apiPayload), + )) { uri.searchParams.append(key, value); } diff --git a/src/services/tables-db.ts b/src/services/tables-db.ts index dd0cb4f8..a472f937 100644 --- a/src/services/tables-db.ts +++ b/src/services/tables-db.ts @@ -72,15 +72,15 @@ export class TablesDB { const total = params.total; const apiPath = '/tablesdb'; - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof queries !== 'undefined') { - payload['queries'] = queries; + apiPayload['queries'] = queries; } if (typeof search !== 'undefined') { - payload['search'] = search; + apiPayload['search'] = search; } if (typeof total !== 'undefined') { - payload['total'] = total; + apiPayload['total'] = total; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -89,7 +89,7 @@ export class TablesDB { accept: 'application/json', }; - return this.client.call('get', uri, apiHeaders, payload); + return this.client.call('get', uri, apiHeaders, apiPayload); } /** @@ -197,24 +197,24 @@ export class TablesDB { throw new AppwriteException('Missing required parameter: "name"'); } const apiPath = '/tablesdb'; - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof databaseId !== 'undefined') { - payload['databaseId'] = databaseId; + apiPayload['databaseId'] = databaseId; } if (typeof name !== 'undefined') { - payload['name'] = name; + apiPayload['name'] = name; } if (typeof enabled !== 'undefined') { - payload['enabled'] = enabled; + apiPayload['enabled'] = enabled; } if (typeof specification !== 'undefined') { - payload['specification'] = specification; + apiPayload['specification'] = specification; } if (typeof replicas !== 'undefined') { - payload['replicas'] = replicas; + apiPayload['replicas'] = replicas; } if (typeof syncMode !== 'undefined') { - payload['syncMode'] = syncMode; + apiPayload['syncMode'] = syncMode; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -224,7 +224,7 @@ export class TablesDB { accept: 'application/json', }; - return this.client.call('post', uri, apiHeaders, payload); + return this.client.call('post', uri, apiHeaders, apiPayload); } /** @@ -235,7 +235,7 @@ export class TablesDB { */ listSpecifications(): Promise { const apiPath = '/tablesdb/specifications'; - const payload: Payload = {}; + const apiPayload: Payload = {}; const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { @@ -243,7 +243,7 @@ export class TablesDB { accept: 'application/json', }; - return this.client.call('get', uri, apiHeaders, payload); + return this.client.call('get', uri, apiHeaders, apiPayload); } /** @@ -286,9 +286,9 @@ export class TablesDB { const queries = params.queries; const apiPath = '/tablesdb/transactions'; - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof queries !== 'undefined') { - payload['queries'] = queries; + apiPayload['queries'] = queries; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -297,7 +297,7 @@ export class TablesDB { accept: 'application/json', }; - return this.client.call('get', uri, apiHeaders, payload); + return this.client.call('get', uri, apiHeaders, apiPayload); } /** @@ -338,9 +338,9 @@ export class TablesDB { const ttl = params.ttl; const apiPath = '/tablesdb/transactions'; - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof ttl !== 'undefined') { - payload['ttl'] = ttl; + apiPayload['ttl'] = ttl; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -350,7 +350,7 @@ export class TablesDB { accept: 'application/json', }; - return this.client.call('post', uri, apiHeaders, payload); + return this.client.call('post', uri, apiHeaders, apiPayload); } /** @@ -400,7 +400,7 @@ export class TablesDB { '{transactionId}', encodeURIComponent(String(transactionId)), ); - const payload: Payload = {}; + const apiPayload: Payload = {}; const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { @@ -408,7 +408,7 @@ export class TablesDB { accept: 'application/json', }; - return this.client.call('get', uri, apiHeaders, payload); + return this.client.call('get', uri, apiHeaders, apiPayload); } /** @@ -483,12 +483,12 @@ export class TablesDB { '{transactionId}', encodeURIComponent(String(transactionId)), ); - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof commit !== 'undefined') { - payload['commit'] = commit; + apiPayload['commit'] = commit; } if (typeof rollback !== 'undefined') { - payload['rollback'] = rollback; + apiPayload['rollback'] = rollback; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -498,7 +498,7 @@ export class TablesDB { accept: 'application/json', }; - return this.client.call('patch', uri, apiHeaders, payload); + return this.client.call('patch', uri, apiHeaders, apiPayload); } /** @@ -546,7 +546,7 @@ export class TablesDB { '{transactionId}', encodeURIComponent(String(transactionId)), ); - const payload: Payload = {}; + const apiPayload: Payload = {}; const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { @@ -555,7 +555,7 @@ export class TablesDB { accept: 'application/json', }; - return this.client.call('delete', uri, apiHeaders, payload); + return this.client.call('delete', uri, apiHeaders, apiPayload); } /** @@ -619,9 +619,9 @@ export class TablesDB { '{transactionId}', encodeURIComponent(String(transactionId)), ); - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof operations !== 'undefined') { - payload['operations'] = operations; + apiPayload['operations'] = operations; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -631,7 +631,7 @@ export class TablesDB { accept: 'application/json', }; - return this.client.call('post', uri, apiHeaders, payload); + return this.client.call('post', uri, apiHeaders, apiPayload); } /** @@ -679,7 +679,7 @@ export class TablesDB { '{databaseId}', encodeURIComponent(String(databaseId)), ); - const payload: Payload = {}; + const apiPayload: Payload = {}; const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { @@ -687,7 +687,7 @@ export class TablesDB { accept: 'application/json', }; - return this.client.call('get', uri, apiHeaders, payload); + return this.client.call('get', uri, apiHeaders, apiPayload); } /** @@ -793,21 +793,21 @@ export class TablesDB { '{databaseId}', encodeURIComponent(String(databaseId)), ); - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof name !== 'undefined') { - payload['name'] = name; + apiPayload['name'] = name; } if (typeof enabled !== 'undefined') { - payload['enabled'] = enabled; + apiPayload['enabled'] = enabled; } if (typeof specification !== 'undefined') { - payload['specification'] = specification; + apiPayload['specification'] = specification; } if (typeof replicas !== 'undefined') { - payload['replicas'] = replicas; + apiPayload['replicas'] = replicas; } if (typeof syncMode !== 'undefined') { - payload['syncMode'] = syncMode; + apiPayload['syncMode'] = syncMode; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -817,7 +817,7 @@ export class TablesDB { accept: 'application/json', }; - return this.client.call('put', uri, apiHeaders, payload); + return this.client.call('put', uri, apiHeaders, apiPayload); } /** @@ -863,7 +863,7 @@ export class TablesDB { '{databaseId}', encodeURIComponent(String(databaseId)), ); - const payload: Payload = {}; + const apiPayload: Payload = {}; const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { @@ -872,7 +872,7 @@ export class TablesDB { accept: 'application/json', }; - return this.client.call('delete', uri, apiHeaders, payload); + return this.client.call('delete', uri, apiHeaders, apiPayload); } /** @@ -935,9 +935,9 @@ export class TablesDB { '{databaseId}', encodeURIComponent(String(databaseId)), ); - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof targetReplicaId !== 'undefined') { - payload['targetReplicaId'] = targetReplicaId; + apiPayload['targetReplicaId'] = targetReplicaId; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -947,7 +947,7 @@ export class TablesDB { accept: 'application/json', }; - return this.client.call('post', uri, apiHeaders, payload); + return this.client.call('post', uri, apiHeaders, apiPayload); } /** @@ -997,7 +997,7 @@ export class TablesDB { '{databaseId}', encodeURIComponent(String(databaseId)), ); - const payload: Payload = {}; + const apiPayload: Payload = {}; const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { @@ -1005,7 +1005,7 @@ export class TablesDB { accept: 'application/json', }; - return this.client.call('get', uri, apiHeaders, payload); + return this.client.call('get', uri, apiHeaders, apiPayload); } /** @@ -1089,12 +1089,12 @@ export class TablesDB { '{databaseId}', encodeURIComponent(String(databaseId)), ); - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof specification !== 'undefined') { - payload['specification'] = specification; + apiPayload['specification'] = specification; } if (typeof autoCutover !== 'undefined') { - payload['autoCutover'] = autoCutover; + apiPayload['autoCutover'] = autoCutover; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -1104,7 +1104,7 @@ export class TablesDB { accept: 'application/json', }; - return this.client.call('post', uri, apiHeaders, payload); + return this.client.call('post', uri, apiHeaders, apiPayload); } /** @@ -1170,7 +1170,7 @@ export class TablesDB { const apiPath = '/tablesdb/{databaseId}/migrations/{migrationId}' .replace('{databaseId}', encodeURIComponent(String(databaseId))) .replace('{migrationId}', encodeURIComponent(String(migrationId))); - const payload: Payload = {}; + const apiPayload: Payload = {}; const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { @@ -1178,7 +1178,7 @@ export class TablesDB { accept: 'application/json', }; - return this.client.call('get', uri, apiHeaders, payload); + return this.client.call('get', uri, apiHeaders, apiPayload); } /** @@ -1241,7 +1241,7 @@ export class TablesDB { const apiPath = '/tablesdb/{databaseId}/migrations/{migrationId}' .replace('{databaseId}', encodeURIComponent(String(databaseId))) .replace('{migrationId}', encodeURIComponent(String(migrationId))); - const payload: Payload = {}; + const apiPayload: Payload = {}; const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { @@ -1250,7 +1250,7 @@ export class TablesDB { accept: 'application/json', }; - return this.client.call('delete', uri, apiHeaders, payload); + return this.client.call('delete', uri, apiHeaders, apiPayload); } /** @@ -1320,7 +1320,7 @@ export class TablesDB { '{migrationId}', encodeURIComponent(String(migrationId)), ); - const payload: Payload = {}; + const apiPayload: Payload = {}; const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { @@ -1329,7 +1329,7 @@ export class TablesDB { accept: 'application/json', }; - return this.client.call('post', uri, apiHeaders, payload); + return this.client.call('post', uri, apiHeaders, apiPayload); } /** @@ -1417,15 +1417,15 @@ export class TablesDB { '{databaseId}', encodeURIComponent(String(databaseId)), ); - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof status !== 'undefined') { - payload['status'] = status; + apiPayload['status'] = status; } if (typeof limit !== 'undefined') { - payload['limit'] = limit; + apiPayload['limit'] = limit; } if (typeof offset !== 'undefined') { - payload['offset'] = offset; + apiPayload['offset'] = offset; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -1434,7 +1434,7 @@ export class TablesDB { accept: 'application/json', }; - return this.client.call('get', uri, apiHeaders, payload); + return this.client.call('get', uri, apiHeaders, apiPayload); } /** @@ -1484,7 +1484,7 @@ export class TablesDB { '{databaseId}', encodeURIComponent(String(databaseId)), ); - const payload: Payload = {}; + const apiPayload: Payload = {}; const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { @@ -1492,7 +1492,7 @@ export class TablesDB { accept: 'application/json', }; - return this.client.call('get', uri, apiHeaders, payload); + return this.client.call('get', uri, apiHeaders, apiPayload); } /** @@ -1540,7 +1540,7 @@ export class TablesDB { '{databaseId}', encodeURIComponent(String(databaseId)), ); - const payload: Payload = {}; + const apiPayload: Payload = {}; const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { @@ -1548,7 +1548,7 @@ export class TablesDB { accept: 'application/json', }; - return this.client.call('get', uri, apiHeaders, payload); + return this.client.call('get', uri, apiHeaders, apiPayload); } /** @@ -1636,15 +1636,15 @@ export class TablesDB { '{databaseId}', encodeURIComponent(String(databaseId)), ); - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof queries !== 'undefined') { - payload['queries'] = queries; + apiPayload['queries'] = queries; } if (typeof search !== 'undefined') { - payload['search'] = search; + apiPayload['search'] = search; } if (typeof total !== 'undefined') { - payload['total'] = total; + apiPayload['total'] = total; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -1653,7 +1653,7 @@ export class TablesDB { accept: 'application/json', }; - return this.client.call('get', uri, apiHeaders, payload); + return this.client.call('get', uri, apiHeaders, apiPayload); } /** @@ -1793,27 +1793,27 @@ export class TablesDB { '{databaseId}', encodeURIComponent(String(databaseId)), ); - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof tableId !== 'undefined') { - payload['tableId'] = tableId; + apiPayload['tableId'] = tableId; } if (typeof name !== 'undefined') { - payload['name'] = name; + apiPayload['name'] = name; } if (typeof permissions !== 'undefined') { - payload['permissions'] = permissions; + apiPayload['permissions'] = permissions; } if (typeof rowSecurity !== 'undefined') { - payload['rowSecurity'] = rowSecurity; + apiPayload['rowSecurity'] = rowSecurity; } if (typeof enabled !== 'undefined') { - payload['enabled'] = enabled; + apiPayload['enabled'] = enabled; } if (typeof columns !== 'undefined') { - payload['columns'] = columns; + apiPayload['columns'] = columns; } if (typeof indexes !== 'undefined') { - payload['indexes'] = indexes; + apiPayload['indexes'] = indexes; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -1823,7 +1823,7 @@ export class TablesDB { accept: 'application/json', }; - return this.client.call('post', uri, apiHeaders, payload); + return this.client.call('post', uri, apiHeaders, apiPayload); } /** @@ -1886,7 +1886,7 @@ export class TablesDB { const apiPath = '/tablesdb/{databaseId}/tables/{tableId}' .replace('{databaseId}', encodeURIComponent(String(databaseId))) .replace('{tableId}', encodeURIComponent(String(tableId))); - const payload: Payload = {}; + const apiPayload: Payload = {}; const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { @@ -1894,7 +1894,7 @@ export class TablesDB { accept: 'application/json', }; - return this.client.call('get', uri, apiHeaders, payload); + return this.client.call('get', uri, apiHeaders, apiPayload); } /** @@ -2013,21 +2013,21 @@ export class TablesDB { const apiPath = '/tablesdb/{databaseId}/tables/{tableId}' .replace('{databaseId}', encodeURIComponent(String(databaseId))) .replace('{tableId}', encodeURIComponent(String(tableId))); - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof name !== 'undefined') { - payload['name'] = name; + apiPayload['name'] = name; } if (typeof permissions !== 'undefined') { - payload['permissions'] = permissions; + apiPayload['permissions'] = permissions; } if (typeof rowSecurity !== 'undefined') { - payload['rowSecurity'] = rowSecurity; + apiPayload['rowSecurity'] = rowSecurity; } if (typeof enabled !== 'undefined') { - payload['enabled'] = enabled; + apiPayload['enabled'] = enabled; } if (typeof purge !== 'undefined') { - payload['purge'] = purge; + apiPayload['purge'] = purge; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -2037,7 +2037,7 @@ export class TablesDB { accept: 'application/json', }; - return this.client.call('put', uri, apiHeaders, payload); + return this.client.call('put', uri, apiHeaders, apiPayload); } /** @@ -2097,7 +2097,7 @@ export class TablesDB { const apiPath = '/tablesdb/{databaseId}/tables/{tableId}' .replace('{databaseId}', encodeURIComponent(String(databaseId))) .replace('{tableId}', encodeURIComponent(String(tableId))); - const payload: Payload = {}; + const apiPayload: Payload = {}; const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { @@ -2106,7 +2106,7 @@ export class TablesDB { accept: 'application/json', }; - return this.client.call('delete', uri, apiHeaders, payload); + return this.client.call('delete', uri, apiHeaders, apiPayload); } /** @@ -2198,12 +2198,12 @@ export class TablesDB { const apiPath = '/tablesdb/{databaseId}/tables/{tableId}/columns' .replace('{databaseId}', encodeURIComponent(String(databaseId))) .replace('{tableId}', encodeURIComponent(String(tableId))); - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof queries !== 'undefined') { - payload['queries'] = queries; + apiPayload['queries'] = queries; } if (typeof total !== 'undefined') { - payload['total'] = total; + apiPayload['total'] = total; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -2212,7 +2212,7 @@ export class TablesDB { accept: 'application/json', }; - return this.client.call('get', uri, apiHeaders, payload); + return this.client.call('get', uri, apiHeaders, apiPayload); } /** @@ -2358,24 +2358,24 @@ export class TablesDB { const apiPath = '/tablesdb/{databaseId}/tables/{tableId}/columns/bigint' .replace('{databaseId}', encodeURIComponent(String(databaseId))) .replace('{tableId}', encodeURIComponent(String(tableId))); - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof key !== 'undefined') { - payload['key'] = key; + apiPayload['key'] = key; } if (typeof required !== 'undefined') { - payload['required'] = required; + apiPayload['required'] = required; } if (typeof min !== 'undefined') { - payload['min'] = min; + apiPayload['min'] = min; } if (typeof max !== 'undefined') { - payload['max'] = max; + apiPayload['max'] = max; } if (typeof xdefault !== 'undefined') { - payload['default'] = xdefault; + apiPayload['default'] = xdefault; } if (typeof array !== 'undefined') { - payload['array'] = array; + apiPayload['array'] = array; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -2385,7 +2385,7 @@ export class TablesDB { accept: 'application/json', }; - return this.client.call('post', uri, apiHeaders, payload); + return this.client.call('post', uri, apiHeaders, apiPayload); } /** @@ -2538,21 +2538,21 @@ export class TablesDB { .replace('{databaseId}', encodeURIComponent(String(databaseId))) .replace('{tableId}', encodeURIComponent(String(tableId))) .replace('{key}', encodeURIComponent(String(key))); - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof required !== 'undefined') { - payload['required'] = required; + apiPayload['required'] = required; } if (typeof min !== 'undefined') { - payload['min'] = min; + apiPayload['min'] = min; } if (typeof max !== 'undefined') { - payload['max'] = max; + apiPayload['max'] = max; } if (typeof xdefault !== 'undefined') { - payload['default'] = xdefault; + apiPayload['default'] = xdefault; } if (typeof newKey !== 'undefined') { - payload['newKey'] = newKey; + apiPayload['newKey'] = newKey; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -2562,7 +2562,7 @@ export class TablesDB { accept: 'application/json', }; - return this.client.call('patch', uri, apiHeaders, payload); + return this.client.call('patch', uri, apiHeaders, apiPayload); } /** @@ -2683,18 +2683,18 @@ export class TablesDB { '/tablesdb/{databaseId}/tables/{tableId}/columns/boolean' .replace('{databaseId}', encodeURIComponent(String(databaseId))) .replace('{tableId}', encodeURIComponent(String(tableId))); - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof key !== 'undefined') { - payload['key'] = key; + apiPayload['key'] = key; } if (typeof required !== 'undefined') { - payload['required'] = required; + apiPayload['required'] = required; } if (typeof xdefault !== 'undefined') { - payload['default'] = xdefault; + apiPayload['default'] = xdefault; } if (typeof array !== 'undefined') { - payload['array'] = array; + apiPayload['array'] = array; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -2704,7 +2704,7 @@ export class TablesDB { accept: 'application/json', }; - return this.client.call('post', uri, apiHeaders, payload); + return this.client.call('post', uri, apiHeaders, apiPayload); } /** @@ -2829,15 +2829,15 @@ export class TablesDB { .replace('{databaseId}', encodeURIComponent(String(databaseId))) .replace('{tableId}', encodeURIComponent(String(tableId))) .replace('{key}', encodeURIComponent(String(key))); - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof required !== 'undefined') { - payload['required'] = required; + apiPayload['required'] = required; } if (typeof xdefault !== 'undefined') { - payload['default'] = xdefault; + apiPayload['default'] = xdefault; } if (typeof newKey !== 'undefined') { - payload['newKey'] = newKey; + apiPayload['newKey'] = newKey; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -2847,7 +2847,7 @@ export class TablesDB { accept: 'application/json', }; - return this.client.call('patch', uri, apiHeaders, payload); + return this.client.call('patch', uri, apiHeaders, apiPayload); } /** @@ -2966,18 +2966,18 @@ export class TablesDB { '/tablesdb/{databaseId}/tables/{tableId}/columns/datetime' .replace('{databaseId}', encodeURIComponent(String(databaseId))) .replace('{tableId}', encodeURIComponent(String(tableId))); - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof key !== 'undefined') { - payload['key'] = key; + apiPayload['key'] = key; } if (typeof required !== 'undefined') { - payload['required'] = required; + apiPayload['required'] = required; } if (typeof xdefault !== 'undefined') { - payload['default'] = xdefault; + apiPayload['default'] = xdefault; } if (typeof array !== 'undefined') { - payload['array'] = array; + apiPayload['array'] = array; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -2987,7 +2987,7 @@ export class TablesDB { accept: 'application/json', }; - return this.client.call('post', uri, apiHeaders, payload); + return this.client.call('post', uri, apiHeaders, apiPayload); } /** @@ -3112,15 +3112,15 @@ export class TablesDB { .replace('{databaseId}', encodeURIComponent(String(databaseId))) .replace('{tableId}', encodeURIComponent(String(tableId))) .replace('{key}', encodeURIComponent(String(key))); - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof required !== 'undefined') { - payload['required'] = required; + apiPayload['required'] = required; } if (typeof xdefault !== 'undefined') { - payload['default'] = xdefault; + apiPayload['default'] = xdefault; } if (typeof newKey !== 'undefined') { - payload['newKey'] = newKey; + apiPayload['newKey'] = newKey; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -3130,7 +3130,7 @@ export class TablesDB { accept: 'application/json', }; - return this.client.call('patch', uri, apiHeaders, payload); + return this.client.call('patch', uri, apiHeaders, apiPayload); } /** @@ -3250,18 +3250,18 @@ export class TablesDB { const apiPath = '/tablesdb/{databaseId}/tables/{tableId}/columns/email' .replace('{databaseId}', encodeURIComponent(String(databaseId))) .replace('{tableId}', encodeURIComponent(String(tableId))); - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof key !== 'undefined') { - payload['key'] = key; + apiPayload['key'] = key; } if (typeof required !== 'undefined') { - payload['required'] = required; + apiPayload['required'] = required; } if (typeof xdefault !== 'undefined') { - payload['default'] = xdefault; + apiPayload['default'] = xdefault; } if (typeof array !== 'undefined') { - payload['array'] = array; + apiPayload['array'] = array; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -3271,7 +3271,7 @@ export class TablesDB { accept: 'application/json', }; - return this.client.call('post', uri, apiHeaders, payload); + return this.client.call('post', uri, apiHeaders, apiPayload); } /** @@ -3398,15 +3398,15 @@ export class TablesDB { .replace('{databaseId}', encodeURIComponent(String(databaseId))) .replace('{tableId}', encodeURIComponent(String(tableId))) .replace('{key}', encodeURIComponent(String(key))); - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof required !== 'undefined') { - payload['required'] = required; + apiPayload['required'] = required; } if (typeof xdefault !== 'undefined') { - payload['default'] = xdefault; + apiPayload['default'] = xdefault; } if (typeof newKey !== 'undefined') { - payload['newKey'] = newKey; + apiPayload['newKey'] = newKey; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -3416,7 +3416,7 @@ export class TablesDB { accept: 'application/json', }; - return this.client.call('patch', uri, apiHeaders, payload); + return this.client.call('patch', uri, apiHeaders, apiPayload); } /** @@ -3548,21 +3548,21 @@ export class TablesDB { const apiPath = '/tablesdb/{databaseId}/tables/{tableId}/columns/enum' .replace('{databaseId}', encodeURIComponent(String(databaseId))) .replace('{tableId}', encodeURIComponent(String(tableId))); - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof key !== 'undefined') { - payload['key'] = key; + apiPayload['key'] = key; } if (typeof elements !== 'undefined') { - payload['elements'] = elements; + apiPayload['elements'] = elements; } if (typeof required !== 'undefined') { - payload['required'] = required; + apiPayload['required'] = required; } if (typeof xdefault !== 'undefined') { - payload['default'] = xdefault; + apiPayload['default'] = xdefault; } if (typeof array !== 'undefined') { - payload['array'] = array; + apiPayload['array'] = array; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -3572,7 +3572,7 @@ export class TablesDB { accept: 'application/json', }; - return this.client.call('post', uri, apiHeaders, payload); + return this.client.call('post', uri, apiHeaders, apiPayload); } /** @@ -3713,18 +3713,18 @@ export class TablesDB { .replace('{databaseId}', encodeURIComponent(String(databaseId))) .replace('{tableId}', encodeURIComponent(String(tableId))) .replace('{key}', encodeURIComponent(String(key))); - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof elements !== 'undefined') { - payload['elements'] = elements; + apiPayload['elements'] = elements; } if (typeof required !== 'undefined') { - payload['required'] = required; + apiPayload['required'] = required; } if (typeof xdefault !== 'undefined') { - payload['default'] = xdefault; + apiPayload['default'] = xdefault; } if (typeof newKey !== 'undefined') { - payload['newKey'] = newKey; + apiPayload['newKey'] = newKey; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -3734,7 +3734,7 @@ export class TablesDB { accept: 'application/json', }; - return this.client.call('patch', uri, apiHeaders, payload); + return this.client.call('patch', uri, apiHeaders, apiPayload); } /** @@ -3880,24 +3880,24 @@ export class TablesDB { const apiPath = '/tablesdb/{databaseId}/tables/{tableId}/columns/float' .replace('{databaseId}', encodeURIComponent(String(databaseId))) .replace('{tableId}', encodeURIComponent(String(tableId))); - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof key !== 'undefined') { - payload['key'] = key; + apiPayload['key'] = key; } if (typeof required !== 'undefined') { - payload['required'] = required; + apiPayload['required'] = required; } if (typeof min !== 'undefined') { - payload['min'] = min; + apiPayload['min'] = min; } if (typeof max !== 'undefined') { - payload['max'] = max; + apiPayload['max'] = max; } if (typeof xdefault !== 'undefined') { - payload['default'] = xdefault; + apiPayload['default'] = xdefault; } if (typeof array !== 'undefined') { - payload['array'] = array; + apiPayload['array'] = array; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -3907,7 +3907,7 @@ export class TablesDB { accept: 'application/json', }; - return this.client.call('post', uri, apiHeaders, payload); + return this.client.call('post', uri, apiHeaders, apiPayload); } /** @@ -4060,21 +4060,21 @@ export class TablesDB { .replace('{databaseId}', encodeURIComponent(String(databaseId))) .replace('{tableId}', encodeURIComponent(String(tableId))) .replace('{key}', encodeURIComponent(String(key))); - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof required !== 'undefined') { - payload['required'] = required; + apiPayload['required'] = required; } if (typeof min !== 'undefined') { - payload['min'] = min; + apiPayload['min'] = min; } if (typeof max !== 'undefined') { - payload['max'] = max; + apiPayload['max'] = max; } if (typeof xdefault !== 'undefined') { - payload['default'] = xdefault; + apiPayload['default'] = xdefault; } if (typeof newKey !== 'undefined') { - payload['newKey'] = newKey; + apiPayload['newKey'] = newKey; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -4084,7 +4084,7 @@ export class TablesDB { accept: 'application/json', }; - return this.client.call('patch', uri, apiHeaders, payload); + return this.client.call('patch', uri, apiHeaders, apiPayload); } /** @@ -4231,24 +4231,24 @@ export class TablesDB { '/tablesdb/{databaseId}/tables/{tableId}/columns/integer' .replace('{databaseId}', encodeURIComponent(String(databaseId))) .replace('{tableId}', encodeURIComponent(String(tableId))); - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof key !== 'undefined') { - payload['key'] = key; + apiPayload['key'] = key; } if (typeof required !== 'undefined') { - payload['required'] = required; + apiPayload['required'] = required; } if (typeof min !== 'undefined') { - payload['min'] = min; + apiPayload['min'] = min; } if (typeof max !== 'undefined') { - payload['max'] = max; + apiPayload['max'] = max; } if (typeof xdefault !== 'undefined') { - payload['default'] = xdefault; + apiPayload['default'] = xdefault; } if (typeof array !== 'undefined') { - payload['array'] = array; + apiPayload['array'] = array; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -4258,7 +4258,7 @@ export class TablesDB { accept: 'application/json', }; - return this.client.call('post', uri, apiHeaders, payload); + return this.client.call('post', uri, apiHeaders, apiPayload); } /** @@ -4411,21 +4411,21 @@ export class TablesDB { .replace('{databaseId}', encodeURIComponent(String(databaseId))) .replace('{tableId}', encodeURIComponent(String(tableId))) .replace('{key}', encodeURIComponent(String(key))); - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof required !== 'undefined') { - payload['required'] = required; + apiPayload['required'] = required; } if (typeof min !== 'undefined') { - payload['min'] = min; + apiPayload['min'] = min; } if (typeof max !== 'undefined') { - payload['max'] = max; + apiPayload['max'] = max; } if (typeof xdefault !== 'undefined') { - payload['default'] = xdefault; + apiPayload['default'] = xdefault; } if (typeof newKey !== 'undefined') { - payload['newKey'] = newKey; + apiPayload['newKey'] = newKey; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -4435,7 +4435,7 @@ export class TablesDB { accept: 'application/json', }; - return this.client.call('patch', uri, apiHeaders, payload); + return this.client.call('patch', uri, apiHeaders, apiPayload); } /** @@ -4555,18 +4555,18 @@ export class TablesDB { const apiPath = '/tablesdb/{databaseId}/tables/{tableId}/columns/ip' .replace('{databaseId}', encodeURIComponent(String(databaseId))) .replace('{tableId}', encodeURIComponent(String(tableId))); - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof key !== 'undefined') { - payload['key'] = key; + apiPayload['key'] = key; } if (typeof required !== 'undefined') { - payload['required'] = required; + apiPayload['required'] = required; } if (typeof xdefault !== 'undefined') { - payload['default'] = xdefault; + apiPayload['default'] = xdefault; } if (typeof array !== 'undefined') { - payload['array'] = array; + apiPayload['array'] = array; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -4576,7 +4576,7 @@ export class TablesDB { accept: 'application/json', }; - return this.client.call('post', uri, apiHeaders, payload); + return this.client.call('post', uri, apiHeaders, apiPayload); } /** @@ -4703,15 +4703,15 @@ export class TablesDB { .replace('{databaseId}', encodeURIComponent(String(databaseId))) .replace('{tableId}', encodeURIComponent(String(tableId))) .replace('{key}', encodeURIComponent(String(key))); - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof required !== 'undefined') { - payload['required'] = required; + apiPayload['required'] = required; } if (typeof xdefault !== 'undefined') { - payload['default'] = xdefault; + apiPayload['default'] = xdefault; } if (typeof newKey !== 'undefined') { - payload['newKey'] = newKey; + apiPayload['newKey'] = newKey; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -4721,7 +4721,7 @@ export class TablesDB { accept: 'application/json', }; - return this.client.call('patch', uri, apiHeaders, payload); + return this.client.call('patch', uri, apiHeaders, apiPayload); } /** @@ -4830,15 +4830,15 @@ export class TablesDB { const apiPath = '/tablesdb/{databaseId}/tables/{tableId}/columns/line' .replace('{databaseId}', encodeURIComponent(String(databaseId))) .replace('{tableId}', encodeURIComponent(String(tableId))); - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof key !== 'undefined') { - payload['key'] = key; + apiPayload['key'] = key; } if (typeof required !== 'undefined') { - payload['required'] = required; + apiPayload['required'] = required; } if (typeof xdefault !== 'undefined') { - payload['default'] = xdefault; + apiPayload['default'] = xdefault; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -4848,7 +4848,7 @@ export class TablesDB { accept: 'application/json', }; - return this.client.call('post', uri, apiHeaders, payload); + return this.client.call('post', uri, apiHeaders, apiPayload); } /** @@ -4968,15 +4968,15 @@ export class TablesDB { .replace('{databaseId}', encodeURIComponent(String(databaseId))) .replace('{tableId}', encodeURIComponent(String(tableId))) .replace('{key}', encodeURIComponent(String(key))); - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof required !== 'undefined') { - payload['required'] = required; + apiPayload['required'] = required; } if (typeof xdefault !== 'undefined') { - payload['default'] = xdefault; + apiPayload['default'] = xdefault; } if (typeof newKey !== 'undefined') { - payload['newKey'] = newKey; + apiPayload['newKey'] = newKey; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -4986,7 +4986,7 @@ export class TablesDB { accept: 'application/json', }; - return this.client.call('patch', uri, apiHeaders, payload); + return this.client.call('patch', uri, apiHeaders, apiPayload); } /** @@ -5116,21 +5116,21 @@ export class TablesDB { '/tablesdb/{databaseId}/tables/{tableId}/columns/longtext' .replace('{databaseId}', encodeURIComponent(String(databaseId))) .replace('{tableId}', encodeURIComponent(String(tableId))); - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof key !== 'undefined') { - payload['key'] = key; + apiPayload['key'] = key; } if (typeof required !== 'undefined') { - payload['required'] = required; + apiPayload['required'] = required; } if (typeof xdefault !== 'undefined') { - payload['default'] = xdefault; + apiPayload['default'] = xdefault; } if (typeof array !== 'undefined') { - payload['array'] = array; + apiPayload['array'] = array; } if (typeof encrypt !== 'undefined') { - payload['encrypt'] = encrypt; + apiPayload['encrypt'] = encrypt; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -5140,7 +5140,7 @@ export class TablesDB { accept: 'application/json', }; - return this.client.call('post', uri, apiHeaders, payload); + return this.client.call('post', uri, apiHeaders, apiPayload); } /** @@ -5267,15 +5267,15 @@ export class TablesDB { .replace('{databaseId}', encodeURIComponent(String(databaseId))) .replace('{tableId}', encodeURIComponent(String(tableId))) .replace('{key}', encodeURIComponent(String(key))); - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof required !== 'undefined') { - payload['required'] = required; + apiPayload['required'] = required; } if (typeof xdefault !== 'undefined') { - payload['default'] = xdefault; + apiPayload['default'] = xdefault; } if (typeof newKey !== 'undefined') { - payload['newKey'] = newKey; + apiPayload['newKey'] = newKey; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -5285,7 +5285,7 @@ export class TablesDB { accept: 'application/json', }; - return this.client.call('patch', uri, apiHeaders, payload); + return this.client.call('patch', uri, apiHeaders, apiPayload); } /** @@ -5415,21 +5415,21 @@ export class TablesDB { '/tablesdb/{databaseId}/tables/{tableId}/columns/mediumtext' .replace('{databaseId}', encodeURIComponent(String(databaseId))) .replace('{tableId}', encodeURIComponent(String(tableId))); - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof key !== 'undefined') { - payload['key'] = key; + apiPayload['key'] = key; } if (typeof required !== 'undefined') { - payload['required'] = required; + apiPayload['required'] = required; } if (typeof xdefault !== 'undefined') { - payload['default'] = xdefault; + apiPayload['default'] = xdefault; } if (typeof array !== 'undefined') { - payload['array'] = array; + apiPayload['array'] = array; } if (typeof encrypt !== 'undefined') { - payload['encrypt'] = encrypt; + apiPayload['encrypt'] = encrypt; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -5439,7 +5439,7 @@ export class TablesDB { accept: 'application/json', }; - return this.client.call('post', uri, apiHeaders, payload); + return this.client.call('post', uri, apiHeaders, apiPayload); } /** @@ -5566,15 +5566,15 @@ export class TablesDB { .replace('{databaseId}', encodeURIComponent(String(databaseId))) .replace('{tableId}', encodeURIComponent(String(tableId))) .replace('{key}', encodeURIComponent(String(key))); - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof required !== 'undefined') { - payload['required'] = required; + apiPayload['required'] = required; } if (typeof xdefault !== 'undefined') { - payload['default'] = xdefault; + apiPayload['default'] = xdefault; } if (typeof newKey !== 'undefined') { - payload['newKey'] = newKey; + apiPayload['newKey'] = newKey; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -5584,7 +5584,7 @@ export class TablesDB { accept: 'application/json', }; - return this.client.call('patch', uri, apiHeaders, payload); + return this.client.call('patch', uri, apiHeaders, apiPayload); } /** @@ -5693,15 +5693,15 @@ export class TablesDB { const apiPath = '/tablesdb/{databaseId}/tables/{tableId}/columns/point' .replace('{databaseId}', encodeURIComponent(String(databaseId))) .replace('{tableId}', encodeURIComponent(String(tableId))); - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof key !== 'undefined') { - payload['key'] = key; + apiPayload['key'] = key; } if (typeof required !== 'undefined') { - payload['required'] = required; + apiPayload['required'] = required; } if (typeof xdefault !== 'undefined') { - payload['default'] = xdefault; + apiPayload['default'] = xdefault; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -5711,7 +5711,7 @@ export class TablesDB { accept: 'application/json', }; - return this.client.call('post', uri, apiHeaders, payload); + return this.client.call('post', uri, apiHeaders, apiPayload); } /** @@ -5831,15 +5831,15 @@ export class TablesDB { .replace('{databaseId}', encodeURIComponent(String(databaseId))) .replace('{tableId}', encodeURIComponent(String(tableId))) .replace('{key}', encodeURIComponent(String(key))); - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof required !== 'undefined') { - payload['required'] = required; + apiPayload['required'] = required; } if (typeof xdefault !== 'undefined') { - payload['default'] = xdefault; + apiPayload['default'] = xdefault; } if (typeof newKey !== 'undefined') { - payload['newKey'] = newKey; + apiPayload['newKey'] = newKey; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -5849,7 +5849,7 @@ export class TablesDB { accept: 'application/json', }; - return this.client.call('patch', uri, apiHeaders, payload); + return this.client.call('patch', uri, apiHeaders, apiPayload); } /** @@ -5959,15 +5959,15 @@ export class TablesDB { '/tablesdb/{databaseId}/tables/{tableId}/columns/polygon' .replace('{databaseId}', encodeURIComponent(String(databaseId))) .replace('{tableId}', encodeURIComponent(String(tableId))); - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof key !== 'undefined') { - payload['key'] = key; + apiPayload['key'] = key; } if (typeof required !== 'undefined') { - payload['required'] = required; + apiPayload['required'] = required; } if (typeof xdefault !== 'undefined') { - payload['default'] = xdefault; + apiPayload['default'] = xdefault; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -5977,7 +5977,7 @@ export class TablesDB { accept: 'application/json', }; - return this.client.call('post', uri, apiHeaders, payload); + return this.client.call('post', uri, apiHeaders, apiPayload); } /** @@ -6097,15 +6097,15 @@ export class TablesDB { .replace('{databaseId}', encodeURIComponent(String(databaseId))) .replace('{tableId}', encodeURIComponent(String(tableId))) .replace('{key}', encodeURIComponent(String(key))); - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof required !== 'undefined') { - payload['required'] = required; + apiPayload['required'] = required; } if (typeof xdefault !== 'undefined') { - payload['default'] = xdefault; + apiPayload['default'] = xdefault; } if (typeof newKey !== 'undefined') { - payload['newKey'] = newKey; + apiPayload['newKey'] = newKey; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -6115,7 +6115,7 @@ export class TablesDB { accept: 'application/json', }; - return this.client.call('patch', uri, apiHeaders, payload); + return this.client.call('patch', uri, apiHeaders, apiPayload); } /** @@ -6262,24 +6262,24 @@ export class TablesDB { '/tablesdb/{databaseId}/tables/{tableId}/columns/relationship' .replace('{databaseId}', encodeURIComponent(String(databaseId))) .replace('{tableId}', encodeURIComponent(String(tableId))); - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof relatedTableId !== 'undefined') { - payload['relatedTableId'] = relatedTableId; + apiPayload['relatedTableId'] = relatedTableId; } if (typeof type !== 'undefined') { - payload['type'] = type; + apiPayload['type'] = type; } if (typeof twoWay !== 'undefined') { - payload['twoWay'] = twoWay; + apiPayload['twoWay'] = twoWay; } if (typeof key !== 'undefined') { - payload['key'] = key; + apiPayload['key'] = key; } if (typeof twoWayKey !== 'undefined') { - payload['twoWayKey'] = twoWayKey; + apiPayload['twoWayKey'] = twoWayKey; } if (typeof onDelete !== 'undefined') { - payload['onDelete'] = onDelete; + apiPayload['onDelete'] = onDelete; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -6289,7 +6289,7 @@ export class TablesDB { accept: 'application/json', }; - return this.client.call('post', uri, apiHeaders, payload); + return this.client.call('post', uri, apiHeaders, apiPayload); } /** @@ -6397,12 +6397,12 @@ export class TablesDB { .replace('{databaseId}', encodeURIComponent(String(databaseId))) .replace('{tableId}', encodeURIComponent(String(tableId))) .replace('{key}', encodeURIComponent(String(key))); - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof onDelete !== 'undefined') { - payload['onDelete'] = onDelete; + apiPayload['onDelete'] = onDelete; } if (typeof newKey !== 'undefined') { - payload['newKey'] = newKey; + apiPayload['newKey'] = newKey; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -6412,7 +6412,7 @@ export class TablesDB { accept: 'application/json', }; - return this.client.call('patch', uri, apiHeaders, payload); + return this.client.call('patch', uri, apiHeaders, apiPayload); } /** @@ -6562,24 +6562,24 @@ export class TablesDB { const apiPath = '/tablesdb/{databaseId}/tables/{tableId}/columns/string' .replace('{databaseId}', encodeURIComponent(String(databaseId))) .replace('{tableId}', encodeURIComponent(String(tableId))); - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof key !== 'undefined') { - payload['key'] = key; + apiPayload['key'] = key; } if (typeof size !== 'undefined') { - payload['size'] = size; + apiPayload['size'] = size; } if (typeof required !== 'undefined') { - payload['required'] = required; + apiPayload['required'] = required; } if (typeof xdefault !== 'undefined') { - payload['default'] = xdefault; + apiPayload['default'] = xdefault; } if (typeof array !== 'undefined') { - payload['array'] = array; + apiPayload['array'] = array; } if (typeof encrypt !== 'undefined') { - payload['encrypt'] = encrypt; + apiPayload['encrypt'] = encrypt; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -6589,7 +6589,7 @@ export class TablesDB { accept: 'application/json', }; - return this.client.call('post', uri, apiHeaders, payload); + return this.client.call('post', uri, apiHeaders, apiPayload); } /** @@ -6726,18 +6726,18 @@ export class TablesDB { .replace('{databaseId}', encodeURIComponent(String(databaseId))) .replace('{tableId}', encodeURIComponent(String(tableId))) .replace('{key}', encodeURIComponent(String(key))); - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof required !== 'undefined') { - payload['required'] = required; + apiPayload['required'] = required; } if (typeof xdefault !== 'undefined') { - payload['default'] = xdefault; + apiPayload['default'] = xdefault; } if (typeof size !== 'undefined') { - payload['size'] = size; + apiPayload['size'] = size; } if (typeof newKey !== 'undefined') { - payload['newKey'] = newKey; + apiPayload['newKey'] = newKey; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -6747,7 +6747,7 @@ export class TablesDB { accept: 'application/json', }; - return this.client.call('patch', uri, apiHeaders, payload); + return this.client.call('patch', uri, apiHeaders, apiPayload); } /** @@ -6876,21 +6876,21 @@ export class TablesDB { const apiPath = '/tablesdb/{databaseId}/tables/{tableId}/columns/text' .replace('{databaseId}', encodeURIComponent(String(databaseId))) .replace('{tableId}', encodeURIComponent(String(tableId))); - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof key !== 'undefined') { - payload['key'] = key; + apiPayload['key'] = key; } if (typeof required !== 'undefined') { - payload['required'] = required; + apiPayload['required'] = required; } if (typeof xdefault !== 'undefined') { - payload['default'] = xdefault; + apiPayload['default'] = xdefault; } if (typeof array !== 'undefined') { - payload['array'] = array; + apiPayload['array'] = array; } if (typeof encrypt !== 'undefined') { - payload['encrypt'] = encrypt; + apiPayload['encrypt'] = encrypt; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -6900,7 +6900,7 @@ export class TablesDB { accept: 'application/json', }; - return this.client.call('post', uri, apiHeaders, payload); + return this.client.call('post', uri, apiHeaders, apiPayload); } /** @@ -7027,15 +7027,15 @@ export class TablesDB { .replace('{databaseId}', encodeURIComponent(String(databaseId))) .replace('{tableId}', encodeURIComponent(String(tableId))) .replace('{key}', encodeURIComponent(String(key))); - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof required !== 'undefined') { - payload['required'] = required; + apiPayload['required'] = required; } if (typeof xdefault !== 'undefined') { - payload['default'] = xdefault; + apiPayload['default'] = xdefault; } if (typeof newKey !== 'undefined') { - payload['newKey'] = newKey; + apiPayload['newKey'] = newKey; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -7045,7 +7045,7 @@ export class TablesDB { accept: 'application/json', }; - return this.client.call('patch', uri, apiHeaders, payload); + return this.client.call('patch', uri, apiHeaders, apiPayload); } /** @@ -7165,18 +7165,18 @@ export class TablesDB { const apiPath = '/tablesdb/{databaseId}/tables/{tableId}/columns/url' .replace('{databaseId}', encodeURIComponent(String(databaseId))) .replace('{tableId}', encodeURIComponent(String(tableId))); - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof key !== 'undefined') { - payload['key'] = key; + apiPayload['key'] = key; } if (typeof required !== 'undefined') { - payload['required'] = required; + apiPayload['required'] = required; } if (typeof xdefault !== 'undefined') { - payload['default'] = xdefault; + apiPayload['default'] = xdefault; } if (typeof array !== 'undefined') { - payload['array'] = array; + apiPayload['array'] = array; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -7186,7 +7186,7 @@ export class TablesDB { accept: 'application/json', }; - return this.client.call('post', uri, apiHeaders, payload); + return this.client.call('post', uri, apiHeaders, apiPayload); } /** @@ -7313,15 +7313,15 @@ export class TablesDB { .replace('{databaseId}', encodeURIComponent(String(databaseId))) .replace('{tableId}', encodeURIComponent(String(tableId))) .replace('{key}', encodeURIComponent(String(key))); - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof required !== 'undefined') { - payload['required'] = required; + apiPayload['required'] = required; } if (typeof xdefault !== 'undefined') { - payload['default'] = xdefault; + apiPayload['default'] = xdefault; } if (typeof newKey !== 'undefined') { - payload['newKey'] = newKey; + apiPayload['newKey'] = newKey; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -7331,7 +7331,7 @@ export class TablesDB { accept: 'application/json', }; - return this.client.call('patch', uri, apiHeaders, payload); + return this.client.call('patch', uri, apiHeaders, apiPayload); } /** @@ -7481,24 +7481,24 @@ export class TablesDB { '/tablesdb/{databaseId}/tables/{tableId}/columns/varchar' .replace('{databaseId}', encodeURIComponent(String(databaseId))) .replace('{tableId}', encodeURIComponent(String(tableId))); - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof key !== 'undefined') { - payload['key'] = key; + apiPayload['key'] = key; } if (typeof size !== 'undefined') { - payload['size'] = size; + apiPayload['size'] = size; } if (typeof required !== 'undefined') { - payload['required'] = required; + apiPayload['required'] = required; } if (typeof xdefault !== 'undefined') { - payload['default'] = xdefault; + apiPayload['default'] = xdefault; } if (typeof array !== 'undefined') { - payload['array'] = array; + apiPayload['array'] = array; } if (typeof encrypt !== 'undefined') { - payload['encrypt'] = encrypt; + apiPayload['encrypt'] = encrypt; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -7508,7 +7508,7 @@ export class TablesDB { accept: 'application/json', }; - return this.client.call('post', uri, apiHeaders, payload); + return this.client.call('post', uri, apiHeaders, apiPayload); } /** @@ -7644,18 +7644,18 @@ export class TablesDB { .replace('{databaseId}', encodeURIComponent(String(databaseId))) .replace('{tableId}', encodeURIComponent(String(tableId))) .replace('{key}', encodeURIComponent(String(key))); - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof required !== 'undefined') { - payload['required'] = required; + apiPayload['required'] = required; } if (typeof xdefault !== 'undefined') { - payload['default'] = xdefault; + apiPayload['default'] = xdefault; } if (typeof size !== 'undefined') { - payload['size'] = size; + apiPayload['size'] = size; } if (typeof newKey !== 'undefined') { - payload['newKey'] = newKey; + apiPayload['newKey'] = newKey; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -7665,7 +7665,7 @@ export class TablesDB { accept: 'application/json', }; - return this.client.call('patch', uri, apiHeaders, payload); + return this.client.call('patch', uri, apiHeaders, apiPayload); } /** @@ -7800,7 +7800,7 @@ export class TablesDB { .replace('{databaseId}', encodeURIComponent(String(databaseId))) .replace('{tableId}', encodeURIComponent(String(tableId))) .replace('{key}', encodeURIComponent(String(key))); - const payload: Payload = {}; + const apiPayload: Payload = {}; const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { @@ -7808,7 +7808,7 @@ export class TablesDB { accept: 'application/json', }; - return this.client.call('get', uri, apiHeaders, payload); + return this.client.call('get', uri, apiHeaders, apiPayload); } /** @@ -7882,7 +7882,7 @@ export class TablesDB { .replace('{databaseId}', encodeURIComponent(String(databaseId))) .replace('{tableId}', encodeURIComponent(String(tableId))) .replace('{key}', encodeURIComponent(String(key))); - const payload: Payload = {}; + const apiPayload: Payload = {}; const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { @@ -7891,7 +7891,7 @@ export class TablesDB { accept: 'application/json', }; - return this.client.call('delete', uri, apiHeaders, payload); + return this.client.call('delete', uri, apiHeaders, apiPayload); } /** @@ -7983,12 +7983,12 @@ export class TablesDB { const apiPath = '/tablesdb/{databaseId}/tables/{tableId}/indexes' .replace('{databaseId}', encodeURIComponent(String(databaseId))) .replace('{tableId}', encodeURIComponent(String(tableId))); - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof queries !== 'undefined') { - payload['queries'] = queries; + apiPayload['queries'] = queries; } if (typeof total !== 'undefined') { - payload['total'] = total; + apiPayload['total'] = total; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -7997,7 +7997,7 @@ export class TablesDB { accept: 'application/json', }; - return this.client.call('get', uri, apiHeaders, payload); + return this.client.call('get', uri, apiHeaders, apiPayload); } /** @@ -8136,21 +8136,21 @@ export class TablesDB { const apiPath = '/tablesdb/{databaseId}/tables/{tableId}/indexes' .replace('{databaseId}', encodeURIComponent(String(databaseId))) .replace('{tableId}', encodeURIComponent(String(tableId))); - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof key !== 'undefined') { - payload['key'] = key; + apiPayload['key'] = key; } if (typeof type !== 'undefined') { - payload['type'] = type; + apiPayload['type'] = type; } if (typeof columns !== 'undefined') { - payload['columns'] = columns; + apiPayload['columns'] = columns; } if (typeof orders !== 'undefined') { - payload['orders'] = orders; + apiPayload['orders'] = orders; } if (typeof lengths !== 'undefined') { - payload['lengths'] = lengths; + apiPayload['lengths'] = lengths; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -8160,7 +8160,7 @@ export class TablesDB { accept: 'application/json', }; - return this.client.call('post', uri, apiHeaders, payload); + return this.client.call('post', uri, apiHeaders, apiPayload); } /** @@ -8238,7 +8238,7 @@ export class TablesDB { .replace('{databaseId}', encodeURIComponent(String(databaseId))) .replace('{tableId}', encodeURIComponent(String(tableId))) .replace('{key}', encodeURIComponent(String(key))); - const payload: Payload = {}; + const apiPayload: Payload = {}; const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { @@ -8246,7 +8246,7 @@ export class TablesDB { accept: 'application/json', }; - return this.client.call('get', uri, apiHeaders, payload); + return this.client.call('get', uri, apiHeaders, apiPayload); } /** @@ -8320,7 +8320,7 @@ export class TablesDB { .replace('{databaseId}', encodeURIComponent(String(databaseId))) .replace('{tableId}', encodeURIComponent(String(tableId))) .replace('{key}', encodeURIComponent(String(key))); - const payload: Payload = {}; + const apiPayload: Payload = {}; const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { @@ -8329,7 +8329,7 @@ export class TablesDB { accept: 'application/json', }; - return this.client.call('delete', uri, apiHeaders, payload); + return this.client.call('delete', uri, apiHeaders, apiPayload); } /** @@ -8439,18 +8439,18 @@ export class TablesDB { const apiPath = '/tablesdb/{databaseId}/tables/{tableId}/rows' .replace('{databaseId}', encodeURIComponent(String(databaseId))) .replace('{tableId}', encodeURIComponent(String(tableId))); - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof queries !== 'undefined') { - payload['queries'] = queries; + apiPayload['queries'] = queries; } if (typeof transactionId !== 'undefined') { - payload['transactionId'] = transactionId; + apiPayload['transactionId'] = transactionId; } if (typeof total !== 'undefined') { - payload['total'] = total; + apiPayload['total'] = total; } if (typeof ttl !== 'undefined') { - payload['ttl'] = ttl; + apiPayload['ttl'] = ttl; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -8459,7 +8459,7 @@ export class TablesDB { accept: 'application/json', }; - return this.client.call('get', uri, apiHeaders, payload); + return this.client.call('get', uri, apiHeaders, apiPayload); } /** @@ -8595,18 +8595,18 @@ export class TablesDB { const apiPath = '/tablesdb/{databaseId}/tables/{tableId}/rows' .replace('{databaseId}', encodeURIComponent(String(databaseId))) .replace('{tableId}', encodeURIComponent(String(tableId))); - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof rowId !== 'undefined') { - payload['rowId'] = rowId; + apiPayload['rowId'] = rowId; } if (typeof data !== 'undefined') { - payload['data'] = data; + apiPayload['data'] = data; } if (typeof permissions !== 'undefined') { - payload['permissions'] = permissions; + apiPayload['permissions'] = permissions; } if (typeof transactionId !== 'undefined') { - payload['transactionId'] = transactionId; + apiPayload['transactionId'] = transactionId; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -8616,7 +8616,7 @@ export class TablesDB { accept: 'application/json', }; - return this.client.call('post', uri, apiHeaders, payload); + return this.client.call('post', uri, apiHeaders, apiPayload); } /** @@ -8711,12 +8711,12 @@ export class TablesDB { const apiPath = '/tablesdb/{databaseId}/tables/{tableId}/rows' .replace('{databaseId}', encodeURIComponent(String(databaseId))) .replace('{tableId}', encodeURIComponent(String(tableId))); - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof rows !== 'undefined') { - payload['rows'] = rows; + apiPayload['rows'] = rows; } if (typeof transactionId !== 'undefined') { - payload['transactionId'] = transactionId; + apiPayload['transactionId'] = transactionId; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -8726,7 +8726,7 @@ export class TablesDB { accept: 'application/json', }; - return this.client.call('post', uri, apiHeaders, payload); + return this.client.call('post', uri, apiHeaders, apiPayload); } /** @@ -8823,12 +8823,12 @@ export class TablesDB { const apiPath = '/tablesdb/{databaseId}/tables/{tableId}/rows' .replace('{databaseId}', encodeURIComponent(String(databaseId))) .replace('{tableId}', encodeURIComponent(String(tableId))); - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof rows !== 'undefined') { - payload['rows'] = rows; + apiPayload['rows'] = rows; } if (typeof transactionId !== 'undefined') { - payload['transactionId'] = transactionId; + apiPayload['transactionId'] = transactionId; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -8838,7 +8838,7 @@ export class TablesDB { accept: 'application/json', }; - return this.client.call('put', uri, apiHeaders, payload); + return this.client.call('put', uri, apiHeaders, apiPayload); } /** @@ -8939,15 +8939,15 @@ export class TablesDB { const apiPath = '/tablesdb/{databaseId}/tables/{tableId}/rows' .replace('{databaseId}', encodeURIComponent(String(databaseId))) .replace('{tableId}', encodeURIComponent(String(tableId))); - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof data !== 'undefined') { - payload['data'] = data; + apiPayload['data'] = data; } if (typeof queries !== 'undefined') { - payload['queries'] = queries; + apiPayload['queries'] = queries; } if (typeof transactionId !== 'undefined') { - payload['transactionId'] = transactionId; + apiPayload['transactionId'] = transactionId; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -8957,7 +8957,7 @@ export class TablesDB { accept: 'application/json', }; - return this.client.call('patch', uri, apiHeaders, payload); + return this.client.call('patch', uri, apiHeaders, apiPayload); } /** @@ -9049,12 +9049,12 @@ export class TablesDB { const apiPath = '/tablesdb/{databaseId}/tables/{tableId}/rows' .replace('{databaseId}', encodeURIComponent(String(databaseId))) .replace('{tableId}', encodeURIComponent(String(tableId))); - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof queries !== 'undefined') { - payload['queries'] = queries; + apiPayload['queries'] = queries; } if (typeof transactionId !== 'undefined') { - payload['transactionId'] = transactionId; + apiPayload['transactionId'] = transactionId; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -9064,7 +9064,7 @@ export class TablesDB { accept: 'application/json', }; - return this.client.call('delete', uri, apiHeaders, payload); + return this.client.call('delete', uri, apiHeaders, apiPayload); } /** @@ -9169,12 +9169,12 @@ export class TablesDB { .replace('{databaseId}', encodeURIComponent(String(databaseId))) .replace('{tableId}', encodeURIComponent(String(tableId))) .replace('{rowId}', encodeURIComponent(String(rowId))); - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof queries !== 'undefined') { - payload['queries'] = queries; + apiPayload['queries'] = queries; } if (typeof transactionId !== 'undefined') { - payload['transactionId'] = transactionId; + apiPayload['transactionId'] = transactionId; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -9183,7 +9183,7 @@ export class TablesDB { accept: 'application/json', }; - return this.client.call('get', uri, apiHeaders, payload); + return this.client.call('get', uri, apiHeaders, apiPayload); } /** @@ -9320,15 +9320,15 @@ export class TablesDB { .replace('{databaseId}', encodeURIComponent(String(databaseId))) .replace('{tableId}', encodeURIComponent(String(tableId))) .replace('{rowId}', encodeURIComponent(String(rowId))); - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof data !== 'undefined') { - payload['data'] = data; + apiPayload['data'] = data; } if (typeof permissions !== 'undefined') { - payload['permissions'] = permissions; + apiPayload['permissions'] = permissions; } if (typeof transactionId !== 'undefined') { - payload['transactionId'] = transactionId; + apiPayload['transactionId'] = transactionId; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -9338,7 +9338,7 @@ export class TablesDB { accept: 'application/json', }; - return this.client.call('put', uri, apiHeaders, payload); + return this.client.call('put', uri, apiHeaders, apiPayload); } /** @@ -9475,15 +9475,15 @@ export class TablesDB { .replace('{databaseId}', encodeURIComponent(String(databaseId))) .replace('{tableId}', encodeURIComponent(String(tableId))) .replace('{rowId}', encodeURIComponent(String(rowId))); - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof data !== 'undefined') { - payload['data'] = data; + apiPayload['data'] = data; } if (typeof permissions !== 'undefined') { - payload['permissions'] = permissions; + apiPayload['permissions'] = permissions; } if (typeof transactionId !== 'undefined') { - payload['transactionId'] = transactionId; + apiPayload['transactionId'] = transactionId; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -9493,7 +9493,7 @@ export class TablesDB { accept: 'application/json', }; - return this.client.call('patch', uri, apiHeaders, payload); + return this.client.call('patch', uri, apiHeaders, apiPayload); } /** @@ -9589,9 +9589,9 @@ export class TablesDB { .replace('{databaseId}', encodeURIComponent(String(databaseId))) .replace('{tableId}', encodeURIComponent(String(tableId))) .replace('{rowId}', encodeURIComponent(String(rowId))); - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof transactionId !== 'undefined') { - payload['transactionId'] = transactionId; + apiPayload['transactionId'] = transactionId; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -9601,7 +9601,7 @@ export class TablesDB { accept: 'application/json', }; - return this.client.call('delete', uri, apiHeaders, payload); + return this.client.call('delete', uri, apiHeaders, apiPayload); } /** @@ -9729,15 +9729,15 @@ export class TablesDB { .replace('{tableId}', encodeURIComponent(String(tableId))) .replace('{rowId}', encodeURIComponent(String(rowId))) .replace('{column}', encodeURIComponent(String(column))); - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof value !== 'undefined') { - payload['value'] = value; + apiPayload['value'] = value; } if (typeof min !== 'undefined') { - payload['min'] = min; + apiPayload['min'] = min; } if (typeof transactionId !== 'undefined') { - payload['transactionId'] = transactionId; + apiPayload['transactionId'] = transactionId; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -9747,7 +9747,7 @@ export class TablesDB { accept: 'application/json', }; - return this.client.call('patch', uri, apiHeaders, payload); + return this.client.call('patch', uri, apiHeaders, apiPayload); } /** @@ -9875,15 +9875,15 @@ export class TablesDB { .replace('{tableId}', encodeURIComponent(String(tableId))) .replace('{rowId}', encodeURIComponent(String(rowId))) .replace('{column}', encodeURIComponent(String(column))); - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof value !== 'undefined') { - payload['value'] = value; + apiPayload['value'] = value; } if (typeof max !== 'undefined') { - payload['max'] = max; + apiPayload['max'] = max; } if (typeof transactionId !== 'undefined') { - payload['transactionId'] = transactionId; + apiPayload['transactionId'] = transactionId; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -9893,6 +9893,6 @@ export class TablesDB { accept: 'application/json', }; - return this.client.call('patch', uri, apiHeaders, payload); + return this.client.call('patch', uri, apiHeaders, apiPayload); } } diff --git a/src/services/teams.ts b/src/services/teams.ts index 54aacf19..34ff9368 100644 --- a/src/services/teams.ts +++ b/src/services/teams.ts @@ -70,15 +70,15 @@ export class Teams { const total = params.total; const apiPath = '/teams'; - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof queries !== 'undefined') { - payload['queries'] = queries; + apiPayload['queries'] = queries; } if (typeof search !== 'undefined') { - payload['search'] = search; + apiPayload['search'] = search; } if (typeof total !== 'undefined') { - payload['total'] = total; + apiPayload['total'] = total; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -87,7 +87,7 @@ export class Teams { accept: 'application/json', }; - return this.client.call('get', uri, apiHeaders, payload); + return this.client.call('get', uri, apiHeaders, apiPayload); } /** @@ -157,15 +157,15 @@ export class Teams { throw new AppwriteException('Missing required parameter: "name"'); } const apiPath = '/teams'; - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof teamId !== 'undefined') { - payload['teamId'] = teamId; + apiPayload['teamId'] = teamId; } if (typeof name !== 'undefined') { - payload['name'] = name; + apiPayload['name'] = name; } if (typeof roles !== 'undefined') { - payload['roles'] = roles; + apiPayload['roles'] = roles; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -175,7 +175,7 @@ export class Teams { accept: 'application/json', }; - return this.client.call('post', uri, apiHeaders, payload); + return this.client.call('post', uri, apiHeaders, apiPayload); } /** @@ -225,7 +225,7 @@ export class Teams { '{teamId}', encodeURIComponent(String(teamId)), ); - const payload: Payload = {}; + const apiPayload: Payload = {}; const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { @@ -233,7 +233,7 @@ export class Teams { accept: 'application/json', }; - return this.client.call('get', uri, apiHeaders, payload); + return this.client.call('get', uri, apiHeaders, apiPayload); } /** @@ -296,9 +296,9 @@ export class Teams { '{teamId}', encodeURIComponent(String(teamId)), ); - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof name !== 'undefined') { - payload['name'] = name; + apiPayload['name'] = name; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -308,7 +308,7 @@ export class Teams { accept: 'application/json', }; - return this.client.call('put', uri, apiHeaders, payload); + return this.client.call('put', uri, apiHeaders, apiPayload); } /** @@ -352,7 +352,7 @@ export class Teams { '{teamId}', encodeURIComponent(String(teamId)), ); - const payload: Payload = {}; + const apiPayload: Payload = {}; const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { @@ -361,7 +361,7 @@ export class Teams { accept: 'application/json', }; - return this.client.call('delete', uri, apiHeaders, payload); + return this.client.call('delete', uri, apiHeaders, apiPayload); } /** @@ -429,12 +429,12 @@ export class Teams { '{teamId}', encodeURIComponent(String(teamId)), ); - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof queries !== 'undefined') { - payload['queries'] = queries; + apiPayload['queries'] = queries; } if (typeof total !== 'undefined') { - payload['total'] = total; + apiPayload['total'] = total; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -443,7 +443,7 @@ export class Teams { accept: 'application/json', }; - return this.client.call('get', uri, apiHeaders, payload); + return this.client.call('get', uri, apiHeaders, apiPayload); } /** @@ -519,12 +519,12 @@ export class Teams { '{teamId}', encodeURIComponent(String(teamId)), ); - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof appId !== 'undefined') { - payload['appId'] = appId; + apiPayload['appId'] = appId; } if (typeof authorizationDetails !== 'undefined') { - payload['authorizationDetails'] = authorizationDetails; + apiPayload['authorizationDetails'] = authorizationDetails; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -534,7 +534,7 @@ export class Teams { accept: 'application/json', }; - return this.client.call('post', uri, apiHeaders, payload); + return this.client.call('post', uri, apiHeaders, apiPayload); } /** @@ -601,7 +601,7 @@ export class Teams { '{installationId}', encodeURIComponent(String(installationId)), ); - const payload: Payload = {}; + const apiPayload: Payload = {}; const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { @@ -609,7 +609,7 @@ export class Teams { accept: 'application/json', }; - return this.client.call('get', uri, apiHeaders, payload); + return this.client.call('get', uri, apiHeaders, apiPayload); } /** @@ -693,9 +693,9 @@ export class Teams { '{installationId}', encodeURIComponent(String(installationId)), ); - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof authorizationDetails !== 'undefined') { - payload['authorizationDetails'] = authorizationDetails; + apiPayload['authorizationDetails'] = authorizationDetails; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -705,7 +705,7 @@ export class Teams { accept: 'application/json', }; - return this.client.call('put', uri, apiHeaders, payload); + return this.client.call('put', uri, apiHeaders, apiPayload); } /** @@ -769,7 +769,7 @@ export class Teams { '{installationId}', encodeURIComponent(String(installationId)), ); - const payload: Payload = {}; + const apiPayload: Payload = {}; const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { @@ -778,7 +778,7 @@ export class Teams { accept: 'application/json', }; - return this.client.call('delete', uri, apiHeaders, payload); + return this.client.call('delete', uri, apiHeaders, apiPayload); } /** @@ -864,15 +864,15 @@ export class Teams { '{teamId}', encodeURIComponent(String(teamId)), ); - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof queries !== 'undefined') { - payload['queries'] = queries; + apiPayload['queries'] = queries; } if (typeof search !== 'undefined') { - payload['search'] = search; + apiPayload['search'] = search; } if (typeof total !== 'undefined') { - payload['total'] = total; + apiPayload['total'] = total; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -881,7 +881,7 @@ export class Teams { accept: 'application/json', }; - return this.client.call('get', uri, apiHeaders, payload); + return this.client.call('get', uri, apiHeaders, apiPayload); } /** @@ -1011,24 +1011,24 @@ export class Teams { '{teamId}', encodeURIComponent(String(teamId)), ); - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof email !== 'undefined') { - payload['email'] = email; + apiPayload['email'] = email; } if (typeof userId !== 'undefined') { - payload['userId'] = userId; + apiPayload['userId'] = userId; } if (typeof phone !== 'undefined') { - payload['phone'] = phone; + apiPayload['phone'] = phone; } if (typeof roles !== 'undefined') { - payload['roles'] = roles; + apiPayload['roles'] = roles; } if (typeof url !== 'undefined') { - payload['url'] = url; + apiPayload['url'] = url; } if (typeof name !== 'undefined') { - payload['name'] = name; + apiPayload['name'] = name; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -1038,7 +1038,7 @@ export class Teams { accept: 'application/json', }; - return this.client.call('post', uri, apiHeaders, payload); + return this.client.call('post', uri, apiHeaders, apiPayload); } /** @@ -1105,7 +1105,7 @@ export class Teams { '{membershipId}', encodeURIComponent(String(membershipId)), ); - const payload: Payload = {}; + const apiPayload: Payload = {}; const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { @@ -1113,7 +1113,7 @@ export class Teams { accept: 'application/json', }; - return this.client.call('get', uri, apiHeaders, payload); + return this.client.call('get', uri, apiHeaders, apiPayload); } /** @@ -1193,9 +1193,9 @@ export class Teams { '{membershipId}', encodeURIComponent(String(membershipId)), ); - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof roles !== 'undefined') { - payload['roles'] = roles; + apiPayload['roles'] = roles; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -1205,7 +1205,7 @@ export class Teams { accept: 'application/json', }; - return this.client.call('patch', uri, apiHeaders, payload); + return this.client.call('patch', uri, apiHeaders, apiPayload); } /** @@ -1269,7 +1269,7 @@ export class Teams { '{membershipId}', encodeURIComponent(String(membershipId)), ); - const payload: Payload = {}; + const apiPayload: Payload = {}; const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { @@ -1278,7 +1278,7 @@ export class Teams { accept: 'application/json', }; - return this.client.call('delete', uri, apiHeaders, payload); + return this.client.call('delete', uri, apiHeaders, apiPayload); } /** @@ -1383,12 +1383,12 @@ export class Teams { '{membershipId}', encodeURIComponent(String(membershipId)), ); - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof userId !== 'undefined') { - payload['userId'] = userId; + apiPayload['userId'] = userId; } if (typeof secret !== 'undefined') { - payload['secret'] = secret; + apiPayload['secret'] = secret; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -1398,7 +1398,7 @@ export class Teams { accept: 'application/json', }; - return this.client.call('patch', uri, apiHeaders, payload); + return this.client.call('patch', uri, apiHeaders, apiPayload); } /** @@ -1448,7 +1448,7 @@ export class Teams { '{teamId}', encodeURIComponent(String(teamId)), ); - const payload: Payload = {}; + const apiPayload: Payload = {}; const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { @@ -1456,7 +1456,7 @@ export class Teams { accept: 'application/json', }; - return this.client.call('get', uri, apiHeaders, payload); + return this.client.call('get', uri, apiHeaders, apiPayload); } /** @@ -1516,9 +1516,9 @@ export class Teams { '{teamId}', encodeURIComponent(String(teamId)), ); - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof prefs !== 'undefined') { - payload['prefs'] = prefs; + apiPayload['prefs'] = prefs; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -1528,6 +1528,6 @@ export class Teams { accept: 'application/json', }; - return this.client.call('put', uri, apiHeaders, payload); + return this.client.call('put', uri, apiHeaders, apiPayload); } } diff --git a/src/services/tokens.ts b/src/services/tokens.ts index 744ea043..ad2fbb77 100644 --- a/src/services/tokens.ts +++ b/src/services/tokens.ts @@ -95,12 +95,12 @@ export class Tokens { const apiPath = '/tokens/buckets/{bucketId}/files/{fileId}' .replace('{bucketId}', encodeURIComponent(String(bucketId))) .replace('{fileId}', encodeURIComponent(String(fileId))); - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof queries !== 'undefined') { - payload['queries'] = queries; + apiPayload['queries'] = queries; } if (typeof total !== 'undefined') { - payload['total'] = total; + apiPayload['total'] = total; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -109,7 +109,7 @@ export class Tokens { accept: 'application/json', }; - return this.client.call('get', uri, apiHeaders, payload); + return this.client.call('get', uri, apiHeaders, apiPayload); } /** @@ -181,9 +181,9 @@ export class Tokens { const apiPath = '/tokens/buckets/{bucketId}/files/{fileId}' .replace('{bucketId}', encodeURIComponent(String(bucketId))) .replace('{fileId}', encodeURIComponent(String(fileId))); - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof expire !== 'undefined') { - payload['expire'] = expire; + apiPayload['expire'] = expire; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -193,7 +193,7 @@ export class Tokens { accept: 'application/json', }; - return this.client.call('post', uri, apiHeaders, payload); + return this.client.call('post', uri, apiHeaders, apiPayload); } /** @@ -241,7 +241,7 @@ export class Tokens { '{tokenId}', encodeURIComponent(String(tokenId)), ); - const payload: Payload = {}; + const apiPayload: Payload = {}; const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { @@ -249,7 +249,7 @@ export class Tokens { accept: 'application/json', }; - return this.client.call('get', uri, apiHeaders, payload); + return this.client.call('get', uri, apiHeaders, apiPayload); } /** @@ -308,9 +308,9 @@ export class Tokens { '{tokenId}', encodeURIComponent(String(tokenId)), ); - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof expire !== 'undefined') { - payload['expire'] = expire; + apiPayload['expire'] = expire; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -320,7 +320,7 @@ export class Tokens { accept: 'application/json', }; - return this.client.call('patch', uri, apiHeaders, payload); + return this.client.call('patch', uri, apiHeaders, apiPayload); } /** @@ -366,7 +366,7 @@ export class Tokens { '{tokenId}', encodeURIComponent(String(tokenId)), ); - const payload: Payload = {}; + const apiPayload: Payload = {}; const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { @@ -375,6 +375,6 @@ export class Tokens { accept: 'application/json', }; - return this.client.call('delete', uri, apiHeaders, payload); + return this.client.call('delete', uri, apiHeaders, apiPayload); } } diff --git a/src/services/usage.ts b/src/services/usage.ts index 53e25a11..a4de85b9 100644 --- a/src/services/usage.ts +++ b/src/services/usage.ts @@ -183,36 +183,36 @@ export class Usage { ); } const apiPath = '/usage/events'; - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof metrics !== 'undefined') { - payload['metrics'] = metrics; + apiPayload['metrics'] = metrics; } if (typeof queries !== 'undefined') { - payload['queries'] = queries; + apiPayload['queries'] = queries; } if (typeof interval !== 'undefined') { - payload['interval'] = interval; + apiPayload['interval'] = interval; } if (typeof dimensions !== 'undefined') { - payload['dimensions'] = dimensions; + apiPayload['dimensions'] = dimensions; } if (typeof startAt !== 'undefined') { - payload['startAt'] = startAt; + apiPayload['startAt'] = startAt; } if (typeof endAt !== 'undefined') { - payload['endAt'] = endAt; + apiPayload['endAt'] = endAt; } if (typeof orderBy !== 'undefined') { - payload['orderBy'] = orderBy; + apiPayload['orderBy'] = orderBy; } if (typeof orderDir !== 'undefined') { - payload['orderDir'] = orderDir; + apiPayload['orderDir'] = orderDir; } if (typeof limit !== 'undefined') { - payload['limit'] = limit; + apiPayload['limit'] = limit; } if (typeof offset !== 'undefined') { - payload['offset'] = offset; + apiPayload['offset'] = offset; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -221,7 +221,7 @@ export class Usage { accept: 'application/json', }; - return this.client.call('get', uri, apiHeaders, payload); + return this.client.call('get', uri, apiHeaders, apiPayload); } /** @@ -411,39 +411,39 @@ export class Usage { ); } const apiPath = '/usage/gauges'; - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof metrics !== 'undefined') { - payload['metrics'] = metrics; + apiPayload['metrics'] = metrics; } if (typeof queries !== 'undefined') { - payload['queries'] = queries; + apiPayload['queries'] = queries; } if (typeof interval !== 'undefined') { - payload['interval'] = interval; + apiPayload['interval'] = interval; } if (typeof dimensions !== 'undefined') { - payload['dimensions'] = dimensions; + apiPayload['dimensions'] = dimensions; } if (typeof startAt !== 'undefined') { - payload['startAt'] = startAt; + apiPayload['startAt'] = startAt; } if (typeof endAt !== 'undefined') { - payload['endAt'] = endAt; + apiPayload['endAt'] = endAt; } if (typeof orderBy !== 'undefined') { - payload['orderBy'] = orderBy; + apiPayload['orderBy'] = orderBy; } if (typeof orderDir !== 'undefined') { - payload['orderDir'] = orderDir; + apiPayload['orderDir'] = orderDir; } if (typeof limit !== 'undefined') { - payload['limit'] = limit; + apiPayload['limit'] = limit; } if (typeof offset !== 'undefined') { - payload['offset'] = offset; + apiPayload['offset'] = offset; } if (typeof aggregate !== 'undefined') { - payload['aggregate'] = aggregate; + apiPayload['aggregate'] = aggregate; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -452,6 +452,6 @@ export class Usage { accept: 'application/json', }; - return this.client.call('get', uri, apiHeaders, payload); + return this.client.call('get', uri, apiHeaders, apiPayload); } } diff --git a/src/services/users.ts b/src/services/users.ts index ea6678f5..dda204f7 100644 --- a/src/services/users.ts +++ b/src/services/users.ts @@ -74,15 +74,15 @@ export class Users { const total = params.total; const apiPath = '/users'; - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof queries !== 'undefined') { - payload['queries'] = queries; + apiPayload['queries'] = queries; } if (typeof search !== 'undefined') { - payload['search'] = search; + apiPayload['search'] = search; } if (typeof total !== 'undefined') { - payload['total'] = total; + apiPayload['total'] = total; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -91,7 +91,7 @@ export class Users { accept: 'application/json', }; - return this.client.call('get', uri, apiHeaders, payload); + return this.client.call('get', uri, apiHeaders, apiPayload); } /** @@ -185,21 +185,21 @@ export class Users { throw new AppwriteException('Missing required parameter: "userId"'); } const apiPath = '/users'; - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof userId !== 'undefined') { - payload['userId'] = userId; + apiPayload['userId'] = userId; } if (typeof email !== 'undefined') { - payload['email'] = email; + apiPayload['email'] = email; } if (typeof phone !== 'undefined') { - payload['phone'] = phone; + apiPayload['phone'] = phone; } if (typeof password !== 'undefined') { - payload['password'] = password; + apiPayload['password'] = password; } if (typeof name !== 'undefined') { - payload['name'] = name; + apiPayload['name'] = name; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -209,7 +209,7 @@ export class Users { accept: 'application/json', }; - return this.client.call('post', uri, apiHeaders, payload); + return this.client.call('post', uri, apiHeaders, apiPayload); } /** @@ -301,18 +301,18 @@ export class Users { ); } const apiPath = '/users/argon2'; - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof userId !== 'undefined') { - payload['userId'] = userId; + apiPayload['userId'] = userId; } if (typeof email !== 'undefined') { - payload['email'] = email; + apiPayload['email'] = email; } if (typeof password !== 'undefined') { - payload['password'] = password; + apiPayload['password'] = password; } if (typeof name !== 'undefined') { - payload['name'] = name; + apiPayload['name'] = name; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -322,7 +322,7 @@ export class Users { accept: 'application/json', }; - return this.client.call('post', uri, apiHeaders, payload); + return this.client.call('post', uri, apiHeaders, apiPayload); } /** @@ -414,18 +414,18 @@ export class Users { ); } const apiPath = '/users/bcrypt'; - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof userId !== 'undefined') { - payload['userId'] = userId; + apiPayload['userId'] = userId; } if (typeof email !== 'undefined') { - payload['email'] = email; + apiPayload['email'] = email; } if (typeof password !== 'undefined') { - payload['password'] = password; + apiPayload['password'] = password; } if (typeof name !== 'undefined') { - payload['name'] = name; + apiPayload['name'] = name; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -435,7 +435,7 @@ export class Users { accept: 'application/json', }; - return this.client.call('post', uri, apiHeaders, payload); + return this.client.call('post', uri, apiHeaders, apiPayload); } /** @@ -498,15 +498,15 @@ export class Users { const total = params.total; const apiPath = '/users/identities'; - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof queries !== 'undefined') { - payload['queries'] = queries; + apiPayload['queries'] = queries; } if (typeof search !== 'undefined') { - payload['search'] = search; + apiPayload['search'] = search; } if (typeof total !== 'undefined') { - payload['total'] = total; + apiPayload['total'] = total; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -515,7 +515,7 @@ export class Users { accept: 'application/json', }; - return this.client.call('get', uri, apiHeaders, payload); + return this.client.call('get', uri, apiHeaders, apiPayload); } /** @@ -563,7 +563,7 @@ export class Users { '{identityId}', encodeURIComponent(String(identityId)), ); - const payload: Payload = {}; + const apiPayload: Payload = {}; const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { @@ -572,7 +572,7 @@ export class Users { accept: 'application/json', }; - return this.client.call('delete', uri, apiHeaders, payload); + return this.client.call('delete', uri, apiHeaders, apiPayload); } /** @@ -664,18 +664,18 @@ export class Users { ); } const apiPath = '/users/md5'; - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof userId !== 'undefined') { - payload['userId'] = userId; + apiPayload['userId'] = userId; } if (typeof email !== 'undefined') { - payload['email'] = email; + apiPayload['email'] = email; } if (typeof password !== 'undefined') { - payload['password'] = password; + apiPayload['password'] = password; } if (typeof name !== 'undefined') { - payload['name'] = name; + apiPayload['name'] = name; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -685,7 +685,7 @@ export class Users { accept: 'application/json', }; - return this.client.call('post', uri, apiHeaders, payload); + return this.client.call('post', uri, apiHeaders, apiPayload); } /** @@ -777,18 +777,18 @@ export class Users { ); } const apiPath = '/users/phpass'; - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof userId !== 'undefined') { - payload['userId'] = userId; + apiPayload['userId'] = userId; } if (typeof email !== 'undefined') { - payload['email'] = email; + apiPayload['email'] = email; } if (typeof password !== 'undefined') { - payload['password'] = password; + apiPayload['password'] = password; } if (typeof name !== 'undefined') { - payload['name'] = name; + apiPayload['name'] = name; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -798,7 +798,7 @@ export class Users { accept: 'application/json', }; - return this.client.call('post', uri, apiHeaders, payload); + return this.client.call('post', uri, apiHeaders, apiPayload); } /** @@ -974,33 +974,33 @@ export class Users { ); } const apiPath = '/users/scrypt'; - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof userId !== 'undefined') { - payload['userId'] = userId; + apiPayload['userId'] = userId; } if (typeof email !== 'undefined') { - payload['email'] = email; + apiPayload['email'] = email; } if (typeof password !== 'undefined') { - payload['password'] = password; + apiPayload['password'] = password; } if (typeof passwordSalt !== 'undefined') { - payload['passwordSalt'] = passwordSalt; + apiPayload['passwordSalt'] = passwordSalt; } if (typeof passwordCpu !== 'undefined') { - payload['passwordCpu'] = passwordCpu; + apiPayload['passwordCpu'] = passwordCpu; } if (typeof passwordMemory !== 'undefined') { - payload['passwordMemory'] = passwordMemory; + apiPayload['passwordMemory'] = passwordMemory; } if (typeof passwordParallel !== 'undefined') { - payload['passwordParallel'] = passwordParallel; + apiPayload['passwordParallel'] = passwordParallel; } if (typeof passwordLength !== 'undefined') { - payload['passwordLength'] = passwordLength; + apiPayload['passwordLength'] = passwordLength; } if (typeof name !== 'undefined') { - payload['name'] = name; + apiPayload['name'] = name; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -1010,7 +1010,7 @@ export class Users { accept: 'application/json', }; - return this.client.call('post', uri, apiHeaders, payload); + return this.client.call('post', uri, apiHeaders, apiPayload); } /** @@ -1149,27 +1149,27 @@ export class Users { ); } const apiPath = '/users/scrypt-modified'; - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof userId !== 'undefined') { - payload['userId'] = userId; + apiPayload['userId'] = userId; } if (typeof email !== 'undefined') { - payload['email'] = email; + apiPayload['email'] = email; } if (typeof password !== 'undefined') { - payload['password'] = password; + apiPayload['password'] = password; } if (typeof passwordSalt !== 'undefined') { - payload['passwordSalt'] = passwordSalt; + apiPayload['passwordSalt'] = passwordSalt; } if (typeof passwordSaltSeparator !== 'undefined') { - payload['passwordSaltSeparator'] = passwordSaltSeparator; + apiPayload['passwordSaltSeparator'] = passwordSaltSeparator; } if (typeof passwordSignerKey !== 'undefined') { - payload['passwordSignerKey'] = passwordSignerKey; + apiPayload['passwordSignerKey'] = passwordSignerKey; } if (typeof name !== 'undefined') { - payload['name'] = name; + apiPayload['name'] = name; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -1179,7 +1179,7 @@ export class Users { accept: 'application/json', }; - return this.client.call('post', uri, apiHeaders, payload); + return this.client.call('post', uri, apiHeaders, apiPayload); } /** @@ -1285,21 +1285,21 @@ export class Users { ); } const apiPath = '/users/sha'; - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof userId !== 'undefined') { - payload['userId'] = userId; + apiPayload['userId'] = userId; } if (typeof email !== 'undefined') { - payload['email'] = email; + apiPayload['email'] = email; } if (typeof password !== 'undefined') { - payload['password'] = password; + apiPayload['password'] = password; } if (typeof passwordVersion !== 'undefined') { - payload['passwordVersion'] = passwordVersion; + apiPayload['passwordVersion'] = passwordVersion; } if (typeof name !== 'undefined') { - payload['name'] = name; + apiPayload['name'] = name; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -1309,7 +1309,7 @@ export class Users { accept: 'application/json', }; - return this.client.call('post', uri, apiHeaders, payload); + return this.client.call('post', uri, apiHeaders, apiPayload); } /** @@ -1353,9 +1353,9 @@ export class Users { const range = params.range; const apiPath = '/users/usage'; - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof range !== 'undefined') { - payload['range'] = range; + apiPayload['range'] = range; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -1364,7 +1364,7 @@ export class Users { accept: 'application/json', }; - return this.client.call('get', uri, apiHeaders, payload); + return this.client.call('get', uri, apiHeaders, apiPayload); } /** @@ -1414,7 +1414,7 @@ export class Users { '{userId}', encodeURIComponent(String(userId)), ); - const payload: Payload = {}; + const apiPayload: Payload = {}; const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { @@ -1422,7 +1422,7 @@ export class Users { accept: 'application/json', }; - return this.client.call('get', uri, apiHeaders, payload); + return this.client.call('get', uri, apiHeaders, apiPayload); } /** @@ -1466,7 +1466,7 @@ export class Users { '{userId}', encodeURIComponent(String(userId)), ); - const payload: Payload = {}; + const apiPayload: Payload = {}; const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { @@ -1475,7 +1475,7 @@ export class Users { accept: 'application/json', }; - return this.client.call('delete', uri, apiHeaders, payload); + return this.client.call('delete', uri, apiHeaders, apiPayload); } /** @@ -1538,9 +1538,9 @@ export class Users { '{userId}', encodeURIComponent(String(userId)), ); - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof email !== 'undefined') { - payload['email'] = email; + apiPayload['email'] = email; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -1550,7 +1550,7 @@ export class Users { accept: 'application/json', }; - return this.client.call('patch', uri, apiHeaders, payload); + return this.client.call('patch', uri, apiHeaders, apiPayload); } /** @@ -1620,9 +1620,9 @@ export class Users { '{userId}', encodeURIComponent(String(userId)), ); - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof impersonator !== 'undefined') { - payload['impersonator'] = impersonator; + apiPayload['impersonator'] = impersonator; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -1632,7 +1632,7 @@ export class Users { accept: 'application/json', }; - return this.client.call('patch', uri, apiHeaders, payload); + return this.client.call('patch', uri, apiHeaders, apiPayload); } /** @@ -1700,12 +1700,12 @@ export class Users { '{userId}', encodeURIComponent(String(userId)), ); - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof sessionId !== 'undefined') { - payload['sessionId'] = sessionId; + apiPayload['sessionId'] = sessionId; } if (typeof duration !== 'undefined') { - payload['duration'] = duration; + apiPayload['duration'] = duration; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -1715,7 +1715,7 @@ export class Users { accept: 'application/json', }; - return this.client.call('post', uri, apiHeaders, payload); + return this.client.call('post', uri, apiHeaders, apiPayload); } /** @@ -1785,9 +1785,9 @@ export class Users { '{userId}', encodeURIComponent(String(userId)), ); - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof labels !== 'undefined') { - payload['labels'] = labels; + apiPayload['labels'] = labels; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -1797,7 +1797,7 @@ export class Users { accept: 'application/json', }; - return this.client.call('put', uri, apiHeaders, payload); + return this.client.call('put', uri, apiHeaders, apiPayload); } /** @@ -1883,15 +1883,15 @@ export class Users { '{userId}', encodeURIComponent(String(userId)), ); - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof queries !== 'undefined') { - payload['queries'] = queries; + apiPayload['queries'] = queries; } if (typeof search !== 'undefined') { - payload['search'] = search; + apiPayload['search'] = search; } if (typeof total !== 'undefined') { - payload['total'] = total; + apiPayload['total'] = total; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -1900,7 +1900,7 @@ export class Users { accept: 'application/json', }; - return this.client.call('get', uri, apiHeaders, payload); + return this.client.call('get', uri, apiHeaders, apiPayload); } /** @@ -1964,9 +1964,9 @@ export class Users { '{userId}', encodeURIComponent(String(userId)), ); - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof mfa !== 'undefined') { - payload['mfa'] = mfa; + apiPayload['mfa'] = mfa; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -1976,7 +1976,7 @@ export class Users { accept: 'application/json', }; - return this.client.call('patch', uri, apiHeaders, payload); + return this.client.call('patch', uri, apiHeaders, apiPayload); } /** @@ -2039,9 +2039,9 @@ export class Users { '{userId}', encodeURIComponent(String(userId)), ); - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof mfa !== 'undefined') { - payload['mfa'] = mfa; + apiPayload['mfa'] = mfa; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -2051,7 +2051,7 @@ export class Users { accept: 'application/json', }; - return this.client.call('patch', uri, apiHeaders, payload); + return this.client.call('patch', uri, apiHeaders, apiPayload); } /** @@ -2114,7 +2114,7 @@ export class Users { const apiPath = '/users/{userId}/mfa/authenticators/{type}' .replace('{userId}', encodeURIComponent(String(userId))) .replace('{type}', encodeURIComponent(String(type))); - const payload: Payload = {}; + const apiPayload: Payload = {}; const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { @@ -2123,7 +2123,7 @@ export class Users { accept: 'application/json', }; - return this.client.call('delete', uri, apiHeaders, payload); + return this.client.call('delete', uri, apiHeaders, apiPayload); } /** @@ -2185,7 +2185,7 @@ export class Users { const apiPath = '/users/{userId}/mfa/authenticators/{type}' .replace('{userId}', encodeURIComponent(String(userId))) .replace('{type}', encodeURIComponent(String(type))); - const payload: Payload = {}; + const apiPayload: Payload = {}; const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { @@ -2194,7 +2194,7 @@ export class Users { accept: 'application/json', }; - return this.client.call('delete', uri, apiHeaders, payload); + return this.client.call('delete', uri, apiHeaders, apiPayload); } /** @@ -2258,7 +2258,7 @@ export class Users { const apiPath = '/users/{userId}/mfa/challenges/{challengeId}' .replace('{userId}', encodeURIComponent(String(userId))) .replace('{challengeId}', encodeURIComponent(String(challengeId))); - const payload: Payload = {}; + const apiPayload: Payload = {}; const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { @@ -2266,7 +2266,7 @@ export class Users { accept: 'application/json', }; - return this.client.call('get', uri, apiHeaders, payload); + return this.client.call('get', uri, apiHeaders, apiPayload); } /** @@ -2313,7 +2313,7 @@ export class Users { '{userId}', encodeURIComponent(String(userId)), ); - const payload: Payload = {}; + const apiPayload: Payload = {}; const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { @@ -2321,7 +2321,7 @@ export class Users { accept: 'application/json', }; - return this.client.call('get', uri, apiHeaders, payload); + return this.client.call('get', uri, apiHeaders, apiPayload); } /** @@ -2367,7 +2367,7 @@ export class Users { '{userId}', encodeURIComponent(String(userId)), ); - const payload: Payload = {}; + const apiPayload: Payload = {}; const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { @@ -2375,7 +2375,7 @@ export class Users { accept: 'application/json', }; - return this.client.call('get', uri, apiHeaders, payload); + return this.client.call('get', uri, apiHeaders, apiPayload); } /** @@ -2424,7 +2424,7 @@ export class Users { '{userId}', encodeURIComponent(String(userId)), ); - const payload: Payload = {}; + const apiPayload: Payload = {}; const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { @@ -2432,7 +2432,7 @@ export class Users { accept: 'application/json', }; - return this.client.call('get', uri, apiHeaders, payload); + return this.client.call('get', uri, apiHeaders, apiPayload); } /** @@ -2480,7 +2480,7 @@ export class Users { '{userId}', encodeURIComponent(String(userId)), ); - const payload: Payload = {}; + const apiPayload: Payload = {}; const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { @@ -2488,7 +2488,7 @@ export class Users { accept: 'application/json', }; - return this.client.call('get', uri, apiHeaders, payload); + return this.client.call('get', uri, apiHeaders, apiPayload); } /** @@ -2537,7 +2537,7 @@ export class Users { '{userId}', encodeURIComponent(String(userId)), ); - const payload: Payload = {}; + const apiPayload: Payload = {}; const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { @@ -2546,7 +2546,7 @@ export class Users { accept: 'application/json', }; - return this.client.call('put', uri, apiHeaders, payload); + return this.client.call('put', uri, apiHeaders, apiPayload); } /** @@ -2594,7 +2594,7 @@ export class Users { '{userId}', encodeURIComponent(String(userId)), ); - const payload: Payload = {}; + const apiPayload: Payload = {}; const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { @@ -2603,7 +2603,7 @@ export class Users { accept: 'application/json', }; - return this.client.call('put', uri, apiHeaders, payload); + return this.client.call('put', uri, apiHeaders, apiPayload); } /** @@ -2652,7 +2652,7 @@ export class Users { '{userId}', encodeURIComponent(String(userId)), ); - const payload: Payload = {}; + const apiPayload: Payload = {}; const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { @@ -2661,7 +2661,7 @@ export class Users { accept: 'application/json', }; - return this.client.call('patch', uri, apiHeaders, payload); + return this.client.call('patch', uri, apiHeaders, apiPayload); } /** @@ -2709,7 +2709,7 @@ export class Users { '{userId}', encodeURIComponent(String(userId)), ); - const payload: Payload = {}; + const apiPayload: Payload = {}; const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { @@ -2718,7 +2718,7 @@ export class Users { accept: 'application/json', }; - return this.client.call('patch', uri, apiHeaders, payload); + return this.client.call('patch', uri, apiHeaders, apiPayload); } /** @@ -2781,9 +2781,9 @@ export class Users { '{userId}', encodeURIComponent(String(userId)), ); - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof name !== 'undefined') { - payload['name'] = name; + apiPayload['name'] = name; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -2793,7 +2793,7 @@ export class Users { accept: 'application/json', }; - return this.client.call('patch', uri, apiHeaders, payload); + return this.client.call('patch', uri, apiHeaders, apiPayload); } /** @@ -2861,9 +2861,9 @@ export class Users { '{userId}', encodeURIComponent(String(userId)), ); - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof password !== 'undefined') { - payload['password'] = password; + apiPayload['password'] = password; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -2873,7 +2873,7 @@ export class Users { accept: 'application/json', }; - return this.client.call('patch', uri, apiHeaders, payload); + return this.client.call('patch', uri, apiHeaders, apiPayload); } /** @@ -2939,9 +2939,9 @@ export class Users { '{userId}', encodeURIComponent(String(userId)), ); - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof number !== 'undefined') { - payload['number'] = number; + apiPayload['number'] = number; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -2951,7 +2951,7 @@ export class Users { accept: 'application/json', }; - return this.client.call('patch', uri, apiHeaders, payload); + return this.client.call('patch', uri, apiHeaders, apiPayload); } /** @@ -3001,7 +3001,7 @@ export class Users { '{userId}', encodeURIComponent(String(userId)), ); - const payload: Payload = {}; + const apiPayload: Payload = {}; const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { @@ -3009,7 +3009,7 @@ export class Users { accept: 'application/json', }; - return this.client.call('get', uri, apiHeaders, payload); + return this.client.call('get', uri, apiHeaders, apiPayload); } /** @@ -3069,9 +3069,9 @@ export class Users { '{userId}', encodeURIComponent(String(userId)), ); - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof prefs !== 'undefined') { - payload['prefs'] = prefs; + apiPayload['prefs'] = prefs; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -3081,7 +3081,7 @@ export class Users { accept: 'application/json', }; - return this.client.call('patch', uri, apiHeaders, payload); + return this.client.call('patch', uri, apiHeaders, apiPayload); } /** @@ -3138,9 +3138,9 @@ export class Users { '{userId}', encodeURIComponent(String(userId)), ); - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof total !== 'undefined') { - payload['total'] = total; + apiPayload['total'] = total; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -3149,7 +3149,7 @@ export class Users { accept: 'application/json', }; - return this.client.call('get', uri, apiHeaders, payload); + return this.client.call('get', uri, apiHeaders, apiPayload); } /** @@ -3199,7 +3199,7 @@ export class Users { '{userId}', encodeURIComponent(String(userId)), ); - const payload: Payload = {}; + const apiPayload: Payload = {}; const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { @@ -3208,7 +3208,7 @@ export class Users { accept: 'application/json', }; - return this.client.call('post', uri, apiHeaders, payload); + return this.client.call('post', uri, apiHeaders, apiPayload); } /** @@ -3252,7 +3252,7 @@ export class Users { '{userId}', encodeURIComponent(String(userId)), ); - const payload: Payload = {}; + const apiPayload: Payload = {}; const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { @@ -3261,7 +3261,7 @@ export class Users { accept: 'application/json', }; - return this.client.call('delete', uri, apiHeaders, payload); + return this.client.call('delete', uri, apiHeaders, apiPayload); } /** @@ -3319,7 +3319,7 @@ export class Users { const apiPath = '/users/{userId}/sessions/{sessionId}' .replace('{userId}', encodeURIComponent(String(userId))) .replace('{sessionId}', encodeURIComponent(String(sessionId))); - const payload: Payload = {}; + const apiPayload: Payload = {}; const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { @@ -3328,7 +3328,7 @@ export class Users { accept: 'application/json', }; - return this.client.call('delete', uri, apiHeaders, payload); + return this.client.call('delete', uri, apiHeaders, apiPayload); } /** @@ -3394,9 +3394,9 @@ export class Users { '{userId}', encodeURIComponent(String(userId)), ); - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof status !== 'undefined') { - payload['status'] = status; + apiPayload['status'] = status; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -3406,7 +3406,7 @@ export class Users { accept: 'application/json', }; - return this.client.call('patch', uri, apiHeaders, payload); + return this.client.call('patch', uri, apiHeaders, apiPayload); } /** @@ -3474,12 +3474,12 @@ export class Users { '{userId}', encodeURIComponent(String(userId)), ); - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof queries !== 'undefined') { - payload['queries'] = queries; + apiPayload['queries'] = queries; } if (typeof total !== 'undefined') { - payload['total'] = total; + apiPayload['total'] = total; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -3488,7 +3488,7 @@ export class Users { accept: 'application/json', }; - return this.client.call('get', uri, apiHeaders, payload); + return this.client.call('get', uri, apiHeaders, apiPayload); } /** @@ -3607,21 +3607,21 @@ export class Users { '{userId}', encodeURIComponent(String(userId)), ); - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof targetId !== 'undefined') { - payload['targetId'] = targetId; + apiPayload['targetId'] = targetId; } if (typeof providerType !== 'undefined') { - payload['providerType'] = providerType; + apiPayload['providerType'] = providerType; } if (typeof identifier !== 'undefined') { - payload['identifier'] = identifier; + apiPayload['identifier'] = identifier; } if (typeof providerId !== 'undefined') { - payload['providerId'] = providerId; + apiPayload['providerId'] = providerId; } if (typeof name !== 'undefined') { - payload['name'] = name; + apiPayload['name'] = name; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -3631,7 +3631,7 @@ export class Users { accept: 'application/json', }; - return this.client.call('post', uri, apiHeaders, payload); + return this.client.call('post', uri, apiHeaders, apiPayload); } /** @@ -3692,7 +3692,7 @@ export class Users { const apiPath = '/users/{userId}/targets/{targetId}' .replace('{userId}', encodeURIComponent(String(userId))) .replace('{targetId}', encodeURIComponent(String(targetId))); - const payload: Payload = {}; + const apiPayload: Payload = {}; const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { @@ -3700,7 +3700,7 @@ export class Users { accept: 'application/json', }; - return this.client.call('get', uri, apiHeaders, payload); + return this.client.call('get', uri, apiHeaders, apiPayload); } /** @@ -3799,15 +3799,15 @@ export class Users { const apiPath = '/users/{userId}/targets/{targetId}' .replace('{userId}', encodeURIComponent(String(userId))) .replace('{targetId}', encodeURIComponent(String(targetId))); - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof identifier !== 'undefined') { - payload['identifier'] = identifier; + apiPayload['identifier'] = identifier; } if (typeof providerId !== 'undefined') { - payload['providerId'] = providerId; + apiPayload['providerId'] = providerId; } if (typeof name !== 'undefined') { - payload['name'] = name; + apiPayload['name'] = name; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -3817,7 +3817,7 @@ export class Users { accept: 'application/json', }; - return this.client.call('patch', uri, apiHeaders, payload); + return this.client.call('patch', uri, apiHeaders, apiPayload); } /** @@ -3875,7 +3875,7 @@ export class Users { const apiPath = '/users/{userId}/targets/{targetId}' .replace('{userId}', encodeURIComponent(String(userId))) .replace('{targetId}', encodeURIComponent(String(targetId))); - const payload: Payload = {}; + const apiPayload: Payload = {}; const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { @@ -3884,7 +3884,7 @@ export class Users { accept: 'application/json', }; - return this.client.call('delete', uri, apiHeaders, payload); + return this.client.call('delete', uri, apiHeaders, apiPayload); } /** @@ -3954,12 +3954,12 @@ export class Users { '{userId}', encodeURIComponent(String(userId)), ); - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof length !== 'undefined') { - payload['length'] = length; + apiPayload['length'] = length; } if (typeof expire !== 'undefined') { - payload['expire'] = expire; + apiPayload['expire'] = expire; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -3969,7 +3969,7 @@ export class Users { accept: 'application/json', }; - return this.client.call('post', uri, apiHeaders, payload); + return this.client.call('post', uri, apiHeaders, apiPayload); } /** @@ -4040,9 +4040,9 @@ export class Users { '{userId}', encodeURIComponent(String(userId)), ); - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof emailVerification !== 'undefined') { - payload['emailVerification'] = emailVerification; + apiPayload['emailVerification'] = emailVerification; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -4052,7 +4052,7 @@ export class Users { accept: 'application/json', }; - return this.client.call('patch', uri, apiHeaders, payload); + return this.client.call('patch', uri, apiHeaders, apiPayload); } /** @@ -4123,9 +4123,9 @@ export class Users { '{userId}', encodeURIComponent(String(userId)), ); - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof phoneVerification !== 'undefined') { - payload['phoneVerification'] = phoneVerification; + apiPayload['phoneVerification'] = phoneVerification; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -4135,6 +4135,6 @@ export class Users { accept: 'application/json', }; - return this.client.call('patch', uri, apiHeaders, payload); + return this.client.call('patch', uri, apiHeaders, apiPayload); } } diff --git a/src/services/vcs.ts b/src/services/vcs.ts index a890f560..8dc843fe 100644 --- a/src/services/vcs.ts +++ b/src/services/vcs.ts @@ -103,15 +103,15 @@ export class Vcs { '{installationId}', encodeURIComponent(String(installationId)), ); - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof providerRepositoryId !== 'undefined') { - payload['providerRepositoryId'] = providerRepositoryId; + apiPayload['providerRepositoryId'] = providerRepositoryId; } if (typeof type !== 'undefined') { - payload['type'] = type; + apiPayload['type'] = type; } if (typeof providerRootDirectory !== 'undefined') { - payload['providerRootDirectory'] = providerRootDirectory; + apiPayload['providerRootDirectory'] = providerRootDirectory; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -121,7 +121,7 @@ export class Vcs { accept: 'application/json', }; - return this.client.call('post', uri, apiHeaders, payload); + return this.client.call('post', uri, apiHeaders, apiPayload); } /** @@ -222,15 +222,15 @@ export class Vcs { '{installationId}', encodeURIComponent(String(installationId)), ); - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof type !== 'undefined') { - payload['type'] = type; + apiPayload['type'] = type; } if (typeof search !== 'undefined') { - payload['search'] = search; + apiPayload['search'] = search; } if (typeof queries !== 'undefined') { - payload['queries'] = queries; + apiPayload['queries'] = queries; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -239,7 +239,7 @@ export class Vcs { accept: 'application/json', }; - return this.client.call('get', uri, apiHeaders, payload); + return this.client.call('get', uri, apiHeaders, apiPayload); } /** @@ -336,15 +336,15 @@ export class Vcs { '{installationId}', encodeURIComponent(String(installationId)), ); - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof name !== 'undefined') { - payload['name'] = name; + apiPayload['name'] = name; } if (typeof xprivate !== 'undefined') { - payload['private'] = xprivate; + apiPayload['private'] = xprivate; } if (typeof providerNamespace !== 'undefined') { - payload['providerNamespace'] = providerNamespace; + apiPayload['providerNamespace'] = providerNamespace; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -354,7 +354,7 @@ export class Vcs { accept: 'application/json', }; - return this.client.call('post', uri, apiHeaders, payload); + return this.client.call('post', uri, apiHeaders, apiPayload); } /** @@ -431,7 +431,7 @@ export class Vcs { '{providerRepositoryId}', encodeURIComponent(String(providerRepositoryId)), ); - const payload: Payload = {}; + const apiPayload: Payload = {}; const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { @@ -439,7 +439,7 @@ export class Vcs { accept: 'application/json', }; - return this.client.call('get', uri, apiHeaders, payload); + return this.client.call('get', uri, apiHeaders, apiPayload); } /** @@ -543,12 +543,12 @@ export class Vcs { '{providerRepositoryId}', encodeURIComponent(String(providerRepositoryId)), ); - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof search !== 'undefined') { - payload['search'] = search; + apiPayload['search'] = search; } if (typeof queries !== 'undefined') { - payload['queries'] = queries; + apiPayload['queries'] = queries; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -557,7 +557,7 @@ export class Vcs { accept: 'application/json', }; - return this.client.call('get', uri, apiHeaders, payload); + return this.client.call('get', uri, apiHeaders, apiPayload); } /** @@ -659,12 +659,12 @@ export class Vcs { '{providerRepositoryId}', encodeURIComponent(String(providerRepositoryId)), ); - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof providerRootDirectory !== 'undefined') { - payload['providerRootDirectory'] = providerRootDirectory; + apiPayload['providerRootDirectory'] = providerRootDirectory; } if (typeof providerReference !== 'undefined') { - payload['providerReference'] = providerReference; + apiPayload['providerReference'] = providerReference; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -673,7 +673,7 @@ export class Vcs { accept: 'application/json', }; - return this.client.call('get', uri, apiHeaders, payload); + return this.client.call('get', uri, apiHeaders, apiPayload); } /** @@ -768,9 +768,9 @@ export class Vcs { '{repositoryId}', encodeURIComponent(String(repositoryId)), ); - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof providerPullRequestId !== 'undefined') { - payload['providerPullRequestId'] = providerPullRequestId; + apiPayload['providerPullRequestId'] = providerPullRequestId; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -780,7 +780,7 @@ export class Vcs { accept: 'application/json', }; - return this.client.call('patch', uri, apiHeaders, payload); + return this.client.call('patch', uri, apiHeaders, apiPayload); } /** @@ -845,15 +845,15 @@ export class Vcs { const total = params.total; const apiPath = '/vcs/installations'; - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof queries !== 'undefined') { - payload['queries'] = queries; + apiPayload['queries'] = queries; } if (typeof search !== 'undefined') { - payload['search'] = search; + apiPayload['search'] = search; } if (typeof total !== 'undefined') { - payload['total'] = total; + apiPayload['total'] = total; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -862,7 +862,7 @@ export class Vcs { accept: 'application/json', }; - return this.client.call('get', uri, apiHeaders, payload); + return this.client.call('get', uri, apiHeaders, apiPayload); } /** @@ -912,7 +912,7 @@ export class Vcs { '{installationId}', encodeURIComponent(String(installationId)), ); - const payload: Payload = {}; + const apiPayload: Payload = {}; const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { @@ -920,7 +920,7 @@ export class Vcs { accept: 'application/json', }; - return this.client.call('get', uri, apiHeaders, payload); + return this.client.call('get', uri, apiHeaders, apiPayload); } /** @@ -968,7 +968,7 @@ export class Vcs { '{installationId}', encodeURIComponent(String(installationId)), ); - const payload: Payload = {}; + const apiPayload: Payload = {}; const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { @@ -977,7 +977,7 @@ export class Vcs { accept: 'application/json', }; - return this.client.call('delete', uri, apiHeaders, payload); + return this.client.call('delete', uri, apiHeaders, apiPayload); } /** @@ -1053,12 +1053,12 @@ export class Vcs { '{installationId}', encodeURIComponent(String(installationId)), ); - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof search !== 'undefined') { - payload['search'] = search; + apiPayload['search'] = search; } if (typeof queries !== 'undefined') { - payload['queries'] = queries; + apiPayload['queries'] = queries; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -1067,6 +1067,6 @@ export class Vcs { accept: 'application/json', }; - return this.client.call('get', uri, apiHeaders, payload); + return this.client.call('get', uri, apiHeaders, apiPayload); } } diff --git a/src/services/vectors-db.ts b/src/services/vectors-db.ts index 82735635..113c5288 100644 --- a/src/services/vectors-db.ts +++ b/src/services/vectors-db.ts @@ -59,12 +59,12 @@ export class VectorsDB { const total = params.total; const apiPath = '/vectorsdb'; - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof queries !== 'undefined') { - payload['queries'] = queries; + apiPayload['queries'] = queries; } if (typeof total !== 'undefined') { - payload['total'] = total; + apiPayload['total'] = total; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -73,7 +73,7 @@ export class VectorsDB { accept: 'application/json', }; - return this.client.call('get', uri, apiHeaders, payload); + return this.client.call('get', uri, apiHeaders, apiPayload); } /** @@ -181,24 +181,24 @@ export class VectorsDB { throw new AppwriteException('Missing required parameter: "name"'); } const apiPath = '/vectorsdb'; - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof databaseId !== 'undefined') { - payload['databaseId'] = databaseId; + apiPayload['databaseId'] = databaseId; } if (typeof name !== 'undefined') { - payload['name'] = name; + apiPayload['name'] = name; } if (typeof enabled !== 'undefined') { - payload['enabled'] = enabled; + apiPayload['enabled'] = enabled; } if (typeof specification !== 'undefined') { - payload['specification'] = specification; + apiPayload['specification'] = specification; } if (typeof replicas !== 'undefined') { - payload['replicas'] = replicas; + apiPayload['replicas'] = replicas; } if (typeof syncMode !== 'undefined') { - payload['syncMode'] = syncMode; + apiPayload['syncMode'] = syncMode; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -208,7 +208,7 @@ export class VectorsDB { accept: 'application/json', }; - return this.client.call('post', uri, apiHeaders, payload); + return this.client.call('post', uri, apiHeaders, apiPayload); } /** @@ -219,7 +219,7 @@ export class VectorsDB { */ listSpecifications(): Promise { const apiPath = '/vectorsdb/specifications'; - const payload: Payload = {}; + const apiPayload: Payload = {}; const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { @@ -227,7 +227,7 @@ export class VectorsDB { accept: 'application/json', }; - return this.client.call('get', uri, apiHeaders, payload); + return this.client.call('get', uri, apiHeaders, apiPayload); } /** @@ -270,9 +270,9 @@ export class VectorsDB { const queries = params.queries; const apiPath = '/vectorsdb/transactions'; - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof queries !== 'undefined') { - payload['queries'] = queries; + apiPayload['queries'] = queries; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -281,7 +281,7 @@ export class VectorsDB { accept: 'application/json', }; - return this.client.call('get', uri, apiHeaders, payload); + return this.client.call('get', uri, apiHeaders, apiPayload); } /** @@ -322,9 +322,9 @@ export class VectorsDB { const ttl = params.ttl; const apiPath = '/vectorsdb/transactions'; - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof ttl !== 'undefined') { - payload['ttl'] = ttl; + apiPayload['ttl'] = ttl; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -334,7 +334,7 @@ export class VectorsDB { accept: 'application/json', }; - return this.client.call('post', uri, apiHeaders, payload); + return this.client.call('post', uri, apiHeaders, apiPayload); } /** @@ -384,7 +384,7 @@ export class VectorsDB { '{transactionId}', encodeURIComponent(String(transactionId)), ); - const payload: Payload = {}; + const apiPayload: Payload = {}; const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { @@ -392,7 +392,7 @@ export class VectorsDB { accept: 'application/json', }; - return this.client.call('get', uri, apiHeaders, payload); + return this.client.call('get', uri, apiHeaders, apiPayload); } /** @@ -467,12 +467,12 @@ export class VectorsDB { '{transactionId}', encodeURIComponent(String(transactionId)), ); - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof commit !== 'undefined') { - payload['commit'] = commit; + apiPayload['commit'] = commit; } if (typeof rollback !== 'undefined') { - payload['rollback'] = rollback; + apiPayload['rollback'] = rollback; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -482,7 +482,7 @@ export class VectorsDB { accept: 'application/json', }; - return this.client.call('patch', uri, apiHeaders, payload); + return this.client.call('patch', uri, apiHeaders, apiPayload); } /** @@ -530,7 +530,7 @@ export class VectorsDB { '{transactionId}', encodeURIComponent(String(transactionId)), ); - const payload: Payload = {}; + const apiPayload: Payload = {}; const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { @@ -539,7 +539,7 @@ export class VectorsDB { accept: 'application/json', }; - return this.client.call('delete', uri, apiHeaders, payload); + return this.client.call('delete', uri, apiHeaders, apiPayload); } /** @@ -603,9 +603,9 @@ export class VectorsDB { '{transactionId}', encodeURIComponent(String(transactionId)), ); - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof operations !== 'undefined') { - payload['operations'] = operations; + apiPayload['operations'] = operations; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -615,7 +615,7 @@ export class VectorsDB { accept: 'application/json', }; - return this.client.call('post', uri, apiHeaders, payload); + return this.client.call('post', uri, apiHeaders, apiPayload); } /** @@ -663,7 +663,7 @@ export class VectorsDB { '{databaseId}', encodeURIComponent(String(databaseId)), ); - const payload: Payload = {}; + const apiPayload: Payload = {}; const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { @@ -671,7 +671,7 @@ export class VectorsDB { accept: 'application/json', }; - return this.client.call('get', uri, apiHeaders, payload); + return this.client.call('get', uri, apiHeaders, apiPayload); } /** @@ -780,21 +780,21 @@ export class VectorsDB { '{databaseId}', encodeURIComponent(String(databaseId)), ); - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof name !== 'undefined') { - payload['name'] = name; + apiPayload['name'] = name; } if (typeof enabled !== 'undefined') { - payload['enabled'] = enabled; + apiPayload['enabled'] = enabled; } if (typeof specification !== 'undefined') { - payload['specification'] = specification; + apiPayload['specification'] = specification; } if (typeof replicas !== 'undefined') { - payload['replicas'] = replicas; + apiPayload['replicas'] = replicas; } if (typeof syncMode !== 'undefined') { - payload['syncMode'] = syncMode; + apiPayload['syncMode'] = syncMode; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -804,7 +804,7 @@ export class VectorsDB { accept: 'application/json', }; - return this.client.call('put', uri, apiHeaders, payload); + return this.client.call('put', uri, apiHeaders, apiPayload); } /** @@ -850,7 +850,7 @@ export class VectorsDB { '{databaseId}', encodeURIComponent(String(databaseId)), ); - const payload: Payload = {}; + const apiPayload: Payload = {}; const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { @@ -859,7 +859,7 @@ export class VectorsDB { accept: 'application/json', }; - return this.client.call('delete', uri, apiHeaders, payload); + return this.client.call('delete', uri, apiHeaders, apiPayload); } /** @@ -947,15 +947,15 @@ export class VectorsDB { '{databaseId}', encodeURIComponent(String(databaseId)), ); - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof queries !== 'undefined') { - payload['queries'] = queries; + apiPayload['queries'] = queries; } if (typeof search !== 'undefined') { - payload['search'] = search; + apiPayload['search'] = search; } if (typeof total !== 'undefined') { - payload['total'] = total; + apiPayload['total'] = total; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -964,7 +964,7 @@ export class VectorsDB { accept: 'application/json', }; - return this.client.call('get', uri, apiHeaders, payload); + return this.client.call('get', uri, apiHeaders, apiPayload); } /** @@ -1092,24 +1092,24 @@ export class VectorsDB { '{databaseId}', encodeURIComponent(String(databaseId)), ); - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof collectionId !== 'undefined') { - payload['collectionId'] = collectionId; + apiPayload['collectionId'] = collectionId; } if (typeof name !== 'undefined') { - payload['name'] = name; + apiPayload['name'] = name; } if (typeof dimension !== 'undefined') { - payload['dimension'] = dimension; + apiPayload['dimension'] = dimension; } if (typeof permissions !== 'undefined') { - payload['permissions'] = permissions; + apiPayload['permissions'] = permissions; } if (typeof documentSecurity !== 'undefined') { - payload['documentSecurity'] = documentSecurity; + apiPayload['documentSecurity'] = documentSecurity; } if (typeof enabled !== 'undefined') { - payload['enabled'] = enabled; + apiPayload['enabled'] = enabled; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -1119,7 +1119,7 @@ export class VectorsDB { accept: 'application/json', }; - return this.client.call('post', uri, apiHeaders, payload); + return this.client.call('post', uri, apiHeaders, apiPayload); } /** @@ -1188,7 +1188,7 @@ export class VectorsDB { '{collectionId}', encodeURIComponent(String(collectionId)), ); - const payload: Payload = {}; + const apiPayload: Payload = {}; const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { @@ -1196,7 +1196,7 @@ export class VectorsDB { accept: 'application/json', }; - return this.client.call('get', uri, apiHeaders, payload); + return this.client.call('get', uri, apiHeaders, apiPayload); } /** @@ -1321,21 +1321,21 @@ export class VectorsDB { '{collectionId}', encodeURIComponent(String(collectionId)), ); - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof name !== 'undefined') { - payload['name'] = name; + apiPayload['name'] = name; } if (typeof dimension !== 'undefined') { - payload['dimension'] = dimension; + apiPayload['dimension'] = dimension; } if (typeof permissions !== 'undefined') { - payload['permissions'] = permissions; + apiPayload['permissions'] = permissions; } if (typeof documentSecurity !== 'undefined') { - payload['documentSecurity'] = documentSecurity; + apiPayload['documentSecurity'] = documentSecurity; } if (typeof enabled !== 'undefined') { - payload['enabled'] = enabled; + apiPayload['enabled'] = enabled; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -1345,7 +1345,7 @@ export class VectorsDB { accept: 'application/json', }; - return this.client.call('put', uri, apiHeaders, payload); + return this.client.call('put', uri, apiHeaders, apiPayload); } /** @@ -1411,7 +1411,7 @@ export class VectorsDB { '{collectionId}', encodeURIComponent(String(collectionId)), ); - const payload: Payload = {}; + const apiPayload: Payload = {}; const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { @@ -1420,7 +1420,7 @@ export class VectorsDB { accept: 'application/json', }; - return this.client.call('delete', uri, apiHeaders, payload); + return this.client.call('delete', uri, apiHeaders, apiPayload); } /** @@ -1536,18 +1536,18 @@ export class VectorsDB { '{collectionId}', encodeURIComponent(String(collectionId)), ); - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof queries !== 'undefined') { - payload['queries'] = queries; + apiPayload['queries'] = queries; } if (typeof transactionId !== 'undefined') { - payload['transactionId'] = transactionId; + apiPayload['transactionId'] = transactionId; } if (typeof total !== 'undefined') { - payload['total'] = total; + apiPayload['total'] = total; } if (typeof ttl !== 'undefined') { - payload['ttl'] = ttl; + apiPayload['ttl'] = ttl; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -1556,7 +1556,7 @@ export class VectorsDB { accept: 'application/json', }; - return this.client.call('get', uri, apiHeaders, payload); + return this.client.call('get', uri, apiHeaders, apiPayload); } /** @@ -1705,18 +1705,18 @@ export class VectorsDB { '{collectionId}', encodeURIComponent(String(collectionId)), ); - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof documentId !== 'undefined') { - payload['documentId'] = documentId; + apiPayload['documentId'] = documentId; } if (typeof data !== 'undefined') { - payload['data'] = data; + apiPayload['data'] = data; } if (typeof permissions !== 'undefined') { - payload['permissions'] = permissions; + apiPayload['permissions'] = permissions; } if (typeof transactionId !== 'undefined') { - payload['transactionId'] = transactionId; + apiPayload['transactionId'] = transactionId; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -1726,7 +1726,7 @@ export class VectorsDB { accept: 'application/json', }; - return this.client.call('post', uri, apiHeaders, payload); + return this.client.call('post', uri, apiHeaders, apiPayload); } /** @@ -1829,12 +1829,12 @@ export class VectorsDB { '{collectionId}', encodeURIComponent(String(collectionId)), ); - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof documents !== 'undefined') { - payload['documents'] = documents; + apiPayload['documents'] = documents; } if (typeof transactionId !== 'undefined') { - payload['transactionId'] = transactionId; + apiPayload['transactionId'] = transactionId; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -1844,7 +1844,7 @@ export class VectorsDB { accept: 'application/json', }; - return this.client.call('post', uri, apiHeaders, payload); + return this.client.call('post', uri, apiHeaders, apiPayload); } /** @@ -1949,12 +1949,12 @@ export class VectorsDB { '{collectionId}', encodeURIComponent(String(collectionId)), ); - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof documents !== 'undefined') { - payload['documents'] = documents; + apiPayload['documents'] = documents; } if (typeof transactionId !== 'undefined') { - payload['transactionId'] = transactionId; + apiPayload['transactionId'] = transactionId; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -1964,7 +1964,7 @@ export class VectorsDB { accept: 'application/json', }; - return this.client.call('put', uri, apiHeaders, payload); + return this.client.call('put', uri, apiHeaders, apiPayload); } /** @@ -2071,15 +2071,15 @@ export class VectorsDB { '{collectionId}', encodeURIComponent(String(collectionId)), ); - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof data !== 'undefined') { - payload['data'] = data; + apiPayload['data'] = data; } if (typeof queries !== 'undefined') { - payload['queries'] = queries; + apiPayload['queries'] = queries; } if (typeof transactionId !== 'undefined') { - payload['transactionId'] = transactionId; + apiPayload['transactionId'] = transactionId; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -2089,7 +2089,7 @@ export class VectorsDB { accept: 'application/json', }; - return this.client.call('patch', uri, apiHeaders, payload); + return this.client.call('patch', uri, apiHeaders, apiPayload); } /** @@ -2187,12 +2187,12 @@ export class VectorsDB { '{collectionId}', encodeURIComponent(String(collectionId)), ); - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof queries !== 'undefined') { - payload['queries'] = queries; + apiPayload['queries'] = queries; } if (typeof transactionId !== 'undefined') { - payload['transactionId'] = transactionId; + apiPayload['transactionId'] = transactionId; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -2202,7 +2202,7 @@ export class VectorsDB { accept: 'application/json', }; - return this.client.call('delete', uri, apiHeaders, payload); + return this.client.call('delete', uri, apiHeaders, apiPayload); } /** @@ -2320,18 +2320,18 @@ export class VectorsDB { '{collectionId}', encodeURIComponent(String(collectionId)), ); - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof queries !== 'undefined') { - payload['queries'] = queries; + apiPayload['queries'] = queries; } if (typeof transactionId !== 'undefined') { - payload['transactionId'] = transactionId; + apiPayload['transactionId'] = transactionId; } if (typeof total !== 'undefined') { - payload['total'] = total; + apiPayload['total'] = total; } if (typeof ttl !== 'undefined') { - payload['ttl'] = ttl; + apiPayload['ttl'] = ttl; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -2341,7 +2341,7 @@ export class VectorsDB { accept: 'application/json', }; - return this.client.call('post', uri, apiHeaders, payload); + return this.client.call('post', uri, apiHeaders, apiPayload); } /** @@ -2457,12 +2457,12 @@ export class VectorsDB { '{documentId}', encodeURIComponent(String(documentId)), ); - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof queries !== 'undefined') { - payload['queries'] = queries; + apiPayload['queries'] = queries; } if (typeof transactionId !== 'undefined') { - payload['transactionId'] = transactionId; + apiPayload['transactionId'] = transactionId; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -2471,7 +2471,7 @@ export class VectorsDB { accept: 'application/json', }; - return this.client.call('get', uri, apiHeaders, payload); + return this.client.call('get', uri, apiHeaders, apiPayload); } /** @@ -2623,15 +2623,15 @@ export class VectorsDB { '{documentId}', encodeURIComponent(String(documentId)), ); - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof data !== 'undefined') { - payload['data'] = data; + apiPayload['data'] = data; } if (typeof permissions !== 'undefined') { - payload['permissions'] = permissions; + apiPayload['permissions'] = permissions; } if (typeof transactionId !== 'undefined') { - payload['transactionId'] = transactionId; + apiPayload['transactionId'] = transactionId; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -2641,7 +2641,7 @@ export class VectorsDB { accept: 'application/json', }; - return this.client.call('put', uri, apiHeaders, payload); + return this.client.call('put', uri, apiHeaders, apiPayload); } /** @@ -2793,15 +2793,15 @@ export class VectorsDB { '{documentId}', encodeURIComponent(String(documentId)), ); - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof data !== 'undefined') { - payload['data'] = data; + apiPayload['data'] = data; } if (typeof permissions !== 'undefined') { - payload['permissions'] = permissions; + apiPayload['permissions'] = permissions; } if (typeof transactionId !== 'undefined') { - payload['transactionId'] = transactionId; + apiPayload['transactionId'] = transactionId; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -2811,7 +2811,7 @@ export class VectorsDB { accept: 'application/json', }; - return this.client.call('patch', uri, apiHeaders, payload); + return this.client.call('patch', uri, apiHeaders, apiPayload); } /** @@ -2916,9 +2916,9 @@ export class VectorsDB { '{documentId}', encodeURIComponent(String(documentId)), ); - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof transactionId !== 'undefined') { - payload['transactionId'] = transactionId; + apiPayload['transactionId'] = transactionId; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -2928,7 +2928,7 @@ export class VectorsDB { accept: 'application/json', }; - return this.client.call('delete', uri, apiHeaders, payload); + return this.client.call('delete', uri, apiHeaders, apiPayload); } /** @@ -3024,12 +3024,12 @@ export class VectorsDB { '{collectionId}', encodeURIComponent(String(collectionId)), ); - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof queries !== 'undefined') { - payload['queries'] = queries; + apiPayload['queries'] = queries; } if (typeof total !== 'undefined') { - payload['total'] = total; + apiPayload['total'] = total; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -3038,7 +3038,7 @@ export class VectorsDB { accept: 'application/json', }; - return this.client.call('get', uri, apiHeaders, payload); + return this.client.call('get', uri, apiHeaders, apiPayload); } /** @@ -3181,21 +3181,21 @@ export class VectorsDB { '{collectionId}', encodeURIComponent(String(collectionId)), ); - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof key !== 'undefined') { - payload['key'] = key; + apiPayload['key'] = key; } if (typeof type !== 'undefined') { - payload['type'] = type; + apiPayload['type'] = type; } if (typeof attributes !== 'undefined') { - payload['attributes'] = attributes; + apiPayload['attributes'] = attributes; } if (typeof orders !== 'undefined') { - payload['orders'] = orders; + apiPayload['orders'] = orders; } if (typeof lengths !== 'undefined') { - payload['lengths'] = lengths; + apiPayload['lengths'] = lengths; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -3205,7 +3205,7 @@ export class VectorsDB { accept: 'application/json', }; - return this.client.call('post', uri, apiHeaders, payload); + return this.client.call('post', uri, apiHeaders, apiPayload); } /** @@ -3287,7 +3287,7 @@ export class VectorsDB { encodeURIComponent(String(collectionId)), ) .replace('{key}', encodeURIComponent(String(key))); - const payload: Payload = {}; + const apiPayload: Payload = {}; const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { @@ -3295,7 +3295,7 @@ export class VectorsDB { accept: 'application/json', }; - return this.client.call('get', uri, apiHeaders, payload); + return this.client.call('get', uri, apiHeaders, apiPayload); } /** @@ -3377,7 +3377,7 @@ export class VectorsDB { encodeURIComponent(String(collectionId)), ) .replace('{key}', encodeURIComponent(String(key))); - const payload: Payload = {}; + const apiPayload: Payload = {}; const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { @@ -3386,7 +3386,7 @@ export class VectorsDB { accept: 'application/json', }; - return this.client.call('delete', uri, apiHeaders, payload); + return this.client.call('delete', uri, apiHeaders, apiPayload); } /** @@ -3449,9 +3449,9 @@ export class VectorsDB { '{databaseId}', encodeURIComponent(String(databaseId)), ); - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof targetReplicaId !== 'undefined') { - payload['targetReplicaId'] = targetReplicaId; + apiPayload['targetReplicaId'] = targetReplicaId; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -3461,7 +3461,7 @@ export class VectorsDB { accept: 'application/json', }; - return this.client.call('post', uri, apiHeaders, payload); + return this.client.call('post', uri, apiHeaders, apiPayload); } /** @@ -3549,15 +3549,15 @@ export class VectorsDB { '{databaseId}', encodeURIComponent(String(databaseId)), ); - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof status !== 'undefined') { - payload['status'] = status; + apiPayload['status'] = status; } if (typeof limit !== 'undefined') { - payload['limit'] = limit; + apiPayload['limit'] = limit; } if (typeof offset !== 'undefined') { - payload['offset'] = offset; + apiPayload['offset'] = offset; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -3566,7 +3566,7 @@ export class VectorsDB { accept: 'application/json', }; - return this.client.call('get', uri, apiHeaders, payload); + return this.client.call('get', uri, apiHeaders, apiPayload); } /** @@ -3616,7 +3616,7 @@ export class VectorsDB { '{databaseId}', encodeURIComponent(String(databaseId)), ); - const payload: Payload = {}; + const apiPayload: Payload = {}; const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { @@ -3624,7 +3624,7 @@ export class VectorsDB { accept: 'application/json', }; - return this.client.call('get', uri, apiHeaders, payload); + return this.client.call('get', uri, apiHeaders, apiPayload); } /** @@ -3672,7 +3672,7 @@ export class VectorsDB { '{databaseId}', encodeURIComponent(String(databaseId)), ); - const payload: Payload = {}; + const apiPayload: Payload = {}; const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { @@ -3680,6 +3680,6 @@ export class VectorsDB { accept: 'application/json', }; - return this.client.call('get', uri, apiHeaders, payload); + return this.client.call('get', uri, apiHeaders, apiPayload); } } diff --git a/src/services/waf.ts b/src/services/waf.ts index d111aff8..cf12adb5 100644 --- a/src/services/waf.ts +++ b/src/services/waf.ts @@ -70,15 +70,15 @@ export class Waf { const total = params.total; const apiPath = '/waf/rules'; - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof queries !== 'undefined') { - payload['queries'] = queries; + apiPayload['queries'] = queries; } if (typeof search !== 'undefined') { - payload['search'] = search; + apiPayload['search'] = search; } if (typeof total !== 'undefined') { - payload['total'] = total; + apiPayload['total'] = total; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -87,7 +87,7 @@ export class Waf { accept: 'application/json', }; - return this.client.call('get', uri, apiHeaders, payload); + return this.client.call('get', uri, apiHeaders, apiPayload); } /** @@ -224,30 +224,30 @@ export class Waf { throw new AppwriteException('Missing required parameter: "name"'); } const apiPath = '/waf/rules/bypass'; - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof ruleId !== 'undefined') { - payload['ruleId'] = ruleId; + apiPayload['ruleId'] = ruleId; } if (typeof resourceType !== 'undefined') { - payload['resourceType'] = resourceType; + apiPayload['resourceType'] = resourceType; } if (typeof resourceId !== 'undefined') { - payload['resourceId'] = resourceId; + apiPayload['resourceId'] = resourceId; } if (typeof name !== 'undefined') { - payload['name'] = name; + apiPayload['name'] = name; } if (typeof description !== 'undefined') { - payload['description'] = description; + apiPayload['description'] = description; } if (typeof priority !== 'undefined') { - payload['priority'] = priority; + apiPayload['priority'] = priority; } if (typeof enabled !== 'undefined') { - payload['enabled'] = enabled; + apiPayload['enabled'] = enabled; } if (typeof conditions !== 'undefined') { - payload['conditions'] = conditions; + apiPayload['conditions'] = conditions; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -257,7 +257,7 @@ export class Waf { accept: 'application/json', }; - return this.client.call('post', uri, apiHeaders, payload); + return this.client.call('post', uri, apiHeaders, apiPayload); } /** @@ -389,27 +389,27 @@ export class Waf { '{ruleId}', encodeURIComponent(String(ruleId)), ); - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof resourceType !== 'undefined') { - payload['resourceType'] = resourceType; + apiPayload['resourceType'] = resourceType; } if (typeof resourceId !== 'undefined') { - payload['resourceId'] = resourceId; + apiPayload['resourceId'] = resourceId; } if (typeof name !== 'undefined') { - payload['name'] = name; + apiPayload['name'] = name; } if (typeof description !== 'undefined') { - payload['description'] = description; + apiPayload['description'] = description; } if (typeof priority !== 'undefined') { - payload['priority'] = priority; + apiPayload['priority'] = priority; } if (typeof enabled !== 'undefined') { - payload['enabled'] = enabled; + apiPayload['enabled'] = enabled; } if (typeof conditions !== 'undefined') { - payload['conditions'] = conditions; + apiPayload['conditions'] = conditions; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -419,7 +419,7 @@ export class Waf { accept: 'application/json', }; - return this.client.call('patch', uri, apiHeaders, payload); + return this.client.call('patch', uri, apiHeaders, apiPayload); } /** @@ -586,39 +586,39 @@ export class Waf { throw new AppwriteException('Missing required parameter: "name"'); } const apiPath = '/waf/rules/challenge'; - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof ruleId !== 'undefined') { - payload['ruleId'] = ruleId; + apiPayload['ruleId'] = ruleId; } if (typeof resourceType !== 'undefined') { - payload['resourceType'] = resourceType; + apiPayload['resourceType'] = resourceType; } if (typeof resourceId !== 'undefined') { - payload['resourceId'] = resourceId; + apiPayload['resourceId'] = resourceId; } if (typeof name !== 'undefined') { - payload['name'] = name; + apiPayload['name'] = name; } if (typeof description !== 'undefined') { - payload['description'] = description; + apiPayload['description'] = description; } if (typeof challengeType !== 'undefined') { - payload['challengeType'] = challengeType; + apiPayload['challengeType'] = challengeType; } if (typeof priority !== 'undefined') { - payload['priority'] = priority; + apiPayload['priority'] = priority; } if (typeof enabled !== 'undefined') { - payload['enabled'] = enabled; + apiPayload['enabled'] = enabled; } if (typeof conditions !== 'undefined') { - payload['conditions'] = conditions; + apiPayload['conditions'] = conditions; } if (typeof difficulty !== 'undefined') { - payload['difficulty'] = difficulty; + apiPayload['difficulty'] = difficulty; } if (typeof ttl !== 'undefined') { - payload['ttl'] = ttl; + apiPayload['ttl'] = ttl; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -628,7 +628,7 @@ export class Waf { accept: 'application/json', }; - return this.client.call('post', uri, apiHeaders, payload); + return this.client.call('post', uri, apiHeaders, apiPayload); } /** @@ -790,36 +790,36 @@ export class Waf { '{ruleId}', encodeURIComponent(String(ruleId)), ); - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof resourceType !== 'undefined') { - payload['resourceType'] = resourceType; + apiPayload['resourceType'] = resourceType; } if (typeof resourceId !== 'undefined') { - payload['resourceId'] = resourceId; + apiPayload['resourceId'] = resourceId; } if (typeof name !== 'undefined') { - payload['name'] = name; + apiPayload['name'] = name; } if (typeof description !== 'undefined') { - payload['description'] = description; + apiPayload['description'] = description; } if (typeof challengeType !== 'undefined') { - payload['challengeType'] = challengeType; + apiPayload['challengeType'] = challengeType; } if (typeof priority !== 'undefined') { - payload['priority'] = priority; + apiPayload['priority'] = priority; } if (typeof enabled !== 'undefined') { - payload['enabled'] = enabled; + apiPayload['enabled'] = enabled; } if (typeof conditions !== 'undefined') { - payload['conditions'] = conditions; + apiPayload['conditions'] = conditions; } if (typeof difficulty !== 'undefined') { - payload['difficulty'] = difficulty; + apiPayload['difficulty'] = difficulty; } if (typeof ttl !== 'undefined') { - payload['ttl'] = ttl; + apiPayload['ttl'] = ttl; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -829,7 +829,7 @@ export class Waf { accept: 'application/json', }; - return this.client.call('patch', uri, apiHeaders, payload); + return this.client.call('patch', uri, apiHeaders, apiPayload); } /** @@ -966,30 +966,30 @@ export class Waf { throw new AppwriteException('Missing required parameter: "name"'); } const apiPath = '/waf/rules/deny'; - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof ruleId !== 'undefined') { - payload['ruleId'] = ruleId; + apiPayload['ruleId'] = ruleId; } if (typeof resourceType !== 'undefined') { - payload['resourceType'] = resourceType; + apiPayload['resourceType'] = resourceType; } if (typeof resourceId !== 'undefined') { - payload['resourceId'] = resourceId; + apiPayload['resourceId'] = resourceId; } if (typeof name !== 'undefined') { - payload['name'] = name; + apiPayload['name'] = name; } if (typeof description !== 'undefined') { - payload['description'] = description; + apiPayload['description'] = description; } if (typeof priority !== 'undefined') { - payload['priority'] = priority; + apiPayload['priority'] = priority; } if (typeof enabled !== 'undefined') { - payload['enabled'] = enabled; + apiPayload['enabled'] = enabled; } if (typeof conditions !== 'undefined') { - payload['conditions'] = conditions; + apiPayload['conditions'] = conditions; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -999,7 +999,7 @@ export class Waf { accept: 'application/json', }; - return this.client.call('post', uri, apiHeaders, payload); + return this.client.call('post', uri, apiHeaders, apiPayload); } /** @@ -1131,27 +1131,27 @@ export class Waf { '{ruleId}', encodeURIComponent(String(ruleId)), ); - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof resourceType !== 'undefined') { - payload['resourceType'] = resourceType; + apiPayload['resourceType'] = resourceType; } if (typeof resourceId !== 'undefined') { - payload['resourceId'] = resourceId; + apiPayload['resourceId'] = resourceId; } if (typeof name !== 'undefined') { - payload['name'] = name; + apiPayload['name'] = name; } if (typeof description !== 'undefined') { - payload['description'] = description; + apiPayload['description'] = description; } if (typeof priority !== 'undefined') { - payload['priority'] = priority; + apiPayload['priority'] = priority; } if (typeof enabled !== 'undefined') { - payload['enabled'] = enabled; + apiPayload['enabled'] = enabled; } if (typeof conditions !== 'undefined') { - payload['conditions'] = conditions; + apiPayload['conditions'] = conditions; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -1161,7 +1161,7 @@ export class Waf { accept: 'application/json', }; - return this.client.call('patch', uri, apiHeaders, payload); + return this.client.call('patch', uri, apiHeaders, apiPayload); } /** @@ -1356,45 +1356,45 @@ export class Waf { ); } const apiPath = '/waf/rules/rate-limit'; - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof ruleId !== 'undefined') { - payload['ruleId'] = ruleId; + apiPayload['ruleId'] = ruleId; } if (typeof resourceType !== 'undefined') { - payload['resourceType'] = resourceType; + apiPayload['resourceType'] = resourceType; } if (typeof resourceId !== 'undefined') { - payload['resourceId'] = resourceId; + apiPayload['resourceId'] = resourceId; } if (typeof name !== 'undefined') { - payload['name'] = name; + apiPayload['name'] = name; } if (typeof description !== 'undefined') { - payload['description'] = description; + apiPayload['description'] = description; } if (typeof limit !== 'undefined') { - payload['limit'] = limit; + apiPayload['limit'] = limit; } if (typeof interval !== 'undefined') { - payload['interval'] = interval; + apiPayload['interval'] = interval; } if (typeof key !== 'undefined') { - payload['key'] = key; + apiPayload['key'] = key; } if (typeof strategy !== 'undefined') { - payload['strategy'] = strategy; + apiPayload['strategy'] = strategy; } if (typeof maxBucketSize !== 'undefined') { - payload['maxBucketSize'] = maxBucketSize; + apiPayload['maxBucketSize'] = maxBucketSize; } if (typeof priority !== 'undefined') { - payload['priority'] = priority; + apiPayload['priority'] = priority; } if (typeof enabled !== 'undefined') { - payload['enabled'] = enabled; + apiPayload['enabled'] = enabled; } if (typeof conditions !== 'undefined') { - payload['conditions'] = conditions; + apiPayload['conditions'] = conditions; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -1404,7 +1404,7 @@ export class Waf { accept: 'application/json', }; - return this.client.call('post', uri, apiHeaders, payload); + return this.client.call('post', uri, apiHeaders, apiPayload); } /** @@ -1576,39 +1576,39 @@ export class Waf { '{ruleId}', encodeURIComponent(String(ruleId)), ); - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof resourceType !== 'undefined') { - payload['resourceType'] = resourceType; + apiPayload['resourceType'] = resourceType; } if (typeof resourceId !== 'undefined') { - payload['resourceId'] = resourceId; + apiPayload['resourceId'] = resourceId; } if (typeof name !== 'undefined') { - payload['name'] = name; + apiPayload['name'] = name; } if (typeof description !== 'undefined') { - payload['description'] = description; + apiPayload['description'] = description; } if (typeof limit !== 'undefined') { - payload['limit'] = limit; + apiPayload['limit'] = limit; } if (typeof interval !== 'undefined') { - payload['interval'] = interval; + apiPayload['interval'] = interval; } if (typeof key !== 'undefined') { - payload['key'] = key; + apiPayload['key'] = key; } if (typeof maxBucketSize !== 'undefined') { - payload['maxBucketSize'] = maxBucketSize; + apiPayload['maxBucketSize'] = maxBucketSize; } if (typeof priority !== 'undefined') { - payload['priority'] = priority; + apiPayload['priority'] = priority; } if (typeof enabled !== 'undefined') { - payload['enabled'] = enabled; + apiPayload['enabled'] = enabled; } if (typeof conditions !== 'undefined') { - payload['conditions'] = conditions; + apiPayload['conditions'] = conditions; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -1618,7 +1618,7 @@ export class Waf { accept: 'application/json', }; - return this.client.call('patch', uri, apiHeaders, payload); + return this.client.call('patch', uri, apiHeaders, apiPayload); } /** @@ -1785,36 +1785,36 @@ export class Waf { ); } const apiPath = '/waf/rules/redirect'; - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof ruleId !== 'undefined') { - payload['ruleId'] = ruleId; + apiPayload['ruleId'] = ruleId; } if (typeof resourceType !== 'undefined') { - payload['resourceType'] = resourceType; + apiPayload['resourceType'] = resourceType; } if (typeof resourceId !== 'undefined') { - payload['resourceId'] = resourceId; + apiPayload['resourceId'] = resourceId; } if (typeof name !== 'undefined') { - payload['name'] = name; + apiPayload['name'] = name; } if (typeof description !== 'undefined') { - payload['description'] = description; + apiPayload['description'] = description; } if (typeof location !== 'undefined') { - payload['location'] = location; + apiPayload['location'] = location; } if (typeof statusCode !== 'undefined') { - payload['statusCode'] = statusCode; + apiPayload['statusCode'] = statusCode; } if (typeof priority !== 'undefined') { - payload['priority'] = priority; + apiPayload['priority'] = priority; } if (typeof enabled !== 'undefined') { - payload['enabled'] = enabled; + apiPayload['enabled'] = enabled; } if (typeof conditions !== 'undefined') { - payload['conditions'] = conditions; + apiPayload['conditions'] = conditions; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -1824,7 +1824,7 @@ export class Waf { accept: 'application/json', }; - return this.client.call('post', uri, apiHeaders, payload); + return this.client.call('post', uri, apiHeaders, apiPayload); } /** @@ -1976,33 +1976,33 @@ export class Waf { '{ruleId}', encodeURIComponent(String(ruleId)), ); - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof resourceType !== 'undefined') { - payload['resourceType'] = resourceType; + apiPayload['resourceType'] = resourceType; } if (typeof resourceId !== 'undefined') { - payload['resourceId'] = resourceId; + apiPayload['resourceId'] = resourceId; } if (typeof name !== 'undefined') { - payload['name'] = name; + apiPayload['name'] = name; } if (typeof description !== 'undefined') { - payload['description'] = description; + apiPayload['description'] = description; } if (typeof location !== 'undefined') { - payload['location'] = location; + apiPayload['location'] = location; } if (typeof statusCode !== 'undefined') { - payload['statusCode'] = statusCode; + apiPayload['statusCode'] = statusCode; } if (typeof priority !== 'undefined') { - payload['priority'] = priority; + apiPayload['priority'] = priority; } if (typeof enabled !== 'undefined') { - payload['enabled'] = enabled; + apiPayload['enabled'] = enabled; } if (typeof conditions !== 'undefined') { - payload['conditions'] = conditions; + apiPayload['conditions'] = conditions; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -2012,7 +2012,7 @@ export class Waf { accept: 'application/json', }; - return this.client.call('patch', uri, apiHeaders, payload); + return this.client.call('patch', uri, apiHeaders, apiPayload); } /** @@ -2060,7 +2060,7 @@ export class Waf { '{ruleId}', encodeURIComponent(String(ruleId)), ); - const payload: Payload = {}; + const apiPayload: Payload = {}; const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { @@ -2068,7 +2068,7 @@ export class Waf { accept: 'application/json', }; - return this.client.call('get', uri, apiHeaders, payload); + return this.client.call('get', uri, apiHeaders, apiPayload); } /** @@ -2114,7 +2114,7 @@ export class Waf { '{ruleId}', encodeURIComponent(String(ruleId)), ); - const payload: Payload = {}; + const apiPayload: Payload = {}; const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { @@ -2123,6 +2123,6 @@ export class Waf { accept: 'application/json', }; - return this.client.call('delete', uri, apiHeaders, payload); + return this.client.call('delete', uri, apiHeaders, apiPayload); } } diff --git a/src/services/webhooks.ts b/src/services/webhooks.ts index f24e3f40..c4a505ca 100644 --- a/src/services/webhooks.ts +++ b/src/services/webhooks.ts @@ -57,12 +57,12 @@ export class Webhooks { const total = params.total; const apiPath = '/webhooks'; - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof queries !== 'undefined') { - payload['queries'] = queries; + apiPayload['queries'] = queries; } if (typeof total !== 'undefined') { - payload['total'] = total; + apiPayload['total'] = total; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -71,7 +71,7 @@ export class Webhooks { accept: 'application/json', }; - return this.client.call('get', uri, apiHeaders, payload); + return this.client.call('get', uri, apiHeaders, apiPayload); } /** @@ -219,33 +219,33 @@ export class Webhooks { throw new AppwriteException('Missing required parameter: "events"'); } const apiPath = '/webhooks'; - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof webhookId !== 'undefined') { - payload['webhookId'] = webhookId; + apiPayload['webhookId'] = webhookId; } if (typeof url !== 'undefined') { - payload['url'] = url; + apiPayload['url'] = url; } if (typeof name !== 'undefined') { - payload['name'] = name; + apiPayload['name'] = name; } if (typeof events !== 'undefined') { - payload['events'] = events; + apiPayload['events'] = events; } if (typeof enabled !== 'undefined') { - payload['enabled'] = enabled; + apiPayload['enabled'] = enabled; } if (typeof tls !== 'undefined') { - payload['tls'] = tls; + apiPayload['tls'] = tls; } if (typeof authUsername !== 'undefined') { - payload['authUsername'] = authUsername; + apiPayload['authUsername'] = authUsername; } if (typeof authPassword !== 'undefined') { - payload['authPassword'] = authPassword; + apiPayload['authPassword'] = authPassword; } if (typeof secret !== 'undefined') { - payload['secret'] = secret; + apiPayload['secret'] = secret; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -255,7 +255,7 @@ export class Webhooks { accept: 'application/json', }; - return this.client.call('post', uri, apiHeaders, payload); + return this.client.call('post', uri, apiHeaders, apiPayload); } /** @@ -303,7 +303,7 @@ export class Webhooks { '{webhookId}', encodeURIComponent(String(webhookId)), ); - const payload: Payload = {}; + const apiPayload: Payload = {}; const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { @@ -311,7 +311,7 @@ export class Webhooks { accept: 'application/json', }; - return this.client.call('get', uri, apiHeaders, payload); + return this.client.call('get', uri, apiHeaders, apiPayload); } /** @@ -452,27 +452,27 @@ export class Webhooks { '{webhookId}', encodeURIComponent(String(webhookId)), ); - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof name !== 'undefined') { - payload['name'] = name; + apiPayload['name'] = name; } if (typeof url !== 'undefined') { - payload['url'] = url; + apiPayload['url'] = url; } if (typeof events !== 'undefined') { - payload['events'] = events; + apiPayload['events'] = events; } if (typeof enabled !== 'undefined') { - payload['enabled'] = enabled; + apiPayload['enabled'] = enabled; } if (typeof tls !== 'undefined') { - payload['tls'] = tls; + apiPayload['tls'] = tls; } if (typeof authUsername !== 'undefined') { - payload['authUsername'] = authUsername; + apiPayload['authUsername'] = authUsername; } if (typeof authPassword !== 'undefined') { - payload['authPassword'] = authPassword; + apiPayload['authPassword'] = authPassword; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -482,7 +482,7 @@ export class Webhooks { accept: 'application/json', }; - return this.client.call('put', uri, apiHeaders, payload); + return this.client.call('put', uri, apiHeaders, apiPayload); } /** @@ -528,7 +528,7 @@ export class Webhooks { '{webhookId}', encodeURIComponent(String(webhookId)), ); - const payload: Payload = {}; + const apiPayload: Payload = {}; const uri = new URL(this.client.config.endpoint + apiPath); const apiHeaders: { [header: string]: string } = { @@ -537,7 +537,7 @@ export class Webhooks { accept: 'application/json', }; - return this.client.call('delete', uri, apiHeaders, payload); + return this.client.call('delete', uri, apiHeaders, apiPayload); } /** @@ -596,9 +596,9 @@ export class Webhooks { '{webhookId}', encodeURIComponent(String(webhookId)), ); - const payload: Payload = {}; + const apiPayload: Payload = {}; if (typeof secret !== 'undefined') { - payload['secret'] = secret; + apiPayload['secret'] = secret; } const uri = new URL(this.client.config.endpoint + apiPath); @@ -608,6 +608,6 @@ export class Webhooks { accept: 'application/json', }; - return this.client.call('patch', uri, apiHeaders, payload); + return this.client.call('patch', uri, apiHeaders, apiPayload); } }