@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
@@ -40,6 +40,7 @@ export class Messaging {
40
40
  payload
41
41
  );
42
42
  }
43
+
43
44
  /**
44
45
  * Create a new email message.
45
46
  *
@@ -119,9 +120,10 @@ export class Messaging {
119
120
  payload
120
121
  );
121
122
  }
123
+
122
124
  /**
123
125
  * Update an email message by its unique ID. This endpoint only works on messages that are in draft status. Messages that are already processing, sent, or failed cannot be updated.
124
-
126
+ *
125
127
  *
126
128
  * @param {string} messageId
127
129
  * @param {string[]} topics
@@ -190,6 +192,7 @@ export class Messaging {
190
192
  payload
191
193
  );
192
194
  }
195
+
193
196
  /**
194
197
  * Create a new push notification.
195
198
  *
@@ -291,9 +294,10 @@ export class Messaging {
291
294
  payload
292
295
  );
293
296
  }
297
+
294
298
  /**
295
299
  * Update a push notification by its unique ID. This endpoint only works on messages that are in draft status. Messages that are already processing, sent, or failed cannot be updated.
296
-
300
+ *
297
301
  *
298
302
  * @param {string} messageId
299
303
  * @param {string[]} topics
@@ -390,6 +394,7 @@ export class Messaging {
390
394
  payload
391
395
  );
392
396
  }
397
+
393
398
  /**
394
399
  * Create a new SMS message.
395
400
  *
@@ -446,9 +451,10 @@ export class Messaging {
446
451
  payload
447
452
  );
448
453
  }
454
+
449
455
  /**
450
456
  * Update an SMS message by its unique ID. This endpoint only works on messages that are in draft status. Messages that are already processing, sent, or failed cannot be updated.
451
-
457
+ *
452
458
  *
453
459
  * @param {string} messageId
454
460
  * @param {string[]} topics
@@ -497,9 +503,10 @@ export class Messaging {
497
503
  payload
498
504
  );
499
505
  }
506
+
500
507
  /**
501
508
  * Get a message by its unique ID.
502
-
509
+ *
503
510
  *
504
511
  * @param {string} messageId
505
512
  * @throws {AppwriteException}
@@ -523,6 +530,7 @@ export class Messaging {
523
530
  payload
524
531
  );
525
532
  }
533
+
526
534
  /**
527
535
  * Delete a message. If the message is not a draft or scheduled, but has been sent, this will not recall the message.
528
536
  *
@@ -549,6 +557,7 @@ export class Messaging {
549
557
  payload
550
558
  );
551
559
  }
560
+
552
561
  /**
553
562
  * Get the message activity logs listed by its unique ID.
554
563
  *
@@ -578,6 +587,7 @@ export class Messaging {
578
587
  payload
579
588
  );
580
589
  }
590
+
581
591
  /**
582
592
  * Get a list of the targets associated with a message.
583
593
  *
@@ -607,6 +617,7 @@ export class Messaging {
607
617
  payload
608
618
  );
609
619
  }
620
+
610
621
  /**
611
622
  * Get a list of all providers from the current Appwrite project.
612
623
  *
@@ -636,6 +647,7 @@ export class Messaging {
636
647
  payload
637
648
  );
638
649
  }
650
+
639
651
  /**
640
652
  * Create a new Apple Push Notification service provider.
641
653
  *
@@ -696,6 +708,7 @@ export class Messaging {
696
708
  payload
697
709
  );
698
710
  }
711
+
699
712
  /**
700
713
  * Update a Apple Push Notification service provider by its unique ID.
701
714
  *
@@ -750,6 +763,7 @@ export class Messaging {
750
763
  payload
751
764
  );
752
765
  }
766
+
753
767
  /**
754
768
  * Create a new Firebase Cloud Messaging provider.
755
769
  *
@@ -794,6 +808,7 @@ export class Messaging {
794
808
  payload
795
809
  );
796
810
  }
811
+
797
812
  /**
798
813
  * Update a Firebase Cloud Messaging provider by its unique ID.
799
814
  *
@@ -832,6 +847,7 @@ export class Messaging {
832
847
  payload
833
848
  );
834
849
  }
850
+
835
851
  /**
836
852
  * Create a new Mailgun provider.
837
853
  *
@@ -900,6 +916,7 @@ export class Messaging {
900
916
  payload
901
917
  );
902
918
  }
919
+
903
920
  /**
904
921
  * Update a Mailgun provider by its unique ID.
905
922
  *
@@ -962,6 +979,7 @@ export class Messaging {
962
979
  payload
963
980
  );
964
981
  }
982
+
965
983
  /**
966
984
  * Create a new MSG91 provider.
967
985
  *
@@ -1014,6 +1032,7 @@ export class Messaging {
1014
1032
  payload
1015
1033
  );
1016
1034
  }
1035
+
1017
1036
  /**
1018
1037
  * Update a MSG91 provider by its unique ID.
1019
1038
  *
@@ -1060,6 +1079,7 @@ export class Messaging {
1060
1079
  payload
1061
1080
  );
1062
1081
  }
1082
+
1063
1083
  /**
1064
1084
  * Create a new Sendgrid provider.
1065
1085
  *
@@ -1120,6 +1140,7 @@ export class Messaging {
1120
1140
  payload
1121
1141
  );
1122
1142
  }
1143
+
1123
1144
  /**
1124
1145
  * Update a Sendgrid provider by its unique ID.
1125
1146
  *
@@ -1174,6 +1195,7 @@ export class Messaging {
1174
1195
  payload
1175
1196
  );
1176
1197
  }
1198
+
1177
1199
  /**
1178
1200
  * Create a new SMTP provider.
1179
1201
  *
@@ -1261,6 +1283,7 @@ export class Messaging {
1261
1283
  payload
1262
1284
  );
1263
1285
  }
1286
+
1264
1287
  /**
1265
1288
  * Update a SMTP provider by its unique ID.
1266
1289
  *
@@ -1339,6 +1362,7 @@ export class Messaging {
1339
1362
  payload
1340
1363
  );
1341
1364
  }
1365
+
1342
1366
  /**
1343
1367
  * Create a new Telesign provider.
1344
1368
  *
@@ -1391,6 +1415,7 @@ export class Messaging {
1391
1415
  payload
1392
1416
  );
1393
1417
  }
1418
+
1394
1419
  /**
1395
1420
  * Update a Telesign provider by its unique ID.
1396
1421
  *
@@ -1437,6 +1462,7 @@ export class Messaging {
1437
1462
  payload
1438
1463
  );
1439
1464
  }
1465
+
1440
1466
  /**
1441
1467
  * Create a new Textmagic provider.
1442
1468
  *
@@ -1489,6 +1515,7 @@ export class Messaging {
1489
1515
  payload
1490
1516
  );
1491
1517
  }
1518
+
1492
1519
  /**
1493
1520
  * Update a Textmagic provider by its unique ID.
1494
1521
  *
@@ -1535,6 +1562,7 @@ export class Messaging {
1535
1562
  payload
1536
1563
  );
1537
1564
  }
1565
+
1538
1566
  /**
1539
1567
  * Create a new Twilio provider.
1540
1568
  *
@@ -1587,6 +1615,7 @@ export class Messaging {
1587
1615
  payload
1588
1616
  );
1589
1617
  }
1618
+
1590
1619
  /**
1591
1620
  * Update a Twilio provider by its unique ID.
1592
1621
  *
@@ -1633,6 +1662,7 @@ export class Messaging {
1633
1662
  payload
1634
1663
  );
1635
1664
  }
1665
+
1636
1666
  /**
1637
1667
  * Create a new Vonage provider.
1638
1668
  *
@@ -1685,6 +1715,7 @@ export class Messaging {
1685
1715
  payload
1686
1716
  );
1687
1717
  }
1718
+
1688
1719
  /**
1689
1720
  * Update a Vonage provider by its unique ID.
1690
1721
  *
@@ -1731,9 +1762,10 @@ export class Messaging {
1731
1762
  payload
1732
1763
  );
1733
1764
  }
1765
+
1734
1766
  /**
1735
1767
  * Get a provider by its unique ID.
1736
-
1768
+ *
1737
1769
  *
1738
1770
  * @param {string} providerId
1739
1771
  * @throws {AppwriteException}
@@ -1757,6 +1789,7 @@ export class Messaging {
1757
1789
  payload
1758
1790
  );
1759
1791
  }
1792
+
1760
1793
  /**
1761
1794
  * Delete a provider by its unique ID.
1762
1795
  *
@@ -1783,6 +1816,7 @@ export class Messaging {
1783
1816
  payload
1784
1817
  );
1785
1818
  }
1819
+
1786
1820
  /**
1787
1821
  * Get the provider activity logs listed by its unique ID.
1788
1822
  *
@@ -1812,6 +1846,7 @@ export class Messaging {
1812
1846
  payload
1813
1847
  );
1814
1848
  }
1849
+
1815
1850
  /**
1816
1851
  * Get the subscriber activity logs listed by its unique ID.
1817
1852
  *
@@ -1841,6 +1876,7 @@ export class Messaging {
1841
1876
  payload
1842
1877
  );
1843
1878
  }
1879
+
1844
1880
  /**
1845
1881
  * Get a list of all topics from the current Appwrite project.
1846
1882
  *
@@ -1870,6 +1906,7 @@ export class Messaging {
1870
1906
  payload
1871
1907
  );
1872
1908
  }
1909
+
1873
1910
  /**
1874
1911
  * Create a new topic.
1875
1912
  *
@@ -1910,9 +1947,10 @@ export class Messaging {
1910
1947
  payload
1911
1948
  );
1912
1949
  }
1950
+
1913
1951
  /**
1914
1952
  * Get a topic by its unique ID.
1915
-
1953
+ *
1916
1954
  *
1917
1955
  * @param {string} topicId
1918
1956
  * @throws {AppwriteException}
@@ -1936,9 +1974,10 @@ export class Messaging {
1936
1974
  payload
1937
1975
  );
1938
1976
  }
1977
+
1939
1978
  /**
1940
1979
  * Update a topic by its unique ID.
1941
-
1980
+ *
1942
1981
  *
1943
1982
  * @param {string} topicId
1944
1983
  * @param {string} name
@@ -1971,6 +2010,7 @@ export class Messaging {
1971
2010
  payload
1972
2011
  );
1973
2012
  }
2013
+
1974
2014
  /**
1975
2015
  * Delete a topic by its unique ID.
1976
2016
  *
@@ -1997,6 +2037,7 @@ export class Messaging {
1997
2037
  payload
1998
2038
  );
1999
2039
  }
2040
+
2000
2041
  /**
2001
2042
  * Get the topic activity logs listed by its unique ID.
2002
2043
  *
@@ -2026,6 +2067,7 @@ export class Messaging {
2026
2067
  payload
2027
2068
  );
2028
2069
  }
2070
+
2029
2071
  /**
2030
2072
  * Get a list of all subscribers from the current Appwrite project.
2031
2073
  *
@@ -2059,6 +2101,7 @@ export class Messaging {
2059
2101
  payload
2060
2102
  );
2061
2103
  }
2104
+
2062
2105
  /**
2063
2106
  * Create a new subscriber.
2064
2107
  *
@@ -2099,9 +2142,10 @@ export class Messaging {
2099
2142
  payload
2100
2143
  );
2101
2144
  }
2145
+
2102
2146
  /**
2103
2147
  * Get a subscriber by its unique ID.
2104
-
2148
+ *
2105
2149
  *
2106
2150
  * @param {string} topicId
2107
2151
  * @param {string} subscriberId
@@ -2129,6 +2173,7 @@ export class Messaging {
2129
2173
  payload
2130
2174
  );
2131
2175
  }
2176
+
2132
2177
  /**
2133
2178
  * Delete a subscriber by its unique ID.
2134
2179
  *
@@ -38,6 +38,7 @@ export class Migrations {
38
38
  payload
39
39
  );
40
40
  }
41
+
41
42
  /**
42
43
  * Migrate data from another Appwrite project to your current project. This endpoint allows you to migrate resources like databases, collections, documents, users, and files from an existing Appwrite project.
43
44
  *
@@ -88,6 +89,7 @@ export class Migrations {
88
89
  payload
89
90
  );
90
91
  }
92
+
91
93
  /**
92
94
  * Generate a report of the data in an Appwrite project before migrating. This endpoint analyzes the source project and returns information about the resources that can be migrated.
93
95
  *
@@ -137,6 +139,7 @@ export class Migrations {
137
139
  payload
138
140
  );
139
141
  }
142
+
140
143
  /**
141
144
  * Import documents from a CSV file into your Appwrite database. This endpoint allows you to import documents from a CSV file uploaded to Appwrite Storage bucket.
142
145
  *
@@ -180,6 +183,7 @@ export class Migrations {
180
183
  payload
181
184
  );
182
185
  }
186
+
183
187
  /**
184
188
  * Migrate data from a Firebase project to your Appwrite project. This endpoint allows you to migrate resources like authentication and other supported services from a Firebase project.
185
189
  *
@@ -216,6 +220,7 @@ export class Migrations {
216
220
  payload
217
221
  );
218
222
  }
223
+
219
224
  /**
220
225
  * Generate a report of the data in a Firebase project before migrating. This endpoint analyzes the source project and returns information about the resources that can be migrated.
221
226
  *
@@ -251,6 +256,7 @@ export class Migrations {
251
256
  payload
252
257
  );
253
258
  }
259
+
254
260
  /**
255
261
  * Migrate data from an NHost project to your Appwrite project. This endpoint allows you to migrate resources like authentication, databases, and other supported services from an NHost project.
256
262
  *
@@ -326,6 +332,7 @@ export class Migrations {
326
332
  payload
327
333
  );
328
334
  }
335
+
329
336
  /**
330
337
  * Generate a detailed report of the data in an NHost project before migrating. This endpoint analyzes the source project and returns information about the resources that can be migrated.
331
338
  *
@@ -400,6 +407,7 @@ export class Migrations {
400
407
  payload
401
408
  );
402
409
  }
410
+
403
411
  /**
404
412
  * Migrate data from a Supabase project to your Appwrite project. This endpoint allows you to migrate resources like authentication, databases, and other supported services from a Supabase project.
405
413
  *
@@ -468,6 +476,7 @@ export class Migrations {
468
476
  payload
469
477
  );
470
478
  }
479
+
471
480
  /**
472
481
  * Generate a report of the data in a Supabase project before migrating. This endpoint analyzes the source project and returns information about the resources that can be migrated.
473
482
  *
@@ -535,6 +544,7 @@ export class Migrations {
535
544
  payload
536
545
  );
537
546
  }
547
+
538
548
  /**
539
549
  * Get a migration by its unique ID. This endpoint returns detailed information about a specific migration including its current status, progress, and any errors that occurred during the migration process.
540
550
  *
@@ -560,6 +570,7 @@ export class Migrations {
560
570
  payload
561
571
  );
562
572
  }
573
+
563
574
  /**
564
575
  * Retry a failed migration. This endpoint allows you to retry a migration that has previously failed.
565
576
  *
@@ -586,6 +597,7 @@ export class Migrations {
586
597
  payload
587
598
  );
588
599
  }
600
+
589
601
  /**
590
602
  * Delete a migration by its unique ID. This endpoint allows you to remove a migration from your project's migration history.
591
603
  *