@appwrite.io/console 5.0.0 → 7.0.0-rc.1

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 (137) hide show
  1. package/CHANGELOG.md +13 -0
  2. package/README.md +2 -2
  3. package/dist/cjs/sdk.js +13663 -10879
  4. package/dist/cjs/sdk.js.map +1 -1
  5. package/dist/esm/sdk.js +13661 -10880
  6. package/dist/esm/sdk.js.map +1 -1
  7. package/dist/iife/sdk.js +13268 -10484
  8. package/docs/examples/databases/create-index.md +2 -2
  9. package/docs/examples/documentsdb/create-collection.md +22 -0
  10. package/docs/examples/documentsdb/create-document.md +25 -0
  11. package/docs/examples/documentsdb/create-documents.md +17 -0
  12. package/docs/examples/documentsdb/create-index.md +21 -0
  13. package/docs/examples/documentsdb/create-transaction.md +15 -0
  14. package/docs/examples/documentsdb/create.md +17 -0
  15. package/docs/examples/documentsdb/decrement-document-attribute.md +21 -0
  16. package/docs/examples/documentsdb/delete-collection.md +16 -0
  17. package/docs/examples/documentsdb/delete-document.md +18 -0
  18. package/docs/examples/documentsdb/delete-documents.md +18 -0
  19. package/docs/examples/documentsdb/delete-index.md +17 -0
  20. package/docs/examples/documentsdb/delete-transaction.md +15 -0
  21. package/docs/examples/documentsdb/delete.md +15 -0
  22. package/docs/examples/documentsdb/get-collection-usage.md +17 -0
  23. package/docs/examples/documentsdb/get-collection.md +16 -0
  24. package/docs/examples/documentsdb/get-document.md +19 -0
  25. package/docs/examples/documentsdb/get-index.md +17 -0
  26. package/docs/examples/documentsdb/get-transaction.md +15 -0
  27. package/docs/examples/documentsdb/get-usage.md +16 -0
  28. package/docs/examples/documentsdb/get.md +15 -0
  29. package/docs/examples/documentsdb/increment-document-attribute.md +21 -0
  30. package/docs/examples/documentsdb/list-collection-logs.md +17 -0
  31. package/docs/examples/documentsdb/list-collections.md +18 -0
  32. package/docs/examples/documentsdb/list-document-logs.md +18 -0
  33. package/docs/examples/documentsdb/list-documents.md +20 -0
  34. package/docs/examples/documentsdb/list-indexes.md +18 -0
  35. package/docs/examples/documentsdb/list-transactions.md +15 -0
  36. package/docs/examples/documentsdb/list-usage.md +15 -0
  37. package/docs/examples/documentsdb/list.md +17 -0
  38. package/docs/examples/documentsdb/update-collection.md +20 -0
  39. package/docs/examples/documentsdb/update-document.md +20 -0
  40. package/docs/examples/documentsdb/update-documents.md +19 -0
  41. package/docs/examples/documentsdb/update-transaction.md +17 -0
  42. package/docs/examples/documentsdb/update.md +17 -0
  43. package/docs/examples/documentsdb/upsert-document.md +20 -0
  44. package/docs/examples/documentsdb/upsert-documents.md +18 -0
  45. package/docs/examples/domains/update-purchase.md +16 -0
  46. package/docs/examples/domains/update-transfer-in.md +16 -0
  47. package/docs/examples/tablesdb/create-index.md +2 -2
  48. package/docs/examples/vectorsdb/create-collection.md +21 -0
  49. package/docs/examples/vectorsdb/create-document.md +29 -0
  50. package/docs/examples/vectorsdb/create-documents.md +17 -0
  51. package/docs/examples/vectorsdb/create-index.md +21 -0
  52. package/docs/examples/vectorsdb/create-operations.md +26 -0
  53. package/docs/examples/vectorsdb/create-text-embeddings.md +16 -0
  54. package/docs/examples/vectorsdb/create-transaction.md +15 -0
  55. package/docs/examples/vectorsdb/create.md +17 -0
  56. package/docs/examples/vectorsdb/delete-collection.md +16 -0
  57. package/docs/examples/vectorsdb/delete-document.md +18 -0
  58. package/docs/examples/vectorsdb/delete-documents.md +18 -0
  59. package/docs/examples/vectorsdb/delete-index.md +17 -0
  60. package/docs/examples/vectorsdb/delete-transaction.md +15 -0
  61. package/docs/examples/vectorsdb/delete.md +15 -0
  62. package/docs/examples/vectorsdb/get-collection-usage.md +17 -0
  63. package/docs/examples/vectorsdb/get-collection.md +16 -0
  64. package/docs/examples/vectorsdb/get-document.md +19 -0
  65. package/docs/examples/vectorsdb/get-index.md +17 -0
  66. package/docs/examples/vectorsdb/get-transaction.md +15 -0
  67. package/docs/examples/vectorsdb/get-usage.md +16 -0
  68. package/docs/examples/vectorsdb/get.md +15 -0
  69. package/docs/examples/vectorsdb/list-collection-logs.md +17 -0
  70. package/docs/examples/vectorsdb/list-collections.md +18 -0
  71. package/docs/examples/vectorsdb/list-documents.md +20 -0
  72. package/docs/examples/vectorsdb/list-indexes.md +18 -0
  73. package/docs/examples/vectorsdb/list-transactions.md +15 -0
  74. package/docs/examples/vectorsdb/list-usage.md +15 -0
  75. package/docs/examples/vectorsdb/list.md +17 -0
  76. package/docs/examples/vectorsdb/update-collection.md +21 -0
  77. package/docs/examples/vectorsdb/update-document.md +20 -0
  78. package/docs/examples/vectorsdb/update-documents.md +19 -0
  79. package/docs/examples/vectorsdb/update-transaction.md +17 -0
  80. package/docs/examples/vectorsdb/update.md +17 -0
  81. package/docs/examples/vectorsdb/upsert-document.md +20 -0
  82. package/docs/examples/vectorsdb/upsert-documents.md +18 -0
  83. package/docs/examples/webhooks/create.md +22 -0
  84. package/docs/examples/webhooks/delete.md +15 -0
  85. package/docs/examples/webhooks/get.md +15 -0
  86. package/docs/examples/webhooks/list.md +16 -0
  87. package/docs/examples/webhooks/update-signature.md +15 -0
  88. package/docs/examples/webhooks/update.md +22 -0
  89. package/package.json +1 -1
  90. package/src/client.ts +1 -1
  91. package/src/enums/appwrite-migration-resource.ts +2 -0
  92. package/src/enums/backup-services.ts +3 -0
  93. package/src/enums/build-runtime.ts +89 -0
  94. package/src/enums/database-type.ts +2 -0
  95. package/src/enums/databases-index-type.ts +6 -0
  96. package/src/enums/documents-db-index-type.ts +6 -0
  97. package/src/enums/domain-purchase-status.ts +6 -0
  98. package/src/enums/domain-transfer-status-enum.ts +10 -0
  99. package/src/enums/model.ts +3 -0
  100. package/src/enums/runtime.ts +89 -0
  101. package/src/enums/runtimes.ts +89 -0
  102. package/src/enums/scopes.ts +2 -0
  103. package/src/enums/{index-type.ts → tables-db-index-type.ts} +1 -1
  104. package/src/enums/vectors-db-index-type.ts +8 -0
  105. package/src/index.ts +11 -4
  106. package/src/models.ts +519 -19
  107. package/src/services/databases.ts +10 -10
  108. package/src/services/documents-db.ts +2608 -0
  109. package/src/services/domains.ts +30 -30
  110. package/src/services/projects.ts +0 -473
  111. package/src/services/tables-db.ts +10 -10
  112. package/src/services/vectors-db.ts +2406 -0
  113. package/src/services/webhooks.ts +451 -0
  114. package/types/enums/appwrite-migration-resource.d.ts +2 -0
  115. package/types/enums/backup-services.d.ts +3 -0
  116. package/types/enums/build-runtime.d.ts +90 -1
  117. package/types/enums/database-type.d.ts +3 -1
  118. package/types/enums/databases-index-type.d.ts +6 -0
  119. package/types/enums/documents-db-index-type.d.ts +6 -0
  120. package/types/enums/domain-purchase-status.d.ts +6 -0
  121. package/types/enums/domain-transfer-status-enum.d.ts +10 -0
  122. package/types/enums/model.d.ts +3 -0
  123. package/types/enums/runtime.d.ts +90 -1
  124. package/types/enums/runtimes.d.ts +90 -1
  125. package/types/enums/scopes.d.ts +2 -0
  126. package/types/enums/{index-type.d.ts → tables-db-index-type.d.ts} +1 -1
  127. package/types/enums/vectors-db-index-type.d.ts +8 -0
  128. package/types/index.d.ts +11 -4
  129. package/types/models.d.ts +509 -19
  130. package/types/services/databases.d.ts +5 -5
  131. package/types/services/documents-db.d.ts +977 -0
  132. package/types/services/domains.d.ts +22 -22
  133. package/types/services/projects.d.ts +0 -171
  134. package/types/services/tables-db.d.ts +5 -5
  135. package/types/services/vectors-db.d.ts +854 -0
  136. package/types/services/webhooks.d.ts +165 -0
  137. package/.github/workflows/autoclose.yml +0 -11
@@ -0,0 +1,17 @@
1
+ ```javascript
2
+ import { Client, DocumentsDB } from "@appwrite.io/console";
3
+
4
+ const client = new Client()
5
+ .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint
6
+ .setProject('<YOUR_PROJECT_ID>'); // Your project ID
7
+
8
+ const documentsDB = new DocumentsDB(client);
9
+
10
+ const result = await documentsDB.update({
11
+ databaseId: '<DATABASE_ID>',
12
+ name: '<NAME>',
13
+ enabled: false // optional
14
+ });
15
+
16
+ console.log(result);
17
+ ```
@@ -0,0 +1,20 @@
1
+ ```javascript
2
+ import { Client, DocumentsDB, Permission, Role } from "@appwrite.io/console";
3
+
4
+ const client = new Client()
5
+ .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint
6
+ .setProject('<YOUR_PROJECT_ID>'); // Your project ID
7
+
8
+ const documentsDB = new DocumentsDB(client);
9
+
10
+ const result = await documentsDB.upsertDocument({
11
+ databaseId: '<DATABASE_ID>',
12
+ collectionId: '<COLLECTION_ID>',
13
+ documentId: '<DOCUMENT_ID>',
14
+ data: {}, // optional
15
+ permissions: [Permission.read(Role.any())], // optional
16
+ transactionId: '<TRANSACTION_ID>' // optional
17
+ });
18
+
19
+ console.log(result);
20
+ ```
@@ -0,0 +1,18 @@
1
+ ```javascript
2
+ import { Client, DocumentsDB } from "@appwrite.io/console";
3
+
4
+ const client = new Client()
5
+ .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint
6
+ .setProject('<YOUR_PROJECT_ID>'); // Your project ID
7
+
8
+ const documentsDB = new DocumentsDB(client);
9
+
10
+ const result = await documentsDB.upsertDocuments({
11
+ databaseId: '<DATABASE_ID>',
12
+ collectionId: '<COLLECTION_ID>',
13
+ documents: [],
14
+ transactionId: '<TRANSACTION_ID>' // optional
15
+ });
16
+
17
+ console.log(result);
18
+ ```
@@ -0,0 +1,16 @@
1
+ ```javascript
2
+ import { Client, Domains } from "@appwrite.io/console";
3
+
4
+ const client = new Client()
5
+ .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint
6
+ .setProject('<YOUR_PROJECT_ID>'); // Your project ID
7
+
8
+ const domains = new Domains(client);
9
+
10
+ const result = await domains.updatePurchase({
11
+ domainId: '<DOMAIN_ID>',
12
+ organizationId: '<ORGANIZATION_ID>'
13
+ });
14
+
15
+ console.log(result);
16
+ ```
@@ -0,0 +1,16 @@
1
+ ```javascript
2
+ import { Client, Domains } from "@appwrite.io/console";
3
+
4
+ const client = new Client()
5
+ .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint
6
+ .setProject('<YOUR_PROJECT_ID>'); // Your project ID
7
+
8
+ const domains = new Domains(client);
9
+
10
+ const result = await domains.updateTransferIn({
11
+ domainId: '<DOMAIN_ID>',
12
+ organizationId: '<ORGANIZATION_ID>'
13
+ });
14
+
15
+ console.log(result);
16
+ ```
@@ -1,5 +1,5 @@
1
1
  ```javascript
2
- import { Client, TablesDB, IndexType, OrderBy } from "@appwrite.io/console";
2
+ import { Client, TablesDB, TablesDBIndexType, OrderBy } from "@appwrite.io/console";
3
3
 
4
4
  const client = new Client()
5
5
  .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint
@@ -11,7 +11,7 @@ const result = await tablesDB.createIndex({
11
11
  databaseId: '<DATABASE_ID>',
12
12
  tableId: '<TABLE_ID>',
13
13
  key: '',
14
- type: IndexType.Key,
14
+ type: TablesDBIndexType.Key,
15
15
  columns: [],
16
16
  orders: [OrderBy.Asc], // optional
17
17
  lengths: [] // optional
@@ -0,0 +1,21 @@
1
+ ```javascript
2
+ import { Client, VectorsDB, Permission, Role } from "@appwrite.io/console";
3
+
4
+ const client = new Client()
5
+ .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint
6
+ .setProject('<YOUR_PROJECT_ID>'); // Your project ID
7
+
8
+ const vectorsDB = new VectorsDB(client);
9
+
10
+ const result = await vectorsDB.createCollection({
11
+ databaseId: '<DATABASE_ID>',
12
+ collectionId: '<COLLECTION_ID>',
13
+ name: '<NAME>',
14
+ dimension: 1,
15
+ permissions: [Permission.read(Role.any())], // optional
16
+ documentSecurity: false, // optional
17
+ enabled: false // optional
18
+ });
19
+
20
+ console.log(result);
21
+ ```
@@ -0,0 +1,29 @@
1
+ ```javascript
2
+ import { Client, VectorsDB, Permission, Role } from "@appwrite.io/console";
3
+
4
+ const client = new Client()
5
+ .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint
6
+ .setProject('<YOUR_PROJECT_ID>'); // Your project ID
7
+
8
+ const vectorsDB = new VectorsDB(client);
9
+
10
+ const result = await vectorsDB.createDocument({
11
+ databaseId: '<DATABASE_ID>',
12
+ collectionId: '<COLLECTION_ID>',
13
+ documentId: '<DOCUMENT_ID>',
14
+ data: {
15
+ "embeddings": [
16
+ 0.12,
17
+ -0.55,
18
+ 0.88,
19
+ 1.02
20
+ ],
21
+ "metadata": {
22
+ "key": "value"
23
+ }
24
+ },
25
+ permissions: [Permission.read(Role.any())] // optional
26
+ });
27
+
28
+ console.log(result);
29
+ ```
@@ -0,0 +1,17 @@
1
+ ```javascript
2
+ import { Client, VectorsDB } from "@appwrite.io/console";
3
+
4
+ const client = new Client()
5
+ .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint
6
+ .setProject('<YOUR_PROJECT_ID>'); // Your project ID
7
+
8
+ const vectorsDB = new VectorsDB(client);
9
+
10
+ const result = await vectorsDB.createDocuments({
11
+ databaseId: '<DATABASE_ID>',
12
+ collectionId: '<COLLECTION_ID>',
13
+ documents: []
14
+ });
15
+
16
+ console.log(result);
17
+ ```
@@ -0,0 +1,21 @@
1
+ ```javascript
2
+ import { Client, VectorsDB, VectorsDBIndexType, OrderBy } from "@appwrite.io/console";
3
+
4
+ const client = new Client()
5
+ .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint
6
+ .setProject('<YOUR_PROJECT_ID>'); // Your project ID
7
+
8
+ const vectorsDB = new VectorsDB(client);
9
+
10
+ const result = await vectorsDB.createIndex({
11
+ databaseId: '<DATABASE_ID>',
12
+ collectionId: '<COLLECTION_ID>',
13
+ key: '',
14
+ type: VectorsDBIndexType.HnswEuclidean,
15
+ attributes: [],
16
+ orders: [OrderBy.Asc], // optional
17
+ lengths: [] // optional
18
+ });
19
+
20
+ console.log(result);
21
+ ```
@@ -0,0 +1,26 @@
1
+ ```javascript
2
+ import { Client, VectorsDB } from "@appwrite.io/console";
3
+
4
+ const client = new Client()
5
+ .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint
6
+ .setProject('<YOUR_PROJECT_ID>'); // Your project ID
7
+
8
+ const vectorsDB = new VectorsDB(client);
9
+
10
+ const result = await vectorsDB.createOperations({
11
+ transactionId: '<TRANSACTION_ID>',
12
+ operations: [
13
+ {
14
+ "action": "create",
15
+ "databaseId": "<DATABASE_ID>",
16
+ "collectionId": "<COLLECTION_ID>",
17
+ "documentId": "<DOCUMENT_ID>",
18
+ "data": {
19
+ "name": "Walter O'Brien"
20
+ }
21
+ }
22
+ ] // optional
23
+ });
24
+
25
+ console.log(result);
26
+ ```
@@ -0,0 +1,16 @@
1
+ ```javascript
2
+ import { Client, VectorsDB, Model } from "@appwrite.io/console";
3
+
4
+ const client = new Client()
5
+ .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint
6
+ .setProject('<YOUR_PROJECT_ID>'); // Your project ID
7
+
8
+ const vectorsDB = new VectorsDB(client);
9
+
10
+ const result = await vectorsDB.createTextEmbeddings({
11
+ texts: [],
12
+ model: Model.Embeddinggemma // optional
13
+ });
14
+
15
+ console.log(result);
16
+ ```
@@ -0,0 +1,15 @@
1
+ ```javascript
2
+ import { Client, VectorsDB } from "@appwrite.io/console";
3
+
4
+ const client = new Client()
5
+ .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint
6
+ .setProject('<YOUR_PROJECT_ID>'); // Your project ID
7
+
8
+ const vectorsDB = new VectorsDB(client);
9
+
10
+ const result = await vectorsDB.createTransaction({
11
+ ttl: 60 // optional
12
+ });
13
+
14
+ console.log(result);
15
+ ```
@@ -0,0 +1,17 @@
1
+ ```javascript
2
+ import { Client, VectorsDB } from "@appwrite.io/console";
3
+
4
+ const client = new Client()
5
+ .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint
6
+ .setProject('<YOUR_PROJECT_ID>'); // Your project ID
7
+
8
+ const vectorsDB = new VectorsDB(client);
9
+
10
+ const result = await vectorsDB.create({
11
+ databaseId: '<DATABASE_ID>',
12
+ name: '<NAME>',
13
+ enabled: false // optional
14
+ });
15
+
16
+ console.log(result);
17
+ ```
@@ -0,0 +1,16 @@
1
+ ```javascript
2
+ import { Client, VectorsDB } from "@appwrite.io/console";
3
+
4
+ const client = new Client()
5
+ .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint
6
+ .setProject('<YOUR_PROJECT_ID>'); // Your project ID
7
+
8
+ const vectorsDB = new VectorsDB(client);
9
+
10
+ const result = await vectorsDB.deleteCollection({
11
+ databaseId: '<DATABASE_ID>',
12
+ collectionId: '<COLLECTION_ID>'
13
+ });
14
+
15
+ console.log(result);
16
+ ```
@@ -0,0 +1,18 @@
1
+ ```javascript
2
+ import { Client, VectorsDB } from "@appwrite.io/console";
3
+
4
+ const client = new Client()
5
+ .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint
6
+ .setProject('<YOUR_PROJECT_ID>'); // Your project ID
7
+
8
+ const vectorsDB = new VectorsDB(client);
9
+
10
+ const result = await vectorsDB.deleteDocument({
11
+ databaseId: '<DATABASE_ID>',
12
+ collectionId: '<COLLECTION_ID>',
13
+ documentId: '<DOCUMENT_ID>',
14
+ transactionId: '<TRANSACTION_ID>' // optional
15
+ });
16
+
17
+ console.log(result);
18
+ ```
@@ -0,0 +1,18 @@
1
+ ```javascript
2
+ import { Client, VectorsDB } from "@appwrite.io/console";
3
+
4
+ const client = new Client()
5
+ .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint
6
+ .setProject('<YOUR_PROJECT_ID>'); // Your project ID
7
+
8
+ const vectorsDB = new VectorsDB(client);
9
+
10
+ const result = await vectorsDB.deleteDocuments({
11
+ databaseId: '<DATABASE_ID>',
12
+ collectionId: '<COLLECTION_ID>',
13
+ queries: [], // optional
14
+ transactionId: '<TRANSACTION_ID>' // optional
15
+ });
16
+
17
+ console.log(result);
18
+ ```
@@ -0,0 +1,17 @@
1
+ ```javascript
2
+ import { Client, VectorsDB } from "@appwrite.io/console";
3
+
4
+ const client = new Client()
5
+ .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint
6
+ .setProject('<YOUR_PROJECT_ID>'); // Your project ID
7
+
8
+ const vectorsDB = new VectorsDB(client);
9
+
10
+ const result = await vectorsDB.deleteIndex({
11
+ databaseId: '<DATABASE_ID>',
12
+ collectionId: '<COLLECTION_ID>',
13
+ key: ''
14
+ });
15
+
16
+ console.log(result);
17
+ ```
@@ -0,0 +1,15 @@
1
+ ```javascript
2
+ import { Client, VectorsDB } from "@appwrite.io/console";
3
+
4
+ const client = new Client()
5
+ .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint
6
+ .setProject('<YOUR_PROJECT_ID>'); // Your project ID
7
+
8
+ const vectorsDB = new VectorsDB(client);
9
+
10
+ const result = await vectorsDB.deleteTransaction({
11
+ transactionId: '<TRANSACTION_ID>'
12
+ });
13
+
14
+ console.log(result);
15
+ ```
@@ -0,0 +1,15 @@
1
+ ```javascript
2
+ import { Client, VectorsDB } from "@appwrite.io/console";
3
+
4
+ const client = new Client()
5
+ .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint
6
+ .setProject('<YOUR_PROJECT_ID>'); // Your project ID
7
+
8
+ const vectorsDB = new VectorsDB(client);
9
+
10
+ const result = await vectorsDB.delete({
11
+ databaseId: '<DATABASE_ID>'
12
+ });
13
+
14
+ console.log(result);
15
+ ```
@@ -0,0 +1,17 @@
1
+ ```javascript
2
+ import { Client, VectorsDB, UsageRange } from "@appwrite.io/console";
3
+
4
+ const client = new Client()
5
+ .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint
6
+ .setProject('<YOUR_PROJECT_ID>'); // Your project ID
7
+
8
+ const vectorsDB = new VectorsDB(client);
9
+
10
+ const result = await vectorsDB.getCollectionUsage({
11
+ databaseId: '<DATABASE_ID>',
12
+ collectionId: '<COLLECTION_ID>',
13
+ range: UsageRange.TwentyFourHours // optional
14
+ });
15
+
16
+ console.log(result);
17
+ ```
@@ -0,0 +1,16 @@
1
+ ```javascript
2
+ import { Client, VectorsDB } from "@appwrite.io/console";
3
+
4
+ const client = new Client()
5
+ .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint
6
+ .setProject('<YOUR_PROJECT_ID>'); // Your project ID
7
+
8
+ const vectorsDB = new VectorsDB(client);
9
+
10
+ const result = await vectorsDB.getCollection({
11
+ databaseId: '<DATABASE_ID>',
12
+ collectionId: '<COLLECTION_ID>'
13
+ });
14
+
15
+ console.log(result);
16
+ ```
@@ -0,0 +1,19 @@
1
+ ```javascript
2
+ import { Client, VectorsDB } from "@appwrite.io/console";
3
+
4
+ const client = new Client()
5
+ .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint
6
+ .setProject('<YOUR_PROJECT_ID>'); // Your project ID
7
+
8
+ const vectorsDB = new VectorsDB(client);
9
+
10
+ const result = await vectorsDB.getDocument({
11
+ databaseId: '<DATABASE_ID>',
12
+ collectionId: '<COLLECTION_ID>',
13
+ documentId: '<DOCUMENT_ID>',
14
+ queries: [], // optional
15
+ transactionId: '<TRANSACTION_ID>' // optional
16
+ });
17
+
18
+ console.log(result);
19
+ ```
@@ -0,0 +1,17 @@
1
+ ```javascript
2
+ import { Client, VectorsDB } from "@appwrite.io/console";
3
+
4
+ const client = new Client()
5
+ .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint
6
+ .setProject('<YOUR_PROJECT_ID>'); // Your project ID
7
+
8
+ const vectorsDB = new VectorsDB(client);
9
+
10
+ const result = await vectorsDB.getIndex({
11
+ databaseId: '<DATABASE_ID>',
12
+ collectionId: '<COLLECTION_ID>',
13
+ key: ''
14
+ });
15
+
16
+ console.log(result);
17
+ ```
@@ -0,0 +1,15 @@
1
+ ```javascript
2
+ import { Client, VectorsDB } from "@appwrite.io/console";
3
+
4
+ const client = new Client()
5
+ .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint
6
+ .setProject('<YOUR_PROJECT_ID>'); // Your project ID
7
+
8
+ const vectorsDB = new VectorsDB(client);
9
+
10
+ const result = await vectorsDB.getTransaction({
11
+ transactionId: '<TRANSACTION_ID>'
12
+ });
13
+
14
+ console.log(result);
15
+ ```
@@ -0,0 +1,16 @@
1
+ ```javascript
2
+ import { Client, VectorsDB, UsageRange } from "@appwrite.io/console";
3
+
4
+ const client = new Client()
5
+ .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint
6
+ .setProject('<YOUR_PROJECT_ID>'); // Your project ID
7
+
8
+ const vectorsDB = new VectorsDB(client);
9
+
10
+ const result = await vectorsDB.getUsage({
11
+ databaseId: '<DATABASE_ID>',
12
+ range: UsageRange.TwentyFourHours // optional
13
+ });
14
+
15
+ console.log(result);
16
+ ```
@@ -0,0 +1,15 @@
1
+ ```javascript
2
+ import { Client, VectorsDB } from "@appwrite.io/console";
3
+
4
+ const client = new Client()
5
+ .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint
6
+ .setProject('<YOUR_PROJECT_ID>'); // Your project ID
7
+
8
+ const vectorsDB = new VectorsDB(client);
9
+
10
+ const result = await vectorsDB.get({
11
+ databaseId: '<DATABASE_ID>'
12
+ });
13
+
14
+ console.log(result);
15
+ ```
@@ -0,0 +1,17 @@
1
+ ```javascript
2
+ import { Client, VectorsDB } from "@appwrite.io/console";
3
+
4
+ const client = new Client()
5
+ .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint
6
+ .setProject('<YOUR_PROJECT_ID>'); // Your project ID
7
+
8
+ const vectorsDB = new VectorsDB(client);
9
+
10
+ const result = await vectorsDB.listCollectionLogs({
11
+ databaseId: '<DATABASE_ID>',
12
+ collectionId: '<COLLECTION_ID>',
13
+ queries: [] // optional
14
+ });
15
+
16
+ console.log(result);
17
+ ```
@@ -0,0 +1,18 @@
1
+ ```javascript
2
+ import { Client, VectorsDB } from "@appwrite.io/console";
3
+
4
+ const client = new Client()
5
+ .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint
6
+ .setProject('<YOUR_PROJECT_ID>'); // Your project ID
7
+
8
+ const vectorsDB = new VectorsDB(client);
9
+
10
+ const result = await vectorsDB.listCollections({
11
+ databaseId: '<DATABASE_ID>',
12
+ queries: [], // optional
13
+ search: '<SEARCH>', // optional
14
+ total: false // optional
15
+ });
16
+
17
+ console.log(result);
18
+ ```
@@ -0,0 +1,20 @@
1
+ ```javascript
2
+ import { Client, VectorsDB } from "@appwrite.io/console";
3
+
4
+ const client = new Client()
5
+ .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint
6
+ .setProject('<YOUR_PROJECT_ID>'); // Your project ID
7
+
8
+ const vectorsDB = new VectorsDB(client);
9
+
10
+ const result = await vectorsDB.listDocuments({
11
+ databaseId: '<DATABASE_ID>',
12
+ collectionId: '<COLLECTION_ID>',
13
+ queries: [], // optional
14
+ transactionId: '<TRANSACTION_ID>', // optional
15
+ total: false, // optional
16
+ ttl: 0 // optional
17
+ });
18
+
19
+ console.log(result);
20
+ ```
@@ -0,0 +1,18 @@
1
+ ```javascript
2
+ import { Client, VectorsDB } from "@appwrite.io/console";
3
+
4
+ const client = new Client()
5
+ .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint
6
+ .setProject('<YOUR_PROJECT_ID>'); // Your project ID
7
+
8
+ const vectorsDB = new VectorsDB(client);
9
+
10
+ const result = await vectorsDB.listIndexes({
11
+ databaseId: '<DATABASE_ID>',
12
+ collectionId: '<COLLECTION_ID>',
13
+ queries: [], // optional
14
+ total: false // optional
15
+ });
16
+
17
+ console.log(result);
18
+ ```
@@ -0,0 +1,15 @@
1
+ ```javascript
2
+ import { Client, VectorsDB } from "@appwrite.io/console";
3
+
4
+ const client = new Client()
5
+ .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint
6
+ .setProject('<YOUR_PROJECT_ID>'); // Your project ID
7
+
8
+ const vectorsDB = new VectorsDB(client);
9
+
10
+ const result = await vectorsDB.listTransactions({
11
+ queries: [] // optional
12
+ });
13
+
14
+ console.log(result);
15
+ ```
@@ -0,0 +1,15 @@
1
+ ```javascript
2
+ import { Client, VectorsDB, UsageRange } from "@appwrite.io/console";
3
+
4
+ const client = new Client()
5
+ .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint
6
+ .setProject('<YOUR_PROJECT_ID>'); // Your project ID
7
+
8
+ const vectorsDB = new VectorsDB(client);
9
+
10
+ const result = await vectorsDB.listUsage({
11
+ range: UsageRange.TwentyFourHours // optional
12
+ });
13
+
14
+ console.log(result);
15
+ ```
@@ -0,0 +1,17 @@
1
+ ```javascript
2
+ import { Client, VectorsDB } from "@appwrite.io/console";
3
+
4
+ const client = new Client()
5
+ .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint
6
+ .setProject('<YOUR_PROJECT_ID>'); // Your project ID
7
+
8
+ const vectorsDB = new VectorsDB(client);
9
+
10
+ const result = await vectorsDB.list({
11
+ queries: [], // optional
12
+ search: '<SEARCH>', // optional
13
+ total: false // optional
14
+ });
15
+
16
+ console.log(result);
17
+ ```