@appwrite.io/console 1.8.0 → 1.10.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 (105) hide show
  1. package/.github/workflows/publish.yml +1 -1
  2. package/CHANGELOG.md +45 -6
  3. package/README.md +82 -2
  4. package/dist/cjs/sdk.js +532 -200
  5. package/dist/cjs/sdk.js.map +1 -1
  6. package/dist/esm/sdk.js +533 -201
  7. package/dist/esm/sdk.js.map +1 -1
  8. package/dist/iife/sdk.js +532 -200
  9. package/docs/examples/databases/create-document.md +1 -3
  10. package/docs/examples/databases/create-documents.md +1 -1
  11. package/docs/examples/databases/decrement-document-attribute.md +18 -0
  12. package/docs/examples/databases/increment-document-attribute.md +18 -0
  13. package/docs/examples/databases/upsert-documents.md +1 -1
  14. package/docs/examples/domains/create-record-a-a-a-a.md +1 -1
  15. package/docs/examples/domains/create-record-a.md +1 -1
  16. package/docs/examples/domains/create-record-alias.md +1 -1
  17. package/docs/examples/domains/create-record-c-a-a.md +1 -1
  18. package/docs/examples/domains/create-record-c-n-a-m-e.md +1 -1
  19. package/docs/examples/domains/create-record-h-t-t-p-s.md +1 -1
  20. package/docs/examples/domains/create-record-m-x.md +1 -1
  21. package/docs/examples/domains/create-record-n-s.md +1 -1
  22. package/docs/examples/domains/create-record-s-r-v.md +1 -1
  23. package/docs/examples/domains/create-record-t-x-t.md +1 -1
  24. package/docs/examples/domains/update-record-a-a-a-a.md +1 -1
  25. package/docs/examples/domains/update-record-a.md +1 -1
  26. package/docs/examples/domains/update-record-alias.md +1 -1
  27. package/docs/examples/domains/update-record-c-a-a.md +1 -1
  28. package/docs/examples/domains/update-record-c-n-a-m-e.md +1 -1
  29. package/docs/examples/domains/update-record-h-t-t-p-s.md +1 -1
  30. package/docs/examples/domains/update-record-m-x.md +1 -1
  31. package/docs/examples/domains/update-record-n-s.md +1 -1
  32. package/docs/examples/domains/update-record-s-r-v.md +1 -1
  33. package/docs/examples/domains/update-record-t-x-t.md +1 -1
  34. package/docs/examples/functions/create-execution.md +1 -1
  35. package/docs/examples/health/{get-queue-stats-usage-dump.md → get-queue-billing-project-aggregation.md} +2 -2
  36. package/docs/examples/health/{get-queue-billing-aggregation.md → get-queue-billing-team-aggregation.md} +1 -1
  37. package/docs/examples/organizations/cancel-downgrade.md +13 -0
  38. package/docs/examples/organizations/estimation-create-organization.md +16 -0
  39. package/docs/examples/organizations/estimation-delete-organization.md +13 -0
  40. package/docs/examples/organizations/estimation-update-plan.md +16 -0
  41. package/docs/examples/organizations/get-available-credits.md +13 -0
  42. package/docs/examples/organizations/get-usage.md +1 -1
  43. package/docs/examples/organizations/update-projects.md +14 -0
  44. package/docs/examples/organizations/validate-payment.md +14 -0
  45. package/docs/examples/proxy/create-redirect-rule.md +4 -2
  46. package/docs/examples/vcs/get-repository-contents.md +2 -1
  47. package/package.json +1 -1
  48. package/src/client.ts +5 -4
  49. package/src/enums/build-runtime.ts +2 -0
  50. package/src/enums/image-format.ts +1 -0
  51. package/src/enums/proxy-resource-type.ts +4 -0
  52. package/src/enums/runtime.ts +2 -0
  53. package/src/index.ts +1 -0
  54. package/src/models.ts +513 -11
  55. package/src/services/account.ts +97 -36
  56. package/src/services/avatars.ts +26 -20
  57. package/src/services/backups.ts +11 -0
  58. package/src/services/console.ts +8 -1
  59. package/src/services/databases.ts +190 -31
  60. package/src/services/domains.ts +111 -69
  61. package/src/services/functions.ts +37 -8
  62. package/src/services/graphql.ts +1 -0
  63. package/src/services/health.ts +54 -4
  64. package/src/services/locale.ts +9 -2
  65. package/src/services/messaging.ts +53 -8
  66. package/src/services/migrations.ts +12 -0
  67. package/src/services/organizations.ts +301 -14
  68. package/src/services/project.ts +5 -0
  69. package/src/services/projects.ts +50 -0
  70. package/src/services/proxy.ts +23 -1
  71. package/src/services/sites.ts +32 -4
  72. package/src/services/storage.ts +23 -9
  73. package/src/services/teams.ts +30 -17
  74. package/src/services/tokens.ts +4 -0
  75. package/src/services/users.ts +69 -27
  76. package/src/services/vcs.ts +16 -4
  77. package/types/enums/build-runtime.d.ts +3 -1
  78. package/types/enums/image-format.d.ts +2 -1
  79. package/types/enums/proxy-resource-type.d.ts +4 -0
  80. package/types/enums/runtime.d.ts +3 -1
  81. package/types/index.d.ts +1 -0
  82. package/types/models.d.ts +494 -188
  83. package/types/services/account.d.ts +36 -36
  84. package/types/services/avatars.d.ts +20 -20
  85. package/types/services/console.d.ts +1 -1
  86. package/types/services/databases.d.ts +67 -31
  87. package/types/services/domains.d.ts +69 -69
  88. package/types/services/functions.d.ts +8 -8
  89. package/types/services/health.d.ts +11 -3
  90. package/types/services/locale.d.ts +2 -2
  91. package/types/services/messaging.d.ts +8 -8
  92. package/types/services/organizations.d.ts +88 -14
  93. package/types/services/proxy.d.ts +4 -1
  94. package/types/services/sites.d.ts +4 -4
  95. package/types/services/storage.d.ts +9 -9
  96. package/types/services/teams.d.ts +17 -17
  97. package/types/services/users.d.ts +27 -27
  98. package/types/services/vcs.d.ts +4 -4
  99. package/docs/examples/functions/create-build.md +0 -15
  100. package/docs/examples/functions/get-function-usage.md +0 -14
  101. package/docs/examples/functions/update-deployment-build.md +0 -14
  102. package/docs/examples/functions/update-deployment.md +0 -14
  103. package/docs/examples/proxy/create-rule.md +0 -15
  104. package/src/enums/resource-type.ts +0 -4
  105. package/types/enums/resource-type.d.ts +0 -4
@@ -49,6 +49,7 @@ export class Projects {
49
49
  payload
50
50
  );
51
51
  }
52
+
52
53
  /**
53
54
  * Create a new project. You can create a maximum of 100 projects per account.
54
55
  *
@@ -132,6 +133,7 @@ export class Projects {
132
133
  payload
133
134
  );
134
135
  }
136
+
135
137
  /**
136
138
  * Get a project by its unique ID. This endpoint allows you to retrieve the project's details, including its name, description, team, region, and other metadata.
137
139
  *
@@ -157,6 +159,7 @@ export class Projects {
157
159
  payload
158
160
  );
159
161
  }
162
+
160
163
  /**
161
164
  * Update a project by its unique ID.
162
165
  *
@@ -226,6 +229,7 @@ export class Projects {
226
229
  payload
227
230
  );
228
231
  }
232
+
229
233
  /**
230
234
  * Delete a project by its unique ID.
231
235
  *
@@ -252,6 +256,7 @@ export class Projects {
252
256
  payload
253
257
  );
254
258
  }
259
+
255
260
  /**
256
261
  * Update the status of a specific API type. Use this endpoint to enable or disable API types such as REST, GraphQL and Realtime.
257
262
  *
@@ -292,6 +297,7 @@ export class Projects {
292
297
  payload
293
298
  );
294
299
  }
300
+
295
301
  /**
296
302
  * Update the status of all API types. Use this endpoint to enable or disable API types such as REST, GraphQL and Realtime all at once.
297
303
  *
@@ -325,6 +331,7 @@ export class Projects {
325
331
  payload
326
332
  );
327
333
  }
334
+
328
335
  /**
329
336
  * Update how long sessions created within a project should stay active for.
330
337
  *
@@ -358,6 +365,7 @@ export class Projects {
358
365
  payload
359
366
  );
360
367
  }
368
+
361
369
  /**
362
370
  * Update the maximum number of users allowed in this project. Set to 0 for unlimited users.
363
371
  *
@@ -391,6 +399,7 @@ export class Projects {
391
399
  payload
392
400
  );
393
401
  }
402
+
394
403
  /**
395
404
  * Update the maximum number of sessions allowed per user within the project, if the limit is hit the oldest session will be deleted to make room for new sessions.
396
405
  *
@@ -424,6 +433,7 @@ export class Projects {
424
433
  payload
425
434
  );
426
435
  }
436
+
427
437
  /**
428
438
  * Update project membership privacy settings. Use this endpoint to control what user information is visible to other team members, such as user name, email, and MFA status.
429
439
  *
@@ -471,6 +481,7 @@ export class Projects {
471
481
  payload
472
482
  );
473
483
  }
484
+
474
485
  /**
475
486
  * Update the list of mock phone numbers for testing. Use these numbers to bypass SMS verification in development.
476
487
  *
@@ -504,6 +515,7 @@ export class Projects {
504
515
  payload
505
516
  );
506
517
  }
518
+
507
519
  /**
508
520
  * Enable or disable checking user passwords against common passwords dictionary. This helps ensure users don't use common and insecure passwords.
509
521
  *
@@ -537,6 +549,7 @@ export class Projects {
537
549
  payload
538
550
  );
539
551
  }
552
+
540
553
  /**
541
554
  * Update the authentication password history requirement. Use this endpoint to require new passwords to be different than the last X amount of previously used ones.
542
555
  *
@@ -570,6 +583,7 @@ export class Projects {
570
583
  payload
571
584
  );
572
585
  }
586
+
573
587
  /**
574
588
  * Enable or disable checking user passwords against their personal data. This helps prevent users from using personal information in their passwords.
575
589
  *
@@ -603,6 +617,7 @@ export class Projects {
603
617
  payload
604
618
  );
605
619
  }
620
+
606
621
  /**
607
622
  * Enable or disable session email alerts. When enabled, users will receive email notifications when new sessions are created.
608
623
  *
@@ -636,6 +651,7 @@ export class Projects {
636
651
  payload
637
652
  );
638
653
  }
654
+
639
655
  /**
640
656
  * Update the status of a specific authentication method. Use this endpoint to enable or disable different authentication methods such as email, magic urls or sms in your project.
641
657
  *
@@ -673,6 +689,7 @@ export class Projects {
673
689
  payload
674
690
  );
675
691
  }
692
+
676
693
  /**
677
694
  * List all the project\'s dev keys. Dev keys are project specific and allow you to bypass rate limits and get better error logging during development.'
678
695
  *
@@ -702,6 +719,7 @@ export class Projects {
702
719
  payload
703
720
  );
704
721
  }
722
+
705
723
  /**
706
724
  * Create a new project dev key. Dev keys are project specific and allow you to bypass rate limits and get better error logging during development. Strictly meant for development purposes only.
707
725
  *
@@ -742,6 +760,7 @@ export class Projects {
742
760
  payload
743
761
  );
744
762
  }
763
+
745
764
  /**
746
765
  * Get a project\'s dev key by its unique ID. Dev keys are project specific and allow you to bypass rate limits and get better error logging during development.
747
766
  *
@@ -771,6 +790,7 @@ export class Projects {
771
790
  payload
772
791
  );
773
792
  }
793
+
774
794
  /**
775
795
  * Update a project\'s dev key by its unique ID. Use this endpoint to update a project\'s dev key name or expiration time.'
776
796
  *
@@ -815,6 +835,7 @@ export class Projects {
815
835
  payload
816
836
  );
817
837
  }
838
+
818
839
  /**
819
840
  * Delete a project\'s dev key by its unique ID. Once deleted, the key will no longer allow bypassing of rate limits and better logging of errors.
820
841
  *
@@ -845,6 +866,7 @@ export class Projects {
845
866
  payload
846
867
  );
847
868
  }
869
+
848
870
  /**
849
871
  * Create a new JWT token. This token can be used to authenticate users with custom scopes and expiration time.
850
872
  *
@@ -882,6 +904,7 @@ export class Projects {
882
904
  payload
883
905
  );
884
906
  }
907
+
885
908
  /**
886
909
  * Get a list of all API keys from the current project.
887
910
  *
@@ -907,6 +930,7 @@ export class Projects {
907
930
  payload
908
931
  );
909
932
  }
933
+
910
934
  /**
911
935
  * Create a new API key. It's recommended to have multiple API keys with strict scopes for separate functions within your project.
912
936
  *
@@ -951,6 +975,7 @@ export class Projects {
951
975
  payload
952
976
  );
953
977
  }
978
+
954
979
  /**
955
980
  * Get a key by its unique ID. This endpoint returns details about a specific API key in your project including it's scopes.
956
981
  *
@@ -980,6 +1005,7 @@ export class Projects {
980
1005
  payload
981
1006
  );
982
1007
  }
1008
+
983
1009
  /**
984
1010
  * Update a key by its unique ID. Use this endpoint to update the name, scopes, or expiration time of an API key.
985
1011
  *
@@ -1028,6 +1054,7 @@ export class Projects {
1028
1054
  payload
1029
1055
  );
1030
1056
  }
1057
+
1031
1058
  /**
1032
1059
  * Delete a key by its unique ID. Once deleted, the key can no longer be used to authenticate API calls.
1033
1060
  *
@@ -1058,6 +1085,7 @@ export class Projects {
1058
1085
  payload
1059
1086
  );
1060
1087
  }
1088
+
1061
1089
  /**
1062
1090
  * Update the OAuth2 provider configurations. Use this endpoint to set up or update the OAuth2 provider credentials or enable/disable providers.
1063
1091
  *
@@ -1103,6 +1131,7 @@ export class Projects {
1103
1131
  payload
1104
1132
  );
1105
1133
  }
1134
+
1106
1135
  /**
1107
1136
  * Get a list of all platforms in the project. This endpoint returns an array of all platforms and their configurations.
1108
1137
  *
@@ -1128,6 +1157,7 @@ export class Projects {
1128
1157
  payload
1129
1158
  );
1130
1159
  }
1160
+
1131
1161
  /**
1132
1162
  * Create a new platform for your project. Use this endpoint to register a new platform where your users will run your application which will interact with the Appwrite API.
1133
1163
  *
@@ -1180,6 +1210,7 @@ export class Projects {
1180
1210
  payload
1181
1211
  );
1182
1212
  }
1213
+
1183
1214
  /**
1184
1215
  * Get a platform by its unique ID. This endpoint returns the platform's details, including its name, type, and key configurations.
1185
1216
  *
@@ -1209,6 +1240,7 @@ export class Projects {
1209
1240
  payload
1210
1241
  );
1211
1242
  }
1243
+
1212
1244
  /**
1213
1245
  * Update a platform by its unique ID. Use this endpoint to update the platform's name, key, platform store ID, or hostname.
1214
1246
  *
@@ -1258,6 +1290,7 @@ export class Projects {
1258
1290
  payload
1259
1291
  );
1260
1292
  }
1293
+
1261
1294
  /**
1262
1295
  * Delete a platform by its unique ID. This endpoint removes the platform and all its configurations from the project.
1263
1296
  *
@@ -1288,6 +1321,7 @@ export class Projects {
1288
1321
  payload
1289
1322
  );
1290
1323
  }
1324
+
1291
1325
  /**
1292
1326
  * Update the status of a specific service. Use this endpoint to enable or disable a service in your project.
1293
1327
  *
@@ -1328,6 +1362,7 @@ export class Projects {
1328
1362
  payload
1329
1363
  );
1330
1364
  }
1365
+
1331
1366
  /**
1332
1367
  * Update the status of all services. Use this endpoint to enable or disable all optional services at once.
1333
1368
  *
@@ -1361,6 +1396,7 @@ export class Projects {
1361
1396
  payload
1362
1397
  );
1363
1398
  }
1399
+
1364
1400
  /**
1365
1401
  * Update the SMTP configuration for your project. Use this endpoint to configure your project's SMTP provider with your custom settings for sending transactional emails.
1366
1402
  *
@@ -1426,6 +1462,7 @@ export class Projects {
1426
1462
  payload
1427
1463
  );
1428
1464
  }
1465
+
1429
1466
  /**
1430
1467
  * Send a test email to verify SMTP configuration.
1431
1468
  *
@@ -1500,6 +1537,7 @@ export class Projects {
1500
1537
  payload
1501
1538
  );
1502
1539
  }
1540
+
1503
1541
  /**
1504
1542
  * Update the team ID of a project allowing for it to be transferred to another team.
1505
1543
  *
@@ -1533,6 +1571,7 @@ export class Projects {
1533
1571
  payload
1534
1572
  );
1535
1573
  }
1574
+
1536
1575
  /**
1537
1576
  * Get a custom email template for the specified locale and type. This endpoint returns the template content, subject, and other configuration details.
1538
1577
  *
@@ -1566,6 +1605,7 @@ export class Projects {
1566
1605
  payload
1567
1606
  );
1568
1607
  }
1608
+
1569
1609
  /**
1570
1610
  * Update a custom email template for the specified locale and type. Use this endpoint to modify the content of your email templates.
1571
1611
  *
@@ -1626,6 +1666,7 @@ export class Projects {
1626
1666
  payload
1627
1667
  );
1628
1668
  }
1669
+
1629
1670
  /**
1630
1671
  * Reset a custom email template to its default value. This endpoint removes any custom content and restores the template to its original state.
1631
1672
  *
@@ -1660,6 +1701,7 @@ export class Projects {
1660
1701
  payload
1661
1702
  );
1662
1703
  }
1704
+
1663
1705
  /**
1664
1706
  * Get a custom SMS template for the specified locale and type returning it's contents.
1665
1707
  *
@@ -1693,6 +1735,7 @@ export class Projects {
1693
1735
  payload
1694
1736
  );
1695
1737
  }
1738
+
1696
1739
  /**
1697
1740
  * Update a custom SMS template for the specified locale and type. Use this endpoint to modify the content of your SMS templates.
1698
1741
  *
@@ -1734,6 +1777,7 @@ export class Projects {
1734
1777
  payload
1735
1778
  );
1736
1779
  }
1780
+
1737
1781
  /**
1738
1782
  * Reset a custom SMS template to its default value. This endpoint removes any custom message and restores the template to its original state.
1739
1783
  *
@@ -1768,6 +1812,7 @@ export class Projects {
1768
1812
  payload
1769
1813
  );
1770
1814
  }
1815
+
1771
1816
  /**
1772
1817
  * Get a list of all webhooks belonging to the project. You can use the query params to filter your results.
1773
1818
  *
@@ -1793,6 +1838,7 @@ export class Projects {
1793
1838
  payload
1794
1839
  );
1795
1840
  }
1841
+
1796
1842
  /**
1797
1843
  * Create a new webhook. Use this endpoint to configure a URL that will receive events from Appwrite when specific events occur.
1798
1844
  *
@@ -1859,6 +1905,7 @@ export class Projects {
1859
1905
  payload
1860
1906
  );
1861
1907
  }
1908
+
1862
1909
  /**
1863
1910
  * Get a webhook by its unique ID. This endpoint returns details about a specific webhook configured for a project.
1864
1911
  *
@@ -1888,6 +1935,7 @@ export class Projects {
1888
1935
  payload
1889
1936
  );
1890
1937
  }
1938
+
1891
1939
  /**
1892
1940
  * Update a webhook by its unique ID. Use this endpoint to update the URL, events, or status of an existing webhook.
1893
1941
  *
@@ -1958,6 +2006,7 @@ export class Projects {
1958
2006
  payload
1959
2007
  );
1960
2008
  }
2009
+
1961
2010
  /**
1962
2011
  * Delete a webhook by its unique ID. Once deleted, the webhook will no longer receive project events.
1963
2012
  *
@@ -1988,6 +2037,7 @@ export class Projects {
1988
2037
  payload
1989
2038
  );
1990
2039
  }
2040
+
1991
2041
  /**
1992
2042
  * Update the webhook signature key. This endpoint can be used to regenerate the signature key used to sign and validate payload deliveries for a specific webhook.
1993
2043
  *
@@ -2,6 +2,7 @@ import { Service } from '../service';
2
2
  import { AppwriteException, Client, type Payload, UploadProgress } from '../client';
3
3
  import type { Models } from '../models';
4
4
  import { StatusCode } from '../enums/status-code';
5
+ import { ProxyResourceType } from '../enums/proxy-resource-type';
5
6
 
6
7
  export class Proxy {
7
8
  client: Client;
@@ -39,6 +40,7 @@ export class Proxy {
39
40
  payload
40
41
  );
41
42
  }
43
+
42
44
  /**
43
45
  * Create a new proxy rule for serving Appwrite's API on custom domain.
44
46
  *
@@ -68,6 +70,7 @@ export class Proxy {
68
70
  payload
69
71
  );
70
72
  }
73
+
71
74
  /**
72
75
  * Create a new proxy rule for executing Appwrite Function on custom domain.
73
76
  *
@@ -108,16 +111,19 @@ export class Proxy {
108
111
  payload
109
112
  );
110
113
  }
114
+
111
115
  /**
112
116
  * Create a new proxy rule for to redirect from custom domain to another domain.
113
117
  *
114
118
  * @param {string} domain
115
119
  * @param {string} url
116
120
  * @param {StatusCode} statusCode
121
+ * @param {string} resourceId
122
+ * @param {ProxyResourceType} resourceType
117
123
  * @throws {AppwriteException}
118
124
  * @returns {Promise<Models.ProxyRule>}
119
125
  */
120
- createRedirectRule(domain: string, url: string, statusCode: StatusCode): Promise<Models.ProxyRule> {
126
+ createRedirectRule(domain: string, url: string, statusCode: StatusCode, resourceId: string, resourceType: ProxyResourceType): Promise<Models.ProxyRule> {
121
127
  if (typeof domain === 'undefined') {
122
128
  throw new AppwriteException('Missing required parameter: "domain"');
123
129
  }
@@ -127,6 +133,12 @@ export class Proxy {
127
133
  if (typeof statusCode === 'undefined') {
128
134
  throw new AppwriteException('Missing required parameter: "statusCode"');
129
135
  }
136
+ if (typeof resourceId === 'undefined') {
137
+ throw new AppwriteException('Missing required parameter: "resourceId"');
138
+ }
139
+ if (typeof resourceType === 'undefined') {
140
+ throw new AppwriteException('Missing required parameter: "resourceType"');
141
+ }
130
142
  const apiPath = '/proxy/rules/redirect';
131
143
  const payload: Payload = {};
132
144
  if (typeof domain !== 'undefined') {
@@ -138,6 +150,12 @@ export class Proxy {
138
150
  if (typeof statusCode !== 'undefined') {
139
151
  payload['statusCode'] = statusCode;
140
152
  }
153
+ if (typeof resourceId !== 'undefined') {
154
+ payload['resourceId'] = resourceId;
155
+ }
156
+ if (typeof resourceType !== 'undefined') {
157
+ payload['resourceType'] = resourceType;
158
+ }
141
159
  const uri = new URL(this.client.config.endpoint + apiPath);
142
160
 
143
161
  const apiHeaders: { [header: string]: string } = {
@@ -151,6 +169,7 @@ export class Proxy {
151
169
  payload
152
170
  );
153
171
  }
172
+
154
173
  /**
155
174
  * Create a new proxy rule for serving Appwrite Site on custom domain.
156
175
  *
@@ -191,6 +210,7 @@ export class Proxy {
191
210
  payload
192
211
  );
193
212
  }
213
+
194
214
  /**
195
215
  * Get a proxy rule by its unique ID.
196
216
  *
@@ -216,6 +236,7 @@ export class Proxy {
216
236
  payload
217
237
  );
218
238
  }
239
+
219
240
  /**
220
241
  * Delete a proxy rule by its unique ID.
221
242
  *
@@ -242,6 +263,7 @@ export class Proxy {
242
263
  payload
243
264
  );
244
265
  }
266
+
245
267
  /**
246
268
  * Retry getting verification process of a proxy rule. This endpoint triggers domain verification by checking DNS records (CNAME) against the configured target domain. If verification is successful, a TLS certificate will be automatically provisioned for the domain.
247
269
  *
@@ -44,6 +44,7 @@ export class Sites {
44
44
  payload
45
45
  );
46
46
  }
47
+
47
48
  /**
48
49
  * Create a new site.
49
50
  *
@@ -150,6 +151,7 @@ export class Sites {
150
151
  payload
151
152
  );
152
153
  }
154
+
153
155
  /**
154
156
  * Get a list of all frameworks that are currently available on the server instance.
155
157
  *
@@ -171,6 +173,7 @@ export class Sites {
171
173
  payload
172
174
  );
173
175
  }
176
+
174
177
  /**
175
178
  * List allowed site specifications for this instance.
176
179
  *
@@ -192,6 +195,7 @@ export class Sites {
192
195
  payload
193
196
  );
194
197
  }
198
+
195
199
  /**
196
200
  * List available site templates. You can use template details in [createSite](/docs/references/cloud/server-nodejs/sites#create) method.
197
201
  *
@@ -229,6 +233,7 @@ export class Sites {
229
233
  payload
230
234
  );
231
235
  }
236
+
232
237
  /**
233
238
  * Get a site template using ID. You can use template details in [createSite](/docs/references/cloud/server-nodejs/sites#create) method.
234
239
  *
@@ -254,6 +259,7 @@ export class Sites {
254
259
  payload
255
260
  );
256
261
  }
262
+
257
263
  /**
258
264
  * Get usage metrics and statistics for all sites in the project. View statistics including total deployments, builds, logs, storage usage, and compute time. The response includes both current totals and historical data for each metric. Use the optional range parameter to specify the time window for historical data: 24h (last 24 hours), 30d (last 30 days), or 90d (last 90 days). If not specified, defaults to 30 days.
259
265
  *
@@ -279,6 +285,7 @@ export class Sites {
279
285
  payload
280
286
  );
281
287
  }
288
+
282
289
  /**
283
290
  * Get a site by its unique ID.
284
291
  *
@@ -304,6 +311,7 @@ export class Sites {
304
311
  payload
305
312
  );
306
313
  }
314
+
307
315
  /**
308
316
  * Update site by its unique ID.
309
317
  *
@@ -404,6 +412,7 @@ export class Sites {
404
412
  payload
405
413
  );
406
414
  }
415
+
407
416
  /**
408
417
  * Delete a site by its unique ID.
409
418
  *
@@ -430,6 +439,7 @@ export class Sites {
430
439
  payload
431
440
  );
432
441
  }
442
+
433
443
  /**
434
444
  * Update the site active deployment. Use this endpoint to switch the code deployment that should be used when visitor opens your site.
435
445
  *
@@ -463,6 +473,7 @@ export class Sites {
463
473
  payload
464
474
  );
465
475
  }
476
+
466
477
  /**
467
478
  * Get a list of all the site&#039;s code deployments. You can use the query params to filter your results.
468
479
  *
@@ -496,6 +507,7 @@ export class Sites {
496
507
  payload
497
508
  );
498
509
  }
510
+
499
511
  /**
500
512
  * 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&#039;ll need to update the function&#039;s deployment to use your new deployment ID.
501
513
  *
@@ -549,6 +561,7 @@ export class Sites {
549
561
  onProgress
550
562
  );
551
563
  }
564
+
552
565
  /**
553
566
  * Create a new build for an existing site deployment. This endpoint allows you to rebuild a deployment with the updated site configuration, including its commands and output directory if they have been modified. The build process will be queued and executed asynchronously. The original deployment&#039;s code will be preserved and used for the new build.
554
567
  *
@@ -582,10 +595,11 @@ export class Sites {
582
595
  payload
583
596
  );
584
597
  }
598
+
585
599
  /**
586
600
  * Create a deployment based on a template.
587
-
588
- Use this endpoint with combination of [listTemplates](https://appwrite.io/docs/server/sites#listTemplates) to find the template details.
601
+ *
602
+ * Use this endpoint with combination of [listTemplates](https://appwrite.io/docs/server/sites#listTemplates) to find the template details.
589
603
  *
590
604
  * @param {string} siteId
591
605
  * @param {string} repository
@@ -642,10 +656,11 @@ Use this endpoint with combination of [listTemplates](https://appwrite.io/docs/s
642
656
  payload
643
657
  );
644
658
  }
659
+
645
660
  /**
646
661
  * Create a deployment when a site is connected to VCS.
647
-
648
- This endpoint lets you create deployment from a branch, commit, or a tag.
662
+ *
663
+ * This endpoint lets you create deployment from a branch, commit, or a tag.
649
664
  *
650
665
  * @param {string} siteId
651
666
  * @param {VCSDeploymentType} type
@@ -688,6 +703,7 @@ This endpoint lets you create deployment from a branch, commit, or a tag.
688
703
  payload
689
704
  );
690
705
  }
706
+
691
707
  /**
692
708
  * Get a site deployment by its unique ID.
693
709
  *
@@ -717,6 +733,7 @@ This endpoint lets you create deployment from a branch, commit, or a tag.
717
733
  payload
718
734
  );
719
735
  }
736
+
720
737
  /**
721
738
  * Delete a site deployment by its unique ID.
722
739
  *
@@ -747,6 +764,7 @@ This endpoint lets you create deployment from a branch, commit, or a tag.
747
764
  payload
748
765
  );
749
766
  }
767
+
750
768
  /**
751
769
  * Get a site deployment content by its unique ID. The endpoint response return with a &#039;Content-Disposition: attachment&#039; header that tells the browser to start downloading the file to user downloads directory.
752
770
  *
@@ -781,6 +799,7 @@ This endpoint lets you create deployment from a branch, commit, or a tag.
781
799
 
782
800
  return uri.toString();
783
801
  }
802
+
784
803
  /**
785
804
  * Cancel an ongoing site deployment build. If the build is already in progress, it will be stopped and marked as canceled. If the build hasn&#039;t started yet, it will be marked as canceled without executing. You cannot cancel builds that have already completed (status &#039;ready&#039;) or failed. The response includes the final build status and details.
786
805
  *
@@ -811,6 +830,7 @@ This endpoint lets you create deployment from a branch, commit, or a tag.
811
830
  payload
812
831
  );
813
832
  }
833
+
814
834
  /**
815
835
  * Get a list of all site logs. You can use the query params to filter your results.
816
836
  *
@@ -840,6 +860,7 @@ This endpoint lets you create deployment from a branch, commit, or a tag.
840
860
  payload
841
861
  );
842
862
  }
863
+
843
864
  /**
844
865
  * Get a site request log by its unique ID.
845
866
  *
@@ -869,6 +890,7 @@ This endpoint lets you create deployment from a branch, commit, or a tag.
869
890
  payload
870
891
  );
871
892
  }
893
+
872
894
  /**
873
895
  * Delete a site log by its unique ID.
874
896
  *
@@ -899,6 +921,7 @@ This endpoint lets you create deployment from a branch, commit, or a tag.
899
921
  payload
900
922
  );
901
923
  }
924
+
902
925
  /**
903
926
  * Get usage metrics and statistics for a for a specific site. View statistics including total deployments, builds, executions, storage usage, and compute time. The response includes both current totals and historical data for each metric. Use the optional range parameter to specify the time window for historical data: 24h (last 24 hours), 30d (last 30 days), or 90d (last 90 days). If not specified, defaults to 30 days.
904
927
  *
@@ -928,6 +951,7 @@ This endpoint lets you create deployment from a branch, commit, or a tag.
928
951
  payload
929
952
  );
930
953
  }
954
+
931
955
  /**
932
956
  * Get a list of all variables of a specific site.
933
957
  *
@@ -953,6 +977,7 @@ This endpoint lets you create deployment from a branch, commit, or a tag.
953
977
  payload
954
978
  );
955
979
  }
980
+
956
981
  /**
957
982
  * Create a new site variable. These variables can be accessed during build and runtime (server-side rendering) as environment variables.
958
983
  *
@@ -997,6 +1022,7 @@ This endpoint lets you create deployment from a branch, commit, or a tag.
997
1022
  payload
998
1023
  );
999
1024
  }
1025
+
1000
1026
  /**
1001
1027
  * Get a variable by its unique ID.
1002
1028
  *
@@ -1026,6 +1052,7 @@ This endpoint lets you create deployment from a branch, commit, or a tag.
1026
1052
  payload
1027
1053
  );
1028
1054
  }
1055
+
1029
1056
  /**
1030
1057
  * Update variable by its unique ID.
1031
1058
  *
@@ -1071,6 +1098,7 @@ This endpoint lets you create deployment from a branch, commit, or a tag.
1071
1098
  payload
1072
1099
  );
1073
1100
  }
1101
+
1074
1102
  /**
1075
1103
  * Delete a variable by its unique ID.
1076
1104
  *