@appwrite.io/console 2.0.0 → 2.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +8 -0
- package/README.md +2 -2
- package/dist/cjs/sdk.js +81 -15
- package/dist/cjs/sdk.js.map +1 -1
- package/dist/esm/sdk.js +77 -15
- package/dist/esm/sdk.js.map +1 -1
- package/dist/iife/sdk.js +3838 -15
- package/docs/examples/account/update-payment-method.md +1 -1
- package/docs/examples/projects/update-labels.md +14 -0
- package/package.json +7 -1
- package/rollup.config.js +40 -24
- package/src/client.ts +49 -10
- package/src/models.ts +432 -424
- package/src/query.ts +14 -11
- package/src/services/account.ts +20 -20
- package/src/services/avatars.ts +117 -117
- package/src/services/backups.ts +18 -18
- package/src/services/console.ts +24 -24
- package/src/services/databases.ts +119 -119
- package/src/services/domains.ts +204 -204
- package/src/services/functions.ts +30 -30
- package/src/services/health.ts +146 -146
- package/src/services/messaging.ts +54 -54
- package/src/services/migrations.ts +36 -36
- package/src/services/organizations.ts +42 -42
- package/src/services/projects.ts +146 -83
- package/src/services/sites.ts +30 -30
- package/src/services/storage.ts +49 -49
- package/src/services/tables-db.ts +119 -119
- package/src/services/users.ts +39 -39
- package/types/client.d.ts +27 -1
- package/types/models.d.ts +432 -424
- package/types/query.d.ts +8 -8
- package/types/services/account.d.ts +11 -11
- package/types/services/avatars.d.ts +82 -82
- package/types/services/backups.d.ts +8 -8
- package/types/services/console.d.ts +14 -14
- package/types/services/databases.d.ts +70 -70
- package/types/services/domains.d.ts +104 -104
- package/types/services/functions.d.ts +15 -15
- package/types/services/health.d.ts +72 -72
- package/types/services/messaging.d.ts +24 -24
- package/types/services/migrations.d.ts +16 -16
- package/types/services/organizations.d.ts +22 -22
- package/types/services/projects.d.ts +60 -38
- package/types/services/sites.d.ts +15 -15
- package/types/services/storage.d.ts +34 -34
- package/types/services/tables-db.d.ts +70 -70
- package/types/services/users.d.ts +24 -24
|
@@ -91,7 +91,7 @@ export class Functions {
|
|
|
91
91
|
* @param {string[]} params.execute - An array of role strings with execution permissions. By default no user is granted with any execute permissions. [learn more about roles](https://appwrite.io/docs/permissions#permission-roles). Maximum of 100 roles are allowed, each 64 characters long.
|
|
92
92
|
* @param {string[]} params.events - Events list. Maximum of 100 events are allowed.
|
|
93
93
|
* @param {string} params.schedule - Schedule CRON syntax.
|
|
94
|
-
* @param {number} params.timeout - Function maximum execution time in seconds.
|
|
94
|
+
* @param {number | bigint} params.timeout - Function maximum execution time in seconds.
|
|
95
95
|
* @param {boolean} params.enabled - Is function enabled? When set to 'disabled', users cannot access the function but Server SDKs with and API key can still access the function. No data is lost when this is toggled.
|
|
96
96
|
* @param {boolean} params.logging - When disabled, executions will exclude logs and errors, and will be slightly faster.
|
|
97
97
|
* @param {string} params.entrypoint - Entrypoint File. This path is relative to the "providerRootDirectory".
|
|
@@ -106,7 +106,7 @@ export class Functions {
|
|
|
106
106
|
* @throws {AppwriteException}
|
|
107
107
|
* @returns {Promise<Models.Function>}
|
|
108
108
|
*/
|
|
109
|
-
create(params: { functionId: string, name: string, runtime: Runtime, execute?: string[], events?: string[], schedule?: string, timeout?: number, enabled?: boolean, logging?: boolean, entrypoint?: string, commands?: string, scopes?: string[], installationId?: string, providerRepositoryId?: string, providerBranch?: string, providerSilentMode?: boolean, providerRootDirectory?: string, specification?: string }): Promise<Models.Function>;
|
|
109
|
+
create(params: { functionId: string, name: string, runtime: Runtime, execute?: string[], events?: string[], schedule?: string, timeout?: number | bigint, enabled?: boolean, logging?: boolean, entrypoint?: string, commands?: string, scopes?: string[], installationId?: string, providerRepositoryId?: string, providerBranch?: string, providerSilentMode?: boolean, providerRootDirectory?: string, specification?: string }): Promise<Models.Function>;
|
|
110
110
|
/**
|
|
111
111
|
* Create a new function. You can pass a list of [permissions](https://appwrite.io/docs/permissions) to allow different project users or team with access to execute the function using the client API.
|
|
112
112
|
*
|
|
@@ -116,7 +116,7 @@ export class Functions {
|
|
|
116
116
|
* @param {string[]} execute - An array of role strings with execution permissions. By default no user is granted with any execute permissions. [learn more about roles](https://appwrite.io/docs/permissions#permission-roles). Maximum of 100 roles are allowed, each 64 characters long.
|
|
117
117
|
* @param {string[]} events - Events list. Maximum of 100 events are allowed.
|
|
118
118
|
* @param {string} schedule - Schedule CRON syntax.
|
|
119
|
-
* @param {number} timeout - Function maximum execution time in seconds.
|
|
119
|
+
* @param {number | bigint} timeout - Function maximum execution time in seconds.
|
|
120
120
|
* @param {boolean} enabled - Is function enabled? When set to 'disabled', users cannot access the function but Server SDKs with and API key can still access the function. No data is lost when this is toggled.
|
|
121
121
|
* @param {boolean} logging - When disabled, executions will exclude logs and errors, and will be slightly faster.
|
|
122
122
|
* @param {string} entrypoint - Entrypoint File. This path is relative to the "providerRootDirectory".
|
|
@@ -132,15 +132,15 @@ export class Functions {
|
|
|
132
132
|
* @returns {Promise<Models.Function>}
|
|
133
133
|
* @deprecated Use the object parameter style method for a better developer experience.
|
|
134
134
|
*/
|
|
135
|
-
create(functionId: string, name: string, runtime: Runtime, execute?: string[], events?: string[], schedule?: string, timeout?: number, enabled?: boolean, logging?: boolean, entrypoint?: string, commands?: string, scopes?: string[], installationId?: string, providerRepositoryId?: string, providerBranch?: string, providerSilentMode?: boolean, providerRootDirectory?: string, specification?: string): Promise<Models.Function>;
|
|
135
|
+
create(functionId: string, name: string, runtime: Runtime, execute?: string[], events?: string[], schedule?: string, timeout?: number | bigint, enabled?: boolean, logging?: boolean, entrypoint?: string, commands?: string, scopes?: string[], installationId?: string, providerRepositoryId?: string, providerBranch?: string, providerSilentMode?: boolean, providerRootDirectory?: string, specification?: string): Promise<Models.Function>;
|
|
136
136
|
create(
|
|
137
|
-
paramsOrFirst: { functionId: string, name: string, runtime: Runtime, execute?: string[], events?: string[], schedule?: string, timeout?: number, enabled?: boolean, logging?: boolean, entrypoint?: string, commands?: string, scopes?: string[], installationId?: string, providerRepositoryId?: string, providerBranch?: string, providerSilentMode?: boolean, providerRootDirectory?: string, specification?: string } | string,
|
|
138
|
-
...rest: [(string)?, (Runtime)?, (string[])?, (string[])?, (string)?, (number)?, (boolean)?, (boolean)?, (string)?, (string)?, (string[])?, (string)?, (string)?, (string)?, (boolean)?, (string)?, (string)?]
|
|
137
|
+
paramsOrFirst: { functionId: string, name: string, runtime: Runtime, execute?: string[], events?: string[], schedule?: string, timeout?: number | bigint, enabled?: boolean, logging?: boolean, entrypoint?: string, commands?: string, scopes?: string[], installationId?: string, providerRepositoryId?: string, providerBranch?: string, providerSilentMode?: boolean, providerRootDirectory?: string, specification?: string } | string,
|
|
138
|
+
...rest: [(string)?, (Runtime)?, (string[])?, (string[])?, (string)?, (number | bigint)?, (boolean)?, (boolean)?, (string)?, (string)?, (string[])?, (string)?, (string)?, (string)?, (boolean)?, (string)?, (string)?]
|
|
139
139
|
): Promise<Models.Function> {
|
|
140
|
-
let params: { functionId: string, name: string, runtime: Runtime, execute?: string[], events?: string[], schedule?: string, timeout?: number, enabled?: boolean, logging?: boolean, entrypoint?: string, commands?: string, scopes?: string[], installationId?: string, providerRepositoryId?: string, providerBranch?: string, providerSilentMode?: boolean, providerRootDirectory?: string, specification?: string };
|
|
140
|
+
let params: { functionId: string, name: string, runtime: Runtime, execute?: string[], events?: string[], schedule?: string, timeout?: number | bigint, enabled?: boolean, logging?: boolean, entrypoint?: string, commands?: string, scopes?: string[], installationId?: string, providerRepositoryId?: string, providerBranch?: string, providerSilentMode?: boolean, providerRootDirectory?: string, specification?: string };
|
|
141
141
|
|
|
142
142
|
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
|
|
143
|
-
params = (paramsOrFirst || {}) as { functionId: string, name: string, runtime: Runtime, execute?: string[], events?: string[], schedule?: string, timeout?: number, enabled?: boolean, logging?: boolean, entrypoint?: string, commands?: string, scopes?: string[], installationId?: string, providerRepositoryId?: string, providerBranch?: string, providerSilentMode?: boolean, providerRootDirectory?: string, specification?: string };
|
|
143
|
+
params = (paramsOrFirst || {}) as { functionId: string, name: string, runtime: Runtime, execute?: string[], events?: string[], schedule?: string, timeout?: number | bigint, enabled?: boolean, logging?: boolean, entrypoint?: string, commands?: string, scopes?: string[], installationId?: string, providerRepositoryId?: string, providerBranch?: string, providerSilentMode?: boolean, providerRootDirectory?: string, specification?: string };
|
|
144
144
|
} else {
|
|
145
145
|
params = {
|
|
146
146
|
functionId: paramsOrFirst as string,
|
|
@@ -149,7 +149,7 @@ export class Functions {
|
|
|
149
149
|
execute: rest[2] as string[],
|
|
150
150
|
events: rest[3] as string[],
|
|
151
151
|
schedule: rest[4] as string,
|
|
152
|
-
timeout: rest[5] as number,
|
|
152
|
+
timeout: rest[5] as number | bigint,
|
|
153
153
|
enabled: rest[6] as boolean,
|
|
154
154
|
logging: rest[7] as boolean,
|
|
155
155
|
entrypoint: rest[8] as string,
|
|
@@ -314,40 +314,40 @@ export class Functions {
|
|
|
314
314
|
*
|
|
315
315
|
* @param {string[]} params.runtimes - List of runtimes allowed for filtering function templates. Maximum of 100 runtimes are allowed.
|
|
316
316
|
* @param {string[]} params.useCases - List of use cases allowed for filtering function templates. Maximum of 100 use cases are allowed.
|
|
317
|
-
* @param {number} params.limit - Limit the number of templates returned in the response. Default limit is 25, and maximum limit is 5000.
|
|
318
|
-
* @param {number} params.offset - Offset the list of returned templates. Maximum offset is 5000.
|
|
317
|
+
* @param {number | bigint} params.limit - Limit the number of templates returned in the response. Default limit is 25, and maximum limit is 5000.
|
|
318
|
+
* @param {number | bigint} params.offset - Offset the list of returned templates. Maximum offset is 5000.
|
|
319
319
|
* @param {boolean} params.total - When set to false, the total count returned will be 0 and will not be calculated.
|
|
320
320
|
* @throws {AppwriteException}
|
|
321
321
|
* @returns {Promise<Models.TemplateFunctionList>}
|
|
322
322
|
*/
|
|
323
|
-
listTemplates(params?: { runtimes?: string[], useCases?: string[], limit?: number, offset?: number, total?: boolean }): Promise<Models.TemplateFunctionList>;
|
|
323
|
+
listTemplates(params?: { runtimes?: string[], useCases?: string[], limit?: number | bigint, offset?: number | bigint, total?: boolean }): Promise<Models.TemplateFunctionList>;
|
|
324
324
|
/**
|
|
325
325
|
* List available function templates. You can use template details in [createFunction](/docs/references/cloud/server-nodejs/functions#create) method.
|
|
326
326
|
*
|
|
327
327
|
* @param {string[]} runtimes - List of runtimes allowed for filtering function templates. Maximum of 100 runtimes are allowed.
|
|
328
328
|
* @param {string[]} useCases - List of use cases allowed for filtering function templates. Maximum of 100 use cases are allowed.
|
|
329
|
-
* @param {number} limit - Limit the number of templates returned in the response. Default limit is 25, and maximum limit is 5000.
|
|
330
|
-
* @param {number} offset - Offset the list of returned templates. Maximum offset is 5000.
|
|
329
|
+
* @param {number | bigint} limit - Limit the number of templates returned in the response. Default limit is 25, and maximum limit is 5000.
|
|
330
|
+
* @param {number | bigint} offset - Offset the list of returned templates. Maximum offset is 5000.
|
|
331
331
|
* @param {boolean} total - When set to false, the total count returned will be 0 and will not be calculated.
|
|
332
332
|
* @throws {AppwriteException}
|
|
333
333
|
* @returns {Promise<Models.TemplateFunctionList>}
|
|
334
334
|
* @deprecated Use the object parameter style method for a better developer experience.
|
|
335
335
|
*/
|
|
336
|
-
listTemplates(runtimes?: string[], useCases?: string[], limit?: number, offset?: number, total?: boolean): Promise<Models.TemplateFunctionList>;
|
|
336
|
+
listTemplates(runtimes?: string[], useCases?: string[], limit?: number | bigint, offset?: number | bigint, total?: boolean): Promise<Models.TemplateFunctionList>;
|
|
337
337
|
listTemplates(
|
|
338
|
-
paramsOrFirst?: { runtimes?: string[], useCases?: string[], limit?: number, offset?: number, total?: boolean } | string[],
|
|
339
|
-
...rest: [(string[])?, (number)?, (number)?, (boolean)?]
|
|
338
|
+
paramsOrFirst?: { runtimes?: string[], useCases?: string[], limit?: number | bigint, offset?: number | bigint, total?: boolean } | string[],
|
|
339
|
+
...rest: [(string[])?, (number | bigint)?, (number | bigint)?, (boolean)?]
|
|
340
340
|
): Promise<Models.TemplateFunctionList> {
|
|
341
|
-
let params: { runtimes?: string[], useCases?: string[], limit?: number, offset?: number, total?: boolean };
|
|
341
|
+
let params: { runtimes?: string[], useCases?: string[], limit?: number | bigint, offset?: number | bigint, total?: boolean };
|
|
342
342
|
|
|
343
343
|
if (!paramsOrFirst || (paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
|
|
344
|
-
params = (paramsOrFirst || {}) as { runtimes?: string[], useCases?: string[], limit?: number, offset?: number, total?: boolean };
|
|
344
|
+
params = (paramsOrFirst || {}) as { runtimes?: string[], useCases?: string[], limit?: number | bigint, offset?: number | bigint, total?: boolean };
|
|
345
345
|
} else {
|
|
346
346
|
params = {
|
|
347
347
|
runtimes: paramsOrFirst as string[],
|
|
348
348
|
useCases: rest[0] as string[],
|
|
349
|
-
limit: rest[1] as number,
|
|
350
|
-
offset: rest[2] as number,
|
|
349
|
+
limit: rest[1] as number | bigint,
|
|
350
|
+
offset: rest[2] as number | bigint,
|
|
351
351
|
total: rest[3] as boolean
|
|
352
352
|
};
|
|
353
353
|
}
|
|
@@ -551,7 +551,7 @@ export class Functions {
|
|
|
551
551
|
* @param {string[]} params.execute - An array of role strings with execution permissions. By default no user is granted with any execute permissions. [learn more about roles](https://appwrite.io/docs/permissions#permission-roles). Maximum of 100 roles are allowed, each 64 characters long.
|
|
552
552
|
* @param {string[]} params.events - Events list. Maximum of 100 events are allowed.
|
|
553
553
|
* @param {string} params.schedule - Schedule CRON syntax.
|
|
554
|
-
* @param {number} params.timeout - Maximum execution time in seconds.
|
|
554
|
+
* @param {number | bigint} params.timeout - Maximum execution time in seconds.
|
|
555
555
|
* @param {boolean} params.enabled - Is function enabled? When set to 'disabled', users cannot access the function but Server SDKs with and API key can still access the function. No data is lost when this is toggled.
|
|
556
556
|
* @param {boolean} params.logging - When disabled, executions will exclude logs and errors, and will be slightly faster.
|
|
557
557
|
* @param {string} params.entrypoint - Entrypoint File. This path is relative to the "providerRootDirectory".
|
|
@@ -566,7 +566,7 @@ export class Functions {
|
|
|
566
566
|
* @throws {AppwriteException}
|
|
567
567
|
* @returns {Promise<Models.Function>}
|
|
568
568
|
*/
|
|
569
|
-
update(params: { functionId: string, name: string, runtime?: Runtime, execute?: string[], events?: string[], schedule?: string, timeout?: number, enabled?: boolean, logging?: boolean, entrypoint?: string, commands?: string, scopes?: string[], installationId?: string, providerRepositoryId?: string, providerBranch?: string, providerSilentMode?: boolean, providerRootDirectory?: string, specification?: string }): Promise<Models.Function>;
|
|
569
|
+
update(params: { functionId: string, name: string, runtime?: Runtime, execute?: string[], events?: string[], schedule?: string, timeout?: number | bigint, enabled?: boolean, logging?: boolean, entrypoint?: string, commands?: string, scopes?: string[], installationId?: string, providerRepositoryId?: string, providerBranch?: string, providerSilentMode?: boolean, providerRootDirectory?: string, specification?: string }): Promise<Models.Function>;
|
|
570
570
|
/**
|
|
571
571
|
* Update function by its unique ID.
|
|
572
572
|
*
|
|
@@ -576,7 +576,7 @@ export class Functions {
|
|
|
576
576
|
* @param {string[]} execute - An array of role strings with execution permissions. By default no user is granted with any execute permissions. [learn more about roles](https://appwrite.io/docs/permissions#permission-roles). Maximum of 100 roles are allowed, each 64 characters long.
|
|
577
577
|
* @param {string[]} events - Events list. Maximum of 100 events are allowed.
|
|
578
578
|
* @param {string} schedule - Schedule CRON syntax.
|
|
579
|
-
* @param {number} timeout - Maximum execution time in seconds.
|
|
579
|
+
* @param {number | bigint} timeout - Maximum execution time in seconds.
|
|
580
580
|
* @param {boolean} enabled - Is function enabled? When set to 'disabled', users cannot access the function but Server SDKs with and API key can still access the function. No data is lost when this is toggled.
|
|
581
581
|
* @param {boolean} logging - When disabled, executions will exclude logs and errors, and will be slightly faster.
|
|
582
582
|
* @param {string} entrypoint - Entrypoint File. This path is relative to the "providerRootDirectory".
|
|
@@ -592,15 +592,15 @@ export class Functions {
|
|
|
592
592
|
* @returns {Promise<Models.Function>}
|
|
593
593
|
* @deprecated Use the object parameter style method for a better developer experience.
|
|
594
594
|
*/
|
|
595
|
-
update(functionId: string, name: string, runtime?: Runtime, execute?: string[], events?: string[], schedule?: string, timeout?: number, enabled?: boolean, logging?: boolean, entrypoint?: string, commands?: string, scopes?: string[], installationId?: string, providerRepositoryId?: string, providerBranch?: string, providerSilentMode?: boolean, providerRootDirectory?: string, specification?: string): Promise<Models.Function>;
|
|
595
|
+
update(functionId: string, name: string, runtime?: Runtime, execute?: string[], events?: string[], schedule?: string, timeout?: number | bigint, enabled?: boolean, logging?: boolean, entrypoint?: string, commands?: string, scopes?: string[], installationId?: string, providerRepositoryId?: string, providerBranch?: string, providerSilentMode?: boolean, providerRootDirectory?: string, specification?: string): Promise<Models.Function>;
|
|
596
596
|
update(
|
|
597
|
-
paramsOrFirst: { functionId: string, name: string, runtime?: Runtime, execute?: string[], events?: string[], schedule?: string, timeout?: number, enabled?: boolean, logging?: boolean, entrypoint?: string, commands?: string, scopes?: string[], installationId?: string, providerRepositoryId?: string, providerBranch?: string, providerSilentMode?: boolean, providerRootDirectory?: string, specification?: string } | string,
|
|
598
|
-
...rest: [(string)?, (Runtime)?, (string[])?, (string[])?, (string)?, (number)?, (boolean)?, (boolean)?, (string)?, (string)?, (string[])?, (string)?, (string)?, (string)?, (boolean)?, (string)?, (string)?]
|
|
597
|
+
paramsOrFirst: { functionId: string, name: string, runtime?: Runtime, execute?: string[], events?: string[], schedule?: string, timeout?: number | bigint, enabled?: boolean, logging?: boolean, entrypoint?: string, commands?: string, scopes?: string[], installationId?: string, providerRepositoryId?: string, providerBranch?: string, providerSilentMode?: boolean, providerRootDirectory?: string, specification?: string } | string,
|
|
598
|
+
...rest: [(string)?, (Runtime)?, (string[])?, (string[])?, (string)?, (number | bigint)?, (boolean)?, (boolean)?, (string)?, (string)?, (string[])?, (string)?, (string)?, (string)?, (boolean)?, (string)?, (string)?]
|
|
599
599
|
): Promise<Models.Function> {
|
|
600
|
-
let params: { functionId: string, name: string, runtime?: Runtime, execute?: string[], events?: string[], schedule?: string, timeout?: number, enabled?: boolean, logging?: boolean, entrypoint?: string, commands?: string, scopes?: string[], installationId?: string, providerRepositoryId?: string, providerBranch?: string, providerSilentMode?: boolean, providerRootDirectory?: string, specification?: string };
|
|
600
|
+
let params: { functionId: string, name: string, runtime?: Runtime, execute?: string[], events?: string[], schedule?: string, timeout?: number | bigint, enabled?: boolean, logging?: boolean, entrypoint?: string, commands?: string, scopes?: string[], installationId?: string, providerRepositoryId?: string, providerBranch?: string, providerSilentMode?: boolean, providerRootDirectory?: string, specification?: string };
|
|
601
601
|
|
|
602
602
|
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
|
|
603
|
-
params = (paramsOrFirst || {}) as { functionId: string, name: string, runtime?: Runtime, execute?: string[], events?: string[], schedule?: string, timeout?: number, enabled?: boolean, logging?: boolean, entrypoint?: string, commands?: string, scopes?: string[], installationId?: string, providerRepositoryId?: string, providerBranch?: string, providerSilentMode?: boolean, providerRootDirectory?: string, specification?: string };
|
|
603
|
+
params = (paramsOrFirst || {}) as { functionId: string, name: string, runtime?: Runtime, execute?: string[], events?: string[], schedule?: string, timeout?: number | bigint, enabled?: boolean, logging?: boolean, entrypoint?: string, commands?: string, scopes?: string[], installationId?: string, providerRepositoryId?: string, providerBranch?: string, providerSilentMode?: boolean, providerRootDirectory?: string, specification?: string };
|
|
604
604
|
} else {
|
|
605
605
|
params = {
|
|
606
606
|
functionId: paramsOrFirst as string,
|
|
@@ -609,7 +609,7 @@ export class Functions {
|
|
|
609
609
|
execute: rest[2] as string[],
|
|
610
610
|
events: rest[3] as string[],
|
|
611
611
|
schedule: rest[4] as string,
|
|
612
|
-
timeout: rest[5] as number,
|
|
612
|
+
timeout: rest[5] as number | bigint,
|
|
613
613
|
enabled: rest[6] as boolean,
|
|
614
614
|
logging: rest[7] as boolean,
|
|
615
615
|
entrypoint: rest[8] as string,
|