@appwrite.io/console 7.0.0-rc.1 → 8.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 (136) hide show
  1. package/.github/workflows/autoclose.yml +11 -0
  2. package/CHANGELOG.md +23 -0
  3. package/README.md +2 -2
  4. package/dist/cjs/sdk.js +10580 -13225
  5. package/dist/cjs/sdk.js.map +1 -1
  6. package/dist/esm/sdk.js +10709 -13348
  7. package/dist/esm/sdk.js.map +1 -1
  8. package/dist/iife/sdk.js +10304 -12936
  9. package/docs/examples/domains/create-purchase.md +2 -1
  10. package/docs/examples/domains/create-transfer-in.md +2 -1
  11. package/docs/examples/domains/{confirm-purchase.md → update-auto-renewal.md} +2 -2
  12. package/docs/examples/project/create-variable.md +1 -0
  13. package/docs/examples/project/list-variables.md +4 -1
  14. package/docs/examples/project/update-variable.md +1 -1
  15. package/docs/examples/{documentsdb/delete.md → users/update-impersonator.md} +5 -4
  16. package/package.json +7 -7
  17. package/rollup.config.js +2 -1
  18. package/src/client.ts +50 -2
  19. package/src/enums/build-runtime.ts +0 -92
  20. package/src/enums/runtime.ts +0 -92
  21. package/src/enums/runtimes.ts +0 -92
  22. package/src/enums/scopes.ts +13 -2
  23. package/src/enums/template-reference-type.ts +1 -1
  24. package/src/enums/use-cases.ts +7 -2
  25. package/src/index.ts +0 -5
  26. package/src/models.ts +23 -435
  27. package/src/services/domains.ts +103 -26
  28. package/src/services/project.ts +76 -33
  29. package/src/services/users.ts +67 -2
  30. package/types/channel.d.ts +3 -3
  31. package/types/client.d.ts +37 -4
  32. package/types/enums/build-runtime.d.ts +1 -93
  33. package/types/enums/runtime.d.ts +1 -93
  34. package/types/enums/runtimes.d.ts +1 -93
  35. package/types/enums/scopes.d.ts +14 -3
  36. package/types/enums/template-reference-type.d.ts +1 -1
  37. package/types/enums/use-cases.d.ts +7 -2
  38. package/types/index.d.ts +0 -5
  39. package/types/models.d.ts +23 -423
  40. package/types/operator.d.ts +3 -3
  41. package/types/query.d.ts +4 -4
  42. package/types/services/domains.d.ts +42 -14
  43. package/types/services/project.d.ts +37 -19
  44. package/types/services/realtime.d.ts +6 -6
  45. package/types/services/users.d.ts +26 -2
  46. package/docs/examples/documentsdb/create-collection.md +0 -22
  47. package/docs/examples/documentsdb/create-document.md +0 -25
  48. package/docs/examples/documentsdb/create-documents.md +0 -17
  49. package/docs/examples/documentsdb/create-index.md +0 -21
  50. package/docs/examples/documentsdb/create-transaction.md +0 -15
  51. package/docs/examples/documentsdb/create.md +0 -17
  52. package/docs/examples/documentsdb/decrement-document-attribute.md +0 -21
  53. package/docs/examples/documentsdb/delete-collection.md +0 -16
  54. package/docs/examples/documentsdb/delete-document.md +0 -18
  55. package/docs/examples/documentsdb/delete-documents.md +0 -18
  56. package/docs/examples/documentsdb/delete-index.md +0 -17
  57. package/docs/examples/documentsdb/delete-transaction.md +0 -15
  58. package/docs/examples/documentsdb/get-collection-usage.md +0 -17
  59. package/docs/examples/documentsdb/get-collection.md +0 -16
  60. package/docs/examples/documentsdb/get-document.md +0 -19
  61. package/docs/examples/documentsdb/get-index.md +0 -17
  62. package/docs/examples/documentsdb/get-transaction.md +0 -15
  63. package/docs/examples/documentsdb/get-usage.md +0 -16
  64. package/docs/examples/documentsdb/get.md +0 -15
  65. package/docs/examples/documentsdb/increment-document-attribute.md +0 -21
  66. package/docs/examples/documentsdb/list-collection-logs.md +0 -17
  67. package/docs/examples/documentsdb/list-collections.md +0 -18
  68. package/docs/examples/documentsdb/list-document-logs.md +0 -18
  69. package/docs/examples/documentsdb/list-documents.md +0 -20
  70. package/docs/examples/documentsdb/list-indexes.md +0 -18
  71. package/docs/examples/documentsdb/list-transactions.md +0 -15
  72. package/docs/examples/documentsdb/list-usage.md +0 -15
  73. package/docs/examples/documentsdb/list.md +0 -17
  74. package/docs/examples/documentsdb/update-collection.md +0 -20
  75. package/docs/examples/documentsdb/update-document.md +0 -20
  76. package/docs/examples/documentsdb/update-documents.md +0 -19
  77. package/docs/examples/documentsdb/update-transaction.md +0 -17
  78. package/docs/examples/documentsdb/update.md +0 -17
  79. package/docs/examples/documentsdb/upsert-document.md +0 -20
  80. package/docs/examples/documentsdb/upsert-documents.md +0 -18
  81. package/docs/examples/domains/confirm-transfer-in.md +0 -16
  82. package/docs/examples/projects/create-webhook.md +0 -22
  83. package/docs/examples/projects/delete-webhook.md +0 -16
  84. package/docs/examples/projects/get-webhook.md +0 -16
  85. package/docs/examples/projects/list-webhooks.md +0 -16
  86. package/docs/examples/projects/update-webhook-signature.md +0 -16
  87. package/docs/examples/projects/update-webhook.md +0 -23
  88. package/docs/examples/vectorsdb/create-collection.md +0 -21
  89. package/docs/examples/vectorsdb/create-document.md +0 -29
  90. package/docs/examples/vectorsdb/create-documents.md +0 -17
  91. package/docs/examples/vectorsdb/create-index.md +0 -21
  92. package/docs/examples/vectorsdb/create-operations.md +0 -26
  93. package/docs/examples/vectorsdb/create-text-embeddings.md +0 -16
  94. package/docs/examples/vectorsdb/create-transaction.md +0 -15
  95. package/docs/examples/vectorsdb/create.md +0 -17
  96. package/docs/examples/vectorsdb/delete-collection.md +0 -16
  97. package/docs/examples/vectorsdb/delete-document.md +0 -18
  98. package/docs/examples/vectorsdb/delete-documents.md +0 -18
  99. package/docs/examples/vectorsdb/delete-index.md +0 -17
  100. package/docs/examples/vectorsdb/delete-transaction.md +0 -15
  101. package/docs/examples/vectorsdb/delete.md +0 -15
  102. package/docs/examples/vectorsdb/get-collection-usage.md +0 -17
  103. package/docs/examples/vectorsdb/get-collection.md +0 -16
  104. package/docs/examples/vectorsdb/get-document.md +0 -19
  105. package/docs/examples/vectorsdb/get-index.md +0 -17
  106. package/docs/examples/vectorsdb/get-transaction.md +0 -15
  107. package/docs/examples/vectorsdb/get-usage.md +0 -16
  108. package/docs/examples/vectorsdb/get.md +0 -15
  109. package/docs/examples/vectorsdb/list-collection-logs.md +0 -17
  110. package/docs/examples/vectorsdb/list-collections.md +0 -18
  111. package/docs/examples/vectorsdb/list-documents.md +0 -20
  112. package/docs/examples/vectorsdb/list-indexes.md +0 -18
  113. package/docs/examples/vectorsdb/list-transactions.md +0 -15
  114. package/docs/examples/vectorsdb/list-usage.md +0 -15
  115. package/docs/examples/vectorsdb/list.md +0 -17
  116. package/docs/examples/vectorsdb/update-collection.md +0 -21
  117. package/docs/examples/vectorsdb/update-document.md +0 -20
  118. package/docs/examples/vectorsdb/update-documents.md +0 -19
  119. package/docs/examples/vectorsdb/update-transaction.md +0 -17
  120. package/docs/examples/vectorsdb/update.md +0 -17
  121. package/docs/examples/vectorsdb/upsert-document.md +0 -20
  122. package/docs/examples/vectorsdb/upsert-documents.md +0 -18
  123. package/src/enums/documents-db-index-type.ts +0 -6
  124. package/src/enums/domain-purchase-payment-status.ts +0 -10
  125. package/src/enums/domain-transfer-status-status.ts +0 -10
  126. package/src/enums/model.ts +0 -3
  127. package/src/enums/vectors-db-index-type.ts +0 -8
  128. package/src/services/documents-db.ts +0 -2608
  129. package/src/services/vectors-db.ts +0 -2406
  130. package/types/enums/documents-db-index-type.d.ts +0 -6
  131. package/types/enums/domain-purchase-payment-status.d.ts +0 -10
  132. package/types/enums/domain-transfer-status-status.d.ts +0 -10
  133. package/types/enums/model.d.ts +0 -3
  134. package/types/enums/vectors-db-index-type.d.ts +0 -8
  135. package/types/services/documents-db.d.ts +0 -977
  136. package/types/services/vectors-db.d.ts +0 -854
package/src/models.ts CHANGED
@@ -330,20 +330,6 @@ export namespace Models {
330
330
  frameworkProviderRepositories: ProviderRepositoryFramework[];
331
331
  }
332
332
 
333
- /**
334
- * Runtime Provider Repositories List
335
- */
336
- export type ProviderRepositoryRuntimeList = {
337
- /**
338
- * Total number of runtimeProviderRepositories that matched your query.
339
- */
340
- total: number;
341
- /**
342
- * List of runtimeProviderRepositories.
343
- */
344
- runtimeProviderRepositories: ProviderRepositoryRuntime[];
345
- }
346
-
347
333
  /**
348
334
  * Branches List
349
335
  */
@@ -750,34 +736,6 @@ export namespace Models {
750
736
  contents: VcsContent[];
751
737
  }
752
738
 
753
- /**
754
- * VectorsDB Collections List
755
- */
756
- export type VectorsdbCollectionList = {
757
- /**
758
- * Total number of collections that matched your query.
759
- */
760
- total: number;
761
- /**
762
- * List of collections.
763
- */
764
- collections: VectorsdbCollection[];
765
- }
766
-
767
- /**
768
- * Embedding list
769
- */
770
- export type EmbeddingList = {
771
- /**
772
- * Total number of embeddings that matched your query.
773
- */
774
- total: number;
775
- /**
776
- * List of embeddings.
777
- */
778
- embeddings: Embedding[];
779
- }
780
-
781
739
  /**
782
740
  * Database
783
741
  */
@@ -816,28 +774,6 @@ export namespace Models {
816
774
  archives: Collection[];
817
775
  }
818
776
 
819
- /**
820
- * Embedding
821
- */
822
- export type Embedding = {
823
- /**
824
- * Embedding model used to generate embeddings.
825
- */
826
- model: string;
827
- /**
828
- * Number of dimensions for each embedding vector.
829
- */
830
- dimension: number;
831
- /**
832
- * Embedding vector values. If an error occurs, this will be an empty array.
833
- */
834
- embedding: number[];
835
- /**
836
- * Error message if embedding generation fails. Empty string if no error.
837
- */
838
- error: string;
839
- }
840
-
841
777
  /**
842
778
  * Collection
843
779
  */
@@ -1708,302 +1644,6 @@ export namespace Models {
1708
1644
  encrypt?: boolean;
1709
1645
  }
1710
1646
 
1711
- /**
1712
- * UsageDocumentsDB
1713
- */
1714
- export type UsageDocumentsDB = {
1715
- /**
1716
- * Time range of the usage stats.
1717
- */
1718
- range: string;
1719
- /**
1720
- * Total aggregated number of collections.
1721
- */
1722
- collectionsTotal: number;
1723
- /**
1724
- * Total aggregated number of documents.
1725
- */
1726
- documentsTotal: number;
1727
- /**
1728
- * Total aggregated storage used in bytes.
1729
- */
1730
- storageTotal: number;
1731
- /**
1732
- * Total number of database reads.
1733
- */
1734
- databaseReadsTotal: number;
1735
- /**
1736
- * Total number of database writes.
1737
- */
1738
- databaseWritesTotal: number;
1739
- /**
1740
- * Aggregated number of collections per period.
1741
- */
1742
- collections: Metric[];
1743
- /**
1744
- * Aggregated number of documents per period.
1745
- */
1746
- documents: Metric[];
1747
- /**
1748
- * Aggregated storage used in bytes per period.
1749
- */
1750
- storage: Metric[];
1751
- /**
1752
- * An array of aggregated number of database reads.
1753
- */
1754
- databaseReads: Metric[];
1755
- /**
1756
- * An array of aggregated number of database writes.
1757
- */
1758
- databaseWrites: Metric[];
1759
- }
1760
-
1761
- /**
1762
- * VectorsDB Collection
1763
- */
1764
- export type VectorsdbCollection = {
1765
- /**
1766
- * Collection ID.
1767
- */
1768
- $id: string;
1769
- /**
1770
- * Collection creation date in ISO 8601 format.
1771
- */
1772
- $createdAt: string;
1773
- /**
1774
- * Collection update date in ISO 8601 format.
1775
- */
1776
- $updatedAt: string;
1777
- /**
1778
- * Collection permissions. [Learn more about permissions](https://appwrite.io/docs/permissions).
1779
- */
1780
- $permissions: string[];
1781
- /**
1782
- * Database ID.
1783
- */
1784
- databaseId: string;
1785
- /**
1786
- * Collection name.
1787
- */
1788
- name: string;
1789
- /**
1790
- * Collection enabled. Can be 'enabled' or 'disabled'. When disabled, the collection is inaccessible to users, but remains accessible to Server SDKs using API keys.
1791
- */
1792
- enabled: boolean;
1793
- /**
1794
- * Whether document-level permissions are enabled. [Learn more about permissions](https://appwrite.io/docs/permissions).
1795
- */
1796
- documentSecurity: boolean;
1797
- /**
1798
- * Collection attributes.
1799
- */
1800
- attributes: (Models.AttributeObject | Models.AttributeVector)[];
1801
- /**
1802
- * Collection indexes.
1803
- */
1804
- indexes: Index[];
1805
- /**
1806
- * Maximum document size in bytes. Returns 0 when no limit applies.
1807
- */
1808
- bytesMax: number;
1809
- /**
1810
- * Currently used document size in bytes based on defined attributes.
1811
- */
1812
- bytesUsed: number;
1813
- /**
1814
- * Embedding dimension.
1815
- */
1816
- dimension: number;
1817
- }
1818
-
1819
- /**
1820
- * AttributeObject
1821
- */
1822
- export type AttributeObject = {
1823
- /**
1824
- * Attribute Key.
1825
- */
1826
- key: string;
1827
- /**
1828
- * Attribute type.
1829
- */
1830
- type: string;
1831
- /**
1832
- * Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`
1833
- */
1834
- status: AttributeStatus;
1835
- /**
1836
- * Error message. Displays error generated on failure of creating or deleting an attribute.
1837
- */
1838
- error: string;
1839
- /**
1840
- * Is attribute required?
1841
- */
1842
- required: boolean;
1843
- /**
1844
- * Is attribute an array?
1845
- */
1846
- array?: boolean;
1847
- /**
1848
- * Attribute creation date in ISO 8601 format.
1849
- */
1850
- $createdAt: string;
1851
- /**
1852
- * Attribute update date in ISO 8601 format.
1853
- */
1854
- $updatedAt: string;
1855
- }
1856
-
1857
- /**
1858
- * AttributeVector
1859
- */
1860
- export type AttributeVector = {
1861
- /**
1862
- * Attribute Key.
1863
- */
1864
- key: string;
1865
- /**
1866
- * Attribute type.
1867
- */
1868
- type: string;
1869
- /**
1870
- * Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`
1871
- */
1872
- status: AttributeStatus;
1873
- /**
1874
- * Error message. Displays error generated on failure of creating or deleting an attribute.
1875
- */
1876
- error: string;
1877
- /**
1878
- * Is attribute required?
1879
- */
1880
- required: boolean;
1881
- /**
1882
- * Is attribute an array?
1883
- */
1884
- array?: boolean;
1885
- /**
1886
- * Attribute creation date in ISO 8601 format.
1887
- */
1888
- $createdAt: string;
1889
- /**
1890
- * Attribute update date in ISO 8601 format.
1891
- */
1892
- $updatedAt: string;
1893
- /**
1894
- * Vector dimensions.
1895
- */
1896
- size: number;
1897
- }
1898
-
1899
- /**
1900
- * UsageVectorsDBs
1901
- */
1902
- export type UsageVectorsDBs = {
1903
- /**
1904
- * Time range of the usage stats.
1905
- */
1906
- range: string;
1907
- /**
1908
- * Total aggregated number of VectorsDB databases.
1909
- */
1910
- databasesTotal: number;
1911
- /**
1912
- * Total aggregated number of collections.
1913
- */
1914
- collectionsTotal: number;
1915
- /**
1916
- * Total aggregated number of documents.
1917
- */
1918
- documentsTotal: number;
1919
- /**
1920
- * Total aggregated storage in bytes.
1921
- */
1922
- storageTotal: number;
1923
- /**
1924
- * Total number of database reads.
1925
- */
1926
- databasesReadsTotal: number;
1927
- /**
1928
- * Total number of database writes.
1929
- */
1930
- databasesWritesTotal: number;
1931
- /**
1932
- * Aggregated number of databases per period.
1933
- */
1934
- databases: Metric[];
1935
- /**
1936
- * Aggregated number of collections per period.
1937
- */
1938
- collections: Metric[];
1939
- /**
1940
- * Aggregated number of documents per period.
1941
- */
1942
- documents: Metric[];
1943
- /**
1944
- * Aggregated storage in bytes per period.
1945
- */
1946
- storage: Metric[];
1947
- /**
1948
- * An array of aggregated number of database reads.
1949
- */
1950
- databasesReads: Metric[];
1951
- /**
1952
- * An array of aggregated number of database writes.
1953
- */
1954
- databasesWrites: Metric[];
1955
- }
1956
-
1957
- /**
1958
- * UsageVectorsDB
1959
- */
1960
- export type UsageVectorsDB = {
1961
- /**
1962
- * Time range of the usage stats.
1963
- */
1964
- range: string;
1965
- /**
1966
- * Total aggregated number of collections.
1967
- */
1968
- collectionsTotal: number;
1969
- /**
1970
- * Total aggregated number of documents.
1971
- */
1972
- documentsTotal: number;
1973
- /**
1974
- * Total aggregated storage used in bytes.
1975
- */
1976
- storageTotal: number;
1977
- /**
1978
- * Total number of database reads.
1979
- */
1980
- databaseReadsTotal: number;
1981
- /**
1982
- * Total number of database writes.
1983
- */
1984
- databaseWritesTotal: number;
1985
- /**
1986
- * Aggregated number of collections per period.
1987
- */
1988
- collections: Metric[];
1989
- /**
1990
- * Aggregated number of documents per period.
1991
- */
1992
- documents: Metric[];
1993
- /**
1994
- * Aggregated storage used in bytes per period.
1995
- */
1996
- storage: Metric[];
1997
- /**
1998
- * An array of aggregated number of database reads.
1999
- */
2000
- databaseReads: Metric[];
2001
- /**
2002
- * An array of aggregated number of database writes.
2003
- */
2004
- databaseWrites: Metric[];
2005
- }
2006
-
2007
1647
  /**
2008
1648
  * Table
2009
1649
  */
@@ -3053,15 +2693,15 @@ export namespace Models {
3053
2693
  */
3054
2694
  event: string;
3055
2695
  /**
3056
- * User ID.
2696
+ * User ID of the actor recorded for this log. During impersonation, this is the original impersonator, not the impersonated target user.
3057
2697
  */
3058
2698
  userId: string;
3059
2699
  /**
3060
- * User Email.
2700
+ * User email of the actor recorded for this log. During impersonation, this is the original impersonator.
3061
2701
  */
3062
2702
  userEmail: string;
3063
2703
  /**
3064
- * User Name.
2704
+ * User name of the actor recorded for this log. During impersonation, this is the original impersonator.
3065
2705
  */
3066
2706
  userName: string;
3067
2707
  /**
@@ -3214,6 +2854,14 @@ export namespace Models {
3214
2854
  * Most recent access date in ISO 8601 format. This attribute is only updated again after 24 hours.
3215
2855
  */
3216
2856
  accessedAt: string;
2857
+ /**
2858
+ * Whether the user can impersonate other users.
2859
+ */
2860
+ impersonator?: boolean;
2861
+ /**
2862
+ * ID of the original actor performing the impersonation. Present only when the current request is impersonating another user. Internal audit logs attribute the action to this user, while the impersonated target is recorded only in internal audit payload data.
2863
+ */
2864
+ impersonatorUserId?: string;
3217
2865
  }
3218
2866
 
3219
2867
  /**
@@ -4451,56 +4099,6 @@ export namespace Models {
4451
4099
  framework: string;
4452
4100
  }
4453
4101
 
4454
- /**
4455
- * ProviderRepositoryRuntime
4456
- */
4457
- export type ProviderRepositoryRuntime = {
4458
- /**
4459
- * VCS (Version Control System) repository ID.
4460
- */
4461
- id: string;
4462
- /**
4463
- * VCS (Version Control System) repository name.
4464
- */
4465
- name: string;
4466
- /**
4467
- * VCS (Version Control System) organization name
4468
- */
4469
- organization: string;
4470
- /**
4471
- * VCS (Version Control System) provider name.
4472
- */
4473
- provider: string;
4474
- /**
4475
- * Is VCS (Version Control System) repository private?
4476
- */
4477
- private: boolean;
4478
- /**
4479
- * VCS (Version Control System) repository's default branch name.
4480
- */
4481
- defaultBranch: string;
4482
- /**
4483
- * VCS (Version Control System) installation ID.
4484
- */
4485
- providerInstallationId: string;
4486
- /**
4487
- * Is VCS (Version Control System) repository authorized for the installation?
4488
- */
4489
- authorized: boolean;
4490
- /**
4491
- * Last commit date in ISO 8601 format.
4492
- */
4493
- pushedAt: string;
4494
- /**
4495
- * Environment variables found in .env files
4496
- */
4497
- variables: string[];
4498
- /**
4499
- * Auto-detected runtime. Empty if type is not "runtime".
4500
- */
4501
- runtime: string;
4502
- }
4503
-
4504
4102
  /**
4505
4103
  * DetectionFramework
4506
4104
  */
@@ -4527,28 +4125,6 @@ export namespace Models {
4527
4125
  outputDirectory: string;
4528
4126
  }
4529
4127
 
4530
- /**
4531
- * DetectionRuntime
4532
- */
4533
- export type DetectionRuntime = {
4534
- /**
4535
- * Environment variables found in .env files
4536
- */
4537
- variables?: DetectionVariable[];
4538
- /**
4539
- * Runtime
4540
- */
4541
- runtime: string;
4542
- /**
4543
- * Function Entrypoint
4544
- */
4545
- entrypoint: string;
4546
- /**
4547
- * Function install and build commands
4548
- */
4549
- commands: string;
4550
- }
4551
-
4552
4128
  /**
4553
4129
  * DetectionVariable
4554
4130
  */
@@ -7955,6 +7531,10 @@ export namespace Models {
7955
7531
  * Realtime connections
7956
7532
  */
7957
7533
  realtime: number;
7534
+ /**
7535
+ * Realtime messages
7536
+ */
7537
+ realtimeMessages: number;
7958
7538
  /**
7959
7539
  * Messages per month
7960
7540
  */
@@ -9375,6 +8955,14 @@ export namespace Models {
9375
8955
  * Realtime additional resources
9376
8956
  */
9377
8957
  realtime: AdditionalResource;
8958
+ /**
8959
+ * Realtime messages additional resources
8960
+ */
8961
+ realtimeMessages: AdditionalResource;
8962
+ /**
8963
+ * Realtime bandwidth additional resources
8964
+ */
8965
+ realtimeBandwidth: AdditionalResource;
9378
8966
  /**
9379
8967
  * Storage additional resources
9380
8968
  */