node-appwrite 20.3.0 → 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/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/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 +2 -2
- package/dist/services/tables-db.d.ts +2 -2
- package/dist/services/tables-db.js.map +1 -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
|
@@ -3,7 +3,8 @@ import { Models } from '../models.mjs';
|
|
|
3
3
|
import { Framework } from '../enums/framework.mjs';
|
|
4
4
|
import { BuildRuntime } from '../enums/build-runtime.mjs';
|
|
5
5
|
import { Adapter } from '../enums/adapter.mjs';
|
|
6
|
-
import {
|
|
6
|
+
import { TemplateReferenceType } from '../enums/template-reference-type.mjs';
|
|
7
|
+
import { VCSReferenceType } from '../enums/vcs-reference-type.mjs';
|
|
7
8
|
import { DeploymentDownloadType } from '../enums/deployment-download-type.mjs';
|
|
8
9
|
import '../query.mjs';
|
|
9
10
|
import '../enums/database-type.mjs';
|
|
@@ -288,7 +289,7 @@ declare class Sites {
|
|
|
288
289
|
*/
|
|
289
290
|
listDeployments(siteId: string, queries?: string[], search?: string, total?: boolean): Promise<Models.DeploymentList>;
|
|
290
291
|
/**
|
|
291
|
-
* Create a new site code deployment. Use this endpoint to upload a new version of your site code. To activate your newly uploaded code, you'll need to update the
|
|
292
|
+
* Create a new site code deployment. Use this endpoint to upload a new version of your site code. To activate your newly uploaded code, you'll need to update the site's deployment to use your new deployment ID.
|
|
292
293
|
*
|
|
293
294
|
* @param {string} params.siteId - Site ID.
|
|
294
295
|
* @param {File} params.code - Gzip file with your code package. When used with the Appwrite CLI, pass the path to your code directory, and the CLI will automatically package your code. Use a path that is within the current directory.
|
|
@@ -309,7 +310,7 @@ declare class Sites {
|
|
|
309
310
|
onProgress?: (progress: UploadProgress) => void;
|
|
310
311
|
}): Promise<Models.Deployment>;
|
|
311
312
|
/**
|
|
312
|
-
* Create a new site code deployment. Use this endpoint to upload a new version of your site code. To activate your newly uploaded code, you'll need to update the
|
|
313
|
+
* Create a new site code deployment. Use this endpoint to upload a new version of your site code. To activate your newly uploaded code, you'll need to update the site's deployment to use your new deployment ID.
|
|
313
314
|
*
|
|
314
315
|
* @param {string} siteId - Site ID.
|
|
315
316
|
* @param {File} code - Gzip file with your code package. When used with the Appwrite CLI, pass the path to your code directory, and the CLI will automatically package your code. Use a path that is within the current directory.
|
|
@@ -353,7 +354,8 @@ declare class Sites {
|
|
|
353
354
|
* @param {string} params.repository - Repository name of the template.
|
|
354
355
|
* @param {string} params.owner - The name of the owner of the template.
|
|
355
356
|
* @param {string} params.rootDirectory - Path to site code in the template repo.
|
|
356
|
-
* @param {
|
|
357
|
+
* @param {TemplateReferenceType} params.type - Type for the reference provided. Can be commit, branch, or tag
|
|
358
|
+
* @param {string} params.reference - Reference value, can be a commit hash, branch name, or release tag
|
|
357
359
|
* @param {boolean} params.activate - Automatically activate the deployment when it is finished building.
|
|
358
360
|
* @throws {AppwriteException}
|
|
359
361
|
* @returns {Promise<Models.Deployment>}
|
|
@@ -363,7 +365,8 @@ declare class Sites {
|
|
|
363
365
|
repository: string;
|
|
364
366
|
owner: string;
|
|
365
367
|
rootDirectory: string;
|
|
366
|
-
|
|
368
|
+
type: TemplateReferenceType;
|
|
369
|
+
reference: string;
|
|
367
370
|
activate?: boolean;
|
|
368
371
|
}): Promise<Models.Deployment>;
|
|
369
372
|
/**
|
|
@@ -375,20 +378,21 @@ declare class Sites {
|
|
|
375
378
|
* @param {string} repository - Repository name of the template.
|
|
376
379
|
* @param {string} owner - The name of the owner of the template.
|
|
377
380
|
* @param {string} rootDirectory - Path to site code in the template repo.
|
|
378
|
-
* @param {
|
|
381
|
+
* @param {TemplateReferenceType} type - Type for the reference provided. Can be commit, branch, or tag
|
|
382
|
+
* @param {string} reference - Reference value, can be a commit hash, branch name, or release tag
|
|
379
383
|
* @param {boolean} activate - Automatically activate the deployment when it is finished building.
|
|
380
384
|
* @throws {AppwriteException}
|
|
381
385
|
* @returns {Promise<Models.Deployment>}
|
|
382
386
|
* @deprecated Use the object parameter style method for a better developer experience.
|
|
383
387
|
*/
|
|
384
|
-
createTemplateDeployment(siteId: string, repository: string, owner: string, rootDirectory: string,
|
|
388
|
+
createTemplateDeployment(siteId: string, repository: string, owner: string, rootDirectory: string, type: TemplateReferenceType, reference: string, activate?: boolean): Promise<Models.Deployment>;
|
|
385
389
|
/**
|
|
386
390
|
* Create a deployment when a site is connected to VCS.
|
|
387
391
|
*
|
|
388
392
|
* This endpoint lets you create deployment from a branch, commit, or a tag.
|
|
389
393
|
*
|
|
390
394
|
* @param {string} params.siteId - Site ID.
|
|
391
|
-
* @param {
|
|
395
|
+
* @param {VCSReferenceType} params.type - Type of reference passed. Allowed values are: branch, commit
|
|
392
396
|
* @param {string} params.reference - VCS reference to create deployment from. Depending on type this can be: branch name, commit hash
|
|
393
397
|
* @param {boolean} params.activate - Automatically activate the deployment when it is finished building.
|
|
394
398
|
* @throws {AppwriteException}
|
|
@@ -396,7 +400,7 @@ declare class Sites {
|
|
|
396
400
|
*/
|
|
397
401
|
createVcsDeployment(params: {
|
|
398
402
|
siteId: string;
|
|
399
|
-
type:
|
|
403
|
+
type: VCSReferenceType;
|
|
400
404
|
reference: string;
|
|
401
405
|
activate?: boolean;
|
|
402
406
|
}): Promise<Models.Deployment>;
|
|
@@ -406,14 +410,14 @@ declare class Sites {
|
|
|
406
410
|
* This endpoint lets you create deployment from a branch, commit, or a tag.
|
|
407
411
|
*
|
|
408
412
|
* @param {string} siteId - Site ID.
|
|
409
|
-
* @param {
|
|
413
|
+
* @param {VCSReferenceType} type - Type of reference passed. Allowed values are: branch, commit
|
|
410
414
|
* @param {string} reference - VCS reference to create deployment from. Depending on type this can be: branch name, commit hash
|
|
411
415
|
* @param {boolean} activate - Automatically activate the deployment when it is finished building.
|
|
412
416
|
* @throws {AppwriteException}
|
|
413
417
|
* @returns {Promise<Models.Deployment>}
|
|
414
418
|
* @deprecated Use the object parameter style method for a better developer experience.
|
|
415
419
|
*/
|
|
416
|
-
createVcsDeployment(siteId: string, type:
|
|
420
|
+
createVcsDeployment(siteId: string, type: VCSReferenceType, reference: string, activate?: boolean): Promise<Models.Deployment>;
|
|
417
421
|
/**
|
|
418
422
|
* Get a site deployment by its unique ID.
|
|
419
423
|
*
|
package/dist/services/sites.d.ts
CHANGED
|
@@ -3,7 +3,8 @@ import { Models } from '../models.js';
|
|
|
3
3
|
import { Framework } from '../enums/framework.js';
|
|
4
4
|
import { BuildRuntime } from '../enums/build-runtime.js';
|
|
5
5
|
import { Adapter } from '../enums/adapter.js';
|
|
6
|
-
import {
|
|
6
|
+
import { TemplateReferenceType } from '../enums/template-reference-type.js';
|
|
7
|
+
import { VCSReferenceType } from '../enums/vcs-reference-type.js';
|
|
7
8
|
import { DeploymentDownloadType } from '../enums/deployment-download-type.js';
|
|
8
9
|
import '../query.js';
|
|
9
10
|
import '../enums/database-type.js';
|
|
@@ -288,7 +289,7 @@ declare class Sites {
|
|
|
288
289
|
*/
|
|
289
290
|
listDeployments(siteId: string, queries?: string[], search?: string, total?: boolean): Promise<Models.DeploymentList>;
|
|
290
291
|
/**
|
|
291
|
-
* Create a new site code deployment. Use this endpoint to upload a new version of your site code. To activate your newly uploaded code, you'll need to update the
|
|
292
|
+
* Create a new site code deployment. Use this endpoint to upload a new version of your site code. To activate your newly uploaded code, you'll need to update the site's deployment to use your new deployment ID.
|
|
292
293
|
*
|
|
293
294
|
* @param {string} params.siteId - Site ID.
|
|
294
295
|
* @param {File} params.code - Gzip file with your code package. When used with the Appwrite CLI, pass the path to your code directory, and the CLI will automatically package your code. Use a path that is within the current directory.
|
|
@@ -309,7 +310,7 @@ declare class Sites {
|
|
|
309
310
|
onProgress?: (progress: UploadProgress) => void;
|
|
310
311
|
}): Promise<Models.Deployment>;
|
|
311
312
|
/**
|
|
312
|
-
* Create a new site code deployment. Use this endpoint to upload a new version of your site code. To activate your newly uploaded code, you'll need to update the
|
|
313
|
+
* Create a new site code deployment. Use this endpoint to upload a new version of your site code. To activate your newly uploaded code, you'll need to update the site's deployment to use your new deployment ID.
|
|
313
314
|
*
|
|
314
315
|
* @param {string} siteId - Site ID.
|
|
315
316
|
* @param {File} code - Gzip file with your code package. When used with the Appwrite CLI, pass the path to your code directory, and the CLI will automatically package your code. Use a path that is within the current directory.
|
|
@@ -353,7 +354,8 @@ declare class Sites {
|
|
|
353
354
|
* @param {string} params.repository - Repository name of the template.
|
|
354
355
|
* @param {string} params.owner - The name of the owner of the template.
|
|
355
356
|
* @param {string} params.rootDirectory - Path to site code in the template repo.
|
|
356
|
-
* @param {
|
|
357
|
+
* @param {TemplateReferenceType} params.type - Type for the reference provided. Can be commit, branch, or tag
|
|
358
|
+
* @param {string} params.reference - Reference value, can be a commit hash, branch name, or release tag
|
|
357
359
|
* @param {boolean} params.activate - Automatically activate the deployment when it is finished building.
|
|
358
360
|
* @throws {AppwriteException}
|
|
359
361
|
* @returns {Promise<Models.Deployment>}
|
|
@@ -363,7 +365,8 @@ declare class Sites {
|
|
|
363
365
|
repository: string;
|
|
364
366
|
owner: string;
|
|
365
367
|
rootDirectory: string;
|
|
366
|
-
|
|
368
|
+
type: TemplateReferenceType;
|
|
369
|
+
reference: string;
|
|
367
370
|
activate?: boolean;
|
|
368
371
|
}): Promise<Models.Deployment>;
|
|
369
372
|
/**
|
|
@@ -375,20 +378,21 @@ declare class Sites {
|
|
|
375
378
|
* @param {string} repository - Repository name of the template.
|
|
376
379
|
* @param {string} owner - The name of the owner of the template.
|
|
377
380
|
* @param {string} rootDirectory - Path to site code in the template repo.
|
|
378
|
-
* @param {
|
|
381
|
+
* @param {TemplateReferenceType} type - Type for the reference provided. Can be commit, branch, or tag
|
|
382
|
+
* @param {string} reference - Reference value, can be a commit hash, branch name, or release tag
|
|
379
383
|
* @param {boolean} activate - Automatically activate the deployment when it is finished building.
|
|
380
384
|
* @throws {AppwriteException}
|
|
381
385
|
* @returns {Promise<Models.Deployment>}
|
|
382
386
|
* @deprecated Use the object parameter style method for a better developer experience.
|
|
383
387
|
*/
|
|
384
|
-
createTemplateDeployment(siteId: string, repository: string, owner: string, rootDirectory: string,
|
|
388
|
+
createTemplateDeployment(siteId: string, repository: string, owner: string, rootDirectory: string, type: TemplateReferenceType, reference: string, activate?: boolean): Promise<Models.Deployment>;
|
|
385
389
|
/**
|
|
386
390
|
* Create a deployment when a site is connected to VCS.
|
|
387
391
|
*
|
|
388
392
|
* This endpoint lets you create deployment from a branch, commit, or a tag.
|
|
389
393
|
*
|
|
390
394
|
* @param {string} params.siteId - Site ID.
|
|
391
|
-
* @param {
|
|
395
|
+
* @param {VCSReferenceType} params.type - Type of reference passed. Allowed values are: branch, commit
|
|
392
396
|
* @param {string} params.reference - VCS reference to create deployment from. Depending on type this can be: branch name, commit hash
|
|
393
397
|
* @param {boolean} params.activate - Automatically activate the deployment when it is finished building.
|
|
394
398
|
* @throws {AppwriteException}
|
|
@@ -396,7 +400,7 @@ declare class Sites {
|
|
|
396
400
|
*/
|
|
397
401
|
createVcsDeployment(params: {
|
|
398
402
|
siteId: string;
|
|
399
|
-
type:
|
|
403
|
+
type: VCSReferenceType;
|
|
400
404
|
reference: string;
|
|
401
405
|
activate?: boolean;
|
|
402
406
|
}): Promise<Models.Deployment>;
|
|
@@ -406,14 +410,14 @@ declare class Sites {
|
|
|
406
410
|
* This endpoint lets you create deployment from a branch, commit, or a tag.
|
|
407
411
|
*
|
|
408
412
|
* @param {string} siteId - Site ID.
|
|
409
|
-
* @param {
|
|
413
|
+
* @param {VCSReferenceType} type - Type of reference passed. Allowed values are: branch, commit
|
|
410
414
|
* @param {string} reference - VCS reference to create deployment from. Depending on type this can be: branch name, commit hash
|
|
411
415
|
* @param {boolean} activate - Automatically activate the deployment when it is finished building.
|
|
412
416
|
* @throws {AppwriteException}
|
|
413
417
|
* @returns {Promise<Models.Deployment>}
|
|
414
418
|
* @deprecated Use the object parameter style method for a better developer experience.
|
|
415
419
|
*/
|
|
416
|
-
createVcsDeployment(siteId: string, type:
|
|
420
|
+
createVcsDeployment(siteId: string, type: VCSReferenceType, reference: string, activate?: boolean): Promise<Models.Deployment>;
|
|
417
421
|
/**
|
|
418
422
|
* Get a site deployment by its unique ID.
|
|
419
423
|
*
|
package/dist/services/sites.js
CHANGED
|
@@ -544,15 +544,17 @@ class Sites {
|
|
|
544
544
|
repository: rest[0],
|
|
545
545
|
owner: rest[1],
|
|
546
546
|
rootDirectory: rest[2],
|
|
547
|
-
|
|
548
|
-
|
|
547
|
+
type: rest[3],
|
|
548
|
+
reference: rest[4],
|
|
549
|
+
activate: rest[5]
|
|
549
550
|
};
|
|
550
551
|
}
|
|
551
552
|
const siteId = params.siteId;
|
|
552
553
|
const repository = params.repository;
|
|
553
554
|
const owner = params.owner;
|
|
554
555
|
const rootDirectory = params.rootDirectory;
|
|
555
|
-
const
|
|
556
|
+
const type = params.type;
|
|
557
|
+
const reference = params.reference;
|
|
556
558
|
const activate = params.activate;
|
|
557
559
|
if (typeof siteId === "undefined") {
|
|
558
560
|
throw new client.AppwriteException('Missing required parameter: "siteId"');
|
|
@@ -566,8 +568,11 @@ class Sites {
|
|
|
566
568
|
if (typeof rootDirectory === "undefined") {
|
|
567
569
|
throw new client.AppwriteException('Missing required parameter: "rootDirectory"');
|
|
568
570
|
}
|
|
569
|
-
if (typeof
|
|
570
|
-
throw new client.AppwriteException('Missing required parameter: "
|
|
571
|
+
if (typeof type === "undefined") {
|
|
572
|
+
throw new client.AppwriteException('Missing required parameter: "type"');
|
|
573
|
+
}
|
|
574
|
+
if (typeof reference === "undefined") {
|
|
575
|
+
throw new client.AppwriteException('Missing required parameter: "reference"');
|
|
571
576
|
}
|
|
572
577
|
const apiPath = "/sites/{siteId}/deployments/template".replace("{siteId}", siteId);
|
|
573
578
|
const payload = {};
|
|
@@ -580,8 +585,11 @@ class Sites {
|
|
|
580
585
|
if (typeof rootDirectory !== "undefined") {
|
|
581
586
|
payload["rootDirectory"] = rootDirectory;
|
|
582
587
|
}
|
|
583
|
-
if (typeof
|
|
584
|
-
payload["
|
|
588
|
+
if (typeof type !== "undefined") {
|
|
589
|
+
payload["type"] = type;
|
|
590
|
+
}
|
|
591
|
+
if (typeof reference !== "undefined") {
|
|
592
|
+
payload["reference"] = reference;
|
|
585
593
|
}
|
|
586
594
|
if (typeof activate !== "undefined") {
|
|
587
595
|
payload["activate"] = activate;
|