feat: Android SDK update for version 13.0.0#115
Conversation
* Added Java `DocumentsDB` CRUD operation examples in docs * Updated server compatibility note to Appwrite server version 1.8.x * Updated Gradle/Maven dependencies to `12.1.0` * Updated API version badge to `1.9.0` in README
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (3)
✅ Files skipped from review due to trivial changes (1)
🚧 Files skipped from review as they are similar to previous changes (2)
WalkthroughThis pull request updates the Appwrite Kotlin client library to version 1.9.0 compatibility. Changes include updating the default response format header from version 1.8.0 to 1.9.0, adding three new Client fluent methods for impersonation configuration ( Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes 🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Greptile SummaryThis PR downgrades the Android SDK from version
Confidence Score: 2/5
Important Files Changed
|
| 60, // ttl (optional) | ||
| new CoroutineCallback<>((result, error) -> { |
There was a problem hiding this comment.
int literal passed for Long? parameter — Java compile error
The ttl parameter in createTransaction has type Long? in Kotlin, which compiles to java.lang.Long on the JVM. In Java, the literal 60 has type int. Java does not allow combining widening conversion (int → long) with boxing (long → Long) in a single method-invocation step, so this example will not compile.
The same problem exists in docs/examples/java/vectorsdb/create-transaction.md (line 13) and in docs/examples/java/documentsdb/list-documents.md and docs/examples/java/vectorsdb/list-documents.md where ttl = 0 is passed.
| 60, // ttl (optional) | |
| new CoroutineCallback<>((result, error) -> { | |
| 60L, // ttl (optional) |
| 0, // value (optional) | ||
| 0, // min (optional) |
There was a problem hiding this comment.
int literals passed for Double? parameters — Java compile error
The value and min parameters of decrementDocumentAttribute have type Double? in Kotlin (compiled to java.lang.Double on the JVM). Java does not allow combining widening (int → double) and boxing (double → Double) in a single method invocation, so passing the integer literals 0 here will not compile.
The identical issue exists in docs/examples/java/documentsdb/increment-document-attribute.md for the value and max parameters.
| 0, // value (optional) | |
| 0, // min (optional) | |
| 0.0, // value (optional) | |
| 0.0, // min (optional) |
| false, // total (optional) | ||
| 0, // ttl (optional) |
There was a problem hiding this comment.
int literal passed for Long? parameter — Java compile error
ttl has type Long? in Kotlin (i.e., java.lang.Long from Java). Passing 0 (an int literal) is a compile error for the same widening+boxing reason described in create-transaction.md.
The same issue exists in docs/examples/java/vectorsdb/list-documents.md.
| false, // total (optional) | |
| 0, // ttl (optional) | |
| false, // total (optional) | |
| 0L, // ttl (optional) |
There was a problem hiding this comment.
Actionable comments posted: 13
Note
Due to the large number of review comments, Critical, Major severity comments were prioritized as inline comments.
🟡 Minor comments (21)
docs/examples/java/documentsdb/delete-document.md-2-4 (1)
2-4:⚠️ Potential issue | 🟡 MinorAdd missing
Logimport in the Java example.Line 23 uses
Log.d(), butandroid.util.Logis not imported.Proposed documentation fix
import io.appwrite.Client; import io.appwrite.coroutines.CoroutineCallback; import io.appwrite.services.DocumentsDB; +import android.util.Log;🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@docs/examples/java/documentsdb/delete-document.md` around lines 2 - 4, The Java example is missing the android.util.Log import used by Log.d(); add the import statement for android.util.Log alongside the existing imports (Client, CoroutineCallback, DocumentsDB) so Log.d(...) resolves correctly and the example compiles and runs.docs/examples/java/vectorsdb/delete-transaction.md-1-24 (1)
1-24:⚠️ Potential issue | 🟡 MinorMissing import for
android.util.Log.The example uses
Log.don line 20 but doesn't importandroid.util.Log. This will cause a compilation error when users copy this example.📝 Proposed fix to add the missing import
```java import io.appwrite.Client; import io.appwrite.coroutines.CoroutineCallback; import io.appwrite.services.VectorsDB; +import android.util.Log; Client client = new Client(context)🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@docs/examples/java/vectorsdb/delete-transaction.md` around lines 1 - 24, The example is missing the android.util.Log import used by Log.d in the vectorsDB.deleteTransaction callback; add the import statement for android.util.Log at the top of the snippet so that Log.d(...) compiles and the example with VectorsDB.deleteTransaction and CoroutineCallback compiles correctly.docs/examples/java/documentsdb/list-transactions.md-1-24 (1)
1-24:⚠️ Potential issue | 🟡 MinorMissing import for
android.util.Log.The example uses
Log.don line 20 but doesn't importandroid.util.Log. This will cause a compilation error when users copy this example.📝 Proposed fix to add the missing import
```java import io.appwrite.Client; import io.appwrite.coroutines.CoroutineCallback; import io.appwrite.services.DocumentsDB; +import android.util.Log; Client client = new Client(context)🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@docs/examples/java/documentsdb/list-transactions.md` around lines 1 - 24, The example is missing the android.util.Log import used by Log.d in the DocumentsDB.listTransactions callback; add the import statement for android.util.Log at the top of the file so Log.d resolves correctly and the snippet compiles, keeping the rest of the example (Client, DocumentsDB, and the listTransactions call with CoroutineCallback) unchanged.docs/examples/java/documentsdb/list-documents.md-1-29 (1)
1-29:⚠️ Potential issue | 🟡 MinorMissing import for
android.util.Log.The example uses
Log.don line 25 but doesn't importandroid.util.Log. This will cause a compilation error when users copy this example.📝 Proposed fix to add the missing import
```java import io.appwrite.Client; import io.appwrite.coroutines.CoroutineCallback; import io.appwrite.services.DocumentsDB; +import android.util.Log; Client client = new Client(context)🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@docs/examples/java/documentsdb/list-documents.md` around lines 1 - 29, The example is missing the android.util.Log import used by Log.d, causing a compile error; add the import for android.util.Log at the top of the snippet so the use of Log.d in the DocumentsDB.listDocuments callback resolves correctly and the example compiles as-is.docs/examples/java/documentsdb/create-transaction.md-1-24 (1)
1-24:⚠️ Potential issue | 🟡 MinorMissing import for
android.util.Log.The example uses
Log.don line 20 but doesn't importandroid.util.Log. This will cause a compilation error when users copy this example.📝 Proposed fix to add the missing import
```java import io.appwrite.Client; import io.appwrite.coroutines.CoroutineCallback; import io.appwrite.services.DocumentsDB; +import android.util.Log; Client client = new Client(context)🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@docs/examples/java/documentsdb/create-transaction.md` around lines 1 - 24, The example uses android.util.Log (Log.d) but the import is missing, causing a compile error; add the import statement for android.util.Log at the top of the snippet so the Log.d call in the DocumentsDB.createTransaction callback resolves correctly (ensure the import appears alongside the existing imports for Client, CoroutineCallback, and DocumentsDB).docs/examples/java/documentsdb/upsert-document.md-1-31 (1)
1-31:⚠️ Potential issue | 🟡 MinorMissing
android.util.Logimport.The example uses
Log.dat line 27 but doesn't importandroid.util.Log. Adding this import would make the example immediately compilable.📦 Proposed fix to add missing import
```java import io.appwrite.Client; import io.appwrite.coroutines.CoroutineCallback; import io.appwrite.Permission; import io.appwrite.Role; import io.appwrite.services.DocumentsDB; +import android.util.Log; Client client = new Client(context)🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@docs/examples/java/documentsdb/upsert-document.md` around lines 1 - 31, Add the missing Android Log import so the example compiles: include the android.util.Log import at the top of the sample used with Log.d in the upsertDocument CoroutineCallback; ensure the import appears alongside the other imports (e.g., near io.appwrite.Client, io.appwrite.coroutines.CoroutineCallback, etc.) so Log.d resolves correctly.docs/examples/java/documentsdb/delete-transaction.md-1-24 (1)
1-24:⚠️ Potential issue | 🟡 MinorMissing
android.util.Logimport.The example uses
Log.dat line 20 but doesn't importandroid.util.Log. Adding this import would make the example immediately compilable.📦 Proposed fix to add missing import
```java import io.appwrite.Client; import io.appwrite.coroutines.CoroutineCallback; import io.appwrite.services.DocumentsDB; +import android.util.Log; Client client = new Client(context)🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@docs/examples/java/documentsdb/delete-transaction.md` around lines 1 - 24, The example is missing the android.util.Log import used by Log.d in the DocumentsDB.deleteTransaction callback; update the example header imports to include android.util.Log so the Log.d call compiles (add the import alongside Client, CoroutineCallback, and DocumentsDB at the top of the snippet).docs/examples/java/documentsdb/update-document.md-1-31 (1)
1-31:⚠️ Potential issue | 🟡 MinorMissing
android.util.Logimport.The example uses
Log.dat line 27 but doesn't importandroid.util.Log. While this is a documentation example, including the correct import would make it immediately compilable for users who copy-paste the code.📦 Proposed fix to add missing import
```java import io.appwrite.Client; import io.appwrite.coroutines.CoroutineCallback; import io.appwrite.Permission; import io.appwrite.Role; import io.appwrite.services.DocumentsDB; +import android.util.Log; Client client = new Client(context)🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@docs/examples/java/documentsdb/update-document.md` around lines 1 - 31, Add the missing android.util.Log import so the example that calls Log.d compiles; update the top of the snippet where imports are declared (near Client, CoroutineCallback, Permission, Role, DocumentsDB) to include import android.util.Log; no other code changes to DocumentsDB or updateDocument are needed.docs/examples/java/documentsdb/increment-document-attribute.md-1-30 (1)
1-30:⚠️ Potential issue | 🟡 MinorMissing
android.util.Logimport.The example uses
Log.dat line 26 but doesn't importandroid.util.Log. Adding this import would make the example immediately compilable.📦 Proposed fix to add missing import
```java import io.appwrite.Client; import io.appwrite.coroutines.CoroutineCallback; import io.appwrite.services.DocumentsDB; +import android.util.Log; Client client = new Client(context)🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@docs/examples/java/documentsdb/increment-document-attribute.md` around lines 1 - 30, The example fails to compile because android.util.Log is not imported; add the import statement for android.util.Log at the top of the file so the Log.d call in the DocumentsDB.incrementDocumentAttribute callback resolves. Locate the example using DocumentsDB.incrementDocumentAttribute (and the Log.d usage) and insert the missing import for android.util.Log alongside the other imports.docs/examples/java/vectorsdb/create-operations.md-2-4 (1)
2-4:⚠️ Potential issue | 🟡 MinorAdd missing Java/Android imports used by the snippet.
The example uses
List,Map, andLogbut doesn’t import them.Proposed fix
import io.appwrite.Client; import io.appwrite.coroutines.CoroutineCallback; import io.appwrite.services.VectorsDB; +import android.util.Log; +import java.util.List; +import java.util.Map;Also applies to: 14-20, 29-29
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@docs/examples/java/vectorsdb/create-operations.md` around lines 2 - 4, The snippet is missing imports for types used (List, Map) and the logger (Log); add the appropriate import lines at the top along with the existing imports—specifically import java.util.List; import java.util.Map; and import android.util.Log;—so occurrences of List, Map and Log referenced alongside Client and VectorsDB compile correctly in the example.docs/examples/java/vectorsdb/create-transaction.md-2-5 (1)
2-5:⚠️ Potential issue | 🟡 MinorImport
android.util.Logfor the logging line.Line 20 uses
Log.d(...)without importingLog.Proposed fix
import io.appwrite.Client; import io.appwrite.coroutines.CoroutineCallback; import io.appwrite.services.VectorsDB; +import android.util.Log;Also applies to: 20-20
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@docs/examples/java/vectorsdb/create-transaction.md` around lines 2 - 5, The example is missing the Android Log import used on line with Log.d(...); add the import statement for android.util.Log alongside the existing imports (next to io.appwrite.Client, io.appwrite.coroutines.CoroutineCallback, io.appwrite.services.VectorsDB) so the Log.d(...) call resolves correctly.docs/examples/java/vectorsdb/list-documents.md-2-4 (1)
2-4:⚠️ Potential issue | 🟡 MinorImport
ListandLogused by the example code.The snippet currently omits required imports for
List.of()andLog.d().Proposed fix
import io.appwrite.Client; import io.appwrite.coroutines.CoroutineCallback; import io.appwrite.services.VectorsDB; +import android.util.Log; +import java.util.List;Also applies to: 15-15, 25-25
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@docs/examples/java/vectorsdb/list-documents.md` around lines 2 - 4, The example is missing imports for the symbols used: add an import for java.util.List to support List.of() and an import for android.util.Log to support Log.d(); update the top imports in the file that currently include Client, CoroutineCallback, and VectorsDB so the example compiles and references to List.of() and Log.d() resolve (also ensure the same imports are present for the other occurrences noted around the other example blocks).docs/examples/java/vectorsdb/update-document.md-2-7 (1)
2-7:⚠️ Potential issue | 🟡 MinorAdd missing imports so the Java example compiles as-is.
This snippet uses
Map,List, andLogbut does not import them.Proposed fix
import io.appwrite.Client; import io.appwrite.coroutines.CoroutineCallback; import io.appwrite.Permission; import io.appwrite.Role; import io.appwrite.services.VectorsDB; +import android.util.Log; +import java.util.List; +import java.util.Map;Also applies to: 18-20, 27-27
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@docs/examples/java/vectorsdb/update-document.md` around lines 2 - 7, The example is missing imports for types used in the snippet; add the appropriate imports for java.util.Map and java.util.List and the logging class used (e.g., android.util.Log or java.util.logging.Logger depending on the example) so the sample compiles as-is; update the top import block alongside existing imports (near VectorsDB/CoroutineCallback usages) to include Map, List, and Log.docs/examples/java/documentsdb/create-documents.md-2-4 (1)
2-4:⚠️ Potential issue | 🟡 MinorAdd missing imports required by
List.ofandLog.d.The snippet won’t compile as pasted without these imports.
Proposed fix
import io.appwrite.Client; import io.appwrite.coroutines.CoroutineCallback; import io.appwrite.services.DocumentsDB; +import android.util.Log; +import java.util.List;Also applies to: 15-15, 22-22
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@docs/examples/java/documentsdb/create-documents.md` around lines 2 - 4, The snippet is missing imports for List.of and Log.d; add the appropriate imports (e.g., import java.util.List; and import android.util.Log;) alongside the existing imports (Client, CoroutineCallback, DocumentsDB) so that usages of List.of and Log.d compile; update the top-of-file import block where imports are declared to include these two imports.docs/examples/java/vectorsdb/update-transaction.md-2-4 (1)
2-4:⚠️ Potential issue | 🟡 MinorMissing
Logimport in this Java snippet.Line 22 references
Log.d(...)butandroid.util.Logis not imported.Proposed fix
import io.appwrite.Client; import io.appwrite.coroutines.CoroutineCallback; import io.appwrite.services.VectorsDB; +import android.util.Log;Also applies to: 22-22
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@docs/examples/java/vectorsdb/update-transaction.md` around lines 2 - 4, The snippet uses Log.d(...) but misses the android.util.Log import; add the import statement for android.util.Log to the top imports alongside Client, CoroutineCallback, and VectorsDB so Log.d resolves correctly; ensure there are no import collisions and rebuild to verify the reference to Log in the update transaction example is recognized.docs/examples/java/documentsdb/get-document.md-1-28 (1)
1-28:⚠️ Potential issue | 🟡 MinorAdd missing import for
Logclass.The example uses
Log.d()on line 24 but doesn't importandroid.util.Log.📦 Proposed fix
import io.appwrite.Client; import io.appwrite.coroutines.CoroutineCallback; import io.appwrite.services.DocumentsDB; +import android.util.Log;🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@docs/examples/java/documentsdb/get-document.md` around lines 1 - 28, The example uses android.util.Log but lacks its import; add an import statement for Log (import android.util.Log;) at the top of the snippet so the call to Log.d(...) in the DocumentsDB.getDocument callback compiles; locate the example code where DocumentsDB and CoroutineCallback are used to insert the import alongside the other imports.docs/examples/java/vectorsdb/get-document.md-1-28 (1)
1-28:⚠️ Potential issue | 🟡 MinorAdd missing imports for
LogandListclasses.The example uses
List.of()on line 16 andLog.d()on line 24 but doesn't import the necessary classes.📦 Proposed fix
import io.appwrite.Client; import io.appwrite.coroutines.CoroutineCallback; import io.appwrite.services.VectorsDB; +import android.util.Log; +import java.util.List;🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@docs/examples/java/vectorsdb/get-document.md` around lines 1 - 28, The example is missing imports for List and Log used by List.of() and Log.d() in the VectorsDB.getDocument example; add the appropriate import statements (e.g., import java.util.List; and import android.util.Log;) at the top of the file so references to List.of() and Log.d() resolve, then ensure the VectorsDB usage (VectorsDB vectorsDB = new VectorsDB(client); and vectorsDB.getDocument(...)) remains unchanged.docs/examples/java/vectorsdb/delete-document.md-1-27 (1)
1-27:⚠️ Potential issue | 🟡 MinorAdd missing import for
Logclass.The example uses
Log.d()on line 23 but doesn't importandroid.util.Log.📦 Proposed fix
import io.appwrite.Client; import io.appwrite.coroutines.CoroutineCallback; import io.appwrite.services.VectorsDB; +import android.util.Log;🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@docs/examples/java/vectorsdb/delete-document.md` around lines 1 - 27, The example uses android.util.Log in the deleteDocument callback but does not import it; add the missing import for Log at the top of the file (import android.util.Log;) so the Log.d(...) call inside the CoroutineCallback in vectorsDB.deleteDocument resolves; update the imports near Client, CoroutineCallback, and VectorsDB to include android.util.Log.docs/examples/java/databases/upsert-documents.md-1-27 (1)
1-27:⚠️ Potential issue | 🟡 MinorAdd missing imports for
LogandListclasses.The example uses
List.of()on line 15 andLog.d()on line 23 but doesn't import the necessary classes.📦 Proposed fix
import io.appwrite.Client; import io.appwrite.coroutines.CoroutineCallback; import io.appwrite.services.Databases; +import android.util.Log; +import java.util.List;🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@docs/examples/java/databases/upsert-documents.md` around lines 1 - 27, The example is missing imports for the types used: add imports for java.util.List (used by List.of()) and android.util.Log (used by Log.d()) at the top of the snippet so the calls in databases.upsertDocuments(...) compile; ensure the imports appear alongside the existing imports (e.g., near Client, CoroutineCallback, Databases).docs/examples/java/documentsdb/create-document.md-1-36 (1)
1-36:⚠️ Potential issue | 🟡 MinorAdd missing imports for
Log,Map, andListclasses.The example uses
Map.of()on line 18,List.of()on line 25, andLog.d()on line 32 but doesn't import the necessary classes.📦 Proposed fix
import io.appwrite.Client; import io.appwrite.coroutines.CoroutineCallback; import io.appwrite.Permission; import io.appwrite.Role; import io.appwrite.services.DocumentsDB; +import android.util.Log; +import java.util.Map; +import java.util.List;🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@docs/examples/java/documentsdb/create-document.md` around lines 1 - 36, The example is missing imports for Map, List, and Log which are used by Map.of(), List.of(), and Log.d(); add the appropriate imports (e.g., java.util.Map, java.util.List, and android.util.Log) at the top of the file so the DocumentsDB.createDocument call and the CoroutineCallback callback compile correctly and Log.d resolves.CHANGELOG.md-3-8 (1)
3-8:⚠️ Potential issue | 🟡 MinorFix version number in CHANGELOG entry.
Line 7 incorrectly states dependencies were updated to
12.1.0, but the actual dependency version published is12.1.1(as shown in README.md lines 41 and 52). Update this to12.1.1to match the actual release version.🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@CHANGELOG.md` around lines 3 - 8, Update the incorrect dependency version string in the CHANGELOG entry: replace the phrase "Updated Gradle/Maven dependencies to `12.1.0`" with "Updated Gradle/Maven dependencies to `12.1.1`" so the CHANGELOG's listed Gradle/Maven dependency version (`12.1.0`) matches the actual published release version (`12.1.1`) and the README references.
🧹 Nitpick comments (31)
docs/examples/kotlin/vectorsdb/delete-document.md (1)
3-3: Remove unused import.The
CoroutineCallbackimport is not used in this Kotlin example. Kotlin suspend functions don't require callbacks.🧹 Proposed fix to remove the unused import
```kotlin import io.appwrite.Client -import io.appwrite.coroutines.CoroutineCallback import io.appwrite.services.VectorsDB val client = Client(context)🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@docs/examples/kotlin/vectorsdb/delete-document.md` at line 3, Remove the unused import "import io.appwrite.coroutines.CoroutineCallback" from the Kotlin example; the code uses suspend functions and doesn't need CoroutineCallback—keep the necessary imports such as Client and VectorsDB and ensure no other unused imports remain (reference symbols: CoroutineCallback, Client, VectorsDB).docs/examples/kotlin/documentsdb/delete-document.md (1)
3-3: Remove unused import.The
CoroutineCallbackimport is not used in this Kotlin example. Kotlin suspend functions don't require callbacks.🧹 Proposed fix to remove the unused import
```kotlin import io.appwrite.Client -import io.appwrite.coroutines.CoroutineCallback import io.appwrite.services.DocumentsDB val client = Client(context)🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@docs/examples/kotlin/documentsdb/delete-document.md` at line 3, Remove the unused import statement "import io.appwrite.coroutines.CoroutineCallback" from the Kotlin example so only the required imports remain (e.g., "import io.appwrite.Client" and "import io.appwrite.services.DocumentsDB"); Kotlin suspend-based examples do not need CoroutineCallback, so delete that import line to clean up the file.docs/examples/kotlin/documentsdb/list-transactions.md (1)
3-3: Remove unused import.The
CoroutineCallbackimport is not used in this Kotlin example. Kotlin suspend functions don't require callbacks; they can be called directly within a coroutine context.🧹 Proposed fix to remove the unused import
```kotlin import io.appwrite.Client -import io.appwrite.coroutines.CoroutineCallback import io.appwrite.services.DocumentsDB val client = Client(context)🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@docs/examples/kotlin/documentsdb/list-transactions.md` at line 3, Remove the unused import CoroutineCallback from the Kotlin example: delete the line importing io.appwrite.coroutines.CoroutineCallback since the code uses suspend functions and the import is unnecessary; ensure remaining imports include io.appwrite.Client and io.appwrite.services.DocumentsDB and that no references to CoroutineCallback remain in the example.docs/examples/kotlin/vectorsdb/create-operations.md (1)
3-3: Remove unused import.
CoroutineCallbackis imported but never used in this Kotlin example. The code uses suspend functions directly, which don't require the callback import.🧹 Proposed fix to remove the unused import
```kotlin import io.appwrite.Client -import io.appwrite.coroutines.CoroutineCallback import io.appwrite.services.VectorsDB🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@docs/examples/kotlin/vectorsdb/create-operations.md` at line 3, Remove the unused import CoroutineCallback from the Kotlin example: delete the line importing io.appwrite.coroutines.CoroutineCallback so the example uses only the required imports (e.g., Client and VectorsDB) and relies on suspend functions rather than callback types.docs/examples/kotlin/documentsdb/list-documents.md (2)
3-3: Remove unused import.
CoroutineCallbackis imported but never used in this Kotlin example. The code uses suspend functions directly, which don't require the callback import.🧹 Proposed fix to remove the unused import
```kotlin import io.appwrite.Client -import io.appwrite.coroutines.CoroutineCallback import io.appwrite.services.DocumentsDB🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@docs/examples/kotlin/documentsdb/list-documents.md` at line 3, The import io.appwrite.coroutines.CoroutineCallback is unused in the Kotlin example; remove that import to clean up the file and rely on the suspend-style usage (keep imports like io.appwrite.Client and io.appwrite.services.DocumentsDB intact). Locate the import statement for CoroutineCallback and delete it so the file no longer contains the unused symbol.
18-18: Consider clarifying thettlparameter usage.The example sets
ttlto0, which may be ambiguous. If0has special meaning (e.g., no expiration) or ifnullshould be used instead for the default behavior, consider adding a comment to clarify this for users.🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@docs/examples/kotlin/documentsdb/list-documents.md` at line 18, The example sets the parameter ttl = 0 which is ambiguous; update the Kotlin snippet to clarify ttl's semantics for the reader by either using a null/default value (e.g., ttl = null) if that indicates no expiration or by adding an inline comment next to ttl (e.g., // 0 = no expiration or // null = use default TTL) so users of the ttl parameter understand the intended behavior — refer to the ttl parameter in the example and adjust the comment or value accordingly.docs/examples/kotlin/databases/upsert-documents.md (1)
3-3: Remove unused import.
CoroutineCallbackis imported but never used in this Kotlin example. The code uses suspend functions directly, which don't require the callback import.🧹 Proposed fix to remove the unused import
```kotlin import io.appwrite.Client -import io.appwrite.coroutines.CoroutineCallback import io.appwrite.services.Databases🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@docs/examples/kotlin/databases/upsert-documents.md` at line 3, Remove the unused import CoroutineCallback from the Kotlin example; locate the import statement that references CoroutineCallback (import io.appwrite.coroutines.CoroutineCallback) and delete it so the file only imports io.appwrite.Client and io.appwrite.services.Databases, since the example uses suspend functions and does not require the CoroutineCallback symbol.docs/examples/kotlin/documentsdb/create-document.md (1)
3-3: Remove unused import.
CoroutineCallbackis imported but never used in this Kotlin example. The code uses suspend functions directly, which don't require the callback import.🧹 Proposed fix to remove the unused import
```kotlin import io.appwrite.Client -import io.appwrite.coroutines.CoroutineCallback import io.appwrite.services.DocumentsDB import io.appwrite.Permission🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@docs/examples/kotlin/documentsdb/create-document.md` at line 3, Remove the unused import CoroutineCallback from the example — the Kotlin code uses suspend functions and does not reference io.appwrite.coroutines.CoroutineCallback, so delete the line importing CoroutineCallback to clean up unused imports (look for the import statement that mentions CoroutineCallback near the other imports like io.appwrite.Client and io.appwrite.services.DocumentsDB).docs/examples/java/documentsdb/list-documents.md (1)
18-18: Consider clarifying thettlparameter usage.The example sets
ttlto0, which may be ambiguous. If0has special meaning (e.g., no expiration) or ifnullshould be used instead for the default behavior, consider adding a comment to clarify this for users.🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@docs/examples/java/documentsdb/list-documents.md` at line 18, The example line "0, // ttl (optional)" is ambiguous about the ttl semantics; update the example to clarify what 0 means (e.g., "0 // no expiration" or "null // use default/no expiration") by changing the inline comment for the ttl parameter so users know whether 0 is special or if they should pass null to get default behavior — reference the ttl parameter in the example snippet (the line currently showing "0, // ttl (optional)").docs/examples/kotlin/documentsdb/create-transaction.md (1)
1-15: Remove unusedCoroutineCallbackimport.The example imports
CoroutineCallbackat line 3 but never uses it. This Kotlin example uses direct assignment (val result = ...) instead of a callback pattern, so the import is unnecessary.♻️ Proposed fix to remove unused import
```kotlin import io.appwrite.Client -import io.appwrite.coroutines.CoroutineCallback import io.appwrite.services.DocumentsDB val client = Client(context)🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@docs/examples/kotlin/documentsdb/create-transaction.md` around lines 1 - 15, Remove the unused import io.appwrite.coroutines.CoroutineCallback from the Kotlin example; locate the top imports (Client, CoroutineCallback, DocumentsDB) and delete the CoroutineCallback import so only the used imports (io.appwrite.Client and io.appwrite.services.DocumentsDB) remain while leaving the rest of the createTransaction example (DocumentsDB and createTransaction call) unchanged.docs/examples/kotlin/vectorsdb/upsert-document.md (1)
1-22: Remove unusedCoroutineCallbackimport.The example imports
CoroutineCallbackat line 3 but never uses it. This Kotlin example uses direct assignment (val result = ...) instead of a callback pattern, so the import is unnecessary.♻️ Proposed fix to remove unused import
```kotlin import io.appwrite.Client -import io.appwrite.coroutines.CoroutineCallback import io.appwrite.services.VectorsDB import io.appwrite.Permission import io.appwrite.Role🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@docs/examples/kotlin/vectorsdb/upsert-document.md` around lines 1 - 22, The import io.appwrite.coroutines.CoroutineCallback is unused in this example; remove that import line so only used symbols (Client, VectorsDB, Permission, Role) remain imported, ensuring no unused imports in the upsertDocument example and keeping the file clean.docs/examples/kotlin/documentsdb/update-document.md (1)
1-22: Remove unusedCoroutineCallbackimport.The example imports
CoroutineCallbackat line 3 but never uses it. This Kotlin example uses direct assignment (val result = ...) instead of a callback pattern, so the import is unnecessary.♻️ Proposed fix to remove unused import
```kotlin import io.appwrite.Client -import io.appwrite.coroutines.CoroutineCallback import io.appwrite.services.DocumentsDB import io.appwrite.Permission import io.appwrite.Role🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@docs/examples/kotlin/documentsdb/update-document.md` around lines 1 - 22, The import io.appwrite.coroutines.CoroutineCallback is unused in this example and should be removed; edit the Kotlin snippet to delete the CoroutineCallback import line so only necessary imports remain (e.g., keep io.appwrite.Client, io.appwrite.services.DocumentsDB, io.appwrite.Permission, io.appwrite.Role) while leaving the DocumentsDB instantiation and updateDocument usage unchanged.docs/examples/kotlin/vectorsdb/create-document.md (1)
1-26: Remove unusedCoroutineCallbackimport.The example imports
CoroutineCallbackat line 3 but never uses it. This Kotlin example uses direct assignment (val result = ...) instead of a callback pattern, so the import is unnecessary.♻️ Proposed fix to remove unused import
```kotlin import io.appwrite.Client -import io.appwrite.coroutines.CoroutineCallback import io.appwrite.services.VectorsDB import io.appwrite.Permission import io.appwrite.Role🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@docs/examples/kotlin/vectorsdb/create-document.md` around lines 1 - 26, The file imports an unused symbol CoroutineCallback; remove the unused import line so the Kotlin example only imports the symbols actually used (Client, VectorsDB, Permission, Role) and leave the createDocument example unchanged; look for the import statement referencing io.appwrite.coroutines.CoroutineCallback and delete it to fix the unused-import warning.docs/examples/java/documentsdb/increment-document-attribute.md (1)
16-16: Use a clearer placeholder for the attribute name.Line 16 uses an empty string
""for the attribute parameter. This is less clear than other placeholders in the example (e.g.,"<DATABASE_ID>"). Consider using"<ATTRIBUTE_NAME>"to maintain consistency.♻️ Proposed fix for clearer placeholder
"<DATABASE_ID>", // databaseId "<COLLECTION_ID>", // collectionId "<DOCUMENT_ID>", // documentId - "", // attribute + "<ATTRIBUTE_NAME>", // attribute 0, // value (optional)🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@docs/examples/java/documentsdb/increment-document-attribute.md` at line 16, Replace the empty string placeholder used for the attribute parameter with a clearer named placeholder; change "" to "<ATTRIBUTE_NAME>" wherever the attribute name is passed (e.g., in the call that currently shows "", which represents the attribute parameter) so the example matches other placeholders like "<DATABASE_ID>" and is clearer to readers.docs/examples/kotlin/vectorsdb/get-document.md (1)
3-3: Drop unused callback import for clarity.This example demonstrates direct result retrieval, so
CoroutineCallbackis unnecessary.Proposed doc cleanup
-import io.appwrite.coroutines.CoroutineCallback🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@docs/examples/kotlin/vectorsdb/get-document.md` at line 3, Remove the unused import of CoroutineCallback from the Kotlin example file: delete the line importing io.appwrite.coroutines.CoroutineCallback so the example only contains required imports and avoids confusing readers with an unused callback type (search for the import statement referencing CoroutineCallback to locate and remove it).docs/examples/kotlin/documentsdb/create-operations.md (1)
3-3: Remove unused callback import in this Kotlin suspend-style example.
CoroutineCallbackis not used in this snippet, so Line 3 is misleading for the style being shown.Proposed doc cleanup
-import io.appwrite.coroutines.CoroutineCallback🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@docs/examples/kotlin/documentsdb/create-operations.md` at line 3, The example imports an unused CoroutineCallback which is misleading for this Kotlin suspend-style snippet; remove the import statement for CoroutineCallback so the code only shows suspend-style usage (locate and delete the line importing CoroutineCallback).docs/examples/kotlin/documentsdb/decrement-document-attribute.md (2)
16-16: Use a more descriptive attribute name in the example.The
attributeparameter is set to an empty string"", which doesn't illustrate typical usage. Consider using a descriptive name like"counter"or"quantity".♻️ Proposed improvement
- attribute = "", + attribute = "counter",🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@docs/examples/kotlin/documentsdb/decrement-document-attribute.md` at line 16, The example sets the parameter named attribute to an empty string which is non-descriptive; update the example call that includes the attribute parameter (the "attribute" argument in the decrement-document-attribute example) to use a meaningful name such as "counter" or "quantity" so readers see real usage—replace the empty string value for attribute with "counter" (or "quantity") wherever the attribute parameter is passed in the example.
3-3: Remove unused import.The
CoroutineCallbackimport is unnecessary for this Kotlin suspend function example. The example uses direct assignment (val result = ...) rather than callback-based async handling.♻️ Proposed fix
import io.appwrite.Client -import io.appwrite.coroutines.CoroutineCallback import io.appwrite.services.DocumentsDB🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@docs/examples/kotlin/documentsdb/decrement-document-attribute.md` at line 3, Remove the unnecessary import "import io.appwrite.coroutines.CoroutineCallback" from the Kotlin example: the suspend-based function (the example using "val result = ...") does not use CoroutineCallback, so delete that import to eliminate the unused symbol.docs/examples/kotlin/vectorsdb/list-documents.md (1)
3-3: Remove unused import.The
CoroutineCallbackimport is unnecessary for this Kotlin suspend function example. The example uses direct assignment (val result = ...) rather than callback-based async handling.♻️ Proposed fix
import io.appwrite.Client -import io.appwrite.coroutines.CoroutineCallback import io.appwrite.services.VectorsDB🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@docs/examples/kotlin/vectorsdb/list-documents.md` at line 3, Remove the unused import of CoroutineCallback from the Kotlin example: delete the import statement for CoroutineCallback since the example uses a suspend function with direct assignment (val result = ...) instead of callback-based async handling; ensure no other references to CoroutineCallback remain in the snippet (e.g., check for any usages in listDocuments or surrounding example code) and keep the rest of the example unchanged.docs/examples/kotlin/vectorsdb/update-document.md (1)
3-3: Remove unused import.The
CoroutineCallbackimport is unnecessary for this Kotlin suspend function example. The example uses direct assignment (val result = ...) rather than callback-based async handling.♻️ Proposed fix
import io.appwrite.Client -import io.appwrite.coroutines.CoroutineCallback import io.appwrite.services.VectorsDB🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@docs/examples/kotlin/vectorsdb/update-document.md` at line 3, Remove the unused import of CoroutineCallback from the Kotlin example: locate the import statement "import io.appwrite.coroutines.CoroutineCallback" and delete it since the suspend-function example uses direct assignment (e.g., val result = ...) and does not use callback-based APIs; ensure no other code references CoroutineCallback after removal.docs/examples/java/databases/upsert-documents.md (1)
15-15: Consider adding a non-empty example for thedocumentsparameter.The example passes an empty list
List.of()for the documents parameter, which doesn't demonstrate the expected structure or usage of the upsert operation.🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@docs/examples/java/databases/upsert-documents.md` at line 15, The example currently passes an empty List.of() for the documents parameter; replace it with a non-empty example showing the expected document structure (e.g., a List containing one or more document objects/maps with keys like "id", "text"/"content", and any metadata) so readers can see how to format and upsert actual documents; update the example in the docs file where the documents parameter is supplied (the List.of() occurrence) to include a concrete sample document entry.docs/examples/java/vectorsdb/upsert-document.md (1)
1-30: Missing imports forLog,Map, andList.The example uses
Log.d,Map.of, andList.ofbut doesn't include their imports. Add the missing imports for completeness.📝 Suggested fix
```java import io.appwrite.Client; import io.appwrite.coroutines.CoroutineCallback; import io.appwrite.Permission; import io.appwrite.Role; import io.appwrite.services.VectorsDB; +import android.util.Log; +import java.util.List; +import java.util.Map;🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@docs/examples/java/vectorsdb/upsert-document.md` around lines 1 - 30, The example is missing imports for Log, List, and Map used by the VectorsDB.upsertDocument example; add import statements for android.util.Log and java.util.List and java.util.Map at the top alongside existing imports so Log.d, List.of(...) and Map.of(...) resolve correctly when using VectorsDB.upsertDocument in the sample.docs/examples/kotlin/documentsdb/get-document.md (1)
3-3: Unused importCoroutineCallback.This Kotlin example uses the suspend function style (direct assignment to
val result), so theCoroutineCallbackimport is not needed and can be removed.📝 Suggested fix
```kotlin import io.appwrite.Client -import io.appwrite.coroutines.CoroutineCallback import io.appwrite.services.DocumentsDB🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@docs/examples/kotlin/documentsdb/get-document.md` at line 3, Remove the unused import line "import io.appwrite.coroutines.CoroutineCallback" from the Kotlin example; the code uses the suspend-style direct assignment (e.g., the val result pattern with DocumentsDB) so delete the CoroutineCallback import to avoid an unused import warning and keep imports limited to "io.appwrite.Client" and "io.appwrite.services.DocumentsDB".docs/examples/java/documentsdb/decrement-document-attribute.md (1)
16-18: Improve attribute placeholder and use Double literals.
- The
attributeplaceholder should follow the convention of other placeholders (e.g.,"<ATTRIBUTE>").- The
valueandminparameters expectDouble?- use double literals for clarity.📝 Suggested fix
- "", // attribute - 0, // value (optional) - 0, // min (optional) + "<ATTRIBUTE>", // attribute + 1.0, // value (optional) + 0.0, // min (optional)🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@docs/examples/java/documentsdb/decrement-document-attribute.md` around lines 16 - 18, Update the placeholders in the example so the attribute follows the existing convention (replace the empty string with "<ATTRIBUTE>") and ensure numeric parameters use Double literals: change the value and min placeholders from 0 to 0.0 to reflect the expected Double? types (referencing the "attribute", "value", and "min" parameters shown in the snippet).docs/examples/java/vectorsdb/create-document.md (1)
1-34: Missing imports forLog,Map, andList.Same as other VectorsDB examples - add the missing imports for
android.util.Log,java.util.List, andjava.util.Map.📝 Suggested fix
```java import io.appwrite.Client; import io.appwrite.coroutines.CoroutineCallback; import io.appwrite.Permission; import io.appwrite.Role; import io.appwrite.services.VectorsDB; +import android.util.Log; +import java.util.List; +import java.util.Map;🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@docs/examples/java/vectorsdb/create-document.md` around lines 1 - 34, The example is missing imports used by the snippet; add the android.util.Log, java.util.List, and java.util.Map imports at the top of the file so symbols used in the example (e.g., Log and the Map/List types in the vectorsDB.createDocument call and its Map.of/List.of data) resolve correctly; update the imports alongside existing ones like io.appwrite.Client, io.appwrite.services.VectorsDB, and io.appwrite.coroutines.CoroutineCallback.docs/examples/java/documentsdb/create-operations.md (1)
1-32: Missing imports forLog,List, andMap.Add the missing imports for completeness, consistent with other Java documentation examples.
📝 Suggested fix
```java import io.appwrite.Client; import io.appwrite.coroutines.CoroutineCallback; import io.appwrite.services.DocumentsDB; +import android.util.Log; +import java.util.List; +import java.util.Map;🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@docs/examples/java/documentsdb/create-operations.md` around lines 1 - 32, The example is missing imports used by the DocumentsDB createOperations snippet; add imports for android.util.Log, java.util.List, and java.util.Map at the top of the Java example so types referenced in List.of/Map.of and the Log.d usage resolve correctly — ensure the import statements appear alongside the existing imports for io.appwrite.Client, io.appwrite.coroutines.CoroutineCallback, and io.appwrite.services.DocumentsDB.library/src/main/java/io/appwrite/services/VectorsDB.kt (2)
164-176: Unnecessarycontent-typeheader on DELETE request.DELETE requests typically have no request body, so setting the
content-typeheader is unnecessary. The same applies todeleteDocumentat Line 615.♻️ Suggested fix
val apiHeaders = mutableMapOf<String, String>( - "content-type" to "application/json", )🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@library/src/main/java/io/appwrite/services/VectorsDB.kt` around lines 164 - 176, Remove the unnecessary "content-type" header from DELETE requests: in the shown DELETE method (the function that builds apiHeaders with "content-type" and calls client.call with "DELETE") and in the deleteDocument method, delete the "content-type" entry so apiHeaders is either empty or only contains required headers (e.g., auth headers). Ensure you only remove that header for DELETE calls and keep any other needed headers intact.
12-14: Empty class-level documentation.The class KDoc is empty. Consider adding a brief description of the VectorsDB service and its purpose for better API discoverability.
📝 Suggested documentation
-/** - * - */ +/** + * The VectorsDB service provides methods to interact with Appwrite VectorsDB, + * including transaction management and document CRUD operations for vector collections. + */ class VectorsDB(client: Client) : Service(client) {🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@library/src/main/java/io/appwrite/services/VectorsDB.kt` around lines 12 - 14, Add a concise KDoc comment above the VectorsDB class that describes what the VectorsDB service does and its purpose for consumers (e.g., manages vector storage/search operations and provides methods to interact with the Appwrite vectors API); include mention of any important constructor parameters or responsibilities (for example the Client dependency injected into VectorsDB) so the generated API docs are informative and improve discoverability.library/src/main/java/io/appwrite/services/DocumentsDB.kt (3)
12-14: Empty class-level documentation.Similar to VectorsDB, the class KDoc is empty. Consider adding a description of the DocumentsDB service.
📝 Suggested documentation
-/** - * - */ +/** + * The DocumentsDB service provides methods to interact with Appwrite DocumentsDB, + * including transaction management, document CRUD operations, and atomic attribute mutations. + */ class DocumentsDB(client: Client) : Service(client) {🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@library/src/main/java/io/appwrite/services/DocumentsDB.kt` around lines 12 - 14, Add a descriptive KDoc for the DocumentsDB class (class DocumentsDB) similar to the one used for VectorsDB: briefly explain the purpose of the DocumentsDB service, what it manages (e.g., storing, querying, and managing document records), any important behaviors or expected usage, and mention any relevant parameters or scope of the service; place this KDoc immediately above the class declaration in DocumentsDB.kt so the class-level documentation is no longer empty.
164-176: Unnecessarycontent-typeheader on DELETE request.Same as noted in
VectorsDB.kt- DELETE requests typically have no body, so this header is unnecessary. Also applies todeleteDocumentat Line 673.🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@library/src/main/java/io/appwrite/services/DocumentsDB.kt` around lines 164 - 176, Remove the unnecessary "content-type" header from the DELETE request headers: locate the DELETE client.call invocation in DocumentsDB.kt (the block building apiHeaders with "content-type" => "application/json") and remove that header entry so apiHeaders doesn't include content-type for DELETE requests; apply the same change to the deleteDocument implementation referenced in this file to ensure DELETE calls do not send a content-type header when there's no request body.
17-212: Consider extracting shared transaction logic.The transaction management APIs (
listTransactions,createTransaction,getTransaction,updateTransaction,deleteTransaction,createOperations) are nearly identical to those inVectorsDB.kt, differing only in the base path (/documentsdbvs/vectorsdb).If these services are manually maintained, consider extracting a shared base class or delegate to reduce duplication. If auto-generated from an API spec, this can be ignored.
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@library/src/main/java/io/appwrite/services/DocumentsDB.kt` around lines 17 - 212, The transaction methods in DocumentsDB (listTransactions, createTransaction, getTransaction, updateTransaction, deleteTransaction, createOperations) duplicate the same logic found in VectorsDB; extract the common behavior into a shared helper or base class (e.g., TransactionService or DocumentsVectorsBase) that accepts the base path ("/documentsdb" vs "/vectorsdb") and encapsulates building apiPath, apiParams, apiHeaders, converters, and the client.call invocation, then have DocumentsDB and VectorsDB delegate their transaction methods to that shared class (or call its generic methods) so only basePath differs while keeping existing method names and signatures intact.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: 278785d3-eb4d-4b6b-aeb6-888d5da3b621
📒 Files selected for processing (66)
CHANGELOG.mdREADME.mddocs/examples/java/databases/upsert-documents.mddocs/examples/java/documentsdb/create-document.mddocs/examples/java/documentsdb/create-documents.mddocs/examples/java/documentsdb/create-operations.mddocs/examples/java/documentsdb/create-transaction.mddocs/examples/java/documentsdb/decrement-document-attribute.mddocs/examples/java/documentsdb/delete-document.mddocs/examples/java/documentsdb/delete-transaction.mddocs/examples/java/documentsdb/get-document.mddocs/examples/java/documentsdb/get-transaction.mddocs/examples/java/documentsdb/increment-document-attribute.mddocs/examples/java/documentsdb/list-documents.mddocs/examples/java/documentsdb/list-transactions.mddocs/examples/java/documentsdb/update-document.mddocs/examples/java/documentsdb/update-transaction.mddocs/examples/java/documentsdb/upsert-document.mddocs/examples/java/vectorsdb/create-document.mddocs/examples/java/vectorsdb/create-operations.mddocs/examples/java/vectorsdb/create-transaction.mddocs/examples/java/vectorsdb/delete-document.mddocs/examples/java/vectorsdb/delete-transaction.mddocs/examples/java/vectorsdb/get-document.mddocs/examples/java/vectorsdb/get-transaction.mddocs/examples/java/vectorsdb/list-documents.mddocs/examples/java/vectorsdb/list-transactions.mddocs/examples/java/vectorsdb/update-document.mddocs/examples/java/vectorsdb/update-transaction.mddocs/examples/java/vectorsdb/upsert-document.mddocs/examples/kotlin/databases/upsert-documents.mddocs/examples/kotlin/documentsdb/create-document.mddocs/examples/kotlin/documentsdb/create-documents.mddocs/examples/kotlin/documentsdb/create-operations.mddocs/examples/kotlin/documentsdb/create-transaction.mddocs/examples/kotlin/documentsdb/decrement-document-attribute.mddocs/examples/kotlin/documentsdb/delete-document.mddocs/examples/kotlin/documentsdb/delete-transaction.mddocs/examples/kotlin/documentsdb/get-document.mddocs/examples/kotlin/documentsdb/get-transaction.mddocs/examples/kotlin/documentsdb/increment-document-attribute.mddocs/examples/kotlin/documentsdb/list-documents.mddocs/examples/kotlin/documentsdb/list-transactions.mddocs/examples/kotlin/documentsdb/update-document.mddocs/examples/kotlin/documentsdb/update-transaction.mddocs/examples/kotlin/documentsdb/upsert-document.mddocs/examples/kotlin/vectorsdb/create-document.mddocs/examples/kotlin/vectorsdb/create-operations.mddocs/examples/kotlin/vectorsdb/create-transaction.mddocs/examples/kotlin/vectorsdb/delete-document.mddocs/examples/kotlin/vectorsdb/delete-transaction.mddocs/examples/kotlin/vectorsdb/get-document.mddocs/examples/kotlin/vectorsdb/get-transaction.mddocs/examples/kotlin/vectorsdb/list-documents.mddocs/examples/kotlin/vectorsdb/list-transactions.mddocs/examples/kotlin/vectorsdb/update-document.mddocs/examples/kotlin/vectorsdb/update-transaction.mddocs/examples/kotlin/vectorsdb/upsert-document.mdlibrary/src/main/java/io/appwrite/Client.ktlibrary/src/main/java/io/appwrite/models/Document.ktlibrary/src/main/java/io/appwrite/models/Log.ktlibrary/src/main/java/io/appwrite/models/Row.ktlibrary/src/main/java/io/appwrite/models/User.ktlibrary/src/main/java/io/appwrite/services/Databases.ktlibrary/src/main/java/io/appwrite/services/DocumentsDB.ktlibrary/src/main/java/io/appwrite/services/VectorsDB.kt
| ```java | ||
| import io.appwrite.Client; | ||
| import io.appwrite.coroutines.CoroutineCallback; | ||
| import io.appwrite.services.DocumentsDB; | ||
|
|
||
| Client client = new Client(context) | ||
| .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint | ||
| .setProject("<YOUR_PROJECT_ID>"); // Your project ID | ||
|
|
||
| DocumentsDB documentsDB = new DocumentsDB(client); | ||
|
|
||
| documentsDB.getTransaction( | ||
| "<TRANSACTION_ID>", // transactionId | ||
| new CoroutineCallback<>((result, error) -> { | ||
| if (error != null) { | ||
| error.printStackTrace(); | ||
| return; | ||
| } | ||
|
|
||
| Log.d("Appwrite", result.toString()); | ||
| }) | ||
| ); | ||
|
|
||
| ``` |
There was a problem hiding this comment.
Missing import for android.util.Log.
The example uses Log.d() on line 20 but does not import android.util.Log. This will cause a compilation error when users try to run this code.
📦 Proposed fix to add the missing import
```java
import io.appwrite.Client;
import io.appwrite.coroutines.CoroutineCallback;
import io.appwrite.services.DocumentsDB;
+import android.util.Log;
Client client = new Client(context)🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In `@docs/examples/java/documentsdb/get-transaction.md` around lines 1 - 24, The
example calls android.util.Log.d inside the DocumentsDB.getTransaction callback
but omits the required import; add the missing import for android.util.Log at
the top alongside the existing imports (so the file imports android.util.Log in
addition to io.appwrite.Client, io.appwrite.coroutines.CoroutineCallback, and
io.appwrite.services.DocumentsDB) so that the use of Log.d in the
CoroutineCallback compiles.
| ```java | ||
| import io.appwrite.Client; | ||
| import io.appwrite.coroutines.CoroutineCallback; | ||
| import io.appwrite.services.DocumentsDB; | ||
|
|
||
| Client client = new Client(context) | ||
| .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint | ||
| .setProject("<YOUR_PROJECT_ID>"); // Your project ID | ||
|
|
||
| DocumentsDB documentsDB = new DocumentsDB(client); | ||
|
|
||
| documentsDB.updateTransaction( | ||
| "<TRANSACTION_ID>", // transactionId | ||
| false, // commit (optional) | ||
| false, // rollback (optional) | ||
| new CoroutineCallback<>((result, error) -> { | ||
| if (error != null) { | ||
| error.printStackTrace(); | ||
| return; | ||
| } | ||
|
|
||
| Log.d("Appwrite", result.toString()); | ||
| }) | ||
| ); | ||
|
|
||
| ``` |
There was a problem hiding this comment.
Missing import for android.util.Log.
The example uses Log.d() on line 22 but does not import android.util.Log. This will cause a compilation error.
📦 Proposed fix to add the missing import
```java
import io.appwrite.Client;
import io.appwrite.coroutines.CoroutineCallback;
import io.appwrite.services.DocumentsDB;
+import android.util.Log;
Client client = new Client(context)📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| ```java | |
| import io.appwrite.Client; | |
| import io.appwrite.coroutines.CoroutineCallback; | |
| import io.appwrite.services.DocumentsDB; | |
| Client client = new Client(context) | |
| .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint | |
| .setProject("<YOUR_PROJECT_ID>"); // Your project ID | |
| DocumentsDB documentsDB = new DocumentsDB(client); | |
| documentsDB.updateTransaction( | |
| "<TRANSACTION_ID>", // transactionId | |
| false, // commit (optional) | |
| false, // rollback (optional) | |
| new CoroutineCallback<>((result, error) -> { | |
| if (error != null) { | |
| error.printStackTrace(); | |
| return; | |
| } | |
| Log.d("Appwrite", result.toString()); | |
| }) | |
| ); | |
| ``` |
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In `@docs/examples/java/documentsdb/update-transaction.md` around lines 1 - 26,
The example is missing the android.util.Log import used by Log.d in the
DocumentsDB.updateTransaction callback; add the line importing android.util.Log
alongside the other imports (near import io.appwrite.services.DocumentsDB) so
the Log symbol resolves and the sample compiles.
| ```java | ||
| import io.appwrite.Client; | ||
| import io.appwrite.coroutines.CoroutineCallback; | ||
| import io.appwrite.services.VectorsDB; | ||
|
|
||
| Client client = new Client(context) | ||
| .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint | ||
| .setProject("<YOUR_PROJECT_ID>"); // Your project ID | ||
|
|
||
| VectorsDB vectorsDB = new VectorsDB(client); | ||
|
|
||
| vectorsDB.getTransaction( | ||
| "<TRANSACTION_ID>", // transactionId | ||
| new CoroutineCallback<>((result, error) -> { | ||
| if (error != null) { | ||
| error.printStackTrace(); | ||
| return; | ||
| } | ||
|
|
||
| Log.d("Appwrite", result.toString()); | ||
| }) | ||
| ); | ||
|
|
||
| ``` |
There was a problem hiding this comment.
Missing import for android.util.Log.
The example uses Log.d() on line 20 but does not import android.util.Log. This will cause a compilation error.
📦 Proposed fix to add the missing import
```java
import io.appwrite.Client;
import io.appwrite.coroutines.CoroutineCallback;
import io.appwrite.services.VectorsDB;
+import android.util.Log;
Client client = new Client(context)🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In `@docs/examples/java/vectorsdb/get-transaction.md` around lines 1 - 24, The
example calls android.util.Log.d in the VectorsDB.getTransaction callback but
the android.util.Log import is missing; add the import statement for
android.util.Log at the top of the file so the Log.d(...) call in the
CoroutineCallback for getTransaction resolves and the example compiles.
| ```java | ||
| import io.appwrite.Client; | ||
| import io.appwrite.coroutines.CoroutineCallback; | ||
| import io.appwrite.services.VectorsDB; | ||
|
|
||
| Client client = new Client(context) | ||
| .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint | ||
| .setProject("<YOUR_PROJECT_ID>"); // Your project ID | ||
|
|
||
| VectorsDB vectorsDB = new VectorsDB(client); | ||
|
|
||
| vectorsDB.listTransactions( | ||
| List.of(), // queries (optional) | ||
| new CoroutineCallback<>((result, error) -> { | ||
| if (error != null) { | ||
| error.printStackTrace(); | ||
| return; | ||
| } | ||
|
|
||
| Log.d("Appwrite", result.toString()); | ||
| }) | ||
| ); | ||
|
|
||
| ``` |
There was a problem hiding this comment.
Missing import for android.util.Log.
The example uses Log.d() on line 20 but does not import android.util.Log. This will cause a compilation error.
📦 Proposed fix to add the missing import
```java
import io.appwrite.Client;
import io.appwrite.coroutines.CoroutineCallback;
import io.appwrite.services.VectorsDB;
+import android.util.Log;
Client client = new Client(context)🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In `@docs/examples/java/vectorsdb/list-transactions.md` around lines 1 - 24, The
Java example uses android.util.Log (Log.d) but the import is missing, causing a
compilation error; add the import for android.util.Log near the other imports so
the Log.d(...) call in the CoroutineCallback succeeds—update the import block
that includes Client, CoroutineCallback, and VectorsDB to also import
android.util.Log.
| val result = databases.upsertDocuments( | ||
| databaseId = "<DATABASE_ID>", | ||
| collectionId = "<COLLECTION_ID>", | ||
| documents = listOf(), | ||
| transactionId = "<TRANSACTION_ID>", // (optional) | ||
| ) |
There was a problem hiding this comment.
🧩 Analysis chain
🏁 Script executed:
#!/bin/bash
# Description: Check if upsertDocuments is marked as deprecated in the SDK source and if there's a recommended alternative
# Search for deprecation annotation on upsertDocuments
rg -n -A5 -B2 '@Deprecated|@deprecated' library/src/main/java/io/appwrite/services/Databases.kt | rg -A5 -B2 'upsertDocuments'
# Also check for any deprecation comments or documentation
ast-grep --pattern 'fun upsertDocuments($$$) { $$$ }'Repository: appwrite/sdk-for-android
Length of output: 341
Add deprecation notice to example documentation.
upsertDocuments is deprecated as of SDK version 1.8.0 and replaced by TablesDB.upsertRows. The example documentation should include a deprecation warning at the top and direct users to the recommended alternative.
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In `@docs/examples/kotlin/databases/upsert-documents.md` around lines 12 - 17, Add
a deprecation notice to this example: indicate that databases.upsertDocuments is
deprecated as of SDK v1.8.0 and recommend using TablesDB.upsertRows instead;
update the top of docs/examples/kotlin/databases/upsert-documents.md to show a
brief deprecation warning and a short pointer to the new TablesDB.upsertRows API
(and consider replacing or adding an equivalent example using
TablesDB.upsertRows alongside the warning). Ensure you reference the deprecated
symbol `upsertDocuments` and the replacement `TablesDB.upsertRows` in the
notice.
| val result = vectorsDB.deleteTransaction( | ||
| transactionId = "<TRANSACTION_ID>", | ||
| ) |
There was a problem hiding this comment.
🧩 Analysis chain
🏁 Script executed:
cat -n docs/examples/kotlin/vectorsdb/delete-transaction.mdRepository: appwrite/sdk-for-android
Length of output: 586
🏁 Script executed:
fd -type f -name "*.kt" | xargs rg "fun deleteTransaction" -A 3 | head -50Repository: appwrite/sdk-for-android
Length of output: 1737
🏁 Script executed:
fd -type f -path "*/docs/examples/kotlin/vectorsdb/*.md" | xargs cat | grep -A 10 "suspend\|launch\|async\|runBlocking" | head -30Repository: appwrite/sdk-for-android
Length of output: 238
🏁 Script executed:
find docs/examples/kotlin/vectorsdb -name "*.md" -type fRepository: appwrite/sdk-for-android
Length of output: 676
🏁 Script executed:
cat docs/examples/kotlin/vectorsdb/create-transaction.mdRepository: appwrite/sdk-for-android
Length of output: 468
🏁 Script executed:
cat docs/examples/kotlin/vectorsdb/get-transaction.mdRepository: appwrite/sdk-for-android
Length of output: 478
Wrap deleteTransaction call in coroutine scope for compilable example.
Line 12 calls a suspend function directly without coroutine context. The code needs to be wrapped in a coroutine scope (e.g., lifecycleScope.launch { }, launch { }, or runBlocking { }):
lifecycleScope.launch {
val result = vectorsDB.deleteTransaction(
transactionId = "<TRANSACTION_ID>",
)
}Otherwise the Kotlin example fails to compile.
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In `@docs/examples/kotlin/vectorsdb/delete-transaction.md` around lines 12 - 14,
The example calls the suspend function deleteTransaction on vectorsDB directly;
wrap that call in a coroutine scope (e.g., lifecycleScope.launch, runBlocking,
or a launch within a CoroutineScope) so the suspend function executes within a
coroutine context; update the snippet containing
vectorsDB.deleteTransaction(...) to be placed inside the chosen coroutine
builder (keeping transactionId and other args unchanged).
| val result = vectorsDB.getTransaction( | ||
| transactionId = "<TRANSACTION_ID>", | ||
| ) |
There was a problem hiding this comment.
🧩 Analysis chain
🏁 Script executed:
cat -n docs/examples/kotlin/vectorsdb/get-transaction.mdRepository: appwrite/sdk-for-android
Length of output: 583
🏁 Script executed:
find . -name "*.kt" -type f | xargs grep -l "class VectorsDB" | head -5Repository: appwrite/sdk-for-android
Length of output: 125
🏁 Script executed:
grep -n "fun getTransaction" ./library/src/main/java/io/appwrite/services/VectorsDB.ktRepository: appwrite/sdk-for-android
Length of output: 102
🏁 Script executed:
sed -n '88,100p' ./library/src/main/java/io/appwrite/services/VectorsDB.ktRepository: appwrite/sdk-for-android
Length of output: 602
Wrap getTransaction call in a coroutine scope.
getTransaction is a suspend function and cannot be called directly in synchronous context. The code must be wrapped in a coroutine builder such as launch, async, or runBlocking, or placed inside a suspend function.
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In `@docs/examples/kotlin/vectorsdb/get-transaction.md` around lines 12 - 14, The
example calls the suspend function vectorsDB.getTransaction directly; wrap this
call inside a coroutine context (e.g., runBlocking { ... },
CoroutineScope(Dispatchers.Default).launch { ... }, async { ... } or call from
an existing suspend function) so it runs in a coroutine; locate the
vectorsDB.getTransaction(...) invocation in the example and move it into a
coroutine builder or a suspend function to fix the compile/runtime error.
| */ | ||
| @SerializedName("\$sequence") | ||
| val sequence: Long, | ||
| val sequence: String, |
There was a problem hiding this comment.
🧩 Analysis chain
🏁 Script executed:
find . -name "Row.kt" -type f | head -20Repository: appwrite/sdk-for-android
Length of output: 117
🏁 Script executed:
cd library/src/main/java/io/appwrite/models && ls -la | head -30Repository: appwrite/sdk-for-android
Length of output: 1891
🏁 Script executed:
wc -l ./library/src/main/java/io/appwrite/models/Row.ktRepository: appwrite/sdk-for-android
Length of output: 121
🏁 Script executed:
cat -n ./library/src/main/java/io/appwrite/models/Row.ktRepository: appwrite/sdk-for-android
Length of output: 3388
🏁 Script executed:
rg "map\[" library/src/main/java/io/appwrite/models/*.kt -A 1 -B 1 | head -80Repository: appwrite/sdk-for-android
Length of output: 7182
🏁 Script executed:
grep -n "as String" library/src/main/java/io/appwrite/models/Row.ktRepository: appwrite/sdk-for-android
Length of output: 392
🏁 Script executed:
find . -name "jsonCast*" -o -name "*Extension*" | grep -i extension | head -20Repository: appwrite/sdk-for-android
Length of output: 326
🏁 Script executed:
cat -n ./library/src/main/java/io/appwrite/extensions/JsonExtensions.ktRepository: appwrite/sdk-for-android
Length of output: 1345
🏁 Script executed:
grep -rn "sequence" library/src/main/java/io/appwrite/models/Row.ktRepository: appwrite/sdk-for-android
Length of output: 317
🏁 Script executed:
rg "\$sequence" library/ --type java --type kotlin -B 2 -A 2Repository: appwrite/sdk-for-android
Length of output: 50
🏁 Script executed:
rg "sequence" library/src/test -B 3 -A 3 | head -60Repository: appwrite/sdk-for-android
Length of output: 124
🏁 Script executed:
find . -name "*.json" -type f | head -10Repository: appwrite/sdk-for-android
Length of output: 100
🏁 Script executed:
rg "Number" library/src/main/java/io/appwrite/extensions/JsonExtensions.kt -B 2 -A 2Repository: appwrite/sdk-for-android
Length of output: 380
🏁 Script executed:
rg "as String" library/src/main/java/io/appwrite/models/ | wc -lRepository: appwrite/sdk-for-android
Length of output: 71
🏁 Script executed:
rg "toLong()" library/src/main/java/io/appwrite/models/ | head -20Repository: appwrite/sdk-for-android
Length of output: 2349
🏁 Script executed:
cat -n library/src/main/java/io/appwrite/extensions/TypeExtensions.ktRepository: appwrite/sdk-for-android
Length of output: 362
🏁 Script executed:
rg "Sequence" library/src/main/java/io/appwrite/models/Row.kt -B 3 -A 3Repository: appwrite/sdk-for-android
Length of output: 50
🏁 Script executed:
git log --oneline library/src/main/java/io/appwrite/models/Row.kt | head -5Repository: appwrite/sdk-for-android
Length of output: 110
🏁 Script executed:
git show HEAD:library/src/main/java/io/appwrite/models/Row.kt | head -110 | tail -20Repository: appwrite/sdk-for-android
Length of output: 745
🏁 Script executed:
rg "as String" library/src/main/java/io/appwrite/models/Row.kt -nRepository: appwrite/sdk-for-android
Length of output: 392
🏁 Script executed:
git diff HEAD~1 library/src/main/java/io/appwrite/models/Row.kt 2>/dev/null || echo "Cannot show diff"Repository: appwrite/sdk-for-android
Length of output: 84
Fix unsafe $sequence deserialization cast at line 96.
The hard cast sequence = map["\$sequence"] as String in the from() function can fail at runtime if the API payload deserializes this field as a numeric type (per Gson's ToNumberPolicy.LONG_OR_DOUBLE configuration). Make the parsing tolerant to both String and Number types.
Suggested fix
- sequence = map["\$sequence"] as String,
+ sequence = when (val rawSequence = map["\$sequence"]) {
+ is String -> rawSequence
+ is Number -> rawSequence.toLong().toString()
+ else -> throw IllegalArgumentException("Invalid \$sequence type: ${rawSequence?.javaClass}")
+ },🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In `@library/src/main/java/io/appwrite/models/Row.kt` at line 20, The
deserialization for Row.sequence in the Row.from() function uses an unsafe cast
`sequence = map["$sequence"] as String`; change it to tolerate either String or
Number by checking the runtime type of map["$sequence"] (e.g., if it's a String
use it directly, if it's a Number call .toString(), and handle null/other types
appropriately) so parsing works when Gson returns numeric types; update the
assignment in Row.from() and any related nullability handling to use the safe
converted string.
| "impersonator" to impersonator as Any, | ||
| "impersonatorUserId" to impersonatorUserId as Any, |
There was a problem hiding this comment.
🧩 Analysis chain
🏁 Script executed:
find . -name "User.kt" -type f | grep -E "models.*User.kt"Repository: appwrite/sdk-for-android
Length of output: 118
🏁 Script executed:
cat -n ./library/src/main/java/io/appwrite/models/User.kt | head -200Repository: appwrite/sdk-for-android
Length of output: 6568
Do not cast nullable impersonation fields to non-null Any.
Lines 157-158 cast nullable fields to as Any, which throws ClassCastException if the value is null. Both impersonator: Boolean? and impersonatorUserId: String? are nullable, so they must be handled conditionally.
Note: The same unsafe pattern appears on lines 142-144 for password, hash, and hashOptions—consider fixing all nullable field casts in this toMap() function.
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In `@library/src/main/java/io/appwrite/models/User.kt` around lines 157 - 158, The
toMap() implementation is unsafely casting nullable properties to non-null Any
(e.g., impersonator, impersonatorUserId, and also password, hash, hashOptions),
which will throw if the value is null; update toMap() to avoid non-null casts by
either (A) only adding those entries when the property != null, or (B) allow
null values in the map by assigning the property directly (no "as Any" cast) or
casting to Any? (e.g., use impersonator (or impersonator as Any?) removed and
instead add "impersonator" to impersonator, or conditionally put "impersonator"
to impersonator when impersonator != null), and apply the same fix for password,
hash, and hashOptions so all nullable fields are handled safely in User.toMap().
This PR contains updates to the Android SDK for version 13.0.0.