node-appwrite 20.2.1 → 21.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/client.js +2 -2
- package/dist/client.js.map +1 -1
- package/dist/client.mjs +2 -2
- package/dist/client.mjs.map +1 -1
- package/dist/enums/build-runtime.d.mts +3 -1
- package/dist/enums/build-runtime.d.ts +3 -1
- package/dist/enums/build-runtime.js +2 -0
- package/dist/enums/build-runtime.js.map +1 -1
- package/dist/enums/build-runtime.mjs +2 -0
- package/dist/enums/build-runtime.mjs.map +1 -1
- package/dist/enums/execution-status.d.mts +2 -1
- package/dist/enums/execution-status.d.ts +2 -1
- package/dist/enums/execution-status.js +1 -0
- package/dist/enums/execution-status.js.map +1 -1
- package/dist/enums/execution-status.mjs +1 -0
- package/dist/enums/execution-status.mjs.map +1 -1
- package/dist/enums/framework.d.mts +1 -0
- package/dist/enums/framework.d.ts +1 -0
- package/dist/enums/framework.js +1 -0
- package/dist/enums/framework.js.map +1 -1
- package/dist/enums/framework.mjs +1 -0
- package/dist/enums/framework.mjs.map +1 -1
- package/dist/enums/output.d.mts +11 -0
- package/dist/enums/output.d.ts +11 -0
- package/dist/enums/output.js +16 -0
- package/dist/enums/output.js.map +1 -0
- package/dist/enums/output.mjs +15 -0
- package/dist/enums/output.mjs.map +1 -0
- package/dist/enums/runtime.d.mts +3 -1
- package/dist/enums/runtime.d.ts +3 -1
- package/dist/enums/runtime.js +2 -0
- package/dist/enums/runtime.js.map +1 -1
- package/dist/enums/runtime.mjs +2 -0
- package/dist/enums/runtime.mjs.map +1 -1
- package/dist/enums/template-reference-type.d.mts +7 -0
- package/dist/enums/template-reference-type.d.ts +7 -0
- package/dist/enums/template-reference-type.js +12 -0
- package/dist/enums/template-reference-type.js.map +1 -0
- package/dist/enums/template-reference-type.mjs +11 -0
- package/dist/enums/template-reference-type.mjs.map +1 -0
- package/dist/enums/theme.d.mts +6 -0
- package/dist/enums/theme.d.ts +6 -0
- package/dist/enums/theme.js +11 -0
- package/dist/enums/theme.js.map +1 -0
- package/dist/enums/theme.mjs +10 -0
- package/dist/enums/theme.mjs.map +1 -0
- package/dist/enums/timezone.d.mts +423 -0
- package/dist/enums/timezone.d.ts +423 -0
- package/dist/enums/timezone.js +428 -0
- package/dist/enums/timezone.js.map +1 -0
- package/dist/enums/timezone.mjs +427 -0
- package/dist/enums/timezone.mjs.map +1 -0
- package/dist/enums/{vcs-deployment-type.d.mts → vcs-reference-type.d.mts} +2 -2
- package/dist/enums/{vcs-deployment-type.d.ts → vcs-reference-type.d.ts} +2 -2
- package/dist/enums/vcs-reference-type.js +12 -0
- package/dist/enums/vcs-reference-type.js.map +1 -0
- package/dist/enums/vcs-reference-type.mjs +11 -0
- package/dist/enums/vcs-reference-type.mjs.map +1 -0
- package/dist/index.d.mts +6 -1
- package/dist/index.d.ts +6 -1
- package/dist/index.js +32 -3
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +6 -1
- package/dist/index.mjs.map +1 -1
- package/dist/models.d.mts +5 -1
- package/dist/models.d.ts +5 -1
- package/dist/operator.d.mts +181 -0
- package/dist/operator.d.ts +181 -0
- package/dist/operator.js +268 -0
- package/dist/operator.js.map +1 -0
- package/dist/operator.mjs +266 -0
- package/dist/operator.mjs.map +1 -0
- package/dist/query.js +6 -6
- package/dist/query.js.map +1 -1
- package/dist/query.mjs +6 -6
- package/dist/query.mjs.map +1 -1
- package/dist/services/account.d.mts +8 -2
- package/dist/services/account.d.ts +8 -2
- package/dist/services/account.js +18 -8
- package/dist/services/account.js.map +1 -1
- package/dist/services/account.mjs +18 -8
- package/dist/services/account.mjs.map +1 -1
- package/dist/services/avatars.d.mts +87 -0
- package/dist/services/avatars.d.ts +87 -0
- package/dist/services/avatars.js +123 -0
- package/dist/services/avatars.js.map +1 -1
- package/dist/services/avatars.mjs +123 -0
- package/dist/services/avatars.mjs.map +1 -1
- package/dist/services/databases.d.mts +20 -5
- package/dist/services/databases.d.ts +20 -5
- package/dist/services/databases.js +30 -5
- package/dist/services/databases.js.map +1 -1
- package/dist/services/databases.mjs +30 -5
- package/dist/services/databases.mjs.map +1 -1
- package/dist/services/functions.d.mts +25 -12
- package/dist/services/functions.d.ts +25 -12
- package/dist/services/functions.js +33 -10
- package/dist/services/functions.js.map +1 -1
- package/dist/services/functions.mjs +33 -10
- package/dist/services/functions.mjs.map +1 -1
- package/dist/services/messaging.d.mts +116 -9
- package/dist/services/messaging.d.ts +116 -9
- package/dist/services/messaging.js +182 -9
- package/dist/services/messaging.js.map +1 -1
- package/dist/services/messaging.mjs +182 -9
- package/dist/services/messaging.mjs.map +1 -1
- package/dist/services/sites.d.mts +27 -14
- package/dist/services/sites.d.ts +27 -14
- package/dist/services/sites.js +33 -10
- package/dist/services/sites.js.map +1 -1
- package/dist/services/sites.mjs +33 -10
- package/dist/services/sites.mjs.map +1 -1
- package/dist/services/storage.d.mts +18 -6
- package/dist/services/storage.d.ts +18 -6
- package/dist/services/storage.js +24 -4
- package/dist/services/storage.js.map +1 -1
- package/dist/services/storage.mjs +24 -4
- package/dist/services/storage.mjs.map +1 -1
- package/dist/services/tables-db.d.mts +22 -7
- package/dist/services/tables-db.d.ts +22 -7
- package/dist/services/tables-db.js +30 -5
- package/dist/services/tables-db.js.map +1 -1
- package/dist/services/tables-db.mjs +30 -5
- package/dist/services/tables-db.mjs.map +1 -1
- package/dist/services/teams.d.mts +8 -2
- package/dist/services/teams.d.ts +8 -2
- package/dist/services/teams.js +12 -2
- package/dist/services/teams.js.map +1 -1
- package/dist/services/teams.mjs +12 -2
- package/dist/services/teams.mjs.map +1 -1
- package/dist/services/tokens.d.mts +4 -1
- package/dist/services/tokens.d.ts +4 -1
- package/dist/services/tokens.js +6 -1
- package/dist/services/tokens.js.map +1 -1
- package/dist/services/tokens.mjs +6 -1
- package/dist/services/tokens.mjs.map +1 -1
- package/dist/services/users.d.mts +24 -6
- package/dist/services/users.d.ts +24 -6
- package/dist/services/users.js +37 -7
- package/dist/services/users.js.map +1 -1
- package/dist/services/users.mjs +37 -7
- package/dist/services/users.mjs.map +1 -1
- package/package.json +1 -1
- package/dist/enums/vcs-deployment-type.js +0 -12
- package/dist/enums/vcs-deployment-type.js.map +0 -1
- package/dist/enums/vcs-deployment-type.mjs +0 -11
- package/dist/enums/vcs-deployment-type.mjs.map +0 -1
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { Client, UploadProgress } from '../client.mjs';
|
|
2
2
|
import { Models } from '../models.mjs';
|
|
3
3
|
import { Runtime } from '../enums/runtime.mjs';
|
|
4
|
-
import {
|
|
4
|
+
import { TemplateReferenceType } from '../enums/template-reference-type.mjs';
|
|
5
|
+
import { VCSReferenceType } from '../enums/vcs-reference-type.mjs';
|
|
5
6
|
import { DeploymentDownloadType } from '../enums/deployment-download-type.mjs';
|
|
6
7
|
import { ExecutionMethod } from '../enums/execution-method.mjs';
|
|
7
8
|
import '../query.mjs';
|
|
@@ -24,23 +25,26 @@ declare class Functions {
|
|
|
24
25
|
*
|
|
25
26
|
* @param {string[]} params.queries - Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: name, enabled, runtime, deploymentId, schedule, scheduleNext, schedulePrevious, timeout, entrypoint, commands, installationId
|
|
26
27
|
* @param {string} params.search - Search term to filter your list results. Max length: 256 chars.
|
|
28
|
+
* @param {boolean} params.total - When set to false, the total count returned will be 0 and will not be calculated.
|
|
27
29
|
* @throws {AppwriteException}
|
|
28
30
|
* @returns {Promise<Models.FunctionList>}
|
|
29
31
|
*/
|
|
30
32
|
list(params?: {
|
|
31
33
|
queries?: string[];
|
|
32
34
|
search?: string;
|
|
35
|
+
total?: boolean;
|
|
33
36
|
}): Promise<Models.FunctionList>;
|
|
34
37
|
/**
|
|
35
38
|
* Get a list of all the project's functions. You can use the query params to filter your results.
|
|
36
39
|
*
|
|
37
40
|
* @param {string[]} queries - Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: name, enabled, runtime, deploymentId, schedule, scheduleNext, schedulePrevious, timeout, entrypoint, commands, installationId
|
|
38
41
|
* @param {string} search - Search term to filter your list results. Max length: 256 chars.
|
|
42
|
+
* @param {boolean} total - When set to false, the total count returned will be 0 and will not be calculated.
|
|
39
43
|
* @throws {AppwriteException}
|
|
40
44
|
* @returns {Promise<Models.FunctionList>}
|
|
41
45
|
* @deprecated Use the object parameter style method for a better developer experience.
|
|
42
46
|
*/
|
|
43
|
-
list(queries?: string[], search?: string): Promise<Models.FunctionList>;
|
|
47
|
+
list(queries?: string[], search?: string, total?: boolean): Promise<Models.FunctionList>;
|
|
44
48
|
/**
|
|
45
49
|
* 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.
|
|
46
50
|
*
|
|
@@ -261,6 +265,7 @@ declare class Functions {
|
|
|
261
265
|
* @param {string} params.functionId - Function ID.
|
|
262
266
|
* @param {string[]} params.queries - Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: buildSize, sourceSize, totalSize, buildDuration, status, activate, type
|
|
263
267
|
* @param {string} params.search - Search term to filter your list results. Max length: 256 chars.
|
|
268
|
+
* @param {boolean} params.total - When set to false, the total count returned will be 0 and will not be calculated.
|
|
264
269
|
* @throws {AppwriteException}
|
|
265
270
|
* @returns {Promise<Models.DeploymentList>}
|
|
266
271
|
*/
|
|
@@ -268,6 +273,7 @@ declare class Functions {
|
|
|
268
273
|
functionId: string;
|
|
269
274
|
queries?: string[];
|
|
270
275
|
search?: string;
|
|
276
|
+
total?: boolean;
|
|
271
277
|
}): Promise<Models.DeploymentList>;
|
|
272
278
|
/**
|
|
273
279
|
* Get a list of all the function's code deployments. You can use the query params to filter your results.
|
|
@@ -275,11 +281,12 @@ declare class Functions {
|
|
|
275
281
|
* @param {string} functionId - Function ID.
|
|
276
282
|
* @param {string[]} queries - Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: buildSize, sourceSize, totalSize, buildDuration, status, activate, type
|
|
277
283
|
* @param {string} search - Search term to filter your list results. Max length: 256 chars.
|
|
284
|
+
* @param {boolean} total - When set to false, the total count returned will be 0 and will not be calculated.
|
|
278
285
|
* @throws {AppwriteException}
|
|
279
286
|
* @returns {Promise<Models.DeploymentList>}
|
|
280
287
|
* @deprecated Use the object parameter style method for a better developer experience.
|
|
281
288
|
*/
|
|
282
|
-
listDeployments(functionId: string, queries?: string[], search?: string): Promise<Models.DeploymentList>;
|
|
289
|
+
listDeployments(functionId: string, queries?: string[], search?: string, total?: boolean): Promise<Models.DeploymentList>;
|
|
283
290
|
/**
|
|
284
291
|
* Create a new function code deployment. Use this endpoint to upload a new version of your code function. To execute your newly uploaded code, you'll need to update the function's deployment to use your new deployment UID.
|
|
285
292
|
*
|
|
@@ -354,7 +361,8 @@ declare class Functions {
|
|
|
354
361
|
* @param {string} params.repository - Repository name of the template.
|
|
355
362
|
* @param {string} params.owner - The name of the owner of the template.
|
|
356
363
|
* @param {string} params.rootDirectory - Path to function code in the template repo.
|
|
357
|
-
* @param {
|
|
364
|
+
* @param {TemplateReferenceType} params.type - Type for the reference provided. Can be commit, branch, or tag
|
|
365
|
+
* @param {string} params.reference - Reference value, can be a commit hash, branch name, or release tag
|
|
358
366
|
* @param {boolean} params.activate - Automatically activate the deployment when it is finished building.
|
|
359
367
|
* @throws {AppwriteException}
|
|
360
368
|
* @returns {Promise<Models.Deployment>}
|
|
@@ -364,7 +372,8 @@ declare class Functions {
|
|
|
364
372
|
repository: string;
|
|
365
373
|
owner: string;
|
|
366
374
|
rootDirectory: string;
|
|
367
|
-
|
|
375
|
+
type: TemplateReferenceType;
|
|
376
|
+
reference: string;
|
|
368
377
|
activate?: boolean;
|
|
369
378
|
}): Promise<Models.Deployment>;
|
|
370
379
|
/**
|
|
@@ -376,20 +385,21 @@ declare class Functions {
|
|
|
376
385
|
* @param {string} repository - Repository name of the template.
|
|
377
386
|
* @param {string} owner - The name of the owner of the template.
|
|
378
387
|
* @param {string} rootDirectory - Path to function code in the template repo.
|
|
379
|
-
* @param {
|
|
388
|
+
* @param {TemplateReferenceType} type - Type for the reference provided. Can be commit, branch, or tag
|
|
389
|
+
* @param {string} reference - Reference value, can be a commit hash, branch name, or release tag
|
|
380
390
|
* @param {boolean} activate - Automatically activate the deployment when it is finished building.
|
|
381
391
|
* @throws {AppwriteException}
|
|
382
392
|
* @returns {Promise<Models.Deployment>}
|
|
383
393
|
* @deprecated Use the object parameter style method for a better developer experience.
|
|
384
394
|
*/
|
|
385
|
-
createTemplateDeployment(functionId: string, repository: string, owner: string, rootDirectory: string,
|
|
395
|
+
createTemplateDeployment(functionId: string, repository: string, owner: string, rootDirectory: string, type: TemplateReferenceType, reference: string, activate?: boolean): Promise<Models.Deployment>;
|
|
386
396
|
/**
|
|
387
397
|
* Create a deployment when a function is connected to VCS.
|
|
388
398
|
*
|
|
389
399
|
* This endpoint lets you create deployment from a branch, commit, or a tag.
|
|
390
400
|
*
|
|
391
401
|
* @param {string} params.functionId - Function ID.
|
|
392
|
-
* @param {
|
|
402
|
+
* @param {VCSReferenceType} params.type - Type of reference passed. Allowed values are: branch, commit
|
|
393
403
|
* @param {string} params.reference - VCS reference to create deployment from. Depending on type this can be: branch name, commit hash
|
|
394
404
|
* @param {boolean} params.activate - Automatically activate the deployment when it is finished building.
|
|
395
405
|
* @throws {AppwriteException}
|
|
@@ -397,7 +407,7 @@ declare class Functions {
|
|
|
397
407
|
*/
|
|
398
408
|
createVcsDeployment(params: {
|
|
399
409
|
functionId: string;
|
|
400
|
-
type:
|
|
410
|
+
type: VCSReferenceType;
|
|
401
411
|
reference: string;
|
|
402
412
|
activate?: boolean;
|
|
403
413
|
}): Promise<Models.Deployment>;
|
|
@@ -407,14 +417,14 @@ declare class Functions {
|
|
|
407
417
|
* This endpoint lets you create deployment from a branch, commit, or a tag.
|
|
408
418
|
*
|
|
409
419
|
* @param {string} functionId - Function ID.
|
|
410
|
-
* @param {
|
|
420
|
+
* @param {VCSReferenceType} type - Type of reference passed. Allowed values are: branch, commit
|
|
411
421
|
* @param {string} reference - VCS reference to create deployment from. Depending on type this can be: branch name, commit hash
|
|
412
422
|
* @param {boolean} activate - Automatically activate the deployment when it is finished building.
|
|
413
423
|
* @throws {AppwriteException}
|
|
414
424
|
* @returns {Promise<Models.Deployment>}
|
|
415
425
|
* @deprecated Use the object parameter style method for a better developer experience.
|
|
416
426
|
*/
|
|
417
|
-
createVcsDeployment(functionId: string, type:
|
|
427
|
+
createVcsDeployment(functionId: string, type: VCSReferenceType, reference: string, activate?: boolean): Promise<Models.Deployment>;
|
|
418
428
|
/**
|
|
419
429
|
* Get a function deployment by its unique ID.
|
|
420
430
|
*
|
|
@@ -511,23 +521,26 @@ declare class Functions {
|
|
|
511
521
|
*
|
|
512
522
|
* @param {string} params.functionId - Function ID.
|
|
513
523
|
* @param {string[]} params.queries - Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: trigger, status, responseStatusCode, duration, requestMethod, requestPath, deploymentId
|
|
524
|
+
* @param {boolean} params.total - When set to false, the total count returned will be 0 and will not be calculated.
|
|
514
525
|
* @throws {AppwriteException}
|
|
515
526
|
* @returns {Promise<Models.ExecutionList>}
|
|
516
527
|
*/
|
|
517
528
|
listExecutions(params: {
|
|
518
529
|
functionId: string;
|
|
519
530
|
queries?: string[];
|
|
531
|
+
total?: boolean;
|
|
520
532
|
}): Promise<Models.ExecutionList>;
|
|
521
533
|
/**
|
|
522
534
|
* Get a list of all the current user function execution logs. You can use the query params to filter your results.
|
|
523
535
|
*
|
|
524
536
|
* @param {string} functionId - Function ID.
|
|
525
537
|
* @param {string[]} queries - Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: trigger, status, responseStatusCode, duration, requestMethod, requestPath, deploymentId
|
|
538
|
+
* @param {boolean} total - When set to false, the total count returned will be 0 and will not be calculated.
|
|
526
539
|
* @throws {AppwriteException}
|
|
527
540
|
* @returns {Promise<Models.ExecutionList>}
|
|
528
541
|
* @deprecated Use the object parameter style method for a better developer experience.
|
|
529
542
|
*/
|
|
530
|
-
listExecutions(functionId: string, queries?: string[]): Promise<Models.ExecutionList>;
|
|
543
|
+
listExecutions(functionId: string, queries?: string[], total?: boolean): Promise<Models.ExecutionList>;
|
|
531
544
|
/**
|
|
532
545
|
* Trigger a function execution. The returned object will return you the current execution status. You can ping the `Get Execution` endpoint to get updates on the current execution status. Once this endpoint is called, your function execution process will start asynchronously.
|
|
533
546
|
*
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { Client, UploadProgress } from '../client.js';
|
|
2
2
|
import { Models } from '../models.js';
|
|
3
3
|
import { Runtime } from '../enums/runtime.js';
|
|
4
|
-
import {
|
|
4
|
+
import { TemplateReferenceType } from '../enums/template-reference-type.js';
|
|
5
|
+
import { VCSReferenceType } from '../enums/vcs-reference-type.js';
|
|
5
6
|
import { DeploymentDownloadType } from '../enums/deployment-download-type.js';
|
|
6
7
|
import { ExecutionMethod } from '../enums/execution-method.js';
|
|
7
8
|
import '../query.js';
|
|
@@ -24,23 +25,26 @@ declare class Functions {
|
|
|
24
25
|
*
|
|
25
26
|
* @param {string[]} params.queries - Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: name, enabled, runtime, deploymentId, schedule, scheduleNext, schedulePrevious, timeout, entrypoint, commands, installationId
|
|
26
27
|
* @param {string} params.search - Search term to filter your list results. Max length: 256 chars.
|
|
28
|
+
* @param {boolean} params.total - When set to false, the total count returned will be 0 and will not be calculated.
|
|
27
29
|
* @throws {AppwriteException}
|
|
28
30
|
* @returns {Promise<Models.FunctionList>}
|
|
29
31
|
*/
|
|
30
32
|
list(params?: {
|
|
31
33
|
queries?: string[];
|
|
32
34
|
search?: string;
|
|
35
|
+
total?: boolean;
|
|
33
36
|
}): Promise<Models.FunctionList>;
|
|
34
37
|
/**
|
|
35
38
|
* Get a list of all the project's functions. You can use the query params to filter your results.
|
|
36
39
|
*
|
|
37
40
|
* @param {string[]} queries - Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: name, enabled, runtime, deploymentId, schedule, scheduleNext, schedulePrevious, timeout, entrypoint, commands, installationId
|
|
38
41
|
* @param {string} search - Search term to filter your list results. Max length: 256 chars.
|
|
42
|
+
* @param {boolean} total - When set to false, the total count returned will be 0 and will not be calculated.
|
|
39
43
|
* @throws {AppwriteException}
|
|
40
44
|
* @returns {Promise<Models.FunctionList>}
|
|
41
45
|
* @deprecated Use the object parameter style method for a better developer experience.
|
|
42
46
|
*/
|
|
43
|
-
list(queries?: string[], search?: string): Promise<Models.FunctionList>;
|
|
47
|
+
list(queries?: string[], search?: string, total?: boolean): Promise<Models.FunctionList>;
|
|
44
48
|
/**
|
|
45
49
|
* 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.
|
|
46
50
|
*
|
|
@@ -261,6 +265,7 @@ declare class Functions {
|
|
|
261
265
|
* @param {string} params.functionId - Function ID.
|
|
262
266
|
* @param {string[]} params.queries - Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: buildSize, sourceSize, totalSize, buildDuration, status, activate, type
|
|
263
267
|
* @param {string} params.search - Search term to filter your list results. Max length: 256 chars.
|
|
268
|
+
* @param {boolean} params.total - When set to false, the total count returned will be 0 and will not be calculated.
|
|
264
269
|
* @throws {AppwriteException}
|
|
265
270
|
* @returns {Promise<Models.DeploymentList>}
|
|
266
271
|
*/
|
|
@@ -268,6 +273,7 @@ declare class Functions {
|
|
|
268
273
|
functionId: string;
|
|
269
274
|
queries?: string[];
|
|
270
275
|
search?: string;
|
|
276
|
+
total?: boolean;
|
|
271
277
|
}): Promise<Models.DeploymentList>;
|
|
272
278
|
/**
|
|
273
279
|
* Get a list of all the function's code deployments. You can use the query params to filter your results.
|
|
@@ -275,11 +281,12 @@ declare class Functions {
|
|
|
275
281
|
* @param {string} functionId - Function ID.
|
|
276
282
|
* @param {string[]} queries - Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: buildSize, sourceSize, totalSize, buildDuration, status, activate, type
|
|
277
283
|
* @param {string} search - Search term to filter your list results. Max length: 256 chars.
|
|
284
|
+
* @param {boolean} total - When set to false, the total count returned will be 0 and will not be calculated.
|
|
278
285
|
* @throws {AppwriteException}
|
|
279
286
|
* @returns {Promise<Models.DeploymentList>}
|
|
280
287
|
* @deprecated Use the object parameter style method for a better developer experience.
|
|
281
288
|
*/
|
|
282
|
-
listDeployments(functionId: string, queries?: string[], search?: string): Promise<Models.DeploymentList>;
|
|
289
|
+
listDeployments(functionId: string, queries?: string[], search?: string, total?: boolean): Promise<Models.DeploymentList>;
|
|
283
290
|
/**
|
|
284
291
|
* Create a new function code deployment. Use this endpoint to upload a new version of your code function. To execute your newly uploaded code, you'll need to update the function's deployment to use your new deployment UID.
|
|
285
292
|
*
|
|
@@ -354,7 +361,8 @@ declare class Functions {
|
|
|
354
361
|
* @param {string} params.repository - Repository name of the template.
|
|
355
362
|
* @param {string} params.owner - The name of the owner of the template.
|
|
356
363
|
* @param {string} params.rootDirectory - Path to function code in the template repo.
|
|
357
|
-
* @param {
|
|
364
|
+
* @param {TemplateReferenceType} params.type - Type for the reference provided. Can be commit, branch, or tag
|
|
365
|
+
* @param {string} params.reference - Reference value, can be a commit hash, branch name, or release tag
|
|
358
366
|
* @param {boolean} params.activate - Automatically activate the deployment when it is finished building.
|
|
359
367
|
* @throws {AppwriteException}
|
|
360
368
|
* @returns {Promise<Models.Deployment>}
|
|
@@ -364,7 +372,8 @@ declare class Functions {
|
|
|
364
372
|
repository: string;
|
|
365
373
|
owner: string;
|
|
366
374
|
rootDirectory: string;
|
|
367
|
-
|
|
375
|
+
type: TemplateReferenceType;
|
|
376
|
+
reference: string;
|
|
368
377
|
activate?: boolean;
|
|
369
378
|
}): Promise<Models.Deployment>;
|
|
370
379
|
/**
|
|
@@ -376,20 +385,21 @@ declare class Functions {
|
|
|
376
385
|
* @param {string} repository - Repository name of the template.
|
|
377
386
|
* @param {string} owner - The name of the owner of the template.
|
|
378
387
|
* @param {string} rootDirectory - Path to function code in the template repo.
|
|
379
|
-
* @param {
|
|
388
|
+
* @param {TemplateReferenceType} type - Type for the reference provided. Can be commit, branch, or tag
|
|
389
|
+
* @param {string} reference - Reference value, can be a commit hash, branch name, or release tag
|
|
380
390
|
* @param {boolean} activate - Automatically activate the deployment when it is finished building.
|
|
381
391
|
* @throws {AppwriteException}
|
|
382
392
|
* @returns {Promise<Models.Deployment>}
|
|
383
393
|
* @deprecated Use the object parameter style method for a better developer experience.
|
|
384
394
|
*/
|
|
385
|
-
createTemplateDeployment(functionId: string, repository: string, owner: string, rootDirectory: string,
|
|
395
|
+
createTemplateDeployment(functionId: string, repository: string, owner: string, rootDirectory: string, type: TemplateReferenceType, reference: string, activate?: boolean): Promise<Models.Deployment>;
|
|
386
396
|
/**
|
|
387
397
|
* Create a deployment when a function is connected to VCS.
|
|
388
398
|
*
|
|
389
399
|
* This endpoint lets you create deployment from a branch, commit, or a tag.
|
|
390
400
|
*
|
|
391
401
|
* @param {string} params.functionId - Function ID.
|
|
392
|
-
* @param {
|
|
402
|
+
* @param {VCSReferenceType} params.type - Type of reference passed. Allowed values are: branch, commit
|
|
393
403
|
* @param {string} params.reference - VCS reference to create deployment from. Depending on type this can be: branch name, commit hash
|
|
394
404
|
* @param {boolean} params.activate - Automatically activate the deployment when it is finished building.
|
|
395
405
|
* @throws {AppwriteException}
|
|
@@ -397,7 +407,7 @@ declare class Functions {
|
|
|
397
407
|
*/
|
|
398
408
|
createVcsDeployment(params: {
|
|
399
409
|
functionId: string;
|
|
400
|
-
type:
|
|
410
|
+
type: VCSReferenceType;
|
|
401
411
|
reference: string;
|
|
402
412
|
activate?: boolean;
|
|
403
413
|
}): Promise<Models.Deployment>;
|
|
@@ -407,14 +417,14 @@ declare class Functions {
|
|
|
407
417
|
* This endpoint lets you create deployment from a branch, commit, or a tag.
|
|
408
418
|
*
|
|
409
419
|
* @param {string} functionId - Function ID.
|
|
410
|
-
* @param {
|
|
420
|
+
* @param {VCSReferenceType} type - Type of reference passed. Allowed values are: branch, commit
|
|
411
421
|
* @param {string} reference - VCS reference to create deployment from. Depending on type this can be: branch name, commit hash
|
|
412
422
|
* @param {boolean} activate - Automatically activate the deployment when it is finished building.
|
|
413
423
|
* @throws {AppwriteException}
|
|
414
424
|
* @returns {Promise<Models.Deployment>}
|
|
415
425
|
* @deprecated Use the object parameter style method for a better developer experience.
|
|
416
426
|
*/
|
|
417
|
-
createVcsDeployment(functionId: string, type:
|
|
427
|
+
createVcsDeployment(functionId: string, type: VCSReferenceType, reference: string, activate?: boolean): Promise<Models.Deployment>;
|
|
418
428
|
/**
|
|
419
429
|
* Get a function deployment by its unique ID.
|
|
420
430
|
*
|
|
@@ -511,23 +521,26 @@ declare class Functions {
|
|
|
511
521
|
*
|
|
512
522
|
* @param {string} params.functionId - Function ID.
|
|
513
523
|
* @param {string[]} params.queries - Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: trigger, status, responseStatusCode, duration, requestMethod, requestPath, deploymentId
|
|
524
|
+
* @param {boolean} params.total - When set to false, the total count returned will be 0 and will not be calculated.
|
|
514
525
|
* @throws {AppwriteException}
|
|
515
526
|
* @returns {Promise<Models.ExecutionList>}
|
|
516
527
|
*/
|
|
517
528
|
listExecutions(params: {
|
|
518
529
|
functionId: string;
|
|
519
530
|
queries?: string[];
|
|
531
|
+
total?: boolean;
|
|
520
532
|
}): Promise<Models.ExecutionList>;
|
|
521
533
|
/**
|
|
522
534
|
* Get a list of all the current user function execution logs. You can use the query params to filter your results.
|
|
523
535
|
*
|
|
524
536
|
* @param {string} functionId - Function ID.
|
|
525
537
|
* @param {string[]} queries - Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: trigger, status, responseStatusCode, duration, requestMethod, requestPath, deploymentId
|
|
538
|
+
* @param {boolean} total - When set to false, the total count returned will be 0 and will not be calculated.
|
|
526
539
|
* @throws {AppwriteException}
|
|
527
540
|
* @returns {Promise<Models.ExecutionList>}
|
|
528
541
|
* @deprecated Use the object parameter style method for a better developer experience.
|
|
529
542
|
*/
|
|
530
|
-
listExecutions(functionId: string, queries?: string[]): Promise<Models.ExecutionList>;
|
|
543
|
+
listExecutions(functionId: string, queries?: string[], total?: boolean): Promise<Models.ExecutionList>;
|
|
531
544
|
/**
|
|
532
545
|
* Trigger a function execution. The returned object will return you the current execution status. You can ping the `Get Execution` endpoint to get updates on the current execution status. Once this endpoint is called, your function execution process will start asynchronously.
|
|
533
546
|
*
|
|
@@ -13,11 +13,13 @@ class Functions {
|
|
|
13
13
|
} else {
|
|
14
14
|
params = {
|
|
15
15
|
queries: paramsOrFirst,
|
|
16
|
-
search: rest[0]
|
|
16
|
+
search: rest[0],
|
|
17
|
+
total: rest[1]
|
|
17
18
|
};
|
|
18
19
|
}
|
|
19
20
|
const queries = params.queries;
|
|
20
21
|
const search = params.search;
|
|
22
|
+
const total = params.total;
|
|
21
23
|
const apiPath = "/functions";
|
|
22
24
|
const payload = {};
|
|
23
25
|
if (typeof queries !== "undefined") {
|
|
@@ -26,6 +28,9 @@ class Functions {
|
|
|
26
28
|
if (typeof search !== "undefined") {
|
|
27
29
|
payload["search"] = search;
|
|
28
30
|
}
|
|
31
|
+
if (typeof total !== "undefined") {
|
|
32
|
+
payload["total"] = total;
|
|
33
|
+
}
|
|
29
34
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
30
35
|
const apiHeaders = {};
|
|
31
36
|
return this.client.call(
|
|
@@ -397,12 +402,14 @@ class Functions {
|
|
|
397
402
|
params = {
|
|
398
403
|
functionId: paramsOrFirst,
|
|
399
404
|
queries: rest[0],
|
|
400
|
-
search: rest[1]
|
|
405
|
+
search: rest[1],
|
|
406
|
+
total: rest[2]
|
|
401
407
|
};
|
|
402
408
|
}
|
|
403
409
|
const functionId = params.functionId;
|
|
404
410
|
const queries = params.queries;
|
|
405
411
|
const search = params.search;
|
|
412
|
+
const total = params.total;
|
|
406
413
|
if (typeof functionId === "undefined") {
|
|
407
414
|
throw new client.AppwriteException('Missing required parameter: "functionId"');
|
|
408
415
|
}
|
|
@@ -414,6 +421,9 @@ class Functions {
|
|
|
414
421
|
if (typeof search !== "undefined") {
|
|
415
422
|
payload["search"] = search;
|
|
416
423
|
}
|
|
424
|
+
if (typeof total !== "undefined") {
|
|
425
|
+
payload["total"] = total;
|
|
426
|
+
}
|
|
417
427
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
418
428
|
const apiHeaders = {};
|
|
419
429
|
return this.client.call(
|
|
@@ -528,15 +538,17 @@ class Functions {
|
|
|
528
538
|
repository: rest[0],
|
|
529
539
|
owner: rest[1],
|
|
530
540
|
rootDirectory: rest[2],
|
|
531
|
-
|
|
532
|
-
|
|
541
|
+
type: rest[3],
|
|
542
|
+
reference: rest[4],
|
|
543
|
+
activate: rest[5]
|
|
533
544
|
};
|
|
534
545
|
}
|
|
535
546
|
const functionId = params.functionId;
|
|
536
547
|
const repository = params.repository;
|
|
537
548
|
const owner = params.owner;
|
|
538
549
|
const rootDirectory = params.rootDirectory;
|
|
539
|
-
const
|
|
550
|
+
const type = params.type;
|
|
551
|
+
const reference = params.reference;
|
|
540
552
|
const activate = params.activate;
|
|
541
553
|
if (typeof functionId === "undefined") {
|
|
542
554
|
throw new client.AppwriteException('Missing required parameter: "functionId"');
|
|
@@ -550,8 +562,11 @@ class Functions {
|
|
|
550
562
|
if (typeof rootDirectory === "undefined") {
|
|
551
563
|
throw new client.AppwriteException('Missing required parameter: "rootDirectory"');
|
|
552
564
|
}
|
|
553
|
-
if (typeof
|
|
554
|
-
throw new client.AppwriteException('Missing required parameter: "
|
|
565
|
+
if (typeof type === "undefined") {
|
|
566
|
+
throw new client.AppwriteException('Missing required parameter: "type"');
|
|
567
|
+
}
|
|
568
|
+
if (typeof reference === "undefined") {
|
|
569
|
+
throw new client.AppwriteException('Missing required parameter: "reference"');
|
|
555
570
|
}
|
|
556
571
|
const apiPath = "/functions/{functionId}/deployments/template".replace("{functionId}", functionId);
|
|
557
572
|
const payload = {};
|
|
@@ -564,8 +579,11 @@ class Functions {
|
|
|
564
579
|
if (typeof rootDirectory !== "undefined") {
|
|
565
580
|
payload["rootDirectory"] = rootDirectory;
|
|
566
581
|
}
|
|
567
|
-
if (typeof
|
|
568
|
-
payload["
|
|
582
|
+
if (typeof type !== "undefined") {
|
|
583
|
+
payload["type"] = type;
|
|
584
|
+
}
|
|
585
|
+
if (typeof reference !== "undefined") {
|
|
586
|
+
payload["reference"] = reference;
|
|
569
587
|
}
|
|
570
588
|
if (typeof activate !== "undefined") {
|
|
571
589
|
payload["activate"] = activate;
|
|
@@ -761,11 +779,13 @@ class Functions {
|
|
|
761
779
|
} else {
|
|
762
780
|
params = {
|
|
763
781
|
functionId: paramsOrFirst,
|
|
764
|
-
queries: rest[0]
|
|
782
|
+
queries: rest[0],
|
|
783
|
+
total: rest[1]
|
|
765
784
|
};
|
|
766
785
|
}
|
|
767
786
|
const functionId = params.functionId;
|
|
768
787
|
const queries = params.queries;
|
|
788
|
+
const total = params.total;
|
|
769
789
|
if (typeof functionId === "undefined") {
|
|
770
790
|
throw new client.AppwriteException('Missing required parameter: "functionId"');
|
|
771
791
|
}
|
|
@@ -774,6 +794,9 @@ class Functions {
|
|
|
774
794
|
if (typeof queries !== "undefined") {
|
|
775
795
|
payload["queries"] = queries;
|
|
776
796
|
}
|
|
797
|
+
if (typeof total !== "undefined") {
|
|
798
|
+
payload["total"] = total;
|
|
799
|
+
}
|
|
777
800
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
778
801
|
const apiHeaders = {};
|
|
779
802
|
return this.client.call(
|