node-appwrite 20.3.0 → 21.1.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/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 +5 -1
- package/dist/index.d.ts +5 -1
- package/dist/index.js +23 -3
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +5 -1
- package/dist/index.mjs.map +1 -1
- package/dist/models.d.mts +4 -0
- package/dist/models.d.ts +4 -0
- package/dist/services/account.js +4 -4
- package/dist/services/account.js.map +1 -1
- package/dist/services/account.mjs +4 -4
- 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 +7 -1
- package/dist/services/databases.d.ts +7 -1
- package/dist/services/databases.js +11 -1
- package/dist/services/databases.js.map +1 -1
- package/dist/services/databases.mjs +11 -1
- package/dist/services/databases.mjs.map +1 -1
- package/dist/services/functions.d.mts +13 -9
- package/dist/services/functions.d.ts +13 -9
- package/dist/services/functions.js +15 -7
- package/dist/services/functions.js.map +1 -1
- package/dist/services/functions.mjs +15 -7
- package/dist/services/functions.mjs.map +1 -1
- package/dist/services/sites.d.mts +15 -11
- package/dist/services/sites.d.ts +15 -11
- package/dist/services/sites.js +15 -7
- package/dist/services/sites.js.map +1 -1
- package/dist/services/sites.mjs +15 -7
- package/dist/services/sites.mjs.map +1 -1
- package/dist/services/storage.d.mts +10 -4
- package/dist/services/storage.d.ts +10 -4
- package/dist/services/storage.js +12 -2
- package/dist/services/storage.js.map +1 -1
- package/dist/services/storage.mjs +12 -2
- package/dist/services/storage.mjs.map +1 -1
- package/dist/services/tables-db.d.mts +9 -3
- package/dist/services/tables-db.d.ts +9 -3
- package/dist/services/tables-db.js +11 -1
- package/dist/services/tables-db.js.map +1 -1
- package/dist/services/tables-db.mjs +11 -1
- package/dist/services/tables-db.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';
|
|
@@ -360,7 +361,8 @@ declare class Functions {
|
|
|
360
361
|
* @param {string} params.repository - Repository name of the template.
|
|
361
362
|
* @param {string} params.owner - The name of the owner of the template.
|
|
362
363
|
* @param {string} params.rootDirectory - Path to function code in the template repo.
|
|
363
|
-
* @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
|
|
364
366
|
* @param {boolean} params.activate - Automatically activate the deployment when it is finished building.
|
|
365
367
|
* @throws {AppwriteException}
|
|
366
368
|
* @returns {Promise<Models.Deployment>}
|
|
@@ -370,7 +372,8 @@ declare class Functions {
|
|
|
370
372
|
repository: string;
|
|
371
373
|
owner: string;
|
|
372
374
|
rootDirectory: string;
|
|
373
|
-
|
|
375
|
+
type: TemplateReferenceType;
|
|
376
|
+
reference: string;
|
|
374
377
|
activate?: boolean;
|
|
375
378
|
}): Promise<Models.Deployment>;
|
|
376
379
|
/**
|
|
@@ -382,20 +385,21 @@ declare class Functions {
|
|
|
382
385
|
* @param {string} repository - Repository name of the template.
|
|
383
386
|
* @param {string} owner - The name of the owner of the template.
|
|
384
387
|
* @param {string} rootDirectory - Path to function code in the template repo.
|
|
385
|
-
* @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
|
|
386
390
|
* @param {boolean} activate - Automatically activate the deployment when it is finished building.
|
|
387
391
|
* @throws {AppwriteException}
|
|
388
392
|
* @returns {Promise<Models.Deployment>}
|
|
389
393
|
* @deprecated Use the object parameter style method for a better developer experience.
|
|
390
394
|
*/
|
|
391
|
-
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>;
|
|
392
396
|
/**
|
|
393
397
|
* Create a deployment when a function is connected to VCS.
|
|
394
398
|
*
|
|
395
399
|
* This endpoint lets you create deployment from a branch, commit, or a tag.
|
|
396
400
|
*
|
|
397
401
|
* @param {string} params.functionId - Function ID.
|
|
398
|
-
* @param {
|
|
402
|
+
* @param {VCSReferenceType} params.type - Type of reference passed. Allowed values are: branch, commit
|
|
399
403
|
* @param {string} params.reference - VCS reference to create deployment from. Depending on type this can be: branch name, commit hash
|
|
400
404
|
* @param {boolean} params.activate - Automatically activate the deployment when it is finished building.
|
|
401
405
|
* @throws {AppwriteException}
|
|
@@ -403,7 +407,7 @@ declare class Functions {
|
|
|
403
407
|
*/
|
|
404
408
|
createVcsDeployment(params: {
|
|
405
409
|
functionId: string;
|
|
406
|
-
type:
|
|
410
|
+
type: VCSReferenceType;
|
|
407
411
|
reference: string;
|
|
408
412
|
activate?: boolean;
|
|
409
413
|
}): Promise<Models.Deployment>;
|
|
@@ -413,14 +417,14 @@ declare class Functions {
|
|
|
413
417
|
* This endpoint lets you create deployment from a branch, commit, or a tag.
|
|
414
418
|
*
|
|
415
419
|
* @param {string} functionId - Function ID.
|
|
416
|
-
* @param {
|
|
420
|
+
* @param {VCSReferenceType} type - Type of reference passed. Allowed values are: branch, commit
|
|
417
421
|
* @param {string} reference - VCS reference to create deployment from. Depending on type this can be: branch name, commit hash
|
|
418
422
|
* @param {boolean} activate - Automatically activate the deployment when it is finished building.
|
|
419
423
|
* @throws {AppwriteException}
|
|
420
424
|
* @returns {Promise<Models.Deployment>}
|
|
421
425
|
* @deprecated Use the object parameter style method for a better developer experience.
|
|
422
426
|
*/
|
|
423
|
-
createVcsDeployment(functionId: string, type:
|
|
427
|
+
createVcsDeployment(functionId: string, type: VCSReferenceType, reference: string, activate?: boolean): Promise<Models.Deployment>;
|
|
424
428
|
/**
|
|
425
429
|
* Get a function deployment by its unique ID.
|
|
426
430
|
*
|
|
@@ -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';
|
|
@@ -360,7 +361,8 @@ declare class Functions {
|
|
|
360
361
|
* @param {string} params.repository - Repository name of the template.
|
|
361
362
|
* @param {string} params.owner - The name of the owner of the template.
|
|
362
363
|
* @param {string} params.rootDirectory - Path to function code in the template repo.
|
|
363
|
-
* @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
|
|
364
366
|
* @param {boolean} params.activate - Automatically activate the deployment when it is finished building.
|
|
365
367
|
* @throws {AppwriteException}
|
|
366
368
|
* @returns {Promise<Models.Deployment>}
|
|
@@ -370,7 +372,8 @@ declare class Functions {
|
|
|
370
372
|
repository: string;
|
|
371
373
|
owner: string;
|
|
372
374
|
rootDirectory: string;
|
|
373
|
-
|
|
375
|
+
type: TemplateReferenceType;
|
|
376
|
+
reference: string;
|
|
374
377
|
activate?: boolean;
|
|
375
378
|
}): Promise<Models.Deployment>;
|
|
376
379
|
/**
|
|
@@ -382,20 +385,21 @@ declare class Functions {
|
|
|
382
385
|
* @param {string} repository - Repository name of the template.
|
|
383
386
|
* @param {string} owner - The name of the owner of the template.
|
|
384
387
|
* @param {string} rootDirectory - Path to function code in the template repo.
|
|
385
|
-
* @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
|
|
386
390
|
* @param {boolean} activate - Automatically activate the deployment when it is finished building.
|
|
387
391
|
* @throws {AppwriteException}
|
|
388
392
|
* @returns {Promise<Models.Deployment>}
|
|
389
393
|
* @deprecated Use the object parameter style method for a better developer experience.
|
|
390
394
|
*/
|
|
391
|
-
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>;
|
|
392
396
|
/**
|
|
393
397
|
* Create a deployment when a function is connected to VCS.
|
|
394
398
|
*
|
|
395
399
|
* This endpoint lets you create deployment from a branch, commit, or a tag.
|
|
396
400
|
*
|
|
397
401
|
* @param {string} params.functionId - Function ID.
|
|
398
|
-
* @param {
|
|
402
|
+
* @param {VCSReferenceType} params.type - Type of reference passed. Allowed values are: branch, commit
|
|
399
403
|
* @param {string} params.reference - VCS reference to create deployment from. Depending on type this can be: branch name, commit hash
|
|
400
404
|
* @param {boolean} params.activate - Automatically activate the deployment when it is finished building.
|
|
401
405
|
* @throws {AppwriteException}
|
|
@@ -403,7 +407,7 @@ declare class Functions {
|
|
|
403
407
|
*/
|
|
404
408
|
createVcsDeployment(params: {
|
|
405
409
|
functionId: string;
|
|
406
|
-
type:
|
|
410
|
+
type: VCSReferenceType;
|
|
407
411
|
reference: string;
|
|
408
412
|
activate?: boolean;
|
|
409
413
|
}): Promise<Models.Deployment>;
|
|
@@ -413,14 +417,14 @@ declare class Functions {
|
|
|
413
417
|
* This endpoint lets you create deployment from a branch, commit, or a tag.
|
|
414
418
|
*
|
|
415
419
|
* @param {string} functionId - Function ID.
|
|
416
|
-
* @param {
|
|
420
|
+
* @param {VCSReferenceType} type - Type of reference passed. Allowed values are: branch, commit
|
|
417
421
|
* @param {string} reference - VCS reference to create deployment from. Depending on type this can be: branch name, commit hash
|
|
418
422
|
* @param {boolean} activate - Automatically activate the deployment when it is finished building.
|
|
419
423
|
* @throws {AppwriteException}
|
|
420
424
|
* @returns {Promise<Models.Deployment>}
|
|
421
425
|
* @deprecated Use the object parameter style method for a better developer experience.
|
|
422
426
|
*/
|
|
423
|
-
createVcsDeployment(functionId: string, type:
|
|
427
|
+
createVcsDeployment(functionId: string, type: VCSReferenceType, reference: string, activate?: boolean): Promise<Models.Deployment>;
|
|
424
428
|
/**
|
|
425
429
|
* Get a function deployment by its unique ID.
|
|
426
430
|
*
|
|
@@ -538,15 +538,17 @@ class Functions {
|
|
|
538
538
|
repository: rest[0],
|
|
539
539
|
owner: rest[1],
|
|
540
540
|
rootDirectory: rest[2],
|
|
541
|
-
|
|
542
|
-
|
|
541
|
+
type: rest[3],
|
|
542
|
+
reference: rest[4],
|
|
543
|
+
activate: rest[5]
|
|
543
544
|
};
|
|
544
545
|
}
|
|
545
546
|
const functionId = params.functionId;
|
|
546
547
|
const repository = params.repository;
|
|
547
548
|
const owner = params.owner;
|
|
548
549
|
const rootDirectory = params.rootDirectory;
|
|
549
|
-
const
|
|
550
|
+
const type = params.type;
|
|
551
|
+
const reference = params.reference;
|
|
550
552
|
const activate = params.activate;
|
|
551
553
|
if (typeof functionId === "undefined") {
|
|
552
554
|
throw new client.AppwriteException('Missing required parameter: "functionId"');
|
|
@@ -560,8 +562,11 @@ class Functions {
|
|
|
560
562
|
if (typeof rootDirectory === "undefined") {
|
|
561
563
|
throw new client.AppwriteException('Missing required parameter: "rootDirectory"');
|
|
562
564
|
}
|
|
563
|
-
if (typeof
|
|
564
|
-
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"');
|
|
565
570
|
}
|
|
566
571
|
const apiPath = "/functions/{functionId}/deployments/template".replace("{functionId}", functionId);
|
|
567
572
|
const payload = {};
|
|
@@ -574,8 +579,11 @@ class Functions {
|
|
|
574
579
|
if (typeof rootDirectory !== "undefined") {
|
|
575
580
|
payload["rootDirectory"] = rootDirectory;
|
|
576
581
|
}
|
|
577
|
-
if (typeof
|
|
578
|
-
payload["
|
|
582
|
+
if (typeof type !== "undefined") {
|
|
583
|
+
payload["type"] = type;
|
|
584
|
+
}
|
|
585
|
+
if (typeof reference !== "undefined") {
|
|
586
|
+
payload["reference"] = reference;
|
|
579
587
|
}
|
|
580
588
|
if (typeof activate !== "undefined") {
|
|
581
589
|
payload["activate"] = activate;
|