@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
@@ -1,17 +0,0 @@
1
- ```javascript
2
- import { Client, DocumentsDB, 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 documentsDB = new DocumentsDB(client);
9
-
10
- const result = await documentsDB.getCollectionUsage({
11
- databaseId: '<DATABASE_ID>',
12
- collectionId: '<COLLECTION_ID>',
13
- range: UsageRange.TwentyFourHours // optional
14
- });
15
-
16
- console.log(result);
17
- ```
@@ -1,16 +0,0 @@
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.getCollection({
11
- databaseId: '<DATABASE_ID>',
12
- collectionId: '<COLLECTION_ID>'
13
- });
14
-
15
- console.log(result);
16
- ```
@@ -1,19 +0,0 @@
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.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
- ```
@@ -1,17 +0,0 @@
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.getIndex({
11
- databaseId: '<DATABASE_ID>',
12
- collectionId: '<COLLECTION_ID>',
13
- key: ''
14
- });
15
-
16
- console.log(result);
17
- ```
@@ -1,15 +0,0 @@
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.getTransaction({
11
- transactionId: '<TRANSACTION_ID>'
12
- });
13
-
14
- console.log(result);
15
- ```
@@ -1,16 +0,0 @@
1
- ```javascript
2
- import { Client, DocumentsDB, 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 documentsDB = new DocumentsDB(client);
9
-
10
- const result = await documentsDB.getUsage({
11
- databaseId: '<DATABASE_ID>',
12
- range: UsageRange.TwentyFourHours // optional
13
- });
14
-
15
- console.log(result);
16
- ```
@@ -1,15 +0,0 @@
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.get({
11
- databaseId: '<DATABASE_ID>'
12
- });
13
-
14
- console.log(result);
15
- ```
@@ -1,21 +0,0 @@
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.incrementDocumentAttribute({
11
- databaseId: '<DATABASE_ID>',
12
- collectionId: '<COLLECTION_ID>',
13
- documentId: '<DOCUMENT_ID>',
14
- attribute: '',
15
- value: null, // optional
16
- max: null, // optional
17
- transactionId: '<TRANSACTION_ID>' // optional
18
- });
19
-
20
- console.log(result);
21
- ```
@@ -1,17 +0,0 @@
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.listCollectionLogs({
11
- databaseId: '<DATABASE_ID>',
12
- collectionId: '<COLLECTION_ID>',
13
- queries: [] // optional
14
- });
15
-
16
- console.log(result);
17
- ```
@@ -1,18 +0,0 @@
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.listCollections({
11
- databaseId: '<DATABASE_ID>',
12
- queries: [], // optional
13
- search: '<SEARCH>', // optional
14
- total: false // optional
15
- });
16
-
17
- console.log(result);
18
- ```
@@ -1,18 +0,0 @@
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.listDocumentLogs({
11
- databaseId: '<DATABASE_ID>',
12
- collectionId: '<COLLECTION_ID>',
13
- documentId: '<DOCUMENT_ID>',
14
- queries: [] // optional
15
- });
16
-
17
- console.log(result);
18
- ```
@@ -1,20 +0,0 @@
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.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
- ```
@@ -1,18 +0,0 @@
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.listIndexes({
11
- databaseId: '<DATABASE_ID>',
12
- collectionId: '<COLLECTION_ID>',
13
- queries: [], // optional
14
- total: false // optional
15
- });
16
-
17
- console.log(result);
18
- ```
@@ -1,15 +0,0 @@
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.listTransactions({
11
- queries: [] // optional
12
- });
13
-
14
- console.log(result);
15
- ```
@@ -1,15 +0,0 @@
1
- ```javascript
2
- import { Client, DocumentsDB, 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 documentsDB = new DocumentsDB(client);
9
-
10
- const result = await documentsDB.listUsage({
11
- range: UsageRange.TwentyFourHours // optional
12
- });
13
-
14
- console.log(result);
15
- ```
@@ -1,17 +0,0 @@
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.list({
11
- queries: [], // optional
12
- search: '<SEARCH>', // optional
13
- total: false // optional
14
- });
15
-
16
- console.log(result);
17
- ```
@@ -1,20 +0,0 @@
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.updateCollection({
11
- databaseId: '<DATABASE_ID>',
12
- collectionId: '<COLLECTION_ID>',
13
- name: '<NAME>',
14
- permissions: [Permission.read(Role.any())], // optional
15
- documentSecurity: false, // optional
16
- enabled: false // optional
17
- });
18
-
19
- console.log(result);
20
- ```
@@ -1,20 +0,0 @@
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.updateDocument({
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
- ```
@@ -1,19 +0,0 @@
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.updateDocuments({
11
- databaseId: '<DATABASE_ID>',
12
- collectionId: '<COLLECTION_ID>',
13
- data: {}, // optional
14
- queries: [], // optional
15
- transactionId: '<TRANSACTION_ID>' // optional
16
- });
17
-
18
- console.log(result);
19
- ```
@@ -1,17 +0,0 @@
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.updateTransaction({
11
- transactionId: '<TRANSACTION_ID>',
12
- commit: false, // optional
13
- rollback: false // optional
14
- });
15
-
16
- console.log(result);
17
- ```
@@ -1,17 +0,0 @@
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
- ```
@@ -1,20 +0,0 @@
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
- ```
@@ -1,18 +0,0 @@
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
- ```
@@ -1,16 +0,0 @@
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.confirmTransferIn({
11
- domainId: '<DOMAIN_ID>',
12
- organizationId: '<ORGANIZATION_ID>'
13
- });
14
-
15
- console.log(result);
16
- ```
@@ -1,22 +0,0 @@
1
- ```javascript
2
- import { Client, Projects } 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 projects = new Projects(client);
9
-
10
- const result = await projects.createWebhook({
11
- projectId: '<PROJECT_ID>',
12
- name: '<NAME>',
13
- events: [],
14
- url: '',
15
- security: false,
16
- enabled: false, // optional
17
- httpUser: '<HTTP_USER>', // optional
18
- httpPass: '<HTTP_PASS>' // optional
19
- });
20
-
21
- console.log(result);
22
- ```
@@ -1,16 +0,0 @@
1
- ```javascript
2
- import { Client, Projects } 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 projects = new Projects(client);
9
-
10
- const result = await projects.deleteWebhook({
11
- projectId: '<PROJECT_ID>',
12
- webhookId: '<WEBHOOK_ID>'
13
- });
14
-
15
- console.log(result);
16
- ```
@@ -1,16 +0,0 @@
1
- ```javascript
2
- import { Client, Projects } 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 projects = new Projects(client);
9
-
10
- const result = await projects.getWebhook({
11
- projectId: '<PROJECT_ID>',
12
- webhookId: '<WEBHOOK_ID>'
13
- });
14
-
15
- console.log(result);
16
- ```
@@ -1,16 +0,0 @@
1
- ```javascript
2
- import { Client, Projects } 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 projects = new Projects(client);
9
-
10
- const result = await projects.listWebhooks({
11
- projectId: '<PROJECT_ID>',
12
- total: false // optional
13
- });
14
-
15
- console.log(result);
16
- ```
@@ -1,16 +0,0 @@
1
- ```javascript
2
- import { Client, Projects } 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 projects = new Projects(client);
9
-
10
- const result = await projects.updateWebhookSignature({
11
- projectId: '<PROJECT_ID>',
12
- webhookId: '<WEBHOOK_ID>'
13
- });
14
-
15
- console.log(result);
16
- ```
@@ -1,23 +0,0 @@
1
- ```javascript
2
- import { Client, Projects } 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 projects = new Projects(client);
9
-
10
- const result = await projects.updateWebhook({
11
- projectId: '<PROJECT_ID>',
12
- webhookId: '<WEBHOOK_ID>',
13
- name: '<NAME>',
14
- events: [],
15
- url: '',
16
- security: false,
17
- enabled: false, // optional
18
- httpUser: '<HTTP_USER>', // optional
19
- httpPass: '<HTTP_PASS>' // optional
20
- });
21
-
22
- console.log(result);
23
- ```
@@ -1,21 +0,0 @@
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
- ```
@@ -1,29 +0,0 @@
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
- ```
@@ -1,17 +0,0 @@
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
- ```