diff --git a/README.md b/README.md index cbfda1c..db339cc 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 - + ``` @@ -108,4 +108,4 @@ This library is auto-generated by Appwrite custom [SDK Generator](https://github ## License -Please see the [BSD-3-Clause license](https://raw.githubusercontent.com/appwrite/appwrite/master/LICENSE) file for more information. \ No newline at end of file +Please see the [BSD-3-Clause license](https://raw.githubusercontent.com/appwrite/appwrite/master/LICENSE) file for more information. diff --git a/package.json b/package.json index 48b15dd..67532e0 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 abstract and simplify complex and repetitive development tasks behind a very simple REST API", - "version": "1.5.0", + "version": "1.5.1", "license": "BSD-3-Clause", "main": "dist/cjs/sdk.js", "exports": { diff --git a/src/client.ts b/src/client.ts index a32350b..b7a4690 100644 --- a/src/client.ts +++ b/src/client.ts @@ -19,14 +19,14 @@ type Headers = { */ type RealtimeResponse = { /** - * Type of the response: 'error', 'event', 'connected', 'pong', or 'response'. + * Type of the response: 'error', 'event', 'connected', 'response' or 'pong'. */ type: 'error' | 'event' | 'connected' | 'response' | 'pong'; /** * Data associated with the response based on the response type. */ - data: RealtimeResponseAuthenticated | RealtimeResponseConnected | RealtimeResponseError | RealtimeResponseEvent; + data: RealtimeResponseAuthenticated | RealtimeResponseConnected | RealtimeResponseError | RealtimeResponseEvent | undefined; } /** @@ -316,7 +316,7 @@ class Client { 'x-sdk-name': 'Console', 'x-sdk-platform': 'console', 'x-sdk-language': 'web', - 'x-sdk-version': '1.5.0', + 'x-sdk-version': '1.5.1', 'X-Appwrite-Response-Format': '1.6.0', }; @@ -544,6 +544,8 @@ class Client { }) } break; + case 'pong': + break; // Handle pong response if needed case 'error': throw message.data; default: diff --git a/src/models.ts b/src/models.ts index 9cf8d14..0b29822 100644 --- a/src/models.ts +++ b/src/models.ts @@ -3135,6 +3135,14 @@ export namespace Models { * Total aggregated number of total databases storage in bytes. */ storageTotal: number; + /** + * Total number of databases reads. + */ + databasesReadsTotal: number; + /** + * Total number of databases writes. + */ + databasesWritesTotal: number; /** * Aggregated number of databases per period. */ @@ -3151,6 +3159,14 @@ export namespace Models { * An array of the aggregated number of databases storage in bytes per period. */ storage: Metric[]; + /** + * An array of aggregated number of database reads. + */ + databasesReads: Metric[]; + /** + * An array of aggregated number of database writes. + */ + databasesWrites: Metric[]; } /** * UsageDatabase @@ -3172,6 +3188,14 @@ export namespace Models { * Total aggregated number of total storage used in bytes. */ storageTotal: number; + /** + * Total number of databases reads. + */ + databaseReadsTotal: number; + /** + * Total number of databases writes. + */ + databaseWritesTotal: number; /** * Aggregated number of collections per period. */ @@ -3184,6 +3208,14 @@ export namespace Models { * Aggregated storage used in bytes per period. */ storage: Metric[]; + /** + * An array of aggregated number of database reads. + */ + databaseReads: Metric[]; + /** + * An array of aggregated number of database writes. + */ + databaseWrites: Metric[]; } /** * UsageCollection @@ -3507,6 +3539,14 @@ export namespace Models { * Total aggregated number of function builds mbSeconds. */ buildsMbSecondsTotal: number; + /** + * Total number of databases reads. + */ + databasesReadsTotal: number; + /** + * Total number of databases writes. + */ + databasesWritesTotal: number; /** * Aggregated number of requests per period. */ @@ -3559,6 +3599,14 @@ export namespace Models { * Aggregated breakdown in totals of phone auth by country. */ authPhoneCountryBreakdown: MetricBreakdown[]; + /** + * An array of aggregated number of database reads. + */ + databasesReads: Metric[]; + /** + * An array of aggregated number of database writes. + */ + databasesWrites: Metric[]; } /** * Headers diff --git a/src/services/account.ts b/src/services/account.ts index b625e88..6a98031 100644 --- a/src/services/account.ts +++ b/src/services/account.ts @@ -29,6 +29,8 @@ export class Account { 'content-type': 'application/json', } + payload['project'] = this.client.config.project; + return await this.client.call( 'get', @@ -79,6 +81,8 @@ export class Account { 'content-type': 'application/json', } + payload['project'] = this.client.config.project; + return await this.client.call( 'post', @@ -104,6 +108,8 @@ export class Account { 'content-type': 'application/json', } + payload['project'] = this.client.config.project; + return await this.client.call( 'delete', @@ -133,6 +139,8 @@ export class Account { 'content-type': 'application/json', } + payload['project'] = this.client.config.project; + return await this.client.call( 'get', @@ -194,6 +202,8 @@ export class Account { 'content-type': 'application/json', } + payload['project'] = this.client.config.project; + return await this.client.call( 'post', @@ -223,6 +233,8 @@ export class Account { 'content-type': 'application/json', } + payload['project'] = this.client.config.project; + return await this.client.call( 'get', @@ -288,6 +300,8 @@ export class Account { 'content-type': 'application/json', } + payload['project'] = this.client.config.project; + return await this.client.call( 'put', @@ -317,6 +331,8 @@ export class Account { 'content-type': 'application/json', } + payload['project'] = this.client.config.project; + return await this.client.call( 'delete', @@ -346,6 +362,8 @@ export class Account { 'content-type': 'application/json', } + payload['project'] = this.client.config.project; + return await this.client.call( 'get', @@ -387,6 +405,8 @@ This endpoint can also be used to convert an anonymous account to a normal one, 'content-type': 'application/json', } + payload['project'] = this.client.config.project; + return await this.client.call( 'patch', @@ -416,6 +436,8 @@ This endpoint can also be used to convert an anonymous account to a normal one, 'content-type': 'application/json', } + payload['project'] = this.client.config.project; + return await this.client.call( 'get', @@ -445,6 +467,8 @@ This endpoint can also be used to convert an anonymous account to a normal one, 'content-type': 'application/json', } + payload['project'] = this.client.config.project; + return await this.client.call( 'delete', @@ -474,6 +498,8 @@ This endpoint can also be used to convert an anonymous account to a normal one, 'content-type': 'application/json', } + payload['project'] = this.client.config.project; + return await this.client.call( 'get', @@ -499,6 +525,8 @@ This endpoint can also be used to convert an anonymous account to a normal one, 'content-type': 'application/json', } + payload['project'] = this.client.config.project; + return await this.client.call( 'post', @@ -528,6 +556,8 @@ This endpoint can also be used to convert an anonymous account to a normal one, 'content-type': 'application/json', } + payload['project'] = this.client.config.project; + return await this.client.call( 'get', @@ -560,6 +590,8 @@ This endpoint can also be used to convert an anonymous account to a normal one, 'content-type': 'application/json', } + payload['project'] = this.client.config.project; + return await this.client.call( 'patch', @@ -589,6 +621,8 @@ This endpoint can also be used to convert an anonymous account to a normal one, 'content-type': 'application/json', } + payload['project'] = this.client.config.project; + return await this.client.call( 'post', @@ -625,6 +659,8 @@ This endpoint can also be used to convert an anonymous account to a normal one, 'content-type': 'application/json', } + payload['project'] = this.client.config.project; + return await this.client.call( 'put', @@ -654,6 +690,8 @@ This endpoint can also be used to convert an anonymous account to a normal one, 'content-type': 'application/json', } + payload['project'] = this.client.config.project; + return await this.client.call( 'delete', @@ -686,6 +724,8 @@ This endpoint can also be used to convert an anonymous account to a normal one, 'content-type': 'application/json', } + payload['project'] = this.client.config.project; + return await this.client.call( 'post', @@ -725,6 +765,8 @@ This endpoint can also be used to convert an anonymous account to a normal one, 'content-type': 'application/json', } + payload['project'] = this.client.config.project; + return await this.client.call( 'put', @@ -750,6 +792,8 @@ This endpoint can also be used to convert an anonymous account to a normal one, 'content-type': 'application/json', } + payload['project'] = this.client.config.project; + return await this.client.call( 'get', @@ -775,6 +819,8 @@ This endpoint can also be used to convert an anonymous account to a normal one, 'content-type': 'application/json', } + payload['project'] = this.client.config.project; + return await this.client.call( 'get', @@ -800,6 +846,8 @@ This endpoint can also be used to convert an anonymous account to a normal one, 'content-type': 'application/json', } + payload['project'] = this.client.config.project; + return await this.client.call( 'post', @@ -825,6 +873,8 @@ This endpoint can also be used to convert an anonymous account to a normal one, 'content-type': 'application/json', } + payload['project'] = this.client.config.project; + return await this.client.call( 'patch', @@ -857,6 +907,8 @@ This endpoint can also be used to convert an anonymous account to a normal one, 'content-type': 'application/json', } + payload['project'] = this.client.config.project; + return await this.client.call( 'patch', @@ -893,6 +945,8 @@ This endpoint can also be used to convert an anonymous account to a normal one, 'content-type': 'application/json', } + payload['project'] = this.client.config.project; + return await this.client.call( 'patch', @@ -922,6 +976,8 @@ This endpoint can also be used to convert an anonymous account to a normal one, 'content-type': 'application/json', } + payload['project'] = this.client.config.project; + return await this.client.call( 'get', @@ -947,6 +1003,8 @@ This endpoint can also be used to convert an anonymous account to a normal one, 'content-type': 'application/json', } + payload['project'] = this.client.config.project; + return await this.client.call( 'post', @@ -976,6 +1034,8 @@ This endpoint can also be used to convert an anonymous account to a normal one, 'content-type': 'application/json', } + payload['project'] = this.client.config.project; + return await this.client.call( 'get', @@ -1019,6 +1079,8 @@ This endpoint can also be used to convert an anonymous account to a normal one, 'content-type': 'application/json', } + payload['project'] = this.client.config.project; + return await this.client.call( 'patch', @@ -1048,6 +1110,8 @@ This endpoint can also be used to convert an anonymous account to a normal one, 'content-type': 'application/json', } + payload['project'] = this.client.config.project; + return await this.client.call( 'delete', @@ -1091,6 +1155,8 @@ This endpoint can also be used to convert an anonymous account to a normal one, 'content-type': 'application/json', } + payload['project'] = this.client.config.project; + return await this.client.call( 'patch', @@ -1120,6 +1186,8 @@ This endpoint can also be used to convert an anonymous account to a normal one, 'content-type': 'application/json', } + payload['project'] = this.client.config.project; + return await this.client.call( 'patch', @@ -1159,6 +1227,8 @@ This endpoint can also be used to convert an anonymous account to a normal one, 'content-type': 'application/json', } + payload['project'] = this.client.config.project; + return await this.client.call( 'patch', @@ -1184,6 +1254,8 @@ This endpoint can also be used to convert an anonymous account to a normal one, 'content-type': 'application/json', } + payload['project'] = this.client.config.project; + return await this.client.call( 'get', @@ -1216,6 +1288,8 @@ This endpoint can also be used to convert an anonymous account to a normal one, 'content-type': 'application/json', } + payload['project'] = this.client.config.project; + return await this.client.call( 'patch', @@ -1255,6 +1329,8 @@ This endpoint can also be used to convert an anonymous account to a normal one, 'content-type': 'application/json', } + payload['project'] = this.client.config.project; + return await this.client.call( 'post', @@ -1303,6 +1379,8 @@ Please note that in order to avoid a [Redirect Attack](https://github.com/OWASP/ 'content-type': 'application/json', } + payload['project'] = this.client.config.project; + return await this.client.call( 'put', @@ -1328,6 +1406,8 @@ Please note that in order to avoid a [Redirect Attack](https://github.com/OWASP/ 'content-type': 'application/json', } + payload['project'] = this.client.config.project; + return await this.client.call( 'get', @@ -1353,6 +1433,8 @@ Please note that in order to avoid a [Redirect Attack](https://github.com/OWASP/ 'content-type': 'application/json', } + payload['project'] = this.client.config.project; + return await this.client.call( 'delete', @@ -1378,6 +1460,8 @@ Please note that in order to avoid a [Redirect Attack](https://github.com/OWASP/ 'content-type': 'application/json', } + payload['project'] = this.client.config.project; + return await this.client.call( 'post', @@ -1419,6 +1503,8 @@ A user is limited to 10 active sessions at a time by default. [Learn more about 'content-type': 'application/json', } + payload['project'] = this.client.config.project; + return await this.client.call( 'post', @@ -1458,6 +1544,8 @@ A user is limited to 10 active sessions at a time by default. [Learn more about 'content-type': 'application/json', } + payload['project'] = this.client.config.project; + return await this.client.call( 'put', @@ -1505,6 +1593,7 @@ A user is limited to 10 active sessions at a time by default. [Learn more about } payload['project'] = this.client.config.project; + for (const [key, value] of Object.entries(Service.flatten(payload))) { uri.searchParams.append(key, value); } @@ -1547,6 +1636,8 @@ A user is limited to 10 active sessions at a time by default. [Learn more about 'content-type': 'application/json', } + payload['project'] = this.client.config.project; + return await this.client.call( 'put', @@ -1586,6 +1677,8 @@ A user is limited to 10 active sessions at a time by default. [Learn more about 'content-type': 'application/json', } + payload['project'] = this.client.config.project; + return await this.client.call( 'post', @@ -1615,6 +1708,8 @@ A user is limited to 10 active sessions at a time by default. [Learn more about 'content-type': 'application/json', } + payload['project'] = this.client.config.project; + return await this.client.call( 'get', @@ -1644,6 +1739,8 @@ A user is limited to 10 active sessions at a time by default. [Learn more about 'content-type': 'application/json', } + payload['project'] = this.client.config.project; + return await this.client.call( 'patch', @@ -1673,6 +1770,8 @@ A user is limited to 10 active sessions at a time by default. [Learn more about 'content-type': 'application/json', } + payload['project'] = this.client.config.project; + return await this.client.call( 'delete', @@ -1698,6 +1797,8 @@ A user is limited to 10 active sessions at a time by default. [Learn more about 'content-type': 'application/json', } + payload['project'] = this.client.config.project; + return await this.client.call( 'patch', @@ -1741,6 +1842,8 @@ A user is limited to 10 active sessions at a time by default. [Learn more about 'content-type': 'application/json', } + payload['project'] = this.client.config.project; + return await this.client.call( 'post', @@ -1777,6 +1880,8 @@ A user is limited to 10 active sessions at a time by default. [Learn more about 'content-type': 'application/json', } + payload['project'] = this.client.config.project; + return await this.client.call( 'put', @@ -1806,6 +1911,8 @@ A user is limited to 10 active sessions at a time by default. [Learn more about 'content-type': 'application/json', } + payload['project'] = this.client.config.project; + return await this.client.call( 'delete', @@ -1851,6 +1958,8 @@ A user is limited to 10 active sessions at a time by default. [Learn more about 'content-type': 'application/json', } + payload['project'] = this.client.config.project; + return await this.client.call( 'post', @@ -1901,6 +2010,8 @@ A user is limited to 10 active sessions at a time by default. [Learn more about 'content-type': 'application/json', } + payload['project'] = this.client.config.project; + return await this.client.call( 'post', @@ -1947,6 +2058,7 @@ A user is limited to 10 active sessions at a time by default. [Learn more about } payload['project'] = this.client.config.project; + for (const [key, value] of Object.entries(Service.flatten(payload))) { uri.searchParams.append(key, value); } @@ -1991,6 +2103,8 @@ A user is limited to 10 active sessions at a time by default. [Learn more about 'content-type': 'application/json', } + payload['project'] = this.client.config.project; + return await this.client.call( 'post', @@ -2026,6 +2140,8 @@ Please note that in order to avoid a [Redirect Attack](https://github.com/OWASP/ 'content-type': 'application/json', } + payload['project'] = this.client.config.project; + return await this.client.call( 'post', @@ -2065,6 +2181,8 @@ Please note that in order to avoid a [Redirect Attack](https://github.com/OWASP/ 'content-type': 'application/json', } + payload['project'] = this.client.config.project; + return await this.client.call( 'put', @@ -2090,6 +2208,8 @@ Please note that in order to avoid a [Redirect Attack](https://github.com/OWASP/ 'content-type': 'application/json', } + payload['project'] = this.client.config.project; + return await this.client.call( 'post', @@ -2129,6 +2249,8 @@ Please note that in order to avoid a [Redirect Attack](https://github.com/OWASP/ 'content-type': 'application/json', } + payload['project'] = this.client.config.project; + return await this.client.call( 'put', diff --git a/src/services/assistant.ts b/src/services/assistant.ts index 5e72789..8406f83 100644 --- a/src/services/assistant.ts +++ b/src/services/assistant.ts @@ -33,6 +33,8 @@ export class Assistant { 'content-type': 'application/json', } + payload['project'] = this.client.config.project; + return await this.client.call( 'post', diff --git a/src/services/avatars.ts b/src/services/avatars.ts index 21376ea..50b52bb 100644 --- a/src/services/avatars.ts +++ b/src/services/avatars.ts @@ -48,13 +48,8 @@ When one dimension is specified and the other is 0, the image is scaled with pre } payload['project'] = this.client.config.project; - for (const [key, value] of Object.entries(Service.flatten(payload))) { - uri.searchParams.append(key, value); - } - payload['project'] = this.client.config.project; - - for (const [key, value] of Object.entries(Client.flatten(payload))) { + for (const [key, value] of Object.entries(Service.flatten(payload))) { uri.searchParams.append(key, value); } @@ -96,14 +91,9 @@ When one dimension is specified and the other is 0, the image is scaled with pre 'content-type': 'application/json', } - payload['project'] = this.client.config.project; - for (const [key, value] of Object.entries(Service.flatten(payload))) { - uri.searchParams.append(key, value); - } - payload['project'] = this.client.config.project; - for (const [key, value] of Object.entries(Client.flatten(payload))) { + for (const [key, value] of Object.entries(Service.flatten(payload))) { uri.searchParams.append(key, value); } @@ -135,14 +125,9 @@ This endpoint does not follow HTTP redirects. 'content-type': 'application/json', } - payload['project'] = this.client.config.project; - for (const [key, value] of Object.entries(Service.flatten(payload))) { - uri.searchParams.append(key, value); - } - payload['project'] = this.client.config.project; - for (const [key, value] of Object.entries(Client.flatten(payload))) { + for (const [key, value] of Object.entries(Service.flatten(payload))) { uri.searchParams.append(key, value); } @@ -184,14 +169,9 @@ When one dimension is specified and the other is 0, the image is scaled with pre 'content-type': 'application/json', } - payload['project'] = this.client.config.project; - for (const [key, value] of Object.entries(Service.flatten(payload))) { - uri.searchParams.append(key, value); - } - payload['project'] = this.client.config.project; - for (const [key, value] of Object.entries(Client.flatten(payload))) { + for (const [key, value] of Object.entries(Service.flatten(payload))) { uri.searchParams.append(key, value); } @@ -234,13 +214,8 @@ This endpoint does not follow HTTP redirects. } payload['project'] = this.client.config.project; - for (const [key, value] of Object.entries(Service.flatten(payload))) { - uri.searchParams.append(key, value); - } - payload['project'] = this.client.config.project; - - for (const [key, value] of Object.entries(Client.flatten(payload))) { + for (const [key, value] of Object.entries(Service.flatten(payload))) { uri.searchParams.append(key, value); } @@ -284,14 +259,9 @@ When one dimension is specified and the other is 0, the image is scaled with pre 'content-type': 'application/json', } - payload['project'] = this.client.config.project; - for (const [key, value] of Object.entries(Service.flatten(payload))) { - uri.searchParams.append(key, value); - } - payload['project'] = this.client.config.project; - for (const [key, value] of Object.entries(Client.flatten(payload))) { + for (const [key, value] of Object.entries(Service.flatten(payload))) { uri.searchParams.append(key, value); } @@ -334,14 +304,9 @@ When one dimension is specified and the other is 0, the image is scaled with pre 'content-type': 'application/json', } - payload['project'] = this.client.config.project; - for (const [key, value] of Object.entries(Service.flatten(payload))) { - uri.searchParams.append(key, value); - } - payload['project'] = this.client.config.project; - for (const [key, value] of Object.entries(Client.flatten(payload))) { + for (const [key, value] of Object.entries(Service.flatten(payload))) { uri.searchParams.append(key, value); } diff --git a/src/services/backups.ts b/src/services/backups.ts index 90443ec..3897dd5 100644 --- a/src/services/backups.ts +++ b/src/services/backups.ts @@ -30,6 +30,8 @@ export class Backups { 'content-type': 'application/json', } + payload['project'] = this.client.config.project; + return await this.client.call( 'get', @@ -66,6 +68,8 @@ export class Backups { 'content-type': 'application/json', } + payload['project'] = this.client.config.project; + return await this.client.call( 'post', @@ -95,6 +99,8 @@ export class Backups { 'content-type': 'application/json', } + payload['project'] = this.client.config.project; + return await this.client.call( 'get', @@ -124,6 +130,8 @@ export class Backups { 'content-type': 'application/json', } + payload['project'] = this.client.config.project; + return await this.client.call( 'delete', @@ -153,6 +161,8 @@ export class Backups { 'content-type': 'application/json', } + payload['project'] = this.client.config.project; + return await this.client.call( 'get', @@ -218,6 +228,8 @@ export class Backups { 'content-type': 'application/json', } + payload['project'] = this.client.config.project; + return await this.client.call( 'post', @@ -247,6 +259,8 @@ export class Backups { 'content-type': 'application/json', } + payload['project'] = this.client.config.project; + return await this.client.call( 'get', @@ -292,6 +306,8 @@ export class Backups { 'content-type': 'application/json', } + payload['project'] = this.client.config.project; + return await this.client.call( 'patch', @@ -321,6 +337,8 @@ export class Backups { 'content-type': 'application/json', } + payload['project'] = this.client.config.project; + return await this.client.call( 'delete', @@ -368,6 +386,8 @@ export class Backups { 'content-type': 'application/json', } + payload['project'] = this.client.config.project; + return await this.client.call( 'post', @@ -397,6 +417,8 @@ export class Backups { 'content-type': 'application/json', } + payload['project'] = this.client.config.project; + return await this.client.call( 'get', @@ -426,6 +448,8 @@ export class Backups { 'content-type': 'application/json', } + payload['project'] = this.client.config.project; + return await this.client.call( 'get', diff --git a/src/services/console.ts b/src/services/console.ts index cb9f9a5..0911521 100644 --- a/src/services/console.ts +++ b/src/services/console.ts @@ -30,6 +30,8 @@ export class Console { 'content-type': 'application/json', } + payload['project'] = this.client.config.project; + return await this.client.call( 'get', @@ -59,6 +61,8 @@ export class Console { 'content-type': 'application/json', } + payload['project'] = this.client.config.project; + return await this.client.call( 'get', @@ -84,6 +88,8 @@ export class Console { 'content-type': 'application/json', } + payload['project'] = this.client.config.project; + return await this.client.call( 'get', @@ -113,6 +119,8 @@ export class Console { 'content-type': 'application/json', } + payload['project'] = this.client.config.project; + return await this.client.call( 'post', @@ -138,6 +146,8 @@ export class Console { 'content-type': 'application/json', } + payload['project'] = this.client.config.project; + return await this.client.call( 'get', @@ -183,6 +193,8 @@ export class Console { 'content-type': 'application/json', } + payload['project'] = this.client.config.project; + return await this.client.call( 'post', @@ -208,6 +220,8 @@ export class Console { 'content-type': 'application/json', } + payload['project'] = this.client.config.project; + return await this.client.call( 'get', diff --git a/src/services/databases.ts b/src/services/databases.ts index ac7aa4f..bcfdd83 100644 --- a/src/services/databases.ts +++ b/src/services/databases.ts @@ -38,6 +38,8 @@ export class Databases { 'content-type': 'application/json', } + payload['project'] = this.client.config.project; + return await this.client.call( 'get', @@ -82,6 +84,8 @@ export class Databases { 'content-type': 'application/json', } + payload['project'] = this.client.config.project; + return await this.client.call( 'post', @@ -111,6 +115,8 @@ export class Databases { 'content-type': 'application/json', } + payload['project'] = this.client.config.project; + return await this.client.call( 'get', @@ -140,6 +146,8 @@ export class Databases { 'content-type': 'application/json', } + payload['project'] = this.client.config.project; + return await this.client.call( 'get', @@ -180,6 +188,8 @@ export class Databases { 'content-type': 'application/json', } + payload['project'] = this.client.config.project; + return await this.client.call( 'put', @@ -209,6 +219,8 @@ export class Databases { 'content-type': 'application/json', } + payload['project'] = this.client.config.project; + return await this.client.call( 'delete', @@ -246,6 +258,8 @@ export class Databases { 'content-type': 'application/json', } + payload['project'] = this.client.config.project; + return await this.client.call( 'get', @@ -301,6 +315,8 @@ export class Databases { 'content-type': 'application/json', } + payload['project'] = this.client.config.project; + return await this.client.call( 'post', @@ -334,6 +350,8 @@ export class Databases { 'content-type': 'application/json', } + payload['project'] = this.client.config.project; + return await this.client.call( 'get', @@ -386,6 +404,8 @@ export class Databases { 'content-type': 'application/json', } + payload['project'] = this.client.config.project; + return await this.client.call( 'put', @@ -419,6 +439,8 @@ export class Databases { 'content-type': 'application/json', } + payload['project'] = this.client.config.project; + return await this.client.call( 'delete', @@ -456,6 +478,8 @@ export class Databases { 'content-type': 'application/json', } + payload['project'] = this.client.config.project; + return await this.client.call( 'get', @@ -512,6 +536,8 @@ export class Databases { 'content-type': 'application/json', } + payload['project'] = this.client.config.project; + return await this.client.call( 'post', @@ -567,6 +593,8 @@ export class Databases { 'content-type': 'application/json', } + payload['project'] = this.client.config.project; + return await this.client.call( 'patch', @@ -622,6 +650,8 @@ export class Databases { 'content-type': 'application/json', } + payload['project'] = this.client.config.project; + return await this.client.call( 'post', @@ -677,6 +707,8 @@ export class Databases { 'content-type': 'application/json', } + payload['project'] = this.client.config.project; + return await this.client.call( 'patch', @@ -733,6 +765,8 @@ export class Databases { 'content-type': 'application/json', } + payload['project'] = this.client.config.project; + return await this.client.call( 'post', @@ -789,6 +823,8 @@ export class Databases { 'content-type': 'application/json', } + payload['project'] = this.client.config.project; + return await this.client.call( 'patch', @@ -852,6 +888,8 @@ export class Databases { 'content-type': 'application/json', } + payload['project'] = this.client.config.project; + return await this.client.call( 'post', @@ -915,6 +953,8 @@ export class Databases { 'content-type': 'application/json', } + payload['project'] = this.client.config.project; + return await this.client.call( 'patch', @@ -979,6 +1019,8 @@ export class Databases { 'content-type': 'application/json', } + payload['project'] = this.client.config.project; + return await this.client.call( 'post', @@ -1049,6 +1091,8 @@ export class Databases { 'content-type': 'application/json', } + payload['project'] = this.client.config.project; + return await this.client.call( 'patch', @@ -1113,6 +1157,8 @@ export class Databases { 'content-type': 'application/json', } + payload['project'] = this.client.config.project; + return await this.client.call( 'post', @@ -1183,6 +1229,8 @@ export class Databases { 'content-type': 'application/json', } + payload['project'] = this.client.config.project; + return await this.client.call( 'patch', @@ -1239,6 +1287,8 @@ export class Databases { 'content-type': 'application/json', } + payload['project'] = this.client.config.project; + return await this.client.call( 'post', @@ -1295,6 +1345,8 @@ export class Databases { 'content-type': 'application/json', } + payload['project'] = this.client.config.project; + return await this.client.call( 'patch', @@ -1359,6 +1411,8 @@ export class Databases { 'content-type': 'application/json', } + payload['project'] = this.client.config.project; + return await this.client.call( 'post', @@ -1426,6 +1480,8 @@ export class Databases { 'content-type': 'application/json', } + payload['project'] = this.client.config.project; + return await this.client.call( 'post', @@ -1486,6 +1542,8 @@ export class Databases { 'content-type': 'application/json', } + payload['project'] = this.client.config.project; + return await this.client.call( 'patch', @@ -1542,6 +1600,8 @@ export class Databases { 'content-type': 'application/json', } + payload['project'] = this.client.config.project; + return await this.client.call( 'post', @@ -1598,6 +1658,8 @@ export class Databases { 'content-type': 'application/json', } + payload['project'] = this.client.config.project; + return await this.client.call( 'patch', @@ -1635,6 +1697,8 @@ export class Databases { 'content-type': 'application/json', } + payload['project'] = this.client.config.project; + return await this.client.call( 'get', @@ -1672,6 +1736,8 @@ export class Databases { 'content-type': 'application/json', } + payload['project'] = this.client.config.project; + return await this.client.call( 'delete', @@ -1718,6 +1784,8 @@ export class Databases { 'content-type': 'application/json', } + payload['project'] = this.client.config.project; + return await this.client.call( 'patch', @@ -1755,6 +1823,8 @@ export class Databases { 'content-type': 'application/json', } + payload['project'] = this.client.config.project; + return await this.client.call( 'get', @@ -1806,6 +1876,8 @@ export class Databases { 'content-type': 'application/json', } + payload['project'] = this.client.config.project; + return await this.client.call( 'post', @@ -1847,6 +1919,8 @@ export class Databases { 'content-type': 'application/json', } + payload['project'] = this.client.config.project; + return await this.client.call( 'get', @@ -1892,6 +1966,8 @@ export class Databases { 'content-type': 'application/json', } + payload['project'] = this.client.config.project; + return await this.client.call( 'patch', @@ -1929,6 +2005,8 @@ export class Databases { 'content-type': 'application/json', } + payload['project'] = this.client.config.project; + return await this.client.call( 'delete', @@ -1970,6 +2048,8 @@ export class Databases { 'content-type': 'application/json', } + payload['project'] = this.client.config.project; + return await this.client.call( 'get', @@ -2007,6 +2087,8 @@ export class Databases { 'content-type': 'application/json', } + payload['project'] = this.client.config.project; + return await this.client.call( 'get', @@ -2066,6 +2148,8 @@ Attributes can be `key`, `fulltext`, and `unique`. 'content-type': 'application/json', } + payload['project'] = this.client.config.project; + return await this.client.call( 'post', @@ -2103,6 +2187,8 @@ Attributes can be `key`, `fulltext`, and `unique`. 'content-type': 'application/json', } + payload['project'] = this.client.config.project; + return await this.client.call( 'get', @@ -2140,6 +2226,8 @@ Attributes can be `key`, `fulltext`, and `unique`. 'content-type': 'application/json', } + payload['project'] = this.client.config.project; + return await this.client.call( 'delete', @@ -2177,6 +2265,8 @@ Attributes can be `key`, `fulltext`, and `unique`. 'content-type': 'application/json', } + payload['project'] = this.client.config.project; + return await this.client.call( 'get', @@ -2214,6 +2304,8 @@ Attributes can be `key`, `fulltext`, and `unique`. 'content-type': 'application/json', } + payload['project'] = this.client.config.project; + return await this.client.call( 'get', @@ -2247,6 +2339,8 @@ Attributes can be `key`, `fulltext`, and `unique`. 'content-type': 'application/json', } + payload['project'] = this.client.config.project; + return await this.client.call( 'get', @@ -2280,6 +2374,8 @@ Attributes can be `key`, `fulltext`, and `unique`. 'content-type': 'application/json', } + payload['project'] = this.client.config.project; + return await this.client.call( 'get', diff --git a/src/services/functions.ts b/src/services/functions.ts index 52c13be..7b44e55 100644 --- a/src/services/functions.ts +++ b/src/services/functions.ts @@ -37,6 +37,8 @@ export class Functions { 'content-type': 'application/json', } + payload['project'] = this.client.config.project; + return await this.client.call( 'get', @@ -159,6 +161,8 @@ export class Functions { 'content-type': 'application/json', } + payload['project'] = this.client.config.project; + return await this.client.call( 'post', @@ -184,6 +188,8 @@ export class Functions { 'content-type': 'application/json', } + payload['project'] = this.client.config.project; + return await this.client.call( 'get', @@ -210,6 +216,8 @@ export class Functions { 'content-type': 'application/json', } + payload['project'] = this.client.config.project; + return await this.client.call( 'get', @@ -251,6 +259,8 @@ export class Functions { 'content-type': 'application/json', } + payload['project'] = this.client.config.project; + return await this.client.call( 'get', @@ -280,6 +290,8 @@ export class Functions { 'content-type': 'application/json', } + payload['project'] = this.client.config.project; + return await this.client.call( 'get', @@ -309,6 +321,8 @@ export class Functions { 'content-type': 'application/json', } + payload['project'] = this.client.config.project; + return await this.client.call( 'get', @@ -338,6 +352,8 @@ export class Functions { 'content-type': 'application/json', } + payload['project'] = this.client.config.project; + return await this.client.call( 'get', @@ -438,6 +454,8 @@ export class Functions { 'content-type': 'application/json', } + payload['project'] = this.client.config.project; + return await this.client.call( 'put', @@ -467,6 +485,8 @@ export class Functions { 'content-type': 'application/json', } + payload['project'] = this.client.config.project; + return await this.client.call( 'delete', @@ -504,6 +524,8 @@ export class Functions { 'content-type': 'application/json', } + payload['project'] = this.client.config.project; + return await this.client.call( 'get', @@ -559,6 +581,8 @@ Use the "command" param to set the entrypoint used to execute your cod 'content-type': 'multipart/form-data', } + payload['project'] = this.client.config.project; + return await this.client.chunkedUpload( 'post', @@ -593,6 +617,8 @@ Use the "command" param to set the entrypoint used to execute your cod 'content-type': 'application/json', } + payload['project'] = this.client.config.project; + return await this.client.call( 'get', @@ -626,6 +652,8 @@ Use the "command" param to set the entrypoint used to execute your cod 'content-type': 'application/json', } + payload['project'] = this.client.config.project; + return await this.client.call( 'patch', @@ -659,6 +687,8 @@ Use the "command" param to set the entrypoint used to execute your cod 'content-type': 'application/json', } + payload['project'] = this.client.config.project; + return await this.client.call( 'delete', @@ -696,6 +726,8 @@ Use the "command" param to set the entrypoint used to execute your cod 'content-type': 'application/json', } + payload['project'] = this.client.config.project; + return await this.client.call( 'post', @@ -729,6 +761,8 @@ Use the "command" param to set the entrypoint used to execute your cod 'content-type': 'application/json', } + payload['project'] = this.client.config.project; + return await this.client.call( 'patch', @@ -763,13 +797,8 @@ Use the "command" param to set the entrypoint used to execute your cod } payload['project'] = this.client.config.project; - for (const [key, value] of Object.entries(Service.flatten(payload))) { - uri.searchParams.append(key, value); - } - payload['project'] = this.client.config.project; - - for (const [key, value] of Object.entries(Client.flatten(payload))) { + for (const [key, value] of Object.entries(Service.flatten(payload))) { uri.searchParams.append(key, value); } @@ -804,6 +833,8 @@ Use the "command" param to set the entrypoint used to execute your cod 'content-type': 'application/json', } + payload['project'] = this.client.config.project; + return await this.client.call( 'get', @@ -857,6 +888,8 @@ Use the "command" param to set the entrypoint used to execute your cod 'content-type': 'application/json', } + payload['project'] = this.client.config.project; + return await this.client.call( 'post', @@ -890,6 +923,8 @@ Use the "command" param to set the entrypoint used to execute your cod 'content-type': 'application/json', } + payload['project'] = this.client.config.project; + return await this.client.call( 'get', @@ -924,6 +959,8 @@ Use the "command" param to set the entrypoint used to execute your cod 'content-type': 'application/json', } + payload['project'] = this.client.config.project; + return await this.client.call( 'delete', @@ -957,6 +994,8 @@ Use the "command" param to set the entrypoint used to execute your cod 'content-type': 'application/json', } + payload['project'] = this.client.config.project; + return await this.client.call( 'get', @@ -986,6 +1025,8 @@ Use the "command" param to set the entrypoint used to execute your cod 'content-type': 'application/json', } + payload['project'] = this.client.config.project; + return await this.client.call( 'get', @@ -1029,6 +1070,8 @@ Use the "command" param to set the entrypoint used to execute your cod 'content-type': 'application/json', } + payload['project'] = this.client.config.project; + return await this.client.call( 'post', @@ -1062,6 +1105,8 @@ Use the "command" param to set the entrypoint used to execute your cod 'content-type': 'application/json', } + payload['project'] = this.client.config.project; + return await this.client.call( 'get', @@ -1106,6 +1151,8 @@ Use the "command" param to set the entrypoint used to execute your cod 'content-type': 'application/json', } + payload['project'] = this.client.config.project; + return await this.client.call( 'put', @@ -1139,6 +1186,8 @@ Use the "command" param to set the entrypoint used to execute your cod 'content-type': 'application/json', } + payload['project'] = this.client.config.project; + return await this.client.call( 'delete', diff --git a/src/services/graphql.ts b/src/services/graphql.ts index e8b27ec..8d57103 100644 --- a/src/services/graphql.ts +++ b/src/services/graphql.ts @@ -34,6 +34,8 @@ export class Graphql { 'content-type': 'application/json', } + payload['project'] = this.client.config.project; + return await this.client.call( 'post', @@ -67,6 +69,8 @@ export class Graphql { 'content-type': 'application/json', } + payload['project'] = this.client.config.project; + return await this.client.call( 'post', diff --git a/src/services/health.ts b/src/services/health.ts index 312cf96..b68f2d5 100644 --- a/src/services/health.ts +++ b/src/services/health.ts @@ -27,6 +27,8 @@ export class Health { 'content-type': 'application/json', } + payload['project'] = this.client.config.project; + return await this.client.call( 'get', @@ -52,6 +54,8 @@ export class Health { 'content-type': 'application/json', } + payload['project'] = this.client.config.project; + return await this.client.call( 'get', @@ -77,6 +81,8 @@ export class Health { 'content-type': 'application/json', } + payload['project'] = this.client.config.project; + return await this.client.call( 'get', @@ -106,6 +112,8 @@ export class Health { 'content-type': 'application/json', } + payload['project'] = this.client.config.project; + return await this.client.call( 'get', @@ -131,6 +139,8 @@ export class Health { 'content-type': 'application/json', } + payload['project'] = this.client.config.project; + return await this.client.call( 'get', @@ -156,6 +166,8 @@ export class Health { 'content-type': 'application/json', } + payload['project'] = this.client.config.project; + return await this.client.call( 'get', @@ -181,6 +193,8 @@ export class Health { 'content-type': 'application/json', } + payload['project'] = this.client.config.project; + return await this.client.call( 'get', @@ -210,6 +224,8 @@ export class Health { 'content-type': 'application/json', } + payload['project'] = this.client.config.project; + return await this.client.call( 'get', @@ -239,6 +255,8 @@ export class Health { 'content-type': 'application/json', } + payload['project'] = this.client.config.project; + return await this.client.call( 'get', @@ -268,6 +286,8 @@ export class Health { 'content-type': 'application/json', } + payload['project'] = this.client.config.project; + return await this.client.call( 'get', @@ -297,6 +317,8 @@ export class Health { 'content-type': 'application/json', } + payload['project'] = this.client.config.project; + return await this.client.call( 'get', @@ -330,6 +352,8 @@ export class Health { 'content-type': 'application/json', } + payload['project'] = this.client.config.project; + return await this.client.call( 'get', @@ -359,6 +383,8 @@ export class Health { 'content-type': 'application/json', } + payload['project'] = this.client.config.project; + return await this.client.call( 'get', @@ -393,6 +419,8 @@ export class Health { 'content-type': 'application/json', } + payload['project'] = this.client.config.project; + return await this.client.call( 'get', @@ -422,6 +450,8 @@ export class Health { 'content-type': 'application/json', } + payload['project'] = this.client.config.project; + return await this.client.call( 'get', @@ -451,6 +481,8 @@ export class Health { 'content-type': 'application/json', } + payload['project'] = this.client.config.project; + return await this.client.call( 'get', @@ -480,6 +512,8 @@ export class Health { 'content-type': 'application/json', } + payload['project'] = this.client.config.project; + return await this.client.call( 'get', @@ -509,6 +543,8 @@ export class Health { 'content-type': 'application/json', } + payload['project'] = this.client.config.project; + return await this.client.call( 'get', @@ -538,6 +574,8 @@ export class Health { 'content-type': 'application/json', } + payload['project'] = this.client.config.project; + return await this.client.call( 'get', @@ -567,6 +605,8 @@ export class Health { 'content-type': 'application/json', } + payload['project'] = this.client.config.project; + return await this.client.call( 'get', @@ -596,6 +636,8 @@ export class Health { 'content-type': 'application/json', } + payload['project'] = this.client.config.project; + return await this.client.call( 'get', @@ -625,6 +667,8 @@ export class Health { 'content-type': 'application/json', } + payload['project'] = this.client.config.project; + return await this.client.call( 'get', @@ -654,6 +698,8 @@ export class Health { 'content-type': 'application/json', } + payload['project'] = this.client.config.project; + return await this.client.call( 'get', @@ -679,6 +725,8 @@ export class Health { 'content-type': 'application/json', } + payload['project'] = this.client.config.project; + return await this.client.call( 'get', @@ -704,6 +752,8 @@ export class Health { 'content-type': 'application/json', } + payload['project'] = this.client.config.project; + return await this.client.call( 'get', @@ -729,6 +779,8 @@ export class Health { 'content-type': 'application/json', } + payload['project'] = this.client.config.project; + return await this.client.call( 'get', diff --git a/src/services/locale.ts b/src/services/locale.ts index ad02a6c..344e2b5 100644 --- a/src/services/locale.ts +++ b/src/services/locale.ts @@ -28,6 +28,8 @@ export class Locale { 'content-type': 'application/json', } + payload['project'] = this.client.config.project; + return await this.client.call( 'get', @@ -53,6 +55,8 @@ export class Locale { 'content-type': 'application/json', } + payload['project'] = this.client.config.project; + return await this.client.call( 'get', @@ -78,6 +82,8 @@ export class Locale { 'content-type': 'application/json', } + payload['project'] = this.client.config.project; + return await this.client.call( 'get', @@ -103,6 +109,8 @@ export class Locale { 'content-type': 'application/json', } + payload['project'] = this.client.config.project; + return await this.client.call( 'get', @@ -128,6 +136,8 @@ export class Locale { 'content-type': 'application/json', } + payload['project'] = this.client.config.project; + return await this.client.call( 'get', @@ -153,6 +163,8 @@ export class Locale { 'content-type': 'application/json', } + payload['project'] = this.client.config.project; + return await this.client.call( 'get', @@ -178,6 +190,8 @@ export class Locale { 'content-type': 'application/json', } + payload['project'] = this.client.config.project; + return await this.client.call( 'get', @@ -203,6 +217,8 @@ export class Locale { 'content-type': 'application/json', } + payload['project'] = this.client.config.project; + return await this.client.call( 'get', diff --git a/src/services/messaging.ts b/src/services/messaging.ts index f0a3bbd..256efc5 100644 --- a/src/services/messaging.ts +++ b/src/services/messaging.ts @@ -36,6 +36,8 @@ export class Messaging { 'content-type': 'application/json', } + payload['project'] = this.client.config.project; + return await this.client.call( 'get', @@ -118,6 +120,8 @@ export class Messaging { 'content-type': 'application/json', } + payload['project'] = this.client.config.project; + return await this.client.call( 'post', @@ -129,7 +133,7 @@ export class Messaging { /** * Update email * - * Update an email message by its unique ID. + * Update an email message by its unique ID. This endpoint only works on messages that are in draft status. Messages that are already processing, sent, or failed cannot be updated. * * @param {string} messageId @@ -192,6 +196,8 @@ export class Messaging { 'content-type': 'application/json', } + payload['project'] = this.client.config.project; + return await this.client.call( 'patch', @@ -296,6 +302,8 @@ export class Messaging { 'content-type': 'application/json', } + payload['project'] = this.client.config.project; + return await this.client.call( 'post', @@ -307,7 +315,7 @@ export class Messaging { /** * Update push notification * - * Update a push notification by its unique ID. + * Update a push notification by its unique ID. This endpoint only works on messages that are in draft status. Messages that are already processing, sent, or failed cannot be updated. * * @param {string} messageId @@ -398,6 +406,8 @@ export class Messaging { 'content-type': 'application/json', } + payload['project'] = this.client.config.project; + return await this.client.call( 'patch', @@ -457,6 +467,8 @@ export class Messaging { 'content-type': 'application/json', } + payload['project'] = this.client.config.project; + return await this.client.call( 'post', @@ -468,7 +480,7 @@ export class Messaging { /** * Update SMS * - * Update an SMS message by its unique ID. + * Update an SMS message by its unique ID. This endpoint only works on messages that are in draft status. Messages that are already processing, sent, or failed cannot be updated. * * @param {string} messageId @@ -511,6 +523,8 @@ export class Messaging { 'content-type': 'application/json', } + payload['project'] = this.client.config.project; + return await this.client.call( 'patch', @@ -541,6 +555,8 @@ export class Messaging { 'content-type': 'application/json', } + payload['project'] = this.client.config.project; + return await this.client.call( 'get', @@ -570,6 +586,8 @@ export class Messaging { 'content-type': 'application/json', } + payload['project'] = this.client.config.project; + return await this.client.call( 'delete', @@ -603,6 +621,8 @@ export class Messaging { 'content-type': 'application/json', } + payload['project'] = this.client.config.project; + return await this.client.call( 'get', @@ -636,6 +656,8 @@ export class Messaging { 'content-type': 'application/json', } + payload['project'] = this.client.config.project; + return await this.client.call( 'get', @@ -669,6 +691,8 @@ export class Messaging { 'content-type': 'application/json', } + payload['project'] = this.client.config.project; + return await this.client.call( 'get', @@ -732,6 +756,8 @@ export class Messaging { 'content-type': 'application/json', } + payload['project'] = this.client.config.project; + return await this.client.call( 'post', @@ -789,6 +815,8 @@ export class Messaging { 'content-type': 'application/json', } + payload['project'] = this.client.config.project; + return await this.client.call( 'patch', @@ -836,6 +864,8 @@ export class Messaging { 'content-type': 'application/json', } + payload['project'] = this.client.config.project; + return await this.client.call( 'post', @@ -877,6 +907,8 @@ export class Messaging { 'content-type': 'application/json', } + payload['project'] = this.client.config.project; + return await this.client.call( 'patch', @@ -948,6 +980,8 @@ export class Messaging { 'content-type': 'application/json', } + payload['project'] = this.client.config.project; + return await this.client.call( 'post', @@ -1013,6 +1047,8 @@ export class Messaging { 'content-type': 'application/json', } + payload['project'] = this.client.config.project; + return await this.client.call( 'patch', @@ -1068,6 +1104,8 @@ export class Messaging { 'content-type': 'application/json', } + payload['project'] = this.client.config.project; + return await this.client.call( 'post', @@ -1117,6 +1155,8 @@ export class Messaging { 'content-type': 'application/json', } + payload['project'] = this.client.config.project; + return await this.client.call( 'patch', @@ -1180,6 +1220,8 @@ export class Messaging { 'content-type': 'application/json', } + payload['project'] = this.client.config.project; + return await this.client.call( 'post', @@ -1237,6 +1279,8 @@ export class Messaging { 'content-type': 'application/json', } + payload['project'] = this.client.config.project; + return await this.client.call( 'patch', @@ -1327,6 +1371,8 @@ export class Messaging { 'content-type': 'application/json', } + payload['project'] = this.client.config.project; + return await this.client.call( 'post', @@ -1408,6 +1454,8 @@ export class Messaging { 'content-type': 'application/json', } + payload['project'] = this.client.config.project; + return await this.client.call( 'patch', @@ -1463,6 +1511,8 @@ export class Messaging { 'content-type': 'application/json', } + payload['project'] = this.client.config.project; + return await this.client.call( 'post', @@ -1512,6 +1562,8 @@ export class Messaging { 'content-type': 'application/json', } + payload['project'] = this.client.config.project; + return await this.client.call( 'patch', @@ -1567,6 +1619,8 @@ export class Messaging { 'content-type': 'application/json', } + payload['project'] = this.client.config.project; + return await this.client.call( 'post', @@ -1616,6 +1670,8 @@ export class Messaging { 'content-type': 'application/json', } + payload['project'] = this.client.config.project; + return await this.client.call( 'patch', @@ -1671,6 +1727,8 @@ export class Messaging { 'content-type': 'application/json', } + payload['project'] = this.client.config.project; + return await this.client.call( 'post', @@ -1720,6 +1778,8 @@ export class Messaging { 'content-type': 'application/json', } + payload['project'] = this.client.config.project; + return await this.client.call( 'patch', @@ -1775,6 +1835,8 @@ export class Messaging { 'content-type': 'application/json', } + payload['project'] = this.client.config.project; + return await this.client.call( 'post', @@ -1824,6 +1886,8 @@ export class Messaging { 'content-type': 'application/json', } + payload['project'] = this.client.config.project; + return await this.client.call( 'patch', @@ -1854,6 +1918,8 @@ export class Messaging { 'content-type': 'application/json', } + payload['project'] = this.client.config.project; + return await this.client.call( 'get', @@ -1883,6 +1949,8 @@ export class Messaging { 'content-type': 'application/json', } + payload['project'] = this.client.config.project; + return await this.client.call( 'delete', @@ -1916,6 +1984,8 @@ export class Messaging { 'content-type': 'application/json', } + payload['project'] = this.client.config.project; + return await this.client.call( 'get', @@ -1949,6 +2019,8 @@ export class Messaging { 'content-type': 'application/json', } + payload['project'] = this.client.config.project; + return await this.client.call( 'get', @@ -1982,6 +2054,8 @@ export class Messaging { 'content-type': 'application/json', } + payload['project'] = this.client.config.project; + return await this.client.call( 'get', @@ -2025,6 +2099,8 @@ export class Messaging { 'content-type': 'application/json', } + payload['project'] = this.client.config.project; + return await this.client.call( 'post', @@ -2055,6 +2131,8 @@ export class Messaging { 'content-type': 'application/json', } + payload['project'] = this.client.config.project; + return await this.client.call( 'get', @@ -2093,6 +2171,8 @@ export class Messaging { 'content-type': 'application/json', } + payload['project'] = this.client.config.project; + return await this.client.call( 'patch', @@ -2122,6 +2202,8 @@ export class Messaging { 'content-type': 'application/json', } + payload['project'] = this.client.config.project; + return await this.client.call( 'delete', @@ -2155,6 +2237,8 @@ export class Messaging { 'content-type': 'application/json', } + payload['project'] = this.client.config.project; + return await this.client.call( 'get', @@ -2192,6 +2276,8 @@ export class Messaging { 'content-type': 'application/json', } + payload['project'] = this.client.config.project; + return await this.client.call( 'get', @@ -2235,6 +2321,8 @@ export class Messaging { 'content-type': 'application/json', } + payload['project'] = this.client.config.project; + return await this.client.call( 'post', @@ -2269,6 +2357,8 @@ export class Messaging { 'content-type': 'application/json', } + payload['project'] = this.client.config.project; + return await this.client.call( 'get', @@ -2302,6 +2392,8 @@ export class Messaging { 'content-type': 'application/json', } + payload['project'] = this.client.config.project; + return await this.client.call( 'delete', diff --git a/src/services/migrations.ts b/src/services/migrations.ts index eba7d80..44b446d 100644 --- a/src/services/migrations.ts +++ b/src/services/migrations.ts @@ -34,6 +34,8 @@ export class Migrations { 'content-type': 'application/json', } + payload['project'] = this.client.config.project; + return await this.client.call( 'get', @@ -87,6 +89,8 @@ export class Migrations { 'content-type': 'application/json', } + payload['project'] = this.client.config.project; + return await this.client.call( 'post', @@ -140,6 +144,8 @@ export class Migrations { 'content-type': 'application/json', } + payload['project'] = this.client.config.project; + return await this.client.call( 'get', @@ -179,6 +185,8 @@ export class Migrations { 'content-type': 'application/json', } + payload['project'] = this.client.config.project; + return await this.client.call( 'post', @@ -218,6 +226,8 @@ export class Migrations { 'content-type': 'application/json', } + payload['project'] = this.client.config.project; + return await this.client.call( 'get', @@ -296,6 +306,8 @@ export class Migrations { 'content-type': 'application/json', } + payload['project'] = this.client.config.project; + return await this.client.call( 'post', @@ -374,6 +386,8 @@ export class Migrations { 'content-type': 'application/json', } + payload['project'] = this.client.config.project; + return await this.client.call( 'get', @@ -445,6 +459,8 @@ export class Migrations { 'content-type': 'application/json', } + payload['project'] = this.client.config.project; + return await this.client.call( 'post', @@ -516,6 +532,8 @@ export class Migrations { 'content-type': 'application/json', } + payload['project'] = this.client.config.project; + return await this.client.call( 'get', @@ -545,6 +563,8 @@ export class Migrations { 'content-type': 'application/json', } + payload['project'] = this.client.config.project; + return await this.client.call( 'get', @@ -574,6 +594,8 @@ export class Migrations { 'content-type': 'application/json', } + payload['project'] = this.client.config.project; + return await this.client.call( 'patch', @@ -603,6 +625,8 @@ export class Migrations { 'content-type': 'application/json', } + payload['project'] = this.client.config.project; + return await this.client.call( 'delete', diff --git a/src/services/organizations.ts b/src/services/organizations.ts index 6326a9b..76195b4 100644 --- a/src/services/organizations.ts +++ b/src/services/organizations.ts @@ -35,6 +35,8 @@ export class Organizations { 'content-type': 'application/json', } + payload['project'] = this.client.config.project; + return await this.client.call( 'get', @@ -90,6 +92,8 @@ export class Organizations { 'content-type': 'application/json', } + payload['project'] = this.client.config.project; + return await this.client.call( 'post', @@ -119,6 +123,8 @@ export class Organizations { 'content-type': 'application/json', } + payload['project'] = this.client.config.project; + return await this.client.call( 'delete', @@ -152,6 +158,8 @@ export class Organizations { 'content-type': 'application/json', } + payload['project'] = this.client.config.project; + return await this.client.call( 'get', @@ -185,6 +193,8 @@ export class Organizations { 'content-type': 'application/json', } + payload['project'] = this.client.config.project; + return await this.client.call( 'get', @@ -221,6 +231,8 @@ export class Organizations { 'content-type': 'application/json', } + payload['project'] = this.client.config.project; + return await this.client.call( 'patch', @@ -250,6 +262,8 @@ export class Organizations { 'content-type': 'application/json', } + payload['project'] = this.client.config.project; + return await this.client.call( 'delete', @@ -283,6 +297,8 @@ export class Organizations { 'content-type': 'application/json', } + payload['project'] = this.client.config.project; + return await this.client.call( 'get', @@ -319,6 +335,8 @@ export class Organizations { 'content-type': 'application/json', } + payload['project'] = this.client.config.project; + return await this.client.call( 'patch', @@ -359,6 +377,8 @@ export class Organizations { 'content-type': 'application/json', } + payload['project'] = this.client.config.project; + return await this.client.call( 'patch', @@ -393,6 +413,8 @@ export class Organizations { 'content-type': 'application/json', } + payload['project'] = this.client.config.project; + return await this.client.call( 'get', @@ -429,6 +451,8 @@ export class Organizations { 'content-type': 'application/json', } + payload['project'] = this.client.config.project; + return await this.client.call( 'post', @@ -462,6 +486,8 @@ export class Organizations { 'content-type': 'application/json', } + payload['project'] = this.client.config.project; + return await this.client.call( 'get', @@ -495,6 +521,8 @@ export class Organizations { 'content-type': 'application/json', } + payload['project'] = this.client.config.project; + return await this.client.call( 'get', @@ -528,6 +556,8 @@ export class Organizations { 'content-type': 'application/json', } + payload['project'] = this.client.config.project; + return await this.client.call( 'get', @@ -561,6 +591,8 @@ export class Organizations { 'content-type': 'application/json', } + payload['project'] = this.client.config.project; + return await this.client.call( 'get', @@ -601,6 +633,8 @@ export class Organizations { 'content-type': 'application/json', } + payload['project'] = this.client.config.project; + return await this.client.call( 'post', @@ -634,6 +668,8 @@ export class Organizations { 'content-type': 'application/json', } + payload['project'] = this.client.config.project; + return await this.client.call( 'get', @@ -670,6 +706,8 @@ export class Organizations { 'content-type': 'application/json', } + payload['project'] = this.client.config.project; + return await this.client.call( 'patch', @@ -699,6 +737,8 @@ export class Organizations { 'content-type': 'application/json', } + payload['project'] = this.client.config.project; + return await this.client.call( 'delete', @@ -736,6 +776,8 @@ export class Organizations { 'content-type': 'application/json', } + payload['project'] = this.client.config.project; + return await this.client.call( 'patch', @@ -765,6 +807,8 @@ export class Organizations { 'content-type': 'application/json', } + payload['project'] = this.client.config.project; + return await this.client.call( 'delete', @@ -798,6 +842,8 @@ export class Organizations { 'content-type': 'application/json', } + payload['project'] = this.client.config.project; + return await this.client.call( 'get', @@ -827,6 +873,8 @@ export class Organizations { 'content-type': 'application/json', } + payload['project'] = this.client.config.project; + return await this.client.call( 'get', @@ -871,6 +919,8 @@ export class Organizations { 'content-type': 'application/json', } + payload['project'] = this.client.config.project; + return await this.client.call( 'patch', @@ -900,6 +950,8 @@ export class Organizations { 'content-type': 'application/json', } + payload['project'] = this.client.config.project; + return await this.client.call( 'get', @@ -936,6 +988,8 @@ export class Organizations { 'content-type': 'application/json', } + payload['project'] = this.client.config.project; + return await this.client.call( 'patch', @@ -973,6 +1027,8 @@ export class Organizations { 'content-type': 'application/json', } + payload['project'] = this.client.config.project; + return await this.client.call( 'get', diff --git a/src/services/project.ts b/src/services/project.ts index 42e69ea..47d544d 100644 --- a/src/services/project.ts +++ b/src/services/project.ts @@ -45,6 +45,8 @@ export class Project { 'content-type': 'application/json', } + payload['project'] = this.client.config.project; + return await this.client.call( 'get', @@ -70,6 +72,8 @@ export class Project { 'content-type': 'application/json', } + payload['project'] = this.client.config.project; + return await this.client.call( 'get', @@ -109,6 +113,8 @@ export class Project { 'content-type': 'application/json', } + payload['project'] = this.client.config.project; + return await this.client.call( 'post', @@ -138,6 +144,8 @@ export class Project { 'content-type': 'application/json', } + payload['project'] = this.client.config.project; + return await this.client.call( 'get', @@ -178,6 +186,8 @@ export class Project { 'content-type': 'application/json', } + payload['project'] = this.client.config.project; + return await this.client.call( 'put', @@ -207,6 +217,8 @@ export class Project { 'content-type': 'application/json', } + payload['project'] = this.client.config.project; + return await this.client.call( 'delete', diff --git a/src/services/projects.ts b/src/services/projects.ts index d903ca8..6ee033e 100644 --- a/src/services/projects.ts +++ b/src/services/projects.ts @@ -45,6 +45,8 @@ export class Projects { 'content-type': 'application/json', } + payload['project'] = this.client.config.project; + return await this.client.call( 'get', @@ -131,6 +133,8 @@ export class Projects { 'content-type': 'application/json', } + payload['project'] = this.client.config.project; + return await this.client.call( 'post', @@ -160,6 +164,8 @@ export class Projects { 'content-type': 'application/json', } + payload['project'] = this.client.config.project; + return await this.client.call( 'get', @@ -232,6 +238,8 @@ export class Projects { 'content-type': 'application/json', } + payload['project'] = this.client.config.project; + return await this.client.call( 'patch', @@ -261,6 +269,8 @@ export class Projects { 'content-type': 'application/json', } + payload['project'] = this.client.config.project; + return await this.client.call( 'delete', @@ -304,6 +314,8 @@ export class Projects { 'content-type': 'application/json', } + payload['project'] = this.client.config.project; + return await this.client.call( 'patch', @@ -340,6 +352,8 @@ export class Projects { 'content-type': 'application/json', } + payload['project'] = this.client.config.project; + return await this.client.call( 'patch', @@ -376,6 +390,8 @@ export class Projects { 'content-type': 'application/json', } + payload['project'] = this.client.config.project; + return await this.client.call( 'patch', @@ -412,6 +428,8 @@ export class Projects { 'content-type': 'application/json', } + payload['project'] = this.client.config.project; + return await this.client.call( 'patch', @@ -448,6 +466,8 @@ export class Projects { 'content-type': 'application/json', } + payload['project'] = this.client.config.project; + return await this.client.call( 'patch', @@ -498,6 +518,8 @@ export class Projects { 'content-type': 'application/json', } + payload['project'] = this.client.config.project; + return await this.client.call( 'patch', @@ -534,6 +556,8 @@ export class Projects { 'content-type': 'application/json', } + payload['project'] = this.client.config.project; + return await this.client.call( 'patch', @@ -570,6 +594,8 @@ export class Projects { 'content-type': 'application/json', } + payload['project'] = this.client.config.project; + return await this.client.call( 'patch', @@ -606,6 +632,8 @@ export class Projects { 'content-type': 'application/json', } + payload['project'] = this.client.config.project; + return await this.client.call( 'patch', @@ -642,6 +670,8 @@ export class Projects { 'content-type': 'application/json', } + payload['project'] = this.client.config.project; + return await this.client.call( 'patch', @@ -678,6 +708,8 @@ export class Projects { 'content-type': 'application/json', } + payload['project'] = this.client.config.project; + return await this.client.call( 'patch', @@ -718,6 +750,8 @@ export class Projects { 'content-type': 'application/json', } + payload['project'] = this.client.config.project; + return await this.client.call( 'patch', @@ -758,6 +792,8 @@ export class Projects { 'content-type': 'application/json', } + payload['project'] = this.client.config.project; + return await this.client.call( 'post', @@ -787,6 +823,8 @@ export class Projects { 'content-type': 'application/json', } + payload['project'] = this.client.config.project; + return await this.client.call( 'get', @@ -834,6 +872,8 @@ export class Projects { 'content-type': 'application/json', } + payload['project'] = this.client.config.project; + return await this.client.call( 'post', @@ -867,6 +907,8 @@ export class Projects { 'content-type': 'application/json', } + payload['project'] = this.client.config.project; + return await this.client.call( 'get', @@ -918,6 +960,8 @@ export class Projects { 'content-type': 'application/json', } + payload['project'] = this.client.config.project; + return await this.client.call( 'put', @@ -951,6 +995,8 @@ export class Projects { 'content-type': 'application/json', } + payload['project'] = this.client.config.project; + return await this.client.call( 'delete', @@ -999,6 +1045,8 @@ export class Projects { 'content-type': 'application/json', } + payload['project'] = this.client.config.project; + return await this.client.call( 'patch', @@ -1028,6 +1076,8 @@ export class Projects { 'content-type': 'application/json', } + payload['project'] = this.client.config.project; + return await this.client.call( 'get', @@ -1083,6 +1133,8 @@ export class Projects { 'content-type': 'application/json', } + payload['project'] = this.client.config.project; + return await this.client.call( 'post', @@ -1116,6 +1168,8 @@ export class Projects { 'content-type': 'application/json', } + payload['project'] = this.client.config.project; + return await this.client.call( 'get', @@ -1168,6 +1222,8 @@ export class Projects { 'content-type': 'application/json', } + payload['project'] = this.client.config.project; + return await this.client.call( 'put', @@ -1201,6 +1257,8 @@ export class Projects { 'content-type': 'application/json', } + payload['project'] = this.client.config.project; + return await this.client.call( 'delete', @@ -1244,6 +1302,8 @@ export class Projects { 'content-type': 'application/json', } + payload['project'] = this.client.config.project; + return await this.client.call( 'patch', @@ -1280,6 +1340,8 @@ export class Projects { 'content-type': 'application/json', } + payload['project'] = this.client.config.project; + return await this.client.call( 'patch', @@ -1348,6 +1410,8 @@ export class Projects { 'content-type': 'application/json', } + payload['project'] = this.client.config.project; + return await this.client.call( 'patch', @@ -1425,6 +1489,8 @@ export class Projects { 'content-type': 'application/json', } + payload['project'] = this.client.config.project; + return await this.client.call( 'post', @@ -1461,6 +1527,8 @@ export class Projects { 'content-type': 'application/json', } + payload['project'] = this.client.config.project; + return await this.client.call( 'patch', @@ -1498,6 +1566,8 @@ export class Projects { 'content-type': 'application/json', } + payload['project'] = this.client.config.project; + return await this.client.call( 'get', @@ -1561,6 +1631,8 @@ export class Projects { 'content-type': 'application/json', } + payload['project'] = this.client.config.project; + return await this.client.call( 'patch', @@ -1598,6 +1670,8 @@ export class Projects { 'content-type': 'application/json', } + payload['project'] = this.client.config.project; + return await this.client.call( 'delete', @@ -1635,6 +1709,8 @@ export class Projects { 'content-type': 'application/json', } + payload['project'] = this.client.config.project; + return await this.client.call( 'get', @@ -1679,6 +1755,8 @@ export class Projects { 'content-type': 'application/json', } + payload['project'] = this.client.config.project; + return await this.client.call( 'patch', @@ -1716,6 +1794,8 @@ export class Projects { 'content-type': 'application/json', } + payload['project'] = this.client.config.project; + return await this.client.call( 'delete', @@ -1745,6 +1825,8 @@ export class Projects { 'content-type': 'application/json', } + payload['project'] = this.client.config.project; + return await this.client.call( 'get', @@ -1814,6 +1896,8 @@ export class Projects { 'content-type': 'application/json', } + payload['project'] = this.client.config.project; + return await this.client.call( 'post', @@ -1847,6 +1931,8 @@ export class Projects { 'content-type': 'application/json', } + payload['project'] = this.client.config.project; + return await this.client.call( 'get', @@ -1920,6 +2006,8 @@ export class Projects { 'content-type': 'application/json', } + payload['project'] = this.client.config.project; + return await this.client.call( 'put', @@ -1953,6 +2041,8 @@ export class Projects { 'content-type': 'application/json', } + payload['project'] = this.client.config.project; + return await this.client.call( 'delete', @@ -1986,6 +2076,8 @@ export class Projects { 'content-type': 'application/json', } + payload['project'] = this.client.config.project; + return await this.client.call( 'patch', diff --git a/src/services/proxy.ts b/src/services/proxy.ts index 1ac5014..1cdaf72 100644 --- a/src/services/proxy.ts +++ b/src/services/proxy.ts @@ -35,6 +35,8 @@ export class Proxy { 'content-type': 'application/json', } + payload['project'] = this.client.config.project; + return await this.client.call( 'get', @@ -78,6 +80,8 @@ export class Proxy { 'content-type': 'application/json', } + payload['project'] = this.client.config.project; + return await this.client.call( 'post', @@ -107,6 +111,8 @@ export class Proxy { 'content-type': 'application/json', } + payload['project'] = this.client.config.project; + return await this.client.call( 'get', @@ -136,6 +142,8 @@ export class Proxy { 'content-type': 'application/json', } + payload['project'] = this.client.config.project; + return await this.client.call( 'delete', @@ -165,6 +173,8 @@ export class Proxy { 'content-type': 'application/json', } + payload['project'] = this.client.config.project; + return await this.client.call( 'patch', diff --git a/src/services/storage.ts b/src/services/storage.ts index e1896b5..e9dd9a7 100644 --- a/src/services/storage.ts +++ b/src/services/storage.ts @@ -38,6 +38,8 @@ export class Storage { 'content-type': 'application/json', } + payload['project'] = this.client.config.project; + return await this.client.call( 'get', @@ -109,6 +111,8 @@ export class Storage { 'content-type': 'application/json', } + payload['project'] = this.client.config.project; + return await this.client.call( 'post', @@ -138,6 +142,8 @@ export class Storage { 'content-type': 'application/json', } + payload['project'] = this.client.config.project; + return await this.client.call( 'get', @@ -206,6 +212,8 @@ export class Storage { 'content-type': 'application/json', } + payload['project'] = this.client.config.project; + return await this.client.call( 'put', @@ -235,6 +243,8 @@ export class Storage { 'content-type': 'application/json', } + payload['project'] = this.client.config.project; + return await this.client.call( 'delete', @@ -272,6 +282,8 @@ export class Storage { 'content-type': 'application/json', } + payload['project'] = this.client.config.project; + return await this.client.call( 'get', @@ -326,6 +338,8 @@ If you're creating a new file using one of the Appwrite SDKs, all the chunk 'content-type': 'multipart/form-data', } + payload['project'] = this.client.config.project; + return await this.client.chunkedUpload( 'post', @@ -360,6 +374,8 @@ If you're creating a new file using one of the Appwrite SDKs, all the chunk 'content-type': 'application/json', } + payload['project'] = this.client.config.project; + return await this.client.call( 'get', @@ -401,6 +417,8 @@ If you're creating a new file using one of the Appwrite SDKs, all the chunk 'content-type': 'application/json', } + payload['project'] = this.client.config.project; + return await this.client.call( 'put', @@ -434,6 +452,8 @@ If you're creating a new file using one of the Appwrite SDKs, all the chunk 'content-type': 'application/json', } + payload['project'] = this.client.config.project; + return await this.client.call( 'delete', @@ -467,14 +487,9 @@ If you're creating a new file using one of the Appwrite SDKs, all the chunk 'content-type': 'application/json', } - payload['project'] = this.client.config.project; - for (const [key, value] of Object.entries(Service.flatten(payload))) { - uri.searchParams.append(key, value); - } - payload['project'] = this.client.config.project; - for (const [key, value] of Object.entries(Client.flatten(payload))) { + for (const [key, value] of Object.entries(Service.flatten(payload))) { uri.searchParams.append(key, value); } @@ -550,13 +565,8 @@ If you're creating a new file using one of the Appwrite SDKs, all the chunk } payload['project'] = this.client.config.project; - for (const [key, value] of Object.entries(Service.flatten(payload))) { - uri.searchParams.append(key, value); - } - payload['project'] = this.client.config.project; - - for (const [key, value] of Object.entries(Client.flatten(payload))) { + for (const [key, value] of Object.entries(Service.flatten(payload))) { uri.searchParams.append(key, value); } @@ -587,14 +597,9 @@ If you're creating a new file using one of the Appwrite SDKs, all the chunk 'content-type': 'application/json', } - payload['project'] = this.client.config.project; - for (const [key, value] of Object.entries(Service.flatten(payload))) { - uri.searchParams.append(key, value); - } - payload['project'] = this.client.config.project; - for (const [key, value] of Object.entries(Client.flatten(payload))) { + for (const [key, value] of Object.entries(Service.flatten(payload))) { uri.searchParams.append(key, value); } @@ -622,6 +627,8 @@ If you're creating a new file using one of the Appwrite SDKs, all the chunk 'content-type': 'application/json', } + payload['project'] = this.client.config.project; + return await this.client.call( 'get', @@ -656,6 +663,8 @@ If you're creating a new file using one of the Appwrite SDKs, all the chunk 'content-type': 'application/json', } + payload['project'] = this.client.config.project; + return await this.client.call( 'get', diff --git a/src/services/teams.ts b/src/services/teams.ts index c0ea9e1..a99ae3d 100644 --- a/src/services/teams.ts +++ b/src/services/teams.ts @@ -34,6 +34,8 @@ export class Teams { 'content-type': 'application/json', } + payload['project'] = this.client.config.project; + return await this.client.call( 'get', @@ -77,6 +79,8 @@ export class Teams { 'content-type': 'application/json', } + payload['project'] = this.client.config.project; + return await this.client.call( 'post', @@ -106,6 +110,8 @@ export class Teams { 'content-type': 'application/json', } + payload['project'] = this.client.config.project; + return await this.client.call( 'get', @@ -142,6 +148,8 @@ export class Teams { 'content-type': 'application/json', } + payload['project'] = this.client.config.project; + return await this.client.call( 'put', @@ -171,6 +179,8 @@ export class Teams { 'content-type': 'application/json', } + payload['project'] = this.client.config.project; + return await this.client.call( 'delete', @@ -204,6 +214,8 @@ export class Teams { 'content-type': 'application/json', } + payload['project'] = this.client.config.project; + return await this.client.call( 'get', @@ -241,6 +253,8 @@ export class Teams { 'content-type': 'application/json', } + payload['project'] = this.client.config.project; + return await this.client.call( 'get', @@ -304,6 +318,8 @@ Please note that to avoid a [Redirect Attack](https://github.com/OWASP/CheatShee 'content-type': 'application/json', } + payload['project'] = this.client.config.project; + return await this.client.call( 'post', @@ -337,6 +353,8 @@ Please note that to avoid a [Redirect Attack](https://github.com/OWASP/CheatShee 'content-type': 'application/json', } + payload['project'] = this.client.config.project; + return await this.client.call( 'get', @@ -378,6 +396,8 @@ Please note that to avoid a [Redirect Attack](https://github.com/OWASP/CheatShee 'content-type': 'application/json', } + payload['project'] = this.client.config.project; + return await this.client.call( 'patch', @@ -411,6 +431,8 @@ Please note that to avoid a [Redirect Attack](https://github.com/OWASP/CheatShee 'content-type': 'application/json', } + payload['project'] = this.client.config.project; + return await this.client.call( 'delete', @@ -461,6 +483,8 @@ If the request is successful, a session for the user is automatically created. 'content-type': 'application/json', } + payload['project'] = this.client.config.project; + return await this.client.call( 'patch', @@ -490,6 +514,8 @@ If the request is successful, a session for the user is automatically created. 'content-type': 'application/json', } + payload['project'] = this.client.config.project; + return await this.client.call( 'get', @@ -526,6 +552,8 @@ If the request is successful, a session for the user is automatically created. 'content-type': 'application/json', } + payload['project'] = this.client.config.project; + return await this.client.call( 'put', diff --git a/src/services/users.ts b/src/services/users.ts index 9d5ee63..7fd6c4a 100644 --- a/src/services/users.ts +++ b/src/services/users.ts @@ -38,6 +38,8 @@ export class Users { 'content-type': 'application/json', } + payload['project'] = this.client.config.project; + return await this.client.call( 'get', @@ -86,6 +88,8 @@ export class Users { 'content-type': 'application/json', } + payload['project'] = this.client.config.project; + return await this.client.call( 'post', @@ -136,6 +140,8 @@ export class Users { 'content-type': 'application/json', } + payload['project'] = this.client.config.project; + return await this.client.call( 'post', @@ -186,6 +192,8 @@ export class Users { 'content-type': 'application/json', } + payload['project'] = this.client.config.project; + return await this.client.call( 'post', @@ -219,6 +227,8 @@ export class Users { 'content-type': 'application/json', } + payload['project'] = this.client.config.project; + return await this.client.call( 'get', @@ -248,6 +258,8 @@ export class Users { 'content-type': 'application/json', } + payload['project'] = this.client.config.project; + return await this.client.call( 'delete', @@ -298,6 +310,8 @@ export class Users { 'content-type': 'application/json', } + payload['project'] = this.client.config.project; + return await this.client.call( 'post', @@ -348,6 +362,8 @@ export class Users { 'content-type': 'application/json', } + payload['project'] = this.client.config.project; + return await this.client.call( 'post', @@ -433,6 +449,8 @@ export class Users { 'content-type': 'application/json', } + payload['project'] = this.client.config.project; + return await this.client.call( 'post', @@ -504,6 +522,8 @@ export class Users { 'content-type': 'application/json', } + payload['project'] = this.client.config.project; + return await this.client.call( 'post', @@ -558,6 +578,8 @@ export class Users { 'content-type': 'application/json', } + payload['project'] = this.client.config.project; + return await this.client.call( 'post', @@ -588,6 +610,8 @@ export class Users { 'content-type': 'application/json', } + payload['project'] = this.client.config.project; + return await this.client.call( 'get', @@ -617,6 +641,8 @@ export class Users { 'content-type': 'application/json', } + payload['project'] = this.client.config.project; + return await this.client.call( 'get', @@ -646,6 +672,8 @@ export class Users { 'content-type': 'application/json', } + payload['project'] = this.client.config.project; + return await this.client.call( 'delete', @@ -682,6 +710,8 @@ export class Users { 'content-type': 'application/json', } + payload['project'] = this.client.config.project; + return await this.client.call( 'patch', @@ -719,6 +749,8 @@ export class Users { 'content-type': 'application/json', } + payload['project'] = this.client.config.project; + return await this.client.call( 'post', @@ -757,6 +789,8 @@ Labels can be used to grant access to resources. While teams are a way for user& 'content-type': 'application/json', } + payload['project'] = this.client.config.project; + return await this.client.call( 'put', @@ -790,6 +824,8 @@ Labels can be used to grant access to resources. While teams are a way for user& 'content-type': 'application/json', } + payload['project'] = this.client.config.project; + return await this.client.call( 'get', @@ -819,6 +855,8 @@ Labels can be used to grant access to resources. While teams are a way for user& 'content-type': 'application/json', } + payload['project'] = this.client.config.project; + return await this.client.call( 'get', @@ -855,6 +893,8 @@ Labels can be used to grant access to resources. While teams are a way for user& 'content-type': 'application/json', } + payload['project'] = this.client.config.project; + return await this.client.call( 'patch', @@ -888,6 +928,8 @@ Labels can be used to grant access to resources. While teams are a way for user& 'content-type': 'application/json', } + payload['project'] = this.client.config.project; + return await this.client.call( 'delete', @@ -917,6 +959,8 @@ Labels can be used to grant access to resources. While teams are a way for user& 'content-type': 'application/json', } + payload['project'] = this.client.config.project; + return await this.client.call( 'get', @@ -946,6 +990,8 @@ Labels can be used to grant access to resources. While teams are a way for user& 'content-type': 'application/json', } + payload['project'] = this.client.config.project; + return await this.client.call( 'get', @@ -975,6 +1021,8 @@ Labels can be used to grant access to resources. While teams are a way for user& 'content-type': 'application/json', } + payload['project'] = this.client.config.project; + return await this.client.call( 'put', @@ -1004,6 +1052,8 @@ Labels can be used to grant access to resources. While teams are a way for user& 'content-type': 'application/json', } + payload['project'] = this.client.config.project; + return await this.client.call( 'patch', @@ -1040,6 +1090,8 @@ Labels can be used to grant access to resources. While teams are a way for user& 'content-type': 'application/json', } + payload['project'] = this.client.config.project; + return await this.client.call( 'patch', @@ -1076,6 +1128,8 @@ Labels can be used to grant access to resources. While teams are a way for user& 'content-type': 'application/json', } + payload['project'] = this.client.config.project; + return await this.client.call( 'patch', @@ -1112,6 +1166,8 @@ Labels can be used to grant access to resources. While teams are a way for user& 'content-type': 'application/json', } + payload['project'] = this.client.config.project; + return await this.client.call( 'patch', @@ -1141,6 +1197,8 @@ Labels can be used to grant access to resources. While teams are a way for user& 'content-type': 'application/json', } + payload['project'] = this.client.config.project; + return await this.client.call( 'get', @@ -1177,6 +1235,8 @@ Labels can be used to grant access to resources. While teams are a way for user& 'content-type': 'application/json', } + payload['project'] = this.client.config.project; + return await this.client.call( 'patch', @@ -1206,6 +1266,8 @@ Labels can be used to grant access to resources. While teams are a way for user& 'content-type': 'application/json', } + payload['project'] = this.client.config.project; + return await this.client.call( 'get', @@ -1237,6 +1299,8 @@ If you want to generate a token for a custom authentication flow, use the [POST 'content-type': 'application/json', } + payload['project'] = this.client.config.project; + return await this.client.call( 'post', @@ -1266,6 +1330,8 @@ If you want to generate a token for a custom authentication flow, use the [POST 'content-type': 'application/json', } + payload['project'] = this.client.config.project; + return await this.client.call( 'delete', @@ -1299,6 +1365,8 @@ If you want to generate a token for a custom authentication flow, use the [POST 'content-type': 'application/json', } + payload['project'] = this.client.config.project; + return await this.client.call( 'delete', @@ -1335,6 +1403,8 @@ If you want to generate a token for a custom authentication flow, use the [POST 'content-type': 'application/json', } + payload['project'] = this.client.config.project; + return await this.client.call( 'patch', @@ -1368,6 +1438,8 @@ If you want to generate a token for a custom authentication flow, use the [POST 'content-type': 'application/json', } + payload['project'] = this.client.config.project; + return await this.client.call( 'get', @@ -1426,6 +1498,8 @@ If you want to generate a token for a custom authentication flow, use the [POST 'content-type': 'application/json', } + payload['project'] = this.client.config.project; + return await this.client.call( 'post', @@ -1459,6 +1533,8 @@ If you want to generate a token for a custom authentication flow, use the [POST 'content-type': 'application/json', } + payload['project'] = this.client.config.project; + return await this.client.call( 'get', @@ -1504,6 +1580,8 @@ If you want to generate a token for a custom authentication flow, use the [POST 'content-type': 'application/json', } + payload['project'] = this.client.config.project; + return await this.client.call( 'patch', @@ -1537,6 +1615,8 @@ If you want to generate a token for a custom authentication flow, use the [POST 'content-type': 'application/json', } + payload['project'] = this.client.config.project; + return await this.client.call( 'delete', @@ -1575,6 +1655,8 @@ If you want to generate a token for a custom authentication flow, use the [POST 'content-type': 'application/json', } + payload['project'] = this.client.config.project; + return await this.client.call( 'post', @@ -1611,6 +1693,8 @@ If you want to generate a token for a custom authentication flow, use the [POST 'content-type': 'application/json', } + payload['project'] = this.client.config.project; + return await this.client.call( 'patch', @@ -1647,6 +1731,8 @@ If you want to generate a token for a custom authentication flow, use the [POST 'content-type': 'application/json', } + payload['project'] = this.client.config.project; + return await this.client.call( 'patch', diff --git a/src/services/vcs.ts b/src/services/vcs.ts index 580392f..0dde09f 100644 --- a/src/services/vcs.ts +++ b/src/services/vcs.ts @@ -34,6 +34,8 @@ export class Vcs { 'content-type': 'application/json', } + payload['project'] = this.client.config.project; + return await this.client.call( 'get', @@ -77,6 +79,8 @@ export class Vcs { 'content-type': 'application/json', } + payload['project'] = this.client.config.project; + return await this.client.call( 'post', @@ -110,6 +114,8 @@ export class Vcs { 'content-type': 'application/json', } + payload['project'] = this.client.config.project; + return await this.client.call( 'get', @@ -144,6 +150,8 @@ export class Vcs { 'content-type': 'application/json', } + payload['project'] = this.client.config.project; + return await this.client.call( 'get', @@ -182,6 +190,8 @@ export class Vcs { 'content-type': 'application/json', } + payload['project'] = this.client.config.project; + return await this.client.call( 'get', @@ -219,6 +229,8 @@ export class Vcs { 'content-type': 'application/json', } + payload['project'] = this.client.config.project; + return await this.client.call( 'post', @@ -259,6 +271,8 @@ export class Vcs { 'content-type': 'application/json', } + payload['project'] = this.client.config.project; + return await this.client.call( 'patch', @@ -293,6 +307,8 @@ export class Vcs { 'content-type': 'application/json', } + payload['project'] = this.client.config.project; + return await this.client.call( 'get', @@ -322,6 +338,8 @@ export class Vcs { 'content-type': 'application/json', } + payload['project'] = this.client.config.project; + return await this.client.call( 'get', @@ -351,6 +369,8 @@ export class Vcs { 'content-type': 'application/json', } + payload['project'] = this.client.config.project; + return await this.client.call( 'delete',