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.
Files changed (147) hide show
  1. package/dist/client.js +2 -2
  2. package/dist/client.js.map +1 -1
  3. package/dist/client.mjs +2 -2
  4. package/dist/client.mjs.map +1 -1
  5. package/dist/enums/build-runtime.d.mts +3 -1
  6. package/dist/enums/build-runtime.d.ts +3 -1
  7. package/dist/enums/build-runtime.js +2 -0
  8. package/dist/enums/build-runtime.js.map +1 -1
  9. package/dist/enums/build-runtime.mjs +2 -0
  10. package/dist/enums/build-runtime.mjs.map +1 -1
  11. package/dist/enums/execution-status.d.mts +2 -1
  12. package/dist/enums/execution-status.d.ts +2 -1
  13. package/dist/enums/execution-status.js +1 -0
  14. package/dist/enums/execution-status.js.map +1 -1
  15. package/dist/enums/execution-status.mjs +1 -0
  16. package/dist/enums/execution-status.mjs.map +1 -1
  17. package/dist/enums/framework.d.mts +1 -0
  18. package/dist/enums/framework.d.ts +1 -0
  19. package/dist/enums/framework.js +1 -0
  20. package/dist/enums/framework.js.map +1 -1
  21. package/dist/enums/framework.mjs +1 -0
  22. package/dist/enums/framework.mjs.map +1 -1
  23. package/dist/enums/output.d.mts +11 -0
  24. package/dist/enums/output.d.ts +11 -0
  25. package/dist/enums/output.js +16 -0
  26. package/dist/enums/output.js.map +1 -0
  27. package/dist/enums/output.mjs +15 -0
  28. package/dist/enums/output.mjs.map +1 -0
  29. package/dist/enums/runtime.d.mts +3 -1
  30. package/dist/enums/runtime.d.ts +3 -1
  31. package/dist/enums/runtime.js +2 -0
  32. package/dist/enums/runtime.js.map +1 -1
  33. package/dist/enums/runtime.mjs +2 -0
  34. package/dist/enums/runtime.mjs.map +1 -1
  35. package/dist/enums/template-reference-type.d.mts +7 -0
  36. package/dist/enums/template-reference-type.d.ts +7 -0
  37. package/dist/enums/template-reference-type.js +12 -0
  38. package/dist/enums/template-reference-type.js.map +1 -0
  39. package/dist/enums/template-reference-type.mjs +11 -0
  40. package/dist/enums/template-reference-type.mjs.map +1 -0
  41. package/dist/enums/theme.d.mts +6 -0
  42. package/dist/enums/theme.d.ts +6 -0
  43. package/dist/enums/theme.js +11 -0
  44. package/dist/enums/theme.js.map +1 -0
  45. package/dist/enums/theme.mjs +10 -0
  46. package/dist/enums/theme.mjs.map +1 -0
  47. package/dist/enums/timezone.d.mts +423 -0
  48. package/dist/enums/timezone.d.ts +423 -0
  49. package/dist/enums/timezone.js +428 -0
  50. package/dist/enums/timezone.js.map +1 -0
  51. package/dist/enums/timezone.mjs +427 -0
  52. package/dist/enums/timezone.mjs.map +1 -0
  53. package/dist/enums/{vcs-deployment-type.d.mts → vcs-reference-type.d.mts} +2 -2
  54. package/dist/enums/{vcs-deployment-type.d.ts → vcs-reference-type.d.ts} +2 -2
  55. package/dist/enums/vcs-reference-type.js +12 -0
  56. package/dist/enums/vcs-reference-type.js.map +1 -0
  57. package/dist/enums/vcs-reference-type.mjs +11 -0
  58. package/dist/enums/vcs-reference-type.mjs.map +1 -0
  59. package/dist/index.d.mts +6 -1
  60. package/dist/index.d.ts +6 -1
  61. package/dist/index.js +32 -3
  62. package/dist/index.js.map +1 -1
  63. package/dist/index.mjs +6 -1
  64. package/dist/index.mjs.map +1 -1
  65. package/dist/models.d.mts +5 -1
  66. package/dist/models.d.ts +5 -1
  67. package/dist/operator.d.mts +181 -0
  68. package/dist/operator.d.ts +181 -0
  69. package/dist/operator.js +268 -0
  70. package/dist/operator.js.map +1 -0
  71. package/dist/operator.mjs +266 -0
  72. package/dist/operator.mjs.map +1 -0
  73. package/dist/query.js +6 -6
  74. package/dist/query.js.map +1 -1
  75. package/dist/query.mjs +6 -6
  76. package/dist/query.mjs.map +1 -1
  77. package/dist/services/account.d.mts +8 -2
  78. package/dist/services/account.d.ts +8 -2
  79. package/dist/services/account.js +18 -8
  80. package/dist/services/account.js.map +1 -1
  81. package/dist/services/account.mjs +18 -8
  82. package/dist/services/account.mjs.map +1 -1
  83. package/dist/services/avatars.d.mts +87 -0
  84. package/dist/services/avatars.d.ts +87 -0
  85. package/dist/services/avatars.js +123 -0
  86. package/dist/services/avatars.js.map +1 -1
  87. package/dist/services/avatars.mjs +123 -0
  88. package/dist/services/avatars.mjs.map +1 -1
  89. package/dist/services/databases.d.mts +20 -5
  90. package/dist/services/databases.d.ts +20 -5
  91. package/dist/services/databases.js +30 -5
  92. package/dist/services/databases.js.map +1 -1
  93. package/dist/services/databases.mjs +30 -5
  94. package/dist/services/databases.mjs.map +1 -1
  95. package/dist/services/functions.d.mts +25 -12
  96. package/dist/services/functions.d.ts +25 -12
  97. package/dist/services/functions.js +33 -10
  98. package/dist/services/functions.js.map +1 -1
  99. package/dist/services/functions.mjs +33 -10
  100. package/dist/services/functions.mjs.map +1 -1
  101. package/dist/services/messaging.d.mts +116 -9
  102. package/dist/services/messaging.d.ts +116 -9
  103. package/dist/services/messaging.js +182 -9
  104. package/dist/services/messaging.js.map +1 -1
  105. package/dist/services/messaging.mjs +182 -9
  106. package/dist/services/messaging.mjs.map +1 -1
  107. package/dist/services/sites.d.mts +27 -14
  108. package/dist/services/sites.d.ts +27 -14
  109. package/dist/services/sites.js +33 -10
  110. package/dist/services/sites.js.map +1 -1
  111. package/dist/services/sites.mjs +33 -10
  112. package/dist/services/sites.mjs.map +1 -1
  113. package/dist/services/storage.d.mts +18 -6
  114. package/dist/services/storage.d.ts +18 -6
  115. package/dist/services/storage.js +24 -4
  116. package/dist/services/storage.js.map +1 -1
  117. package/dist/services/storage.mjs +24 -4
  118. package/dist/services/storage.mjs.map +1 -1
  119. package/dist/services/tables-db.d.mts +22 -7
  120. package/dist/services/tables-db.d.ts +22 -7
  121. package/dist/services/tables-db.js +30 -5
  122. package/dist/services/tables-db.js.map +1 -1
  123. package/dist/services/tables-db.mjs +30 -5
  124. package/dist/services/tables-db.mjs.map +1 -1
  125. package/dist/services/teams.d.mts +8 -2
  126. package/dist/services/teams.d.ts +8 -2
  127. package/dist/services/teams.js +12 -2
  128. package/dist/services/teams.js.map +1 -1
  129. package/dist/services/teams.mjs +12 -2
  130. package/dist/services/teams.mjs.map +1 -1
  131. package/dist/services/tokens.d.mts +4 -1
  132. package/dist/services/tokens.d.ts +4 -1
  133. package/dist/services/tokens.js +6 -1
  134. package/dist/services/tokens.js.map +1 -1
  135. package/dist/services/tokens.mjs +6 -1
  136. package/dist/services/tokens.mjs.map +1 -1
  137. package/dist/services/users.d.mts +24 -6
  138. package/dist/services/users.d.ts +24 -6
  139. package/dist/services/users.js +37 -7
  140. package/dist/services/users.js.map +1 -1
  141. package/dist/services/users.mjs +37 -7
  142. package/dist/services/users.mjs.map +1 -1
  143. package/package.json +1 -1
  144. package/dist/enums/vcs-deployment-type.js +0 -12
  145. package/dist/enums/vcs-deployment-type.js.map +0 -1
  146. package/dist/enums/vcs-deployment-type.mjs +0 -11
  147. 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 { VCSDeploymentType } from '../enums/vcs-deployment-type.mjs';
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';
@@ -25,23 +26,26 @@ declare class Sites {
25
26
  *
26
27
  * @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, framework, deploymentId, buildCommand, installCommand, outputDirectory, installationId
27
28
  * @param {string} params.search - Search term to filter your list results. Max length: 256 chars.
29
+ * @param {boolean} params.total - When set to false, the total count returned will be 0 and will not be calculated.
28
30
  * @throws {AppwriteException}
29
31
  * @returns {Promise<Models.SiteList>}
30
32
  */
31
33
  list(params?: {
32
34
  queries?: string[];
33
35
  search?: string;
36
+ total?: boolean;
34
37
  }): Promise<Models.SiteList>;
35
38
  /**
36
39
  * Get a list of all the project's sites. You can use the query params to filter your results.
37
40
  *
38
41
  * @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, framework, deploymentId, buildCommand, installCommand, outputDirectory, installationId
39
42
  * @param {string} search - Search term to filter your list results. Max length: 256 chars.
43
+ * @param {boolean} total - When set to false, the total count returned will be 0 and will not be calculated.
40
44
  * @throws {AppwriteException}
41
45
  * @returns {Promise<Models.SiteList>}
42
46
  * @deprecated Use the object parameter style method for a better developer experience.
43
47
  */
44
- list(queries?: string[], search?: string): Promise<Models.SiteList>;
48
+ list(queries?: string[], search?: string, total?: boolean): Promise<Models.SiteList>;
45
49
  /**
46
50
  * Create a new site.
47
51
  *
@@ -262,6 +266,7 @@ declare class Sites {
262
266
  * @param {string} params.siteId - Site ID.
263
267
  * @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
264
268
  * @param {string} params.search - Search term to filter your list results. Max length: 256 chars.
269
+ * @param {boolean} params.total - When set to false, the total count returned will be 0 and will not be calculated.
265
270
  * @throws {AppwriteException}
266
271
  * @returns {Promise<Models.DeploymentList>}
267
272
  */
@@ -269,6 +274,7 @@ declare class Sites {
269
274
  siteId: string;
270
275
  queries?: string[];
271
276
  search?: string;
277
+ total?: boolean;
272
278
  }): Promise<Models.DeploymentList>;
273
279
  /**
274
280
  * Get a list of all the site's code deployments. You can use the query params to filter your results.
@@ -276,13 +282,14 @@ declare class Sites {
276
282
  * @param {string} siteId - Site ID.
277
283
  * @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
278
284
  * @param {string} search - Search term to filter your list results. Max length: 256 chars.
285
+ * @param {boolean} total - When set to false, the total count returned will be 0 and will not be calculated.
279
286
  * @throws {AppwriteException}
280
287
  * @returns {Promise<Models.DeploymentList>}
281
288
  * @deprecated Use the object parameter style method for a better developer experience.
282
289
  */
283
- listDeployments(siteId: string, queries?: string[], search?: string): Promise<Models.DeploymentList>;
290
+ listDeployments(siteId: string, queries?: string[], search?: string, total?: boolean): Promise<Models.DeploymentList>;
284
291
  /**
285
- * 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 function's deployment to use your new deployment ID.
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.
286
293
  *
287
294
  * @param {string} params.siteId - Site ID.
288
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.
@@ -303,7 +310,7 @@ declare class Sites {
303
310
  onProgress?: (progress: UploadProgress) => void;
304
311
  }): Promise<Models.Deployment>;
305
312
  /**
306
- * 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 function's deployment to use your new deployment ID.
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.
307
314
  *
308
315
  * @param {string} siteId - Site ID.
309
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.
@@ -347,7 +354,8 @@ declare class Sites {
347
354
  * @param {string} params.repository - Repository name of the template.
348
355
  * @param {string} params.owner - The name of the owner of the template.
349
356
  * @param {string} params.rootDirectory - Path to site code in the template repo.
350
- * @param {string} params.version - Version (tag) for the repo linked to the site template.
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
351
359
  * @param {boolean} params.activate - Automatically activate the deployment when it is finished building.
352
360
  * @throws {AppwriteException}
353
361
  * @returns {Promise<Models.Deployment>}
@@ -357,7 +365,8 @@ declare class Sites {
357
365
  repository: string;
358
366
  owner: string;
359
367
  rootDirectory: string;
360
- version: string;
368
+ type: TemplateReferenceType;
369
+ reference: string;
361
370
  activate?: boolean;
362
371
  }): Promise<Models.Deployment>;
363
372
  /**
@@ -369,20 +378,21 @@ declare class Sites {
369
378
  * @param {string} repository - Repository name of the template.
370
379
  * @param {string} owner - The name of the owner of the template.
371
380
  * @param {string} rootDirectory - Path to site code in the template repo.
372
- * @param {string} version - Version (tag) for the repo linked to the site template.
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
373
383
  * @param {boolean} activate - Automatically activate the deployment when it is finished building.
374
384
  * @throws {AppwriteException}
375
385
  * @returns {Promise<Models.Deployment>}
376
386
  * @deprecated Use the object parameter style method for a better developer experience.
377
387
  */
378
- createTemplateDeployment(siteId: string, repository: string, owner: string, rootDirectory: string, version: string, activate?: boolean): Promise<Models.Deployment>;
388
+ createTemplateDeployment(siteId: string, repository: string, owner: string, rootDirectory: string, type: TemplateReferenceType, reference: string, activate?: boolean): Promise<Models.Deployment>;
379
389
  /**
380
390
  * Create a deployment when a site is connected to VCS.
381
391
  *
382
392
  * This endpoint lets you create deployment from a branch, commit, or a tag.
383
393
  *
384
394
  * @param {string} params.siteId - Site ID.
385
- * @param {VCSDeploymentType} params.type - Type of reference passed. Allowed values are: branch, commit
395
+ * @param {VCSReferenceType} params.type - Type of reference passed. Allowed values are: branch, commit
386
396
  * @param {string} params.reference - VCS reference to create deployment from. Depending on type this can be: branch name, commit hash
387
397
  * @param {boolean} params.activate - Automatically activate the deployment when it is finished building.
388
398
  * @throws {AppwriteException}
@@ -390,7 +400,7 @@ declare class Sites {
390
400
  */
391
401
  createVcsDeployment(params: {
392
402
  siteId: string;
393
- type: VCSDeploymentType;
403
+ type: VCSReferenceType;
394
404
  reference: string;
395
405
  activate?: boolean;
396
406
  }): Promise<Models.Deployment>;
@@ -400,14 +410,14 @@ declare class Sites {
400
410
  * This endpoint lets you create deployment from a branch, commit, or a tag.
401
411
  *
402
412
  * @param {string} siteId - Site ID.
403
- * @param {VCSDeploymentType} type - Type of reference passed. Allowed values are: branch, commit
413
+ * @param {VCSReferenceType} type - Type of reference passed. Allowed values are: branch, commit
404
414
  * @param {string} reference - VCS reference to create deployment from. Depending on type this can be: branch name, commit hash
405
415
  * @param {boolean} activate - Automatically activate the deployment when it is finished building.
406
416
  * @throws {AppwriteException}
407
417
  * @returns {Promise<Models.Deployment>}
408
418
  * @deprecated Use the object parameter style method for a better developer experience.
409
419
  */
410
- createVcsDeployment(siteId: string, type: VCSDeploymentType, reference: string, activate?: boolean): Promise<Models.Deployment>;
420
+ createVcsDeployment(siteId: string, type: VCSReferenceType, reference: string, activate?: boolean): Promise<Models.Deployment>;
411
421
  /**
412
422
  * Get a site deployment by its unique ID.
413
423
  *
@@ -504,23 +514,26 @@ declare class Sites {
504
514
  *
505
515
  * @param {string} params.siteId - Site ID.
506
516
  * @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
517
+ * @param {boolean} params.total - When set to false, the total count returned will be 0 and will not be calculated.
507
518
  * @throws {AppwriteException}
508
519
  * @returns {Promise<Models.ExecutionList>}
509
520
  */
510
521
  listLogs(params: {
511
522
  siteId: string;
512
523
  queries?: string[];
524
+ total?: boolean;
513
525
  }): Promise<Models.ExecutionList>;
514
526
  /**
515
527
  * Get a list of all site logs. You can use the query params to filter your results.
516
528
  *
517
529
  * @param {string} siteId - Site ID.
518
530
  * @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
531
+ * @param {boolean} total - When set to false, the total count returned will be 0 and will not be calculated.
519
532
  * @throws {AppwriteException}
520
533
  * @returns {Promise<Models.ExecutionList>}
521
534
  * @deprecated Use the object parameter style method for a better developer experience.
522
535
  */
523
- listLogs(siteId: string, queries?: string[]): Promise<Models.ExecutionList>;
536
+ listLogs(siteId: string, queries?: string[], total?: boolean): Promise<Models.ExecutionList>;
524
537
  /**
525
538
  * Get a site request log by its unique ID.
526
539
  *
@@ -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 { VCSDeploymentType } from '../enums/vcs-deployment-type.js';
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';
@@ -25,23 +26,26 @@ declare class Sites {
25
26
  *
26
27
  * @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, framework, deploymentId, buildCommand, installCommand, outputDirectory, installationId
27
28
  * @param {string} params.search - Search term to filter your list results. Max length: 256 chars.
29
+ * @param {boolean} params.total - When set to false, the total count returned will be 0 and will not be calculated.
28
30
  * @throws {AppwriteException}
29
31
  * @returns {Promise<Models.SiteList>}
30
32
  */
31
33
  list(params?: {
32
34
  queries?: string[];
33
35
  search?: string;
36
+ total?: boolean;
34
37
  }): Promise<Models.SiteList>;
35
38
  /**
36
39
  * Get a list of all the project's sites. You can use the query params to filter your results.
37
40
  *
38
41
  * @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, framework, deploymentId, buildCommand, installCommand, outputDirectory, installationId
39
42
  * @param {string} search - Search term to filter your list results. Max length: 256 chars.
43
+ * @param {boolean} total - When set to false, the total count returned will be 0 and will not be calculated.
40
44
  * @throws {AppwriteException}
41
45
  * @returns {Promise<Models.SiteList>}
42
46
  * @deprecated Use the object parameter style method for a better developer experience.
43
47
  */
44
- list(queries?: string[], search?: string): Promise<Models.SiteList>;
48
+ list(queries?: string[], search?: string, total?: boolean): Promise<Models.SiteList>;
45
49
  /**
46
50
  * Create a new site.
47
51
  *
@@ -262,6 +266,7 @@ declare class Sites {
262
266
  * @param {string} params.siteId - Site ID.
263
267
  * @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
264
268
  * @param {string} params.search - Search term to filter your list results. Max length: 256 chars.
269
+ * @param {boolean} params.total - When set to false, the total count returned will be 0 and will not be calculated.
265
270
  * @throws {AppwriteException}
266
271
  * @returns {Promise<Models.DeploymentList>}
267
272
  */
@@ -269,6 +274,7 @@ declare class Sites {
269
274
  siteId: string;
270
275
  queries?: string[];
271
276
  search?: string;
277
+ total?: boolean;
272
278
  }): Promise<Models.DeploymentList>;
273
279
  /**
274
280
  * Get a list of all the site's code deployments. You can use the query params to filter your results.
@@ -276,13 +282,14 @@ declare class Sites {
276
282
  * @param {string} siteId - Site ID.
277
283
  * @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
278
284
  * @param {string} search - Search term to filter your list results. Max length: 256 chars.
285
+ * @param {boolean} total - When set to false, the total count returned will be 0 and will not be calculated.
279
286
  * @throws {AppwriteException}
280
287
  * @returns {Promise<Models.DeploymentList>}
281
288
  * @deprecated Use the object parameter style method for a better developer experience.
282
289
  */
283
- listDeployments(siteId: string, queries?: string[], search?: string): Promise<Models.DeploymentList>;
290
+ listDeployments(siteId: string, queries?: string[], search?: string, total?: boolean): Promise<Models.DeploymentList>;
284
291
  /**
285
- * 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 function's deployment to use your new deployment ID.
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.
286
293
  *
287
294
  * @param {string} params.siteId - Site ID.
288
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.
@@ -303,7 +310,7 @@ declare class Sites {
303
310
  onProgress?: (progress: UploadProgress) => void;
304
311
  }): Promise<Models.Deployment>;
305
312
  /**
306
- * 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 function's deployment to use your new deployment ID.
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.
307
314
  *
308
315
  * @param {string} siteId - Site ID.
309
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.
@@ -347,7 +354,8 @@ declare class Sites {
347
354
  * @param {string} params.repository - Repository name of the template.
348
355
  * @param {string} params.owner - The name of the owner of the template.
349
356
  * @param {string} params.rootDirectory - Path to site code in the template repo.
350
- * @param {string} params.version - Version (tag) for the repo linked to the site template.
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
351
359
  * @param {boolean} params.activate - Automatically activate the deployment when it is finished building.
352
360
  * @throws {AppwriteException}
353
361
  * @returns {Promise<Models.Deployment>}
@@ -357,7 +365,8 @@ declare class Sites {
357
365
  repository: string;
358
366
  owner: string;
359
367
  rootDirectory: string;
360
- version: string;
368
+ type: TemplateReferenceType;
369
+ reference: string;
361
370
  activate?: boolean;
362
371
  }): Promise<Models.Deployment>;
363
372
  /**
@@ -369,20 +378,21 @@ declare class Sites {
369
378
  * @param {string} repository - Repository name of the template.
370
379
  * @param {string} owner - The name of the owner of the template.
371
380
  * @param {string} rootDirectory - Path to site code in the template repo.
372
- * @param {string} version - Version (tag) for the repo linked to the site template.
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
373
383
  * @param {boolean} activate - Automatically activate the deployment when it is finished building.
374
384
  * @throws {AppwriteException}
375
385
  * @returns {Promise<Models.Deployment>}
376
386
  * @deprecated Use the object parameter style method for a better developer experience.
377
387
  */
378
- createTemplateDeployment(siteId: string, repository: string, owner: string, rootDirectory: string, version: string, activate?: boolean): Promise<Models.Deployment>;
388
+ createTemplateDeployment(siteId: string, repository: string, owner: string, rootDirectory: string, type: TemplateReferenceType, reference: string, activate?: boolean): Promise<Models.Deployment>;
379
389
  /**
380
390
  * Create a deployment when a site is connected to VCS.
381
391
  *
382
392
  * This endpoint lets you create deployment from a branch, commit, or a tag.
383
393
  *
384
394
  * @param {string} params.siteId - Site ID.
385
- * @param {VCSDeploymentType} params.type - Type of reference passed. Allowed values are: branch, commit
395
+ * @param {VCSReferenceType} params.type - Type of reference passed. Allowed values are: branch, commit
386
396
  * @param {string} params.reference - VCS reference to create deployment from. Depending on type this can be: branch name, commit hash
387
397
  * @param {boolean} params.activate - Automatically activate the deployment when it is finished building.
388
398
  * @throws {AppwriteException}
@@ -390,7 +400,7 @@ declare class Sites {
390
400
  */
391
401
  createVcsDeployment(params: {
392
402
  siteId: string;
393
- type: VCSDeploymentType;
403
+ type: VCSReferenceType;
394
404
  reference: string;
395
405
  activate?: boolean;
396
406
  }): Promise<Models.Deployment>;
@@ -400,14 +410,14 @@ declare class Sites {
400
410
  * This endpoint lets you create deployment from a branch, commit, or a tag.
401
411
  *
402
412
  * @param {string} siteId - Site ID.
403
- * @param {VCSDeploymentType} type - Type of reference passed. Allowed values are: branch, commit
413
+ * @param {VCSReferenceType} type - Type of reference passed. Allowed values are: branch, commit
404
414
  * @param {string} reference - VCS reference to create deployment from. Depending on type this can be: branch name, commit hash
405
415
  * @param {boolean} activate - Automatically activate the deployment when it is finished building.
406
416
  * @throws {AppwriteException}
407
417
  * @returns {Promise<Models.Deployment>}
408
418
  * @deprecated Use the object parameter style method for a better developer experience.
409
419
  */
410
- createVcsDeployment(siteId: string, type: VCSDeploymentType, reference: string, activate?: boolean): Promise<Models.Deployment>;
420
+ createVcsDeployment(siteId: string, type: VCSReferenceType, reference: string, activate?: boolean): Promise<Models.Deployment>;
411
421
  /**
412
422
  * Get a site deployment by its unique ID.
413
423
  *
@@ -504,23 +514,26 @@ declare class Sites {
504
514
  *
505
515
  * @param {string} params.siteId - Site ID.
506
516
  * @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
517
+ * @param {boolean} params.total - When set to false, the total count returned will be 0 and will not be calculated.
507
518
  * @throws {AppwriteException}
508
519
  * @returns {Promise<Models.ExecutionList>}
509
520
  */
510
521
  listLogs(params: {
511
522
  siteId: string;
512
523
  queries?: string[];
524
+ total?: boolean;
513
525
  }): Promise<Models.ExecutionList>;
514
526
  /**
515
527
  * Get a list of all site logs. You can use the query params to filter your results.
516
528
  *
517
529
  * @param {string} siteId - Site ID.
518
530
  * @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
531
+ * @param {boolean} total - When set to false, the total count returned will be 0 and will not be calculated.
519
532
  * @throws {AppwriteException}
520
533
  * @returns {Promise<Models.ExecutionList>}
521
534
  * @deprecated Use the object parameter style method for a better developer experience.
522
535
  */
523
- listLogs(siteId: string, queries?: string[]): Promise<Models.ExecutionList>;
536
+ listLogs(siteId: string, queries?: string[], total?: boolean): Promise<Models.ExecutionList>;
524
537
  /**
525
538
  * Get a site request log by its unique ID.
526
539
  *
@@ -13,11 +13,13 @@ class Sites {
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 = "/sites";
22
24
  const payload = {};
23
25
  if (typeof queries !== "undefined") {
@@ -26,6 +28,9 @@ class Sites {
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(
@@ -403,12 +408,14 @@ class Sites {
403
408
  params = {
404
409
  siteId: paramsOrFirst,
405
410
  queries: rest[0],
406
- search: rest[1]
411
+ search: rest[1],
412
+ total: rest[2]
407
413
  };
408
414
  }
409
415
  const siteId = params.siteId;
410
416
  const queries = params.queries;
411
417
  const search = params.search;
418
+ const total = params.total;
412
419
  if (typeof siteId === "undefined") {
413
420
  throw new client.AppwriteException('Missing required parameter: "siteId"');
414
421
  }
@@ -420,6 +427,9 @@ class Sites {
420
427
  if (typeof search !== "undefined") {
421
428
  payload["search"] = search;
422
429
  }
430
+ if (typeof total !== "undefined") {
431
+ payload["total"] = total;
432
+ }
423
433
  const uri = new URL(this.client.config.endpoint + apiPath);
424
434
  const apiHeaders = {};
425
435
  return this.client.call(
@@ -534,15 +544,17 @@ class Sites {
534
544
  repository: rest[0],
535
545
  owner: rest[1],
536
546
  rootDirectory: rest[2],
537
- version: rest[3],
538
- activate: rest[4]
547
+ type: rest[3],
548
+ reference: rest[4],
549
+ activate: rest[5]
539
550
  };
540
551
  }
541
552
  const siteId = params.siteId;
542
553
  const repository = params.repository;
543
554
  const owner = params.owner;
544
555
  const rootDirectory = params.rootDirectory;
545
- const version = params.version;
556
+ const type = params.type;
557
+ const reference = params.reference;
546
558
  const activate = params.activate;
547
559
  if (typeof siteId === "undefined") {
548
560
  throw new client.AppwriteException('Missing required parameter: "siteId"');
@@ -556,8 +568,11 @@ class Sites {
556
568
  if (typeof rootDirectory === "undefined") {
557
569
  throw new client.AppwriteException('Missing required parameter: "rootDirectory"');
558
570
  }
559
- if (typeof version === "undefined") {
560
- throw new client.AppwriteException('Missing required parameter: "version"');
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"');
561
576
  }
562
577
  const apiPath = "/sites/{siteId}/deployments/template".replace("{siteId}", siteId);
563
578
  const payload = {};
@@ -570,8 +585,11 @@ class Sites {
570
585
  if (typeof rootDirectory !== "undefined") {
571
586
  payload["rootDirectory"] = rootDirectory;
572
587
  }
573
- if (typeof version !== "undefined") {
574
- payload["version"] = version;
588
+ if (typeof type !== "undefined") {
589
+ payload["type"] = type;
590
+ }
591
+ if (typeof reference !== "undefined") {
592
+ payload["reference"] = reference;
575
593
  }
576
594
  if (typeof activate !== "undefined") {
577
595
  payload["activate"] = activate;
@@ -767,11 +785,13 @@ class Sites {
767
785
  } else {
768
786
  params = {
769
787
  siteId: paramsOrFirst,
770
- queries: rest[0]
788
+ queries: rest[0],
789
+ total: rest[1]
771
790
  };
772
791
  }
773
792
  const siteId = params.siteId;
774
793
  const queries = params.queries;
794
+ const total = params.total;
775
795
  if (typeof siteId === "undefined") {
776
796
  throw new client.AppwriteException('Missing required parameter: "siteId"');
777
797
  }
@@ -780,6 +800,9 @@ class Sites {
780
800
  if (typeof queries !== "undefined") {
781
801
  payload["queries"] = queries;
782
802
  }
803
+ if (typeof total !== "undefined") {
804
+ payload["total"] = total;
805
+ }
783
806
  const uri = new URL(this.client.config.endpoint + apiPath);
784
807
  const apiHeaders = {};
785
808
  return this.client.call(