-
Notifications
You must be signed in to change notification settings - Fork 35
feat: React Native SDK update for version 0.24.2 #94
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,18 @@ | ||
| ```javascript | ||
| import { Client, Databases } from "react-native-appwrite"; | ||
|
|
||
| const client = new Client() | ||
| .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint | ||
| .setProject('<YOUR_PROJECT_ID>'); // Your project ID | ||
|
|
||
| const databases = new Databases(client); | ||
|
|
||
| const result = await databases.upsertDocuments({ | ||
| databaseId: '<DATABASE_ID>', | ||
| collectionId: '<COLLECTION_ID>', | ||
| documents: [], | ||
| transactionId: '<TRANSACTION_ID>' // optional | ||
| }); | ||
|
|
||
| console.log(result); | ||
| ``` |
| Original file line number | Diff line number | Diff line change | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|
| @@ -0,0 +1,25 @@ | ||||||||||
| ```javascript | ||||||||||
| import { Client, DocumentsDB, Permission, Role } from "react-native-appwrite"; | ||||||||||
|
|
||||||||||
| const client = new Client() | ||||||||||
| .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint | ||||||||||
| .setProject('<YOUR_PROJECT_ID>'); // Your project ID | ||||||||||
|
|
||||||||||
| const documentsDB = new DocumentsDB(client); | ||||||||||
|
|
||||||||||
| const result = await documentsDB.createDocument({ | ||||||||||
| databaseId: '<DATABASE_ID>', | ||||||||||
| collectionId: '<COLLECTION_ID>', | ||||||||||
| documentId: '<DOCUMENT_ID>', | ||||||||||
| data: { | ||||||||||
| "username": "walter.obrien", | ||||||||||
| "email": "walter.obrien@example.com", | ||||||||||
| "fullName": "Walter O'Brien", | ||||||||||
| "age": 30, | ||||||||||
| "isAdmin": false | ||||||||||
| }, | ||||||||||
| permissions: ["read("any")"] // optional | ||||||||||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
The permission string The same issue appears in the following files as well:
Since
Suggested change
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🧩 Analysis chain🏁 Script executed: cat -n docs/examples/documentsdb/create-document.md | head -30Repository: appwrite/sdk-for-react-native Length of output: 966 🌐 Web query:
💡 Result: The syntax for Appwrite's Permission.read method in JavaScript is Permission.read(role), where role is an instance from the Role class, such as Role.any, Role.user('user-id'), Role.users, or Role.team('team-id'). Example usage when creating a document: import { Client, Databases, Permission, Role, ID } from 'node-appwrite' || 'appwrite'; const client = new Client.setEndpoint('https://cloud.appwrite.io/v1').setProject('project-id'); const databases = new Databases(client); const result = await databases.createDocument( 'database-id', 'collection-id', ID.unique, { key: 'value' }, [ Permission.read(Role.any), // Anyone can read Permission.read(Role.user('user-id')), // Specific user can read Permission.update(Role.team('team-id')), // Team can update ] ); This grants read access to the specified role(s). Permissions are combined in an array for create/updateDocument methods. Server SDKs bypass permissions checks. Citations: Correct the permissions syntax to use valid Appwrite API. Line 21 has invalid nested quotes that won't parse. The correct Appwrite syntax uses Proposed fix- permissions: ["read("any")"] // optional
+ permissions: [Permission.read(Role.any)] // optional📝 Committable suggestion
Suggested change
🤖 Prompt for AI Agents |
||||||||||
| }); | ||||||||||
|
|
||||||||||
| console.log(result); | ||||||||||
| ``` | ||||||||||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,17 @@ | ||
| ```javascript | ||
| import { Client, DocumentsDB } from "react-native-appwrite"; | ||
|
|
||
| const client = new Client() | ||
| .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint | ||
| .setProject('<YOUR_PROJECT_ID>'); // Your project ID | ||
|
|
||
| const documentsDB = new DocumentsDB(client); | ||
|
|
||
| const result = await documentsDB.createDocuments({ | ||
| databaseId: '<DATABASE_ID>', | ||
| collectionId: '<COLLECTION_ID>', | ||
| documents: [] | ||
| }); | ||
|
|
||
| console.log(result); | ||
| ``` |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,26 @@ | ||
| ```javascript | ||
| import { Client, DocumentsDB } from "react-native-appwrite"; | ||
|
|
||
| const client = new Client() | ||
| .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint | ||
| .setProject('<YOUR_PROJECT_ID>'); // Your project ID | ||
|
|
||
| const documentsDB = new DocumentsDB(client); | ||
|
|
||
| const result = await documentsDB.createOperations({ | ||
| transactionId: '<TRANSACTION_ID>', | ||
| operations: [ | ||
| { | ||
| "action": "create", | ||
| "databaseId": "<DATABASE_ID>", | ||
| "collectionId": "<COLLECTION_ID>", | ||
| "documentId": "<DOCUMENT_ID>", | ||
| "data": { | ||
| "name": "Walter O'Brien" | ||
| } | ||
| } | ||
| ] // optional | ||
| }); | ||
|
|
||
| console.log(result); | ||
| ``` |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,15 @@ | ||
| ```javascript | ||
| import { Client, DocumentsDB } from "react-native-appwrite"; | ||
|
|
||
| const client = new Client() | ||
| .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint | ||
| .setProject('<YOUR_PROJECT_ID>'); // Your project ID | ||
|
|
||
| const documentsDB = new DocumentsDB(client); | ||
|
|
||
| const result = await documentsDB.createTransaction({ | ||
| ttl: 60 // optional | ||
| }); | ||
|
|
||
| console.log(result); | ||
| ``` |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,21 @@ | ||
| ```javascript | ||
| import { Client, DocumentsDB } from "react-native-appwrite"; | ||
|
|
||
| const client = new Client() | ||
| .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint | ||
| .setProject('<YOUR_PROJECT_ID>'); // Your project ID | ||
|
|
||
| const documentsDB = new DocumentsDB(client); | ||
|
|
||
| const result = await documentsDB.decrementDocumentAttribute({ | ||
| databaseId: '<DATABASE_ID>', | ||
| collectionId: '<COLLECTION_ID>', | ||
| documentId: '<DOCUMENT_ID>', | ||
| attribute: '', | ||
| value: 0, // optional | ||
| min: 0, // optional | ||
| transactionId: '<TRANSACTION_ID>' // optional | ||
| }); | ||
|
|
||
| console.log(result); | ||
| ``` |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,18 @@ | ||
| ```javascript | ||
| import { Client, DocumentsDB } from "react-native-appwrite"; | ||
|
|
||
| const client = new Client() | ||
| .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint | ||
| .setProject('<YOUR_PROJECT_ID>'); // Your project ID | ||
|
|
||
| const documentsDB = new DocumentsDB(client); | ||
|
|
||
| const result = await documentsDB.deleteDocument({ | ||
| databaseId: '<DATABASE_ID>', | ||
| collectionId: '<COLLECTION_ID>', | ||
| documentId: '<DOCUMENT_ID>', | ||
| transactionId: '<TRANSACTION_ID>' // optional | ||
| }); | ||
|
|
||
| console.log(result); | ||
| ``` |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,15 @@ | ||
| ```javascript | ||
| import { Client, DocumentsDB } from "react-native-appwrite"; | ||
|
|
||
| const client = new Client() | ||
| .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint | ||
| .setProject('<YOUR_PROJECT_ID>'); // Your project ID | ||
|
|
||
| const documentsDB = new DocumentsDB(client); | ||
|
|
||
| const result = await documentsDB.deleteTransaction({ | ||
| transactionId: '<TRANSACTION_ID>' | ||
| }); | ||
|
|
||
| console.log(result); | ||
| ``` |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,19 @@ | ||
| ```javascript | ||
| import { Client, DocumentsDB } from "react-native-appwrite"; | ||
|
|
||
| const client = new Client() | ||
| .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint | ||
| .setProject('<YOUR_PROJECT_ID>'); // Your project ID | ||
|
|
||
| const documentsDB = new DocumentsDB(client); | ||
|
|
||
| const result = await documentsDB.getDocument({ | ||
| databaseId: '<DATABASE_ID>', | ||
| collectionId: '<COLLECTION_ID>', | ||
| documentId: '<DOCUMENT_ID>', | ||
| queries: [], // optional | ||
| transactionId: '<TRANSACTION_ID>' // optional | ||
| }); | ||
|
|
||
| console.log(result); | ||
| ``` |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,15 @@ | ||
| ```javascript | ||
| import { Client, DocumentsDB } from "react-native-appwrite"; | ||
|
|
||
| const client = new Client() | ||
| .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint | ||
| .setProject('<YOUR_PROJECT_ID>'); // Your project ID | ||
|
|
||
| const documentsDB = new DocumentsDB(client); | ||
|
|
||
| const result = await documentsDB.getTransaction({ | ||
| transactionId: '<TRANSACTION_ID>' | ||
| }); | ||
|
|
||
| console.log(result); | ||
| ``` |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,21 @@ | ||
| ```javascript | ||
| import { Client, DocumentsDB } from "react-native-appwrite"; | ||
|
|
||
| const client = new Client() | ||
| .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint | ||
| .setProject('<YOUR_PROJECT_ID>'); // Your project ID | ||
|
|
||
| const documentsDB = new DocumentsDB(client); | ||
|
|
||
| const result = await documentsDB.incrementDocumentAttribute({ | ||
| databaseId: '<DATABASE_ID>', | ||
| collectionId: '<COLLECTION_ID>', | ||
| documentId: '<DOCUMENT_ID>', | ||
| attribute: '', | ||
| value: 0, // optional | ||
| max: 0, // optional | ||
| transactionId: '<TRANSACTION_ID>' // optional | ||
| }); | ||
|
|
||
| console.log(result); | ||
| ``` |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,20 @@ | ||
| ```javascript | ||
| import { Client, DocumentsDB } from "react-native-appwrite"; | ||
|
|
||
| const client = new Client() | ||
| .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint | ||
| .setProject('<YOUR_PROJECT_ID>'); // Your project ID | ||
|
|
||
| const documentsDB = new DocumentsDB(client); | ||
|
|
||
| const result = await documentsDB.listDocuments({ | ||
| databaseId: '<DATABASE_ID>', | ||
| collectionId: '<COLLECTION_ID>', | ||
| queries: [], // optional | ||
| transactionId: '<TRANSACTION_ID>', // optional | ||
| total: false, // optional | ||
| ttl: 0 // optional | ||
| }); | ||
|
|
||
| console.log(result); | ||
| ``` |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,15 @@ | ||
| ```javascript | ||
| import { Client, DocumentsDB } from "react-native-appwrite"; | ||
|
|
||
| const client = new Client() | ||
| .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint | ||
| .setProject('<YOUR_PROJECT_ID>'); // Your project ID | ||
|
|
||
| const documentsDB = new DocumentsDB(client); | ||
|
|
||
| const result = await documentsDB.listTransactions({ | ||
| queries: [] // optional | ||
| }); | ||
|
|
||
| console.log(result); | ||
| ``` |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,20 @@ | ||
| ```javascript | ||
| import { Client, DocumentsDB, Permission, Role } from "react-native-appwrite"; | ||
|
|
||
| const client = new Client() | ||
| .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint | ||
| .setProject('<YOUR_PROJECT_ID>'); // Your project ID | ||
|
|
||
| const documentsDB = new DocumentsDB(client); | ||
|
|
||
| const result = await documentsDB.updateDocument({ | ||
| databaseId: '<DATABASE_ID>', | ||
| collectionId: '<COLLECTION_ID>', | ||
| documentId: '<DOCUMENT_ID>', | ||
| data: {}, // optional | ||
| permissions: ["read("any")"], // optional | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Fix syntax error in permissions string literal. The permissions string has unescaped quotes that will cause a JavaScript parse error: permissions: ["read("any")"]The inner quotes terminate the string prematurely. Choose one of these solutions:
🐛 Proposed fix using helper classes (recommended)- permissions: ["read("any")"], // optional
+ permissions: [Permission.read(Role.any())], // optional🤖 Prompt for AI Agents |
||
| transactionId: '<TRANSACTION_ID>' // optional | ||
| }); | ||
|
|
||
| console.log(result); | ||
| ``` | ||
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| @@ -0,0 +1,17 @@ | ||||||||||||||||||||
| ```javascript | ||||||||||||||||||||
| import { Client, DocumentsDB } from "react-native-appwrite"; | ||||||||||||||||||||
|
|
||||||||||||||||||||
| const client = new Client() | ||||||||||||||||||||
| .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint | ||||||||||||||||||||
| .setProject('<YOUR_PROJECT_ID>'); // Your project ID | ||||||||||||||||||||
|
|
||||||||||||||||||||
| const documentsDB = new DocumentsDB(client); | ||||||||||||||||||||
|
|
||||||||||||||||||||
| const result = await documentsDB.updateTransaction({ | ||||||||||||||||||||
| transactionId: '<TRANSACTION_ID>', | ||||||||||||||||||||
| commit: false, // optional | ||||||||||||||||||||
| rollback: false // optional | ||||||||||||||||||||
| }); | ||||||||||||||||||||
|
Comment on lines
+10
to
+14
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🧩 Analysis chain🌐 Web query:
💡 Result: Yes, Appwrite DocumentsDB (now TablesDB) transaction updates in API 1.9.0 require passing only one of commit or rollback per updateTransaction request. The official documentation shows mutually exclusive examples: either {commit: true} to commit or {rollback: true} to rollback, never both in the same call. Passing both would likely result in an error, as they represent opposing actions. Citations:
Update example to show only one of The example shows both flags set to false, creating ambiguity about proper usage. Appwrite DocumentsDB API requires Suggested fix const result = await documentsDB.updateTransaction({
transactionId: '<TRANSACTION_ID>',
- commit: false, // optional
- rollback: false // optional
+ rollback: true // optional (use either `commit` or `rollback`)
});📝 Committable suggestion
Suggested change
🤖 Prompt for AI Agents |
||||||||||||||||||||
|
|
||||||||||||||||||||
| console.log(result); | ||||||||||||||||||||
| ``` | ||||||||||||||||||||
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
| @@ -0,0 +1,20 @@ | ||||||
| ```javascript | ||||||
| import { Client, DocumentsDB, Permission, Role } from "react-native-appwrite"; | ||||||
|
|
||||||
| const client = new Client() | ||||||
| .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint | ||||||
| .setProject('<YOUR_PROJECT_ID>'); // Your project ID | ||||||
|
|
||||||
| const documentsDB = new DocumentsDB(client); | ||||||
|
|
||||||
| const result = await documentsDB.upsertDocument({ | ||||||
| databaseId: '<DATABASE_ID>', | ||||||
| collectionId: '<COLLECTION_ID>', | ||||||
| documentId: '<DOCUMENT_ID>', | ||||||
| data: {}, // optional | ||||||
| permissions: ["read("any")"], // optional | ||||||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🧩 Analysis chain🏁 Script executed: cat -n docs/examples/documentsdb/upsert-document.md | head -30Repository: appwrite/sdk-for-react-native Length of output: 824 🏁 Script executed: # Search for Permission and Role usage patterns in the codebase
rg "Permission\.|Role\." --type md -A 2 -B 2 | head -50Repository: appwrite/sdk-for-react-native Length of output: 481 🌐 Web query:
💡 Result: The syntax for Appwrite Permission.read Role.any is Permission.read(Role.any), used in SDKs to grant read access to any user for resources like database rows, documents, files, etc. This is a static method call from the Permission and Role classes. Example from official docs for creating a database row readable by anyone: import { Client, Databases, Permission, Role } from "node-appwrite"; const client = new Client .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint .setProject('<PROJECT_ID>'); // Your project ID const databases = new Databases(client); databases.createDocument( '<DATABASE_ID>', '<COLLECTION_ID>', 'unique', { 'actorName': 'Chris Evans', 'height': 183 }, [ Permission.read(Role.any), // Anyone can read this row // Additional permissions... ] ); Similar syntax applies across Client and Server SDKs (Web, Node.js, etc.). Permissions are arrays passed to create/update methods for resources. Role.any grants access to anyone (wildcard), while Permission.read specifies read access. Users can only grant permissions they own. Citations: Permissions example has broken JavaScript syntax. Line 15 uses invalid nested quoting that won't parse. The string Fix- permissions: ["read("any")"], // optional
+ permissions: [Permission.read(Role.any())], // optionalThe fix uses the correct Appwrite Permission and Role API (already imported at line 2). 📝 Committable suggestion
Suggested change
🤖 Prompt for AI Agents |
||||||
| transactionId: '<TRANSACTION_ID>' // optional | ||||||
| }); | ||||||
|
|
||||||
| console.log(result); | ||||||
| ``` | ||||||
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
| @@ -0,0 +1,29 @@ | ||||||
| ```javascript | ||||||
| import { Client, VectorsDB, Permission, Role } from "react-native-appwrite"; | ||||||
|
|
||||||
| const client = new Client() | ||||||
| .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint | ||||||
| .setProject('<YOUR_PROJECT_ID>'); // Your project ID | ||||||
|
|
||||||
| const vectorsDB = new VectorsDB(client); | ||||||
|
|
||||||
| const result = await vectorsDB.createDocument({ | ||||||
| databaseId: '<DATABASE_ID>', | ||||||
| collectionId: '<COLLECTION_ID>', | ||||||
| documentId: '<DOCUMENT_ID>', | ||||||
| data: { | ||||||
| "embeddings": [ | ||||||
| 0.12, | ||||||
| -0.55, | ||||||
| 0.88, | ||||||
| 1.02 | ||||||
| ], | ||||||
| "metadata": { | ||||||
| "key": "value" | ||||||
| } | ||||||
| }, | ||||||
| permissions: ["read("any")"] // optional | ||||||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🧩 Analysis chain🏁 Script executed: #!/bin/bash
# Verify all docs examples still containing the invalid nested-quote permission literal.
rg -n --type=md 'permissions:\s*\["read\("any"\)"\]'Repository: appwrite/sdk-for-react-native Length of output: 1332 🏁 Script executed: cat -n docs/examples/vectorsdb/create-document.mdRepository: appwrite/sdk-for-react-native Length of output: 987 🏁 Script executed: rg -n --type=md 'Permission\.' docs/examples/ -A 1 -B 1 | head -50Repository: appwrite/sdk-for-react-native Length of output: 351 🏁 Script executed: rg -n 'Permission\.read' docs/examples/ -B 2 -A 2Repository: appwrite/sdk-for-react-native Length of output: 55 🏁 Script executed: find . -type f -name "*.md" | xargs rg -l "Permission\|permissions" | head -5Repository: appwrite/sdk-for-react-native Length of output: 55 🏁 Script executed: rg -n "Permission\s*\(" --type=typescript --type=javascript . | head -20Repository: appwrite/sdk-for-react-native Length of output: 107 🏁 Script executed: cat -n README.md | head -100Repository: appwrite/sdk-for-react-native Length of output: 4723 🏁 Script executed: find . -type f -name "*.ts" -o -name "*.js" | grep -E "(Permission|Role)" | head -10Repository: appwrite/sdk-for-react-native Length of output: 55 🏁 Script executed: fd -t f "Permission\|Role" src/ --type f | head -20Repository: appwrite/sdk-for-react-native Length of output: 55 🏁 Script executed: ls -la src/ 2>/dev/null || find . -type d -name src | head -5Repository: appwrite/sdk-for-react-native Length of output: 902 🏁 Script executed: cat -n src/permission.tsRepository: appwrite/sdk-for-react-native Length of output: 698 🏁 Script executed: cat -n src/role.tsRepository: appwrite/sdk-for-react-native Length of output: 3160 Fix invalid permissions syntax in the example. Line 25 uses an invalid JavaScript string ( Proposed fix- permissions: ["read("any")"] // optional
+ permissions: [Permission.read(Role.any())] // optionalThis same issue appears in 14 documentation files across the examples directory (databases, documents, storage, tables, and vectors examples). 📝 Committable suggestion
Suggested change
🤖 Prompt for AI Agents |
||||||
| }); | ||||||
|
|
||||||
| console.log(result); | ||||||
| ``` | ||||||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,26 @@ | ||
| ```javascript | ||
| import { Client, VectorsDB } from "react-native-appwrite"; | ||
|
|
||
| const client = new Client() | ||
| .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint | ||
| .setProject('<YOUR_PROJECT_ID>'); // Your project ID | ||
|
|
||
| const vectorsDB = new VectorsDB(client); | ||
|
|
||
| const result = await vectorsDB.createOperations({ | ||
| transactionId: '<TRANSACTION_ID>', | ||
| operations: [ | ||
| { | ||
| "action": "create", | ||
| "databaseId": "<DATABASE_ID>", | ||
| "collectionId": "<COLLECTION_ID>", | ||
| "documentId": "<DOCUMENT_ID>", | ||
| "data": { | ||
| "name": "Walter O'Brien" | ||
| } | ||
| } | ||
| ] // optional | ||
| }); | ||
|
|
||
| console.log(result); | ||
| ``` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The badge was updated to
api%20version-1.9.0, but the compatibility line now reads"compatible with Appwrite server version 1.8.x". These two statements contradict each other — users targeting server version 1.8.x would expect the API version badge to reflect that same line. Please align both to the intended target version (either1.8.xor1.9.x).