From 95231e8d9ed2d50386790317ee9d0f8360a94b6c Mon Sep 17 00:00:00 2001 From: root Date: Fri, 28 Nov 2025 19:06:33 +0000 Subject: [PATCH 1/3] feat: add method to service --- CHANGELOG.md | 4 + README.md | 4 +- .../java/account/create-o-auth-2-token.md | 2 +- docs/examples/java/account/list-identities.md | 2 +- docs/examples/java/account/list-logs.md | 2 +- docs/examples/java/account/update-prefs.md | 8 +- docs/examples/java/avatars/get-screenshot.md | 45 + .../java/databases/create-collection.md | 4 +- .../java/databases/create-document.md | 16 +- .../java/databases/create-documents.md | 2 +- .../java/databases/create-enum-attribute.md | 2 +- docs/examples/java/databases/create-index.md | 6 +- .../java/databases/create-line-attribute.md | 2 +- .../java/databases/create-operations.md | 20 +- .../java/databases/create-point-attribute.md | 2 +- .../databases/create-polygon-attribute.md | 2 +- .../create-relationship-attribute.md | 1 + .../java/databases/delete-documents.md | 2 +- docs/examples/java/databases/get-document.md | 2 +- .../java/databases/list-attributes.md | 2 +- .../java/databases/list-collections.md | 2 +- .../examples/java/databases/list-documents.md | 2 +- docs/examples/java/databases/list-indexes.md | 2 +- .../java/databases/list-transactions.md | 2 +- docs/examples/java/databases/list.md | 2 +- .../java/databases/update-collection.md | 4 +- .../java/databases/update-document.md | 6 +- .../java/databases/update-documents.md | 4 +- .../java/databases/update-enum-attribute.md | 2 +- .../java/databases/update-line-attribute.md | 2 +- .../java/databases/update-point-attribute.md | 2 +- .../databases/update-polygon-attribute.md | 2 +- .../update-relationship-attribute.md | 1 + .../java/databases/upsert-document.md | 6 +- .../java/databases/upsert-documents.md | 2 +- .../java/functions/create-execution.md | 3 +- .../functions/create-template-deployment.md | 4 +- .../java/functions/create-vcs-deployment.md | 4 +- docs/examples/java/functions/create.md | 8 +- .../java/functions/get-deployment-download.md | 1 + .../java/functions/list-deployments.md | 2 +- .../java/functions/list-executions.md | 2 +- docs/examples/java/functions/list.md | 2 +- docs/examples/java/functions/update.md | 9 +- docs/examples/java/graphql/mutation.md | 2 +- docs/examples/java/graphql/query.md | 2 +- docs/examples/java/health/get-failed-jobs.md | 2 +- docs/examples/java/messaging/create-email.md | 12 +- .../java/messaging/create-fcm-provider.md | 2 +- docs/examples/java/messaging/create-push.md | 9 +- docs/examples/java/messaging/create-sms.md | 6 +- .../java/messaging/create-smtp-provider.md | 1 + docs/examples/java/messaging/create-topic.md | 2 +- .../java/messaging/list-message-logs.md | 2 +- docs/examples/java/messaging/list-messages.md | 2 +- .../java/messaging/list-provider-logs.md | 2 +- .../examples/java/messaging/list-providers.md | 2 +- .../java/messaging/list-subscriber-logs.md | 2 +- .../java/messaging/list-subscribers.md | 2 +- docs/examples/java/messaging/list-targets.md | 2 +- .../java/messaging/list-topic-logs.md | 2 +- docs/examples/java/messaging/list-topics.md | 2 +- docs/examples/java/messaging/update-email.md | 12 +- .../java/messaging/update-fcm-provider.md | 2 +- docs/examples/java/messaging/update-push.md | 9 +- docs/examples/java/messaging/update-sms.md | 6 +- .../java/messaging/update-smtp-provider.md | 1 + docs/examples/java/messaging/update-topic.md | 2 +- .../java/sites/create-template-deployment.md | 4 +- .../java/sites/create-vcs-deployment.md | 4 +- docs/examples/java/sites/create.md | 7 +- .../java/sites/get-deployment-download.md | 1 + docs/examples/java/sites/list-deployments.md | 2 +- docs/examples/java/sites/list-logs.md | 2 +- docs/examples/java/sites/list.md | 2 +- docs/examples/java/sites/update.md | 8 +- docs/examples/java/storage/create-bucket.md | 10 +- docs/examples/java/storage/create-file.md | 4 +- .../examples/java/storage/get-file-preview.md | 2 + docs/examples/java/storage/list-buckets.md | 2 +- docs/examples/java/storage/list-files.md | 2 +- docs/examples/java/storage/update-bucket.md | 10 +- docs/examples/java/storage/update-file.md | 4 +- .../java/tablesdb/create-enum-column.md | 2 +- docs/examples/java/tablesdb/create-index.md | 6 +- .../java/tablesdb/create-line-column.md | 2 +- .../java/tablesdb/create-operations.md | 20 +- .../java/tablesdb/create-point-column.md | 2 +- .../java/tablesdb/create-polygon-column.md | 2 +- .../tablesdb/create-relationship-column.md | 1 + docs/examples/java/tablesdb/create-row.md | 16 +- docs/examples/java/tablesdb/create-rows.md | 2 +- docs/examples/java/tablesdb/create-table.md | 4 +- docs/examples/java/tablesdb/delete-rows.md | 2 +- docs/examples/java/tablesdb/get-row.md | 2 +- docs/examples/java/tablesdb/list-columns.md | 2 +- docs/examples/java/tablesdb/list-indexes.md | 2 +- docs/examples/java/tablesdb/list-rows.md | 2 +- docs/examples/java/tablesdb/list-tables.md | 2 +- .../java/tablesdb/list-transactions.md | 2 +- docs/examples/java/tablesdb/list.md | 2 +- .../java/tablesdb/update-enum-column.md | 2 +- .../java/tablesdb/update-line-column.md | 2 +- .../java/tablesdb/update-point-column.md | 2 +- .../java/tablesdb/update-polygon-column.md | 2 +- .../tablesdb/update-relationship-column.md | 1 + docs/examples/java/tablesdb/update-row.md | 6 +- docs/examples/java/tablesdb/update-rows.md | 4 +- docs/examples/java/tablesdb/update-table.md | 4 +- docs/examples/java/tablesdb/upsert-row.md | 6 +- docs/examples/java/tablesdb/upsert-rows.md | 2 +- docs/examples/java/teams/create-membership.md | 2 +- docs/examples/java/teams/create.md | 2 +- docs/examples/java/teams/list-memberships.md | 2 +- docs/examples/java/teams/list.md | 2 +- docs/examples/java/teams/update-membership.md | 2 +- docs/examples/java/teams/update-prefs.md | 2 +- docs/examples/java/tokens/list.md | 2 +- docs/examples/java/users/create-sha-user.md | 1 + docs/examples/java/users/list-identities.md | 2 +- docs/examples/java/users/list-logs.md | 2 +- docs/examples/java/users/list-memberships.md | 2 +- docs/examples/java/users/list-targets.md | 2 +- docs/examples/java/users/list.md | 2 +- docs/examples/java/users/update-labels.md | 2 +- docs/examples/java/users/update-prefs.md | 2 +- .../examples/kotlin/avatars/get-screenshot.md | 36 + .../kotlin/databases/create-line-attribute.md | 2 +- .../kotlin/databases/create-operations.md | 20 +- .../databases/create-polygon-attribute.md | 2 +- .../create-relationship-attribute.md | 1 + .../kotlin/databases/update-line-attribute.md | 2 +- .../databases/update-polygon-attribute.md | 2 +- .../update-relationship-attribute.md | 1 + .../kotlin/functions/create-execution.md | 1 + .../functions/create-template-deployment.md | 4 +- .../kotlin/functions/create-vcs-deployment.md | 4 +- docs/examples/kotlin/functions/create.md | 2 +- .../functions/get-deployment-download.md | 1 + docs/examples/kotlin/functions/update.md | 1 + .../examples/kotlin/health/get-failed-jobs.md | 2 +- docs/examples/kotlin/messaging/create-push.md | 1 + .../kotlin/messaging/create-smtp-provider.md | 1 + docs/examples/kotlin/messaging/update-push.md | 1 + .../kotlin/messaging/update-smtp-provider.md | 1 + .../sites/create-template-deployment.md | 4 +- .../kotlin/sites/create-vcs-deployment.md | 4 +- docs/examples/kotlin/sites/create.md | 5 +- .../kotlin/sites/get-deployment-download.md | 1 + docs/examples/kotlin/sites/update.md | 4 +- docs/examples/kotlin/storage/create-bucket.md | 4 +- .../kotlin/storage/get-file-preview.md | 2 + docs/examples/kotlin/storage/update-bucket.md | 4 +- .../kotlin/tablesdb/create-line-column.md | 2 +- .../kotlin/tablesdb/create-operations.md | 20 +- .../kotlin/tablesdb/create-polygon-column.md | 2 +- .../tablesdb/create-relationship-column.md | 1 + .../kotlin/tablesdb/update-line-column.md | 2 +- .../kotlin/tablesdb/update-polygon-column.md | 2 +- .../tablesdb/update-relationship-column.md | 1 + docs/examples/kotlin/users/create-sha-user.md | 1 + src/main/kotlin/io/appwrite/Client.kt | 4 +- .../kotlin/io/appwrite/enums/BuildRuntime.kt | 6 +- src/main/kotlin/io/appwrite/enums/Output.kt | 22 + src/main/kotlin/io/appwrite/enums/Runtime.kt | 6 +- .../appwrite/enums/TemplateReferenceType.kt | 14 + src/main/kotlin/io/appwrite/enums/Theme.kt | 12 + src/main/kotlin/io/appwrite/enums/Timezone.kt | 846 ++++++++++++++++++ ...SDeploymentType.kt => VCSReferenceType.kt} | 2 +- src/main/kotlin/io/appwrite/models/Bucket.kt | 8 + .../kotlin/io/appwrite/services/Avatars.kt | 87 ++ .../kotlin/io/appwrite/services/Functions.kt | 11 +- src/main/kotlin/io/appwrite/services/Sites.kt | 13 +- .../kotlin/io/appwrite/services/Storage.kt | 8 +- .../services/{TablesDb.kt => TablesDB.kt} | 2 +- 175 files changed, 1407 insertions(+), 269 deletions(-) create mode 100644 docs/examples/java/avatars/get-screenshot.md create mode 100644 docs/examples/kotlin/avatars/get-screenshot.md create mode 100644 src/main/kotlin/io/appwrite/enums/Output.kt create mode 100644 src/main/kotlin/io/appwrite/enums/TemplateReferenceType.kt create mode 100644 src/main/kotlin/io/appwrite/enums/Theme.kt create mode 100644 src/main/kotlin/io/appwrite/enums/Timezone.kt rename src/main/kotlin/io/appwrite/enums/{VCSDeploymentType.kt => VCSReferenceType.kt} (84%) rename src/main/kotlin/io/appwrite/services/{TablesDb.kt => TablesDB.kt} (99%) diff --git a/CHANGELOG.md b/CHANGELOG.md index 362c9aa9..b98dc745 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ # Change Log +## 12.4.0 + +* Add `getScreenshot` method to `Avatars` service + ## 12.3.0 * Add `total` parameter to list queries allowing skipping counting rows in a table for improved performance diff --git a/README.md b/README.md index f86832ca..8bd1ef98 100644 --- a/README.md +++ b/README.md @@ -39,7 +39,7 @@ repositories { Next, add the dependency to your project's `build.gradle(.kts)` file: ```groovy -implementation("io.appwrite:sdk-for-kotlin:12.3.0") +implementation("io.appwrite:sdk-for-kotlin:12.4.0") ``` ### Maven @@ -50,7 +50,7 @@ Add this to your project's `pom.xml` file: io.appwrite sdk-for-kotlin - 12.3.0 + 12.4.0 ``` diff --git a/docs/examples/java/account/create-o-auth-2-token.md b/docs/examples/java/account/create-o-auth-2-token.md index 5b325f5c..376d9435 100644 --- a/docs/examples/java/account/create-o-auth-2-token.md +++ b/docs/examples/java/account/create-o-auth-2-token.md @@ -13,7 +13,7 @@ account.createOAuth2Token( OAuthProvider.AMAZON, // provider "https://example.com", // success (optional) "https://example.com", // failure (optional) - listOf(), // scopes (optional) + List.of(), // scopes (optional) new CoroutineCallback<>((result, error) -> { if (error != null) { error.printStackTrace(); diff --git a/docs/examples/java/account/list-identities.md b/docs/examples/java/account/list-identities.md index 8d204d59..97cdf99b 100644 --- a/docs/examples/java/account/list-identities.md +++ b/docs/examples/java/account/list-identities.md @@ -10,7 +10,7 @@ Client client = new Client() Account account = new Account(client); account.listIdentities( - listOf(), // queries (optional) + List.of(), // queries (optional) false, // total (optional) new CoroutineCallback<>((result, error) -> { if (error != null) { diff --git a/docs/examples/java/account/list-logs.md b/docs/examples/java/account/list-logs.md index 4b301a11..6c41c7f0 100644 --- a/docs/examples/java/account/list-logs.md +++ b/docs/examples/java/account/list-logs.md @@ -10,7 +10,7 @@ Client client = new Client() Account account = new Account(client); account.listLogs( - listOf(), // queries (optional) + List.of(), // queries (optional) false, // total (optional) new CoroutineCallback<>((result, error) -> { if (error != null) { diff --git a/docs/examples/java/account/update-prefs.md b/docs/examples/java/account/update-prefs.md index 0b689391..4fc1cb54 100644 --- a/docs/examples/java/account/update-prefs.md +++ b/docs/examples/java/account/update-prefs.md @@ -10,10 +10,10 @@ Client client = new Client() Account account = new Account(client); account.updatePrefs( - mapOf( - "language" to "en", - "timezone" to "UTC", - "darkTheme" to true + Map.of( + "language", "en", + "timezone", "UTC", + "darkTheme", true ), // prefs new CoroutineCallback<>((result, error) -> { if (error != null) { diff --git a/docs/examples/java/avatars/get-screenshot.md b/docs/examples/java/avatars/get-screenshot.md new file mode 100644 index 00000000..18743583 --- /dev/null +++ b/docs/examples/java/avatars/get-screenshot.md @@ -0,0 +1,45 @@ +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Avatars; +import io.appwrite.enums.Theme; +import io.appwrite.enums.Timezone; +import io.appwrite.enums.Output; + +Client client = new Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + .setSession(""); // The user session to authenticate with + +Avatars avatars = new Avatars(client); + +avatars.getScreenshot( + "https://example.com", // url + Map.of("a", "b"), // headers (optional) + 1, // viewportWidth (optional) + 1, // viewportHeight (optional) + 0.1, // scale (optional) + Theme.LIGHT, // theme (optional) + "", // userAgent (optional) + false, // fullpage (optional) + "", // locale (optional) + Timezone.AFRICA_ABIDJAN, // timezone (optional) + -90, // latitude (optional) + -180, // longitude (optional) + 0, // accuracy (optional) + false, // touch (optional) + List.of(), // permissions (optional) + 0, // sleep (optional) + 0, // width (optional) + 0, // height (optional) + -1, // quality (optional) + Output.JPG, // output (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + diff --git a/docs/examples/java/databases/create-collection.md b/docs/examples/java/databases/create-collection.md index 10eed04a..eea55558 100644 --- a/docs/examples/java/databases/create-collection.md +++ b/docs/examples/java/databases/create-collection.md @@ -1,8 +1,8 @@ import io.appwrite.Client; import io.appwrite.coroutines.CoroutineCallback; -import io.appwrite.services.Databases; import io.appwrite.Permission; import io.appwrite.Role; +import io.appwrite.services.Databases; Client client = new Client() .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint @@ -15,7 +15,7 @@ databases.createCollection( "", // databaseId "", // collectionId "", // name - listOf(Permission.read(Role.any())), // permissions (optional) + List.of(Permission.read(Role.any())), // permissions (optional) false, // documentSecurity (optional) false, // enabled (optional) new CoroutineCallback<>((result, error) -> { diff --git a/docs/examples/java/databases/create-document.md b/docs/examples/java/databases/create-document.md index aa6c9ea2..7ff195f6 100644 --- a/docs/examples/java/databases/create-document.md +++ b/docs/examples/java/databases/create-document.md @@ -1,8 +1,8 @@ import io.appwrite.Client; import io.appwrite.coroutines.CoroutineCallback; -import io.appwrite.services.Databases; import io.appwrite.Permission; import io.appwrite.Role; +import io.appwrite.services.Databases; Client client = new Client() .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint @@ -15,14 +15,14 @@ databases.createDocument( "", // databaseId "", // collectionId "", // documentId - mapOf( - "username" to "walter.obrien", - "email" to "walter.obrien@example.com", - "fullName" to "Walter O'Brien", - "age" to 30, - "isAdmin" to false + Map.of( + "username", "walter.obrien", + "email", "walter.obrien@example.com", + "fullName", "Walter O'Brien", + "age", 30, + "isAdmin", false ), // data - listOf(Permission.read(Role.any())), // permissions (optional) + List.of(Permission.read(Role.any())), // permissions (optional) "", // transactionId (optional) new CoroutineCallback<>((result, error) -> { if (error != null) { diff --git a/docs/examples/java/databases/create-documents.md b/docs/examples/java/databases/create-documents.md index 3a454097..be695fe8 100644 --- a/docs/examples/java/databases/create-documents.md +++ b/docs/examples/java/databases/create-documents.md @@ -12,7 +12,7 @@ Databases databases = new Databases(client); databases.createDocuments( "", // databaseId "", // collectionId - listOf(), // documents + List.of(), // documents "", // transactionId (optional) new CoroutineCallback<>((result, error) -> { if (error != null) { diff --git a/docs/examples/java/databases/create-enum-attribute.md b/docs/examples/java/databases/create-enum-attribute.md index 44202086..b8666666 100644 --- a/docs/examples/java/databases/create-enum-attribute.md +++ b/docs/examples/java/databases/create-enum-attribute.md @@ -13,7 +13,7 @@ databases.createEnumAttribute( "", // databaseId "", // collectionId "", // key - listOf(), // elements + List.of(), // elements false, // required "", // default (optional) false, // array (optional) diff --git a/docs/examples/java/databases/create-index.md b/docs/examples/java/databases/create-index.md index fe2d9bf6..1fb1efb8 100644 --- a/docs/examples/java/databases/create-index.md +++ b/docs/examples/java/databases/create-index.md @@ -15,9 +15,9 @@ databases.createIndex( "", // collectionId "", // key IndexType.KEY, // type - listOf(), // attributes - listOf(), // orders (optional) - listOf(), // lengths (optional) + List.of(), // attributes + List.of(), // orders (optional) + List.of(), // lengths (optional) new CoroutineCallback<>((result, error) -> { if (error != null) { error.printStackTrace(); diff --git a/docs/examples/java/databases/create-line-attribute.md b/docs/examples/java/databases/create-line-attribute.md index ad988b87..c0daeac6 100644 --- a/docs/examples/java/databases/create-line-attribute.md +++ b/docs/examples/java/databases/create-line-attribute.md @@ -14,7 +14,7 @@ databases.createLineAttribute( "", // collectionId "", // key false, // required - listOf([1, 2], [3, 4], [5, 6]), // default (optional) + List.of(List.of(1, 2), List.of(3, 4), List.of(5, 6)), // default (optional) new CoroutineCallback<>((result, error) -> { if (error != null) { error.printStackTrace(); diff --git a/docs/examples/java/databases/create-operations.md b/docs/examples/java/databases/create-operations.md index 2dad8a15..c935f82a 100644 --- a/docs/examples/java/databases/create-operations.md +++ b/docs/examples/java/databases/create-operations.md @@ -11,17 +11,15 @@ Databases databases = new Databases(client); databases.createOperations( "", // transactionId - listOf( - { - "action": "create", - "databaseId": "", - "collectionId": "", - "documentId": "", - "data": { - "name": "Walter O'Brien" - } - } - ), // operations (optional) + List.of(Map.of( + "action", "create", + "databaseId", "", + "collectionId", "", + "documentId", "", + "data", Map.of( + "name", "Walter O'Brien" + ) + )), // operations (optional) new CoroutineCallback<>((result, error) -> { if (error != null) { error.printStackTrace(); diff --git a/docs/examples/java/databases/create-point-attribute.md b/docs/examples/java/databases/create-point-attribute.md index 89d7cc71..c3b5d503 100644 --- a/docs/examples/java/databases/create-point-attribute.md +++ b/docs/examples/java/databases/create-point-attribute.md @@ -14,7 +14,7 @@ databases.createPointAttribute( "", // collectionId "", // key false, // required - listOf(1, 2), // default (optional) + List.of(1, 2), // default (optional) new CoroutineCallback<>((result, error) -> { if (error != null) { error.printStackTrace(); diff --git a/docs/examples/java/databases/create-polygon-attribute.md b/docs/examples/java/databases/create-polygon-attribute.md index 556fb384..4f8fe036 100644 --- a/docs/examples/java/databases/create-polygon-attribute.md +++ b/docs/examples/java/databases/create-polygon-attribute.md @@ -14,7 +14,7 @@ databases.createPolygonAttribute( "", // collectionId "", // key false, // required - listOf([[1, 2], [3, 4], [5, 6], [1, 2]]), // default (optional) + List.of(List.of(List.of(1, 2), List.of(3, 4), List.of(5, 6), List.of(1, 2))), // default (optional) new CoroutineCallback<>((result, error) -> { if (error != null) { error.printStackTrace(); diff --git a/docs/examples/java/databases/create-relationship-attribute.md b/docs/examples/java/databases/create-relationship-attribute.md index a67f4526..580be890 100644 --- a/docs/examples/java/databases/create-relationship-attribute.md +++ b/docs/examples/java/databases/create-relationship-attribute.md @@ -2,6 +2,7 @@ import io.appwrite.Client; import io.appwrite.coroutines.CoroutineCallback; import io.appwrite.services.Databases; import io.appwrite.enums.RelationshipType; +import io.appwrite.enums.RelationMutate; Client client = new Client() .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint diff --git a/docs/examples/java/databases/delete-documents.md b/docs/examples/java/databases/delete-documents.md index 958c40c3..f535ae77 100644 --- a/docs/examples/java/databases/delete-documents.md +++ b/docs/examples/java/databases/delete-documents.md @@ -12,7 +12,7 @@ Databases databases = new Databases(client); databases.deleteDocuments( "", // databaseId "", // collectionId - listOf(), // queries (optional) + List.of(), // queries (optional) "", // transactionId (optional) new CoroutineCallback<>((result, error) -> { if (error != null) { diff --git a/docs/examples/java/databases/get-document.md b/docs/examples/java/databases/get-document.md index 489447f5..d3e8b8b3 100644 --- a/docs/examples/java/databases/get-document.md +++ b/docs/examples/java/databases/get-document.md @@ -13,7 +13,7 @@ databases.getDocument( "", // databaseId "", // collectionId "", // documentId - listOf(), // queries (optional) + List.of(), // queries (optional) "", // transactionId (optional) new CoroutineCallback<>((result, error) -> { if (error != null) { diff --git a/docs/examples/java/databases/list-attributes.md b/docs/examples/java/databases/list-attributes.md index b1b3bd1b..dd883e23 100644 --- a/docs/examples/java/databases/list-attributes.md +++ b/docs/examples/java/databases/list-attributes.md @@ -12,7 +12,7 @@ Databases databases = new Databases(client); databases.listAttributes( "", // databaseId "", // collectionId - listOf(), // queries (optional) + List.of(), // queries (optional) false, // total (optional) new CoroutineCallback<>((result, error) -> { if (error != null) { diff --git a/docs/examples/java/databases/list-collections.md b/docs/examples/java/databases/list-collections.md index efb0e7f8..ddb47c99 100644 --- a/docs/examples/java/databases/list-collections.md +++ b/docs/examples/java/databases/list-collections.md @@ -11,7 +11,7 @@ Databases databases = new Databases(client); databases.listCollections( "", // databaseId - listOf(), // queries (optional) + List.of(), // queries (optional) "", // search (optional) false, // total (optional) new CoroutineCallback<>((result, error) -> { diff --git a/docs/examples/java/databases/list-documents.md b/docs/examples/java/databases/list-documents.md index 472d15ba..b8ef0717 100644 --- a/docs/examples/java/databases/list-documents.md +++ b/docs/examples/java/databases/list-documents.md @@ -12,7 +12,7 @@ Databases databases = new Databases(client); databases.listDocuments( "", // databaseId "", // collectionId - listOf(), // queries (optional) + List.of(), // queries (optional) "", // transactionId (optional) false, // total (optional) new CoroutineCallback<>((result, error) -> { diff --git a/docs/examples/java/databases/list-indexes.md b/docs/examples/java/databases/list-indexes.md index 5715af7d..c7019041 100644 --- a/docs/examples/java/databases/list-indexes.md +++ b/docs/examples/java/databases/list-indexes.md @@ -12,7 +12,7 @@ Databases databases = new Databases(client); databases.listIndexes( "", // databaseId "", // collectionId - listOf(), // queries (optional) + List.of(), // queries (optional) false, // total (optional) new CoroutineCallback<>((result, error) -> { if (error != null) { diff --git a/docs/examples/java/databases/list-transactions.md b/docs/examples/java/databases/list-transactions.md index 281fc120..8a6f6054 100644 --- a/docs/examples/java/databases/list-transactions.md +++ b/docs/examples/java/databases/list-transactions.md @@ -10,7 +10,7 @@ Client client = new Client() Databases databases = new Databases(client); databases.listTransactions( - listOf(), // queries (optional) + List.of(), // queries (optional) new CoroutineCallback<>((result, error) -> { if (error != null) { error.printStackTrace(); diff --git a/docs/examples/java/databases/list.md b/docs/examples/java/databases/list.md index a3f2d51f..32ef454a 100644 --- a/docs/examples/java/databases/list.md +++ b/docs/examples/java/databases/list.md @@ -10,7 +10,7 @@ Client client = new Client() Databases databases = new Databases(client); databases.list( - listOf(), // queries (optional) + List.of(), // queries (optional) "", // search (optional) false, // total (optional) new CoroutineCallback<>((result, error) -> { diff --git a/docs/examples/java/databases/update-collection.md b/docs/examples/java/databases/update-collection.md index 24d312da..898f1aaf 100644 --- a/docs/examples/java/databases/update-collection.md +++ b/docs/examples/java/databases/update-collection.md @@ -1,8 +1,8 @@ import io.appwrite.Client; import io.appwrite.coroutines.CoroutineCallback; -import io.appwrite.services.Databases; import io.appwrite.Permission; import io.appwrite.Role; +import io.appwrite.services.Databases; Client client = new Client() .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint @@ -15,7 +15,7 @@ databases.updateCollection( "", // databaseId "", // collectionId "", // name - listOf(Permission.read(Role.any())), // permissions (optional) + List.of(Permission.read(Role.any())), // permissions (optional) false, // documentSecurity (optional) false, // enabled (optional) new CoroutineCallback<>((result, error) -> { diff --git a/docs/examples/java/databases/update-document.md b/docs/examples/java/databases/update-document.md index 749de99f..0638225b 100644 --- a/docs/examples/java/databases/update-document.md +++ b/docs/examples/java/databases/update-document.md @@ -1,8 +1,8 @@ import io.appwrite.Client; import io.appwrite.coroutines.CoroutineCallback; -import io.appwrite.services.Databases; import io.appwrite.Permission; import io.appwrite.Role; +import io.appwrite.services.Databases; Client client = new Client() .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint @@ -15,8 +15,8 @@ databases.updateDocument( "", // databaseId "", // collectionId "", // documentId - mapOf( "a" to "b" ), // data (optional) - listOf(Permission.read(Role.any())), // permissions (optional) + Map.of("a", "b"), // data (optional) + List.of(Permission.read(Role.any())), // permissions (optional) "", // transactionId (optional) new CoroutineCallback<>((result, error) -> { if (error != null) { diff --git a/docs/examples/java/databases/update-documents.md b/docs/examples/java/databases/update-documents.md index a685ac81..57a82f56 100644 --- a/docs/examples/java/databases/update-documents.md +++ b/docs/examples/java/databases/update-documents.md @@ -12,8 +12,8 @@ Databases databases = new Databases(client); databases.updateDocuments( "", // databaseId "", // collectionId - mapOf( "a" to "b" ), // data (optional) - listOf(), // queries (optional) + Map.of("a", "b"), // data (optional) + List.of(), // queries (optional) "", // transactionId (optional) new CoroutineCallback<>((result, error) -> { if (error != null) { diff --git a/docs/examples/java/databases/update-enum-attribute.md b/docs/examples/java/databases/update-enum-attribute.md index 89606806..8870e372 100644 --- a/docs/examples/java/databases/update-enum-attribute.md +++ b/docs/examples/java/databases/update-enum-attribute.md @@ -13,7 +13,7 @@ databases.updateEnumAttribute( "", // databaseId "", // collectionId "", // key - listOf(), // elements + List.of(), // elements false, // required "", // default "", // newKey (optional) diff --git a/docs/examples/java/databases/update-line-attribute.md b/docs/examples/java/databases/update-line-attribute.md index 6a4265bb..14d83eee 100644 --- a/docs/examples/java/databases/update-line-attribute.md +++ b/docs/examples/java/databases/update-line-attribute.md @@ -14,7 +14,7 @@ databases.updateLineAttribute( "", // collectionId "", // key false, // required - listOf([1, 2], [3, 4], [5, 6]), // default (optional) + List.of(List.of(1, 2), List.of(3, 4), List.of(5, 6)), // default (optional) "", // newKey (optional) new CoroutineCallback<>((result, error) -> { if (error != null) { diff --git a/docs/examples/java/databases/update-point-attribute.md b/docs/examples/java/databases/update-point-attribute.md index 38d48c27..5d44d7a1 100644 --- a/docs/examples/java/databases/update-point-attribute.md +++ b/docs/examples/java/databases/update-point-attribute.md @@ -14,7 +14,7 @@ databases.updatePointAttribute( "", // collectionId "", // key false, // required - listOf(1, 2), // default (optional) + List.of(1, 2), // default (optional) "", // newKey (optional) new CoroutineCallback<>((result, error) -> { if (error != null) { diff --git a/docs/examples/java/databases/update-polygon-attribute.md b/docs/examples/java/databases/update-polygon-attribute.md index 6e6fd085..2c530b9a 100644 --- a/docs/examples/java/databases/update-polygon-attribute.md +++ b/docs/examples/java/databases/update-polygon-attribute.md @@ -14,7 +14,7 @@ databases.updatePolygonAttribute( "", // collectionId "", // key false, // required - listOf([[1, 2], [3, 4], [5, 6], [1, 2]]), // default (optional) + List.of(List.of(List.of(1, 2), List.of(3, 4), List.of(5, 6), List.of(1, 2))), // default (optional) "", // newKey (optional) new CoroutineCallback<>((result, error) -> { if (error != null) { diff --git a/docs/examples/java/databases/update-relationship-attribute.md b/docs/examples/java/databases/update-relationship-attribute.md index 8af20e91..998f0beb 100644 --- a/docs/examples/java/databases/update-relationship-attribute.md +++ b/docs/examples/java/databases/update-relationship-attribute.md @@ -1,6 +1,7 @@ import io.appwrite.Client; import io.appwrite.coroutines.CoroutineCallback; import io.appwrite.services.Databases; +import io.appwrite.enums.RelationMutate; Client client = new Client() .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint diff --git a/docs/examples/java/databases/upsert-document.md b/docs/examples/java/databases/upsert-document.md index 4f156bbf..ec99390e 100644 --- a/docs/examples/java/databases/upsert-document.md +++ b/docs/examples/java/databases/upsert-document.md @@ -1,8 +1,8 @@ import io.appwrite.Client; import io.appwrite.coroutines.CoroutineCallback; -import io.appwrite.services.Databases; import io.appwrite.Permission; import io.appwrite.Role; +import io.appwrite.services.Databases; Client client = new Client() .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint @@ -15,8 +15,8 @@ databases.upsertDocument( "", // databaseId "", // collectionId "", // documentId - mapOf( "a" to "b" ), // data - listOf(Permission.read(Role.any())), // permissions (optional) + Map.of("a", "b"), // data + List.of(Permission.read(Role.any())), // permissions (optional) "", // transactionId (optional) new CoroutineCallback<>((result, error) -> { if (error != null) { diff --git a/docs/examples/java/databases/upsert-documents.md b/docs/examples/java/databases/upsert-documents.md index b8fcd878..ee4450fc 100644 --- a/docs/examples/java/databases/upsert-documents.md +++ b/docs/examples/java/databases/upsert-documents.md @@ -12,7 +12,7 @@ Databases databases = new Databases(client); databases.upsertDocuments( "", // databaseId "", // collectionId - listOf(), // documents + List.of(), // documents "", // transactionId (optional) new CoroutineCallback<>((result, error) -> { if (error != null) { diff --git a/docs/examples/java/functions/create-execution.md b/docs/examples/java/functions/create-execution.md index 93efa0ad..98a4d1b5 100644 --- a/docs/examples/java/functions/create-execution.md +++ b/docs/examples/java/functions/create-execution.md @@ -1,6 +1,7 @@ import io.appwrite.Client; import io.appwrite.coroutines.CoroutineCallback; import io.appwrite.services.Functions; +import io.appwrite.enums.ExecutionMethod; Client client = new Client() .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint @@ -15,7 +16,7 @@ functions.createExecution( false, // async (optional) "", // path (optional) ExecutionMethod.GET, // method (optional) - mapOf( "a" to "b" ), // headers (optional) + Map.of("a", "b"), // headers (optional) "", // scheduledAt (optional) new CoroutineCallback<>((result, error) -> { if (error != null) { diff --git a/docs/examples/java/functions/create-template-deployment.md b/docs/examples/java/functions/create-template-deployment.md index 53b5a9ae..59c105df 100644 --- a/docs/examples/java/functions/create-template-deployment.md +++ b/docs/examples/java/functions/create-template-deployment.md @@ -1,6 +1,7 @@ import io.appwrite.Client; import io.appwrite.coroutines.CoroutineCallback; import io.appwrite.services.Functions; +import io.appwrite.enums.TemplateReferenceType; Client client = new Client() .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint @@ -14,7 +15,8 @@ functions.createTemplateDeployment( "", // repository "", // owner "", // rootDirectory - "", // version + TemplateReferenceType.COMMIT, // type + "", // reference false, // activate (optional) new CoroutineCallback<>((result, error) -> { if (error != null) { diff --git a/docs/examples/java/functions/create-vcs-deployment.md b/docs/examples/java/functions/create-vcs-deployment.md index 9274cd88..25f2f284 100644 --- a/docs/examples/java/functions/create-vcs-deployment.md +++ b/docs/examples/java/functions/create-vcs-deployment.md @@ -1,7 +1,7 @@ import io.appwrite.Client; import io.appwrite.coroutines.CoroutineCallback; import io.appwrite.services.Functions; -import io.appwrite.enums.VCSDeploymentType; +import io.appwrite.enums.VCSReferenceType; Client client = new Client() .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint @@ -12,7 +12,7 @@ Functions functions = new Functions(client); functions.createVcsDeployment( "", // functionId - VCSDeploymentType.BRANCH, // type + VCSReferenceType.BRANCH, // type "", // reference false, // activate (optional) new CoroutineCallback<>((result, error) -> { diff --git a/docs/examples/java/functions/create.md b/docs/examples/java/functions/create.md index 71871287..17e29114 100644 --- a/docs/examples/java/functions/create.md +++ b/docs/examples/java/functions/create.md @@ -13,16 +13,16 @@ Functions functions = new Functions(client); functions.create( "", // functionId "", // name - .NODE_14_5, // runtime - listOf("any"), // execute (optional) - listOf(), // events (optional) + Runtime.NODE_14_5, // runtime + List.of("any"), // execute (optional) + List.of(), // events (optional) "", // schedule (optional) 1, // timeout (optional) false, // enabled (optional) false, // logging (optional) "", // entrypoint (optional) "", // commands (optional) - listOf(), // scopes (optional) + List.of(), // scopes (optional) "", // installationId (optional) "", // providerRepositoryId (optional) "", // providerBranch (optional) diff --git a/docs/examples/java/functions/get-deployment-download.md b/docs/examples/java/functions/get-deployment-download.md index d522b12c..2b6d38a7 100644 --- a/docs/examples/java/functions/get-deployment-download.md +++ b/docs/examples/java/functions/get-deployment-download.md @@ -1,6 +1,7 @@ import io.appwrite.Client; import io.appwrite.coroutines.CoroutineCallback; import io.appwrite.services.Functions; +import io.appwrite.enums.DeploymentDownloadType; Client client = new Client() .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint diff --git a/docs/examples/java/functions/list-deployments.md b/docs/examples/java/functions/list-deployments.md index a0ea8b68..a92cf079 100644 --- a/docs/examples/java/functions/list-deployments.md +++ b/docs/examples/java/functions/list-deployments.md @@ -11,7 +11,7 @@ Functions functions = new Functions(client); functions.listDeployments( "", // functionId - listOf(), // queries (optional) + List.of(), // queries (optional) "", // search (optional) false, // total (optional) new CoroutineCallback<>((result, error) -> { diff --git a/docs/examples/java/functions/list-executions.md b/docs/examples/java/functions/list-executions.md index 8026d473..2b97ab3b 100644 --- a/docs/examples/java/functions/list-executions.md +++ b/docs/examples/java/functions/list-executions.md @@ -11,7 +11,7 @@ Functions functions = new Functions(client); functions.listExecutions( "", // functionId - listOf(), // queries (optional) + List.of(), // queries (optional) false, // total (optional) new CoroutineCallback<>((result, error) -> { if (error != null) { diff --git a/docs/examples/java/functions/list.md b/docs/examples/java/functions/list.md index 5d0f59c3..712510db 100644 --- a/docs/examples/java/functions/list.md +++ b/docs/examples/java/functions/list.md @@ -10,7 +10,7 @@ Client client = new Client() Functions functions = new Functions(client); functions.list( - listOf(), // queries (optional) + List.of(), // queries (optional) "", // search (optional) false, // total (optional) new CoroutineCallback<>((result, error) -> { diff --git a/docs/examples/java/functions/update.md b/docs/examples/java/functions/update.md index 5956c57b..4b54a636 100644 --- a/docs/examples/java/functions/update.md +++ b/docs/examples/java/functions/update.md @@ -1,6 +1,7 @@ import io.appwrite.Client; import io.appwrite.coroutines.CoroutineCallback; import io.appwrite.services.Functions; +import io.appwrite.enums.Runtime; Client client = new Client() .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint @@ -12,16 +13,16 @@ Functions functions = new Functions(client); functions.update( "", // functionId "", // name - .NODE_14_5, // runtime (optional) - listOf("any"), // execute (optional) - listOf(), // events (optional) + Runtime.NODE_14_5, // runtime (optional) + List.of("any"), // execute (optional) + List.of(), // events (optional) "", // schedule (optional) 1, // timeout (optional) false, // enabled (optional) false, // logging (optional) "", // entrypoint (optional) "", // commands (optional) - listOf(), // scopes (optional) + List.of(), // scopes (optional) "", // installationId (optional) "", // providerRepositoryId (optional) "", // providerBranch (optional) diff --git a/docs/examples/java/graphql/mutation.md b/docs/examples/java/graphql/mutation.md index 77889245..baf41a8a 100644 --- a/docs/examples/java/graphql/mutation.md +++ b/docs/examples/java/graphql/mutation.md @@ -10,7 +10,7 @@ Client client = new Client() Graphql graphql = new Graphql(client); graphql.mutation( - mapOf( "a" to "b" ), // query + Map.of("a", "b"), // query new CoroutineCallback<>((result, error) -> { if (error != null) { error.printStackTrace(); diff --git a/docs/examples/java/graphql/query.md b/docs/examples/java/graphql/query.md index e109d523..381da3fb 100644 --- a/docs/examples/java/graphql/query.md +++ b/docs/examples/java/graphql/query.md @@ -10,7 +10,7 @@ Client client = new Client() Graphql graphql = new Graphql(client); graphql.query( - mapOf( "a" to "b" ), // query + Map.of("a", "b"), // query new CoroutineCallback<>((result, error) -> { if (error != null) { error.printStackTrace(); diff --git a/docs/examples/java/health/get-failed-jobs.md b/docs/examples/java/health/get-failed-jobs.md index d2b81bd0..0495e265 100644 --- a/docs/examples/java/health/get-failed-jobs.md +++ b/docs/examples/java/health/get-failed-jobs.md @@ -11,7 +11,7 @@ Client client = new Client() Health health = new Health(client); health.getFailedJobs( - .V1_DATABASE, // name + Name.V1_DATABASE, // name 0, // threshold (optional) new CoroutineCallback<>((result, error) -> { if (error != null) { diff --git a/docs/examples/java/messaging/create-email.md b/docs/examples/java/messaging/create-email.md index d6ab5ee1..ca654e6a 100644 --- a/docs/examples/java/messaging/create-email.md +++ b/docs/examples/java/messaging/create-email.md @@ -13,12 +13,12 @@ messaging.createEmail( "", // messageId "", // subject "", // content - listOf(), // topics (optional) - listOf(), // users (optional) - listOf(), // targets (optional) - listOf(), // cc (optional) - listOf(), // bcc (optional) - listOf(), // attachments (optional) + List.of(), // topics (optional) + List.of(), // users (optional) + List.of(), // targets (optional) + List.of(), // cc (optional) + List.of(), // bcc (optional) + List.of(), // attachments (optional) false, // draft (optional) false, // html (optional) "", // scheduledAt (optional) diff --git a/docs/examples/java/messaging/create-fcm-provider.md b/docs/examples/java/messaging/create-fcm-provider.md index 0d67e28c..554ab3cb 100644 --- a/docs/examples/java/messaging/create-fcm-provider.md +++ b/docs/examples/java/messaging/create-fcm-provider.md @@ -12,7 +12,7 @@ Messaging messaging = new Messaging(client); messaging.createFCMProvider( "", // providerId "", // name - mapOf( "a" to "b" ), // serviceAccountJSON (optional) + Map.of("a", "b"), // serviceAccountJSON (optional) false, // enabled (optional) new CoroutineCallback<>((result, error) -> { if (error != null) { diff --git a/docs/examples/java/messaging/create-push.md b/docs/examples/java/messaging/create-push.md index 14e8ca26..7ab3541a 100644 --- a/docs/examples/java/messaging/create-push.md +++ b/docs/examples/java/messaging/create-push.md @@ -1,6 +1,7 @@ import io.appwrite.Client; import io.appwrite.coroutines.CoroutineCallback; import io.appwrite.services.Messaging; +import io.appwrite.enums.MessagePriority; Client client = new Client() .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint @@ -13,10 +14,10 @@ messaging.createPush( "", // messageId "", // title (optional) "<BODY>", // body (optional) - listOf(), // topics (optional) - listOf(), // users (optional) - listOf(), // targets (optional) - mapOf( "a" to "b" ), // data (optional) + List.of(), // topics (optional) + List.of(), // users (optional) + List.of(), // targets (optional) + Map.of("a", "b"), // data (optional) "<ACTION>", // action (optional) "<ID1:ID2>", // image (optional) "<ICON>", // icon (optional) diff --git a/docs/examples/java/messaging/create-sms.md b/docs/examples/java/messaging/create-sms.md index ca40cc33..5ac95079 100644 --- a/docs/examples/java/messaging/create-sms.md +++ b/docs/examples/java/messaging/create-sms.md @@ -12,9 +12,9 @@ Messaging messaging = new Messaging(client); messaging.createSMS( "<MESSAGE_ID>", // messageId "<CONTENT>", // content - listOf(), // topics (optional) - listOf(), // users (optional) - listOf(), // targets (optional) + List.of(), // topics (optional) + List.of(), // users (optional) + List.of(), // targets (optional) false, // draft (optional) "", // scheduledAt (optional) new CoroutineCallback<>((result, error) -> { diff --git a/docs/examples/java/messaging/create-smtp-provider.md b/docs/examples/java/messaging/create-smtp-provider.md index 1f1a0f99..966436e3 100644 --- a/docs/examples/java/messaging/create-smtp-provider.md +++ b/docs/examples/java/messaging/create-smtp-provider.md @@ -1,6 +1,7 @@ import io.appwrite.Client; import io.appwrite.coroutines.CoroutineCallback; import io.appwrite.services.Messaging; +import io.appwrite.enums.SmtpEncryption; Client client = new Client() .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint diff --git a/docs/examples/java/messaging/create-topic.md b/docs/examples/java/messaging/create-topic.md index 63a24b46..ec55053d 100644 --- a/docs/examples/java/messaging/create-topic.md +++ b/docs/examples/java/messaging/create-topic.md @@ -12,7 +12,7 @@ Messaging messaging = new Messaging(client); messaging.createTopic( "<TOPIC_ID>", // topicId "<NAME>", // name - listOf("any"), // subscribe (optional) + List.of("any"), // subscribe (optional) new CoroutineCallback<>((result, error) -> { if (error != null) { error.printStackTrace(); diff --git a/docs/examples/java/messaging/list-message-logs.md b/docs/examples/java/messaging/list-message-logs.md index 253299cc..30469ffc 100644 --- a/docs/examples/java/messaging/list-message-logs.md +++ b/docs/examples/java/messaging/list-message-logs.md @@ -11,7 +11,7 @@ Messaging messaging = new Messaging(client); messaging.listMessageLogs( "<MESSAGE_ID>", // messageId - listOf(), // queries (optional) + List.of(), // queries (optional) false, // total (optional) new CoroutineCallback<>((result, error) -> { if (error != null) { diff --git a/docs/examples/java/messaging/list-messages.md b/docs/examples/java/messaging/list-messages.md index 65352229..8af8085d 100644 --- a/docs/examples/java/messaging/list-messages.md +++ b/docs/examples/java/messaging/list-messages.md @@ -10,7 +10,7 @@ Client client = new Client() Messaging messaging = new Messaging(client); messaging.listMessages( - listOf(), // queries (optional) + List.of(), // queries (optional) "<SEARCH>", // search (optional) false, // total (optional) new CoroutineCallback<>((result, error) -> { diff --git a/docs/examples/java/messaging/list-provider-logs.md b/docs/examples/java/messaging/list-provider-logs.md index 3bce2114..e62dedf8 100644 --- a/docs/examples/java/messaging/list-provider-logs.md +++ b/docs/examples/java/messaging/list-provider-logs.md @@ -11,7 +11,7 @@ Messaging messaging = new Messaging(client); messaging.listProviderLogs( "<PROVIDER_ID>", // providerId - listOf(), // queries (optional) + List.of(), // queries (optional) false, // total (optional) new CoroutineCallback<>((result, error) -> { if (error != null) { diff --git a/docs/examples/java/messaging/list-providers.md b/docs/examples/java/messaging/list-providers.md index 115cd417..b52408c0 100644 --- a/docs/examples/java/messaging/list-providers.md +++ b/docs/examples/java/messaging/list-providers.md @@ -10,7 +10,7 @@ Client client = new Client() Messaging messaging = new Messaging(client); messaging.listProviders( - listOf(), // queries (optional) + List.of(), // queries (optional) "<SEARCH>", // search (optional) false, // total (optional) new CoroutineCallback<>((result, error) -> { diff --git a/docs/examples/java/messaging/list-subscriber-logs.md b/docs/examples/java/messaging/list-subscriber-logs.md index e2e1e946..317db329 100644 --- a/docs/examples/java/messaging/list-subscriber-logs.md +++ b/docs/examples/java/messaging/list-subscriber-logs.md @@ -11,7 +11,7 @@ Messaging messaging = new Messaging(client); messaging.listSubscriberLogs( "<SUBSCRIBER_ID>", // subscriberId - listOf(), // queries (optional) + List.of(), // queries (optional) false, // total (optional) new CoroutineCallback<>((result, error) -> { if (error != null) { diff --git a/docs/examples/java/messaging/list-subscribers.md b/docs/examples/java/messaging/list-subscribers.md index 3b87ed86..cc552179 100644 --- a/docs/examples/java/messaging/list-subscribers.md +++ b/docs/examples/java/messaging/list-subscribers.md @@ -11,7 +11,7 @@ Messaging messaging = new Messaging(client); messaging.listSubscribers( "<TOPIC_ID>", // topicId - listOf(), // queries (optional) + List.of(), // queries (optional) "<SEARCH>", // search (optional) false, // total (optional) new CoroutineCallback<>((result, error) -> { diff --git a/docs/examples/java/messaging/list-targets.md b/docs/examples/java/messaging/list-targets.md index db6aee1f..b123218d 100644 --- a/docs/examples/java/messaging/list-targets.md +++ b/docs/examples/java/messaging/list-targets.md @@ -11,7 +11,7 @@ Messaging messaging = new Messaging(client); messaging.listTargets( "<MESSAGE_ID>", // messageId - listOf(), // queries (optional) + List.of(), // queries (optional) false, // total (optional) new CoroutineCallback<>((result, error) -> { if (error != null) { diff --git a/docs/examples/java/messaging/list-topic-logs.md b/docs/examples/java/messaging/list-topic-logs.md index 800bb6b7..d2d88095 100644 --- a/docs/examples/java/messaging/list-topic-logs.md +++ b/docs/examples/java/messaging/list-topic-logs.md @@ -11,7 +11,7 @@ Messaging messaging = new Messaging(client); messaging.listTopicLogs( "<TOPIC_ID>", // topicId - listOf(), // queries (optional) + List.of(), // queries (optional) false, // total (optional) new CoroutineCallback<>((result, error) -> { if (error != null) { diff --git a/docs/examples/java/messaging/list-topics.md b/docs/examples/java/messaging/list-topics.md index bd53b41d..ea258c27 100644 --- a/docs/examples/java/messaging/list-topics.md +++ b/docs/examples/java/messaging/list-topics.md @@ -10,7 +10,7 @@ Client client = new Client() Messaging messaging = new Messaging(client); messaging.listTopics( - listOf(), // queries (optional) + List.of(), // queries (optional) "<SEARCH>", // search (optional) false, // total (optional) new CoroutineCallback<>((result, error) -> { diff --git a/docs/examples/java/messaging/update-email.md b/docs/examples/java/messaging/update-email.md index 56e97678..1bed63b3 100644 --- a/docs/examples/java/messaging/update-email.md +++ b/docs/examples/java/messaging/update-email.md @@ -11,17 +11,17 @@ Messaging messaging = new Messaging(client); messaging.updateEmail( "<MESSAGE_ID>", // messageId - listOf(), // topics (optional) - listOf(), // users (optional) - listOf(), // targets (optional) + List.of(), // topics (optional) + List.of(), // users (optional) + List.of(), // targets (optional) "<SUBJECT>", // subject (optional) "<CONTENT>", // content (optional) false, // draft (optional) false, // html (optional) - listOf(), // cc (optional) - listOf(), // bcc (optional) + List.of(), // cc (optional) + List.of(), // bcc (optional) "", // scheduledAt (optional) - listOf(), // attachments (optional) + List.of(), // attachments (optional) new CoroutineCallback<>((result, error) -> { if (error != null) { error.printStackTrace(); diff --git a/docs/examples/java/messaging/update-fcm-provider.md b/docs/examples/java/messaging/update-fcm-provider.md index dd92f932..2976ff5a 100644 --- a/docs/examples/java/messaging/update-fcm-provider.md +++ b/docs/examples/java/messaging/update-fcm-provider.md @@ -13,7 +13,7 @@ messaging.updateFCMProvider( "<PROVIDER_ID>", // providerId "<NAME>", // name (optional) false, // enabled (optional) - mapOf( "a" to "b" ), // serviceAccountJSON (optional) + Map.of("a", "b"), // serviceAccountJSON (optional) new CoroutineCallback<>((result, error) -> { if (error != null) { error.printStackTrace(); diff --git a/docs/examples/java/messaging/update-push.md b/docs/examples/java/messaging/update-push.md index ce566836..80f70130 100644 --- a/docs/examples/java/messaging/update-push.md +++ b/docs/examples/java/messaging/update-push.md @@ -1,6 +1,7 @@ import io.appwrite.Client; import io.appwrite.coroutines.CoroutineCallback; import io.appwrite.services.Messaging; +import io.appwrite.enums.MessagePriority; Client client = new Client() .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint @@ -11,12 +12,12 @@ Messaging messaging = new Messaging(client); messaging.updatePush( "<MESSAGE_ID>", // messageId - listOf(), // topics (optional) - listOf(), // users (optional) - listOf(), // targets (optional) + List.of(), // topics (optional) + List.of(), // users (optional) + List.of(), // targets (optional) "<TITLE>", // title (optional) "<BODY>", // body (optional) - mapOf( "a" to "b" ), // data (optional) + Map.of("a", "b"), // data (optional) "<ACTION>", // action (optional) "<ID1:ID2>", // image (optional) "<ICON>", // icon (optional) diff --git a/docs/examples/java/messaging/update-sms.md b/docs/examples/java/messaging/update-sms.md index c59505b6..4df9588f 100644 --- a/docs/examples/java/messaging/update-sms.md +++ b/docs/examples/java/messaging/update-sms.md @@ -11,9 +11,9 @@ Messaging messaging = new Messaging(client); messaging.updateSMS( "<MESSAGE_ID>", // messageId - listOf(), // topics (optional) - listOf(), // users (optional) - listOf(), // targets (optional) + List.of(), // topics (optional) + List.of(), // users (optional) + List.of(), // targets (optional) "<CONTENT>", // content (optional) false, // draft (optional) "", // scheduledAt (optional) diff --git a/docs/examples/java/messaging/update-smtp-provider.md b/docs/examples/java/messaging/update-smtp-provider.md index 36f12003..c8ab7571 100644 --- a/docs/examples/java/messaging/update-smtp-provider.md +++ b/docs/examples/java/messaging/update-smtp-provider.md @@ -1,6 +1,7 @@ import io.appwrite.Client; import io.appwrite.coroutines.CoroutineCallback; import io.appwrite.services.Messaging; +import io.appwrite.enums.SmtpEncryption; Client client = new Client() .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint diff --git a/docs/examples/java/messaging/update-topic.md b/docs/examples/java/messaging/update-topic.md index be9c44dc..0d651c78 100644 --- a/docs/examples/java/messaging/update-topic.md +++ b/docs/examples/java/messaging/update-topic.md @@ -12,7 +12,7 @@ Messaging messaging = new Messaging(client); messaging.updateTopic( "<TOPIC_ID>", // topicId "<NAME>", // name (optional) - listOf("any"), // subscribe (optional) + List.of("any"), // subscribe (optional) new CoroutineCallback<>((result, error) -> { if (error != null) { error.printStackTrace(); diff --git a/docs/examples/java/sites/create-template-deployment.md b/docs/examples/java/sites/create-template-deployment.md index 63aba4a0..e7fee585 100644 --- a/docs/examples/java/sites/create-template-deployment.md +++ b/docs/examples/java/sites/create-template-deployment.md @@ -1,6 +1,7 @@ import io.appwrite.Client; import io.appwrite.coroutines.CoroutineCallback; import io.appwrite.services.Sites; +import io.appwrite.enums.TemplateReferenceType; Client client = new Client() .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint @@ -14,7 +15,8 @@ sites.createTemplateDeployment( "<REPOSITORY>", // repository "<OWNER>", // owner "<ROOT_DIRECTORY>", // rootDirectory - "<VERSION>", // version + TemplateReferenceType.BRANCH, // type + "<REFERENCE>", // reference false, // activate (optional) new CoroutineCallback<>((result, error) -> { if (error != null) { diff --git a/docs/examples/java/sites/create-vcs-deployment.md b/docs/examples/java/sites/create-vcs-deployment.md index 754eb264..8a1dca95 100644 --- a/docs/examples/java/sites/create-vcs-deployment.md +++ b/docs/examples/java/sites/create-vcs-deployment.md @@ -1,7 +1,7 @@ import io.appwrite.Client; import io.appwrite.coroutines.CoroutineCallback; import io.appwrite.services.Sites; -import io.appwrite.enums.VCSDeploymentType; +import io.appwrite.enums.VCSReferenceType; Client client = new Client() .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint @@ -12,7 +12,7 @@ Sites sites = new Sites(client); sites.createVcsDeployment( "<SITE_ID>", // siteId - VCSDeploymentType.BRANCH, // type + VCSReferenceType.BRANCH, // type "<REFERENCE>", // reference false, // activate (optional) new CoroutineCallback<>((result, error) -> { diff --git a/docs/examples/java/sites/create.md b/docs/examples/java/sites/create.md index 19664ec5..11e0dbba 100644 --- a/docs/examples/java/sites/create.md +++ b/docs/examples/java/sites/create.md @@ -3,6 +3,7 @@ import io.appwrite.coroutines.CoroutineCallback; import io.appwrite.services.Sites; import io.appwrite.enums.Framework; import io.appwrite.enums.BuildRuntime; +import io.appwrite.enums.Adapter; Client client = new Client() .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint @@ -14,15 +15,15 @@ Sites sites = new Sites(client); sites.create( "<SITE_ID>", // siteId "<NAME>", // name - .ANALOG, // framework - .NODE_14_5, // buildRuntime + Framework.ANALOG, // framework + BuildRuntime.NODE_14_5, // buildRuntime false, // enabled (optional) false, // logging (optional) 1, // timeout (optional) "<INSTALL_COMMAND>", // installCommand (optional) "<BUILD_COMMAND>", // buildCommand (optional) "<OUTPUT_DIRECTORY>", // outputDirectory (optional) - .STATIC, // adapter (optional) + Adapter.STATIC, // adapter (optional) "<INSTALLATION_ID>", // installationId (optional) "<FALLBACK_FILE>", // fallbackFile (optional) "<PROVIDER_REPOSITORY_ID>", // providerRepositoryId (optional) diff --git a/docs/examples/java/sites/get-deployment-download.md b/docs/examples/java/sites/get-deployment-download.md index 5875c726..ce26ba8c 100644 --- a/docs/examples/java/sites/get-deployment-download.md +++ b/docs/examples/java/sites/get-deployment-download.md @@ -1,6 +1,7 @@ import io.appwrite.Client; import io.appwrite.coroutines.CoroutineCallback; import io.appwrite.services.Sites; +import io.appwrite.enums.DeploymentDownloadType; Client client = new Client() .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint diff --git a/docs/examples/java/sites/list-deployments.md b/docs/examples/java/sites/list-deployments.md index a19f4ecf..a1953cdf 100644 --- a/docs/examples/java/sites/list-deployments.md +++ b/docs/examples/java/sites/list-deployments.md @@ -11,7 +11,7 @@ Sites sites = new Sites(client); sites.listDeployments( "<SITE_ID>", // siteId - listOf(), // queries (optional) + List.of(), // queries (optional) "<SEARCH>", // search (optional) false, // total (optional) new CoroutineCallback<>((result, error) -> { diff --git a/docs/examples/java/sites/list-logs.md b/docs/examples/java/sites/list-logs.md index 85c2171a..095f0ae9 100644 --- a/docs/examples/java/sites/list-logs.md +++ b/docs/examples/java/sites/list-logs.md @@ -11,7 +11,7 @@ Sites sites = new Sites(client); sites.listLogs( "<SITE_ID>", // siteId - listOf(), // queries (optional) + List.of(), // queries (optional) false, // total (optional) new CoroutineCallback<>((result, error) -> { if (error != null) { diff --git a/docs/examples/java/sites/list.md b/docs/examples/java/sites/list.md index 20b5533c..d8c69419 100644 --- a/docs/examples/java/sites/list.md +++ b/docs/examples/java/sites/list.md @@ -10,7 +10,7 @@ Client client = new Client() Sites sites = new Sites(client); sites.list( - listOf(), // queries (optional) + List.of(), // queries (optional) "<SEARCH>", // search (optional) false, // total (optional) new CoroutineCallback<>((result, error) -> { diff --git a/docs/examples/java/sites/update.md b/docs/examples/java/sites/update.md index 9a8b577c..0c4024b8 100644 --- a/docs/examples/java/sites/update.md +++ b/docs/examples/java/sites/update.md @@ -2,6 +2,8 @@ import io.appwrite.Client; import io.appwrite.coroutines.CoroutineCallback; import io.appwrite.services.Sites; import io.appwrite.enums.Framework; +import io.appwrite.enums.BuildRuntime; +import io.appwrite.enums.Adapter; Client client = new Client() .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint @@ -13,15 +15,15 @@ Sites sites = new Sites(client); sites.update( "<SITE_ID>", // siteId "<NAME>", // name - .ANALOG, // framework + Framework.ANALOG, // framework false, // enabled (optional) false, // logging (optional) 1, // timeout (optional) "<INSTALL_COMMAND>", // installCommand (optional) "<BUILD_COMMAND>", // buildCommand (optional) "<OUTPUT_DIRECTORY>", // outputDirectory (optional) - .NODE_14_5, // buildRuntime (optional) - .STATIC, // adapter (optional) + BuildRuntime.NODE_14_5, // buildRuntime (optional) + Adapter.STATIC, // adapter (optional) "<FALLBACK_FILE>", // fallbackFile (optional) "<INSTALLATION_ID>", // installationId (optional) "<PROVIDER_REPOSITORY_ID>", // providerRepositoryId (optional) diff --git a/docs/examples/java/storage/create-bucket.md b/docs/examples/java/storage/create-bucket.md index d48db240..0af282a0 100644 --- a/docs/examples/java/storage/create-bucket.md +++ b/docs/examples/java/storage/create-bucket.md @@ -1,8 +1,9 @@ import io.appwrite.Client; import io.appwrite.coroutines.CoroutineCallback; -import io.appwrite.services.Storage; import io.appwrite.Permission; import io.appwrite.Role; +import io.appwrite.services.Storage; +import io.appwrite.enums.Compression; Client client = new Client() .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint @@ -14,14 +15,15 @@ Storage storage = new Storage(client); storage.createBucket( "<BUCKET_ID>", // bucketId "<NAME>", // name - listOf(Permission.read(Role.any())), // permissions (optional) + List.of(Permission.read(Role.any())), // permissions (optional) false, // fileSecurity (optional) false, // enabled (optional) 1, // maximumFileSize (optional) - listOf(), // allowedFileExtensions (optional) - .NONE, // compression (optional) + List.of(), // allowedFileExtensions (optional) + Compression.NONE, // compression (optional) false, // encryption (optional) false, // antivirus (optional) + false, // transformations (optional) new CoroutineCallback<>((result, error) -> { if (error != null) { error.printStackTrace(); diff --git a/docs/examples/java/storage/create-file.md b/docs/examples/java/storage/create-file.md index 7ddf8913..abaeee3e 100644 --- a/docs/examples/java/storage/create-file.md +++ b/docs/examples/java/storage/create-file.md @@ -1,9 +1,9 @@ import io.appwrite.Client; import io.appwrite.coroutines.CoroutineCallback; import io.appwrite.models.InputFile; -import io.appwrite.services.Storage; import io.appwrite.Permission; import io.appwrite.Role; +import io.appwrite.services.Storage; Client client = new Client() .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint @@ -16,7 +16,7 @@ storage.createFile( "<BUCKET_ID>", // bucketId "<FILE_ID>", // fileId InputFile.fromPath("file.png"), // file - listOf(Permission.read(Role.any())), // permissions (optional) + List.of(Permission.read(Role.any())), // permissions (optional) new CoroutineCallback<>((result, error) -> { if (error != null) { error.printStackTrace(); diff --git a/docs/examples/java/storage/get-file-preview.md b/docs/examples/java/storage/get-file-preview.md index 1a0ab596..61f76372 100644 --- a/docs/examples/java/storage/get-file-preview.md +++ b/docs/examples/java/storage/get-file-preview.md @@ -1,6 +1,8 @@ import io.appwrite.Client; import io.appwrite.coroutines.CoroutineCallback; import io.appwrite.services.Storage; +import io.appwrite.enums.ImageGravity; +import io.appwrite.enums.ImageFormat; Client client = new Client() .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint diff --git a/docs/examples/java/storage/list-buckets.md b/docs/examples/java/storage/list-buckets.md index 504cfb7c..3fde32c7 100644 --- a/docs/examples/java/storage/list-buckets.md +++ b/docs/examples/java/storage/list-buckets.md @@ -10,7 +10,7 @@ Client client = new Client() Storage storage = new Storage(client); storage.listBuckets( - listOf(), // queries (optional) + List.of(), // queries (optional) "<SEARCH>", // search (optional) false, // total (optional) new CoroutineCallback<>((result, error) -> { diff --git a/docs/examples/java/storage/list-files.md b/docs/examples/java/storage/list-files.md index 6397ca07..712c4200 100644 --- a/docs/examples/java/storage/list-files.md +++ b/docs/examples/java/storage/list-files.md @@ -11,7 +11,7 @@ Storage storage = new Storage(client); storage.listFiles( "<BUCKET_ID>", // bucketId - listOf(), // queries (optional) + List.of(), // queries (optional) "<SEARCH>", // search (optional) false, // total (optional) new CoroutineCallback<>((result, error) -> { diff --git a/docs/examples/java/storage/update-bucket.md b/docs/examples/java/storage/update-bucket.md index 586b1135..47b322e4 100644 --- a/docs/examples/java/storage/update-bucket.md +++ b/docs/examples/java/storage/update-bucket.md @@ -1,8 +1,9 @@ import io.appwrite.Client; import io.appwrite.coroutines.CoroutineCallback; -import io.appwrite.services.Storage; import io.appwrite.Permission; import io.appwrite.Role; +import io.appwrite.services.Storage; +import io.appwrite.enums.Compression; Client client = new Client() .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint @@ -14,14 +15,15 @@ Storage storage = new Storage(client); storage.updateBucket( "<BUCKET_ID>", // bucketId "<NAME>", // name - listOf(Permission.read(Role.any())), // permissions (optional) + List.of(Permission.read(Role.any())), // permissions (optional) false, // fileSecurity (optional) false, // enabled (optional) 1, // maximumFileSize (optional) - listOf(), // allowedFileExtensions (optional) - .NONE, // compression (optional) + List.of(), // allowedFileExtensions (optional) + Compression.NONE, // compression (optional) false, // encryption (optional) false, // antivirus (optional) + false, // transformations (optional) new CoroutineCallback<>((result, error) -> { if (error != null) { error.printStackTrace(); diff --git a/docs/examples/java/storage/update-file.md b/docs/examples/java/storage/update-file.md index d534e0eb..b394fd56 100644 --- a/docs/examples/java/storage/update-file.md +++ b/docs/examples/java/storage/update-file.md @@ -1,8 +1,8 @@ import io.appwrite.Client; import io.appwrite.coroutines.CoroutineCallback; -import io.appwrite.services.Storage; import io.appwrite.Permission; import io.appwrite.Role; +import io.appwrite.services.Storage; Client client = new Client() .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint @@ -15,7 +15,7 @@ storage.updateFile( "<BUCKET_ID>", // bucketId "<FILE_ID>", // fileId "<NAME>", // name (optional) - listOf(Permission.read(Role.any())), // permissions (optional) + List.of(Permission.read(Role.any())), // permissions (optional) new CoroutineCallback<>((result, error) -> { if (error != null) { error.printStackTrace(); diff --git a/docs/examples/java/tablesdb/create-enum-column.md b/docs/examples/java/tablesdb/create-enum-column.md index bc31bbe7..ea0452f2 100644 --- a/docs/examples/java/tablesdb/create-enum-column.md +++ b/docs/examples/java/tablesdb/create-enum-column.md @@ -13,7 +13,7 @@ tablesDB.createEnumColumn( "<DATABASE_ID>", // databaseId "<TABLE_ID>", // tableId "", // key - listOf(), // elements + List.of(), // elements false, // required "<DEFAULT>", // default (optional) false, // array (optional) diff --git a/docs/examples/java/tablesdb/create-index.md b/docs/examples/java/tablesdb/create-index.md index 991bd342..07076d97 100644 --- a/docs/examples/java/tablesdb/create-index.md +++ b/docs/examples/java/tablesdb/create-index.md @@ -15,9 +15,9 @@ tablesDB.createIndex( "<TABLE_ID>", // tableId "", // key IndexType.KEY, // type - listOf(), // columns - listOf(), // orders (optional) - listOf(), // lengths (optional) + List.of(), // columns + List.of(), // orders (optional) + List.of(), // lengths (optional) new CoroutineCallback<>((result, error) -> { if (error != null) { error.printStackTrace(); diff --git a/docs/examples/java/tablesdb/create-line-column.md b/docs/examples/java/tablesdb/create-line-column.md index afe029eb..f8351cac 100644 --- a/docs/examples/java/tablesdb/create-line-column.md +++ b/docs/examples/java/tablesdb/create-line-column.md @@ -14,7 +14,7 @@ tablesDB.createLineColumn( "<TABLE_ID>", // tableId "", // key false, // required - listOf([1, 2], [3, 4], [5, 6]), // default (optional) + List.of(List.of(1, 2), List.of(3, 4), List.of(5, 6)), // default (optional) new CoroutineCallback<>((result, error) -> { if (error != null) { error.printStackTrace(); diff --git a/docs/examples/java/tablesdb/create-operations.md b/docs/examples/java/tablesdb/create-operations.md index 9504f623..a7c3a1bc 100644 --- a/docs/examples/java/tablesdb/create-operations.md +++ b/docs/examples/java/tablesdb/create-operations.md @@ -11,17 +11,15 @@ TablesDB tablesDB = new TablesDB(client); tablesDB.createOperations( "<TRANSACTION_ID>", // transactionId - listOf( - { - "action": "create", - "databaseId": "<DATABASE_ID>", - "tableId": "<TABLE_ID>", - "rowId": "<ROW_ID>", - "data": { - "name": "Walter O'Brien" - } - } - ), // operations (optional) + List.of(Map.of( + "action", "create", + "databaseId", "<DATABASE_ID>", + "tableId", "<TABLE_ID>", + "rowId", "<ROW_ID>", + "data", Map.of( + "name", "Walter O'Brien" + ) + )), // operations (optional) new CoroutineCallback<>((result, error) -> { if (error != null) { error.printStackTrace(); diff --git a/docs/examples/java/tablesdb/create-point-column.md b/docs/examples/java/tablesdb/create-point-column.md index 2c9941b0..2f6ae0e9 100644 --- a/docs/examples/java/tablesdb/create-point-column.md +++ b/docs/examples/java/tablesdb/create-point-column.md @@ -14,7 +14,7 @@ tablesDB.createPointColumn( "<TABLE_ID>", // tableId "", // key false, // required - listOf(1, 2), // default (optional) + List.of(1, 2), // default (optional) new CoroutineCallback<>((result, error) -> { if (error != null) { error.printStackTrace(); diff --git a/docs/examples/java/tablesdb/create-polygon-column.md b/docs/examples/java/tablesdb/create-polygon-column.md index 58ca7983..58caa8a7 100644 --- a/docs/examples/java/tablesdb/create-polygon-column.md +++ b/docs/examples/java/tablesdb/create-polygon-column.md @@ -14,7 +14,7 @@ tablesDB.createPolygonColumn( "<TABLE_ID>", // tableId "", // key false, // required - listOf([[1, 2], [3, 4], [5, 6], [1, 2]]), // default (optional) + List.of(List.of(List.of(1, 2), List.of(3, 4), List.of(5, 6), List.of(1, 2))), // default (optional) new CoroutineCallback<>((result, error) -> { if (error != null) { error.printStackTrace(); diff --git a/docs/examples/java/tablesdb/create-relationship-column.md b/docs/examples/java/tablesdb/create-relationship-column.md index 956c1fa5..c7a3a5f2 100644 --- a/docs/examples/java/tablesdb/create-relationship-column.md +++ b/docs/examples/java/tablesdb/create-relationship-column.md @@ -2,6 +2,7 @@ import io.appwrite.Client; import io.appwrite.coroutines.CoroutineCallback; import io.appwrite.services.TablesDB; import io.appwrite.enums.RelationshipType; +import io.appwrite.enums.RelationMutate; Client client = new Client() .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint diff --git a/docs/examples/java/tablesdb/create-row.md b/docs/examples/java/tablesdb/create-row.md index 9e47167c..3da8c324 100644 --- a/docs/examples/java/tablesdb/create-row.md +++ b/docs/examples/java/tablesdb/create-row.md @@ -1,8 +1,8 @@ import io.appwrite.Client; import io.appwrite.coroutines.CoroutineCallback; -import io.appwrite.services.TablesDB; import io.appwrite.Permission; import io.appwrite.Role; +import io.appwrite.services.TablesDB; Client client = new Client() .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint @@ -15,14 +15,14 @@ tablesDB.createRow( "<DATABASE_ID>", // databaseId "<TABLE_ID>", // tableId "<ROW_ID>", // rowId - mapOf( - "username" to "walter.obrien", - "email" to "walter.obrien@example.com", - "fullName" to "Walter O'Brien", - "age" to 30, - "isAdmin" to false + Map.of( + "username", "walter.obrien", + "email", "walter.obrien@example.com", + "fullName", "Walter O'Brien", + "age", 30, + "isAdmin", false ), // data - listOf(Permission.read(Role.any())), // permissions (optional) + List.of(Permission.read(Role.any())), // permissions (optional) "<TRANSACTION_ID>", // transactionId (optional) new CoroutineCallback<>((result, error) -> { if (error != null) { diff --git a/docs/examples/java/tablesdb/create-rows.md b/docs/examples/java/tablesdb/create-rows.md index 956d8121..e99ea04d 100644 --- a/docs/examples/java/tablesdb/create-rows.md +++ b/docs/examples/java/tablesdb/create-rows.md @@ -12,7 +12,7 @@ TablesDB tablesDB = new TablesDB(client); tablesDB.createRows( "<DATABASE_ID>", // databaseId "<TABLE_ID>", // tableId - listOf(), // rows + List.of(), // rows "<TRANSACTION_ID>", // transactionId (optional) new CoroutineCallback<>((result, error) -> { if (error != null) { diff --git a/docs/examples/java/tablesdb/create-table.md b/docs/examples/java/tablesdb/create-table.md index 1f9fd10d..615278a2 100644 --- a/docs/examples/java/tablesdb/create-table.md +++ b/docs/examples/java/tablesdb/create-table.md @@ -1,8 +1,8 @@ import io.appwrite.Client; import io.appwrite.coroutines.CoroutineCallback; -import io.appwrite.services.TablesDB; import io.appwrite.Permission; import io.appwrite.Role; +import io.appwrite.services.TablesDB; Client client = new Client() .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint @@ -15,7 +15,7 @@ tablesDB.createTable( "<DATABASE_ID>", // databaseId "<TABLE_ID>", // tableId "<NAME>", // name - listOf(Permission.read(Role.any())), // permissions (optional) + List.of(Permission.read(Role.any())), // permissions (optional) false, // rowSecurity (optional) false, // enabled (optional) new CoroutineCallback<>((result, error) -> { diff --git a/docs/examples/java/tablesdb/delete-rows.md b/docs/examples/java/tablesdb/delete-rows.md index 80ca0bb4..f90789d2 100644 --- a/docs/examples/java/tablesdb/delete-rows.md +++ b/docs/examples/java/tablesdb/delete-rows.md @@ -12,7 +12,7 @@ TablesDB tablesDB = new TablesDB(client); tablesDB.deleteRows( "<DATABASE_ID>", // databaseId "<TABLE_ID>", // tableId - listOf(), // queries (optional) + List.of(), // queries (optional) "<TRANSACTION_ID>", // transactionId (optional) new CoroutineCallback<>((result, error) -> { if (error != null) { diff --git a/docs/examples/java/tablesdb/get-row.md b/docs/examples/java/tablesdb/get-row.md index d642ebca..5b18e8f8 100644 --- a/docs/examples/java/tablesdb/get-row.md +++ b/docs/examples/java/tablesdb/get-row.md @@ -13,7 +13,7 @@ tablesDB.getRow( "<DATABASE_ID>", // databaseId "<TABLE_ID>", // tableId "<ROW_ID>", // rowId - listOf(), // queries (optional) + List.of(), // queries (optional) "<TRANSACTION_ID>", // transactionId (optional) new CoroutineCallback<>((result, error) -> { if (error != null) { diff --git a/docs/examples/java/tablesdb/list-columns.md b/docs/examples/java/tablesdb/list-columns.md index bdf376cb..f7e37f97 100644 --- a/docs/examples/java/tablesdb/list-columns.md +++ b/docs/examples/java/tablesdb/list-columns.md @@ -12,7 +12,7 @@ TablesDB tablesDB = new TablesDB(client); tablesDB.listColumns( "<DATABASE_ID>", // databaseId "<TABLE_ID>", // tableId - listOf(), // queries (optional) + List.of(), // queries (optional) false, // total (optional) new CoroutineCallback<>((result, error) -> { if (error != null) { diff --git a/docs/examples/java/tablesdb/list-indexes.md b/docs/examples/java/tablesdb/list-indexes.md index 5b732043..ca792c54 100644 --- a/docs/examples/java/tablesdb/list-indexes.md +++ b/docs/examples/java/tablesdb/list-indexes.md @@ -12,7 +12,7 @@ TablesDB tablesDB = new TablesDB(client); tablesDB.listIndexes( "<DATABASE_ID>", // databaseId "<TABLE_ID>", // tableId - listOf(), // queries (optional) + List.of(), // queries (optional) false, // total (optional) new CoroutineCallback<>((result, error) -> { if (error != null) { diff --git a/docs/examples/java/tablesdb/list-rows.md b/docs/examples/java/tablesdb/list-rows.md index 8d7956bb..7903da4b 100644 --- a/docs/examples/java/tablesdb/list-rows.md +++ b/docs/examples/java/tablesdb/list-rows.md @@ -12,7 +12,7 @@ TablesDB tablesDB = new TablesDB(client); tablesDB.listRows( "<DATABASE_ID>", // databaseId "<TABLE_ID>", // tableId - listOf(), // queries (optional) + List.of(), // queries (optional) "<TRANSACTION_ID>", // transactionId (optional) false, // total (optional) new CoroutineCallback<>((result, error) -> { diff --git a/docs/examples/java/tablesdb/list-tables.md b/docs/examples/java/tablesdb/list-tables.md index 646be0f4..9b4c88bd 100644 --- a/docs/examples/java/tablesdb/list-tables.md +++ b/docs/examples/java/tablesdb/list-tables.md @@ -11,7 +11,7 @@ TablesDB tablesDB = new TablesDB(client); tablesDB.listTables( "<DATABASE_ID>", // databaseId - listOf(), // queries (optional) + List.of(), // queries (optional) "<SEARCH>", // search (optional) false, // total (optional) new CoroutineCallback<>((result, error) -> { diff --git a/docs/examples/java/tablesdb/list-transactions.md b/docs/examples/java/tablesdb/list-transactions.md index acc4902d..f0b4db05 100644 --- a/docs/examples/java/tablesdb/list-transactions.md +++ b/docs/examples/java/tablesdb/list-transactions.md @@ -10,7 +10,7 @@ Client client = new Client() TablesDB tablesDB = new TablesDB(client); tablesDB.listTransactions( - listOf(), // queries (optional) + List.of(), // queries (optional) new CoroutineCallback<>((result, error) -> { if (error != null) { error.printStackTrace(); diff --git a/docs/examples/java/tablesdb/list.md b/docs/examples/java/tablesdb/list.md index 98784df8..cf230365 100644 --- a/docs/examples/java/tablesdb/list.md +++ b/docs/examples/java/tablesdb/list.md @@ -10,7 +10,7 @@ Client client = new Client() TablesDB tablesDB = new TablesDB(client); tablesDB.list( - listOf(), // queries (optional) + List.of(), // queries (optional) "<SEARCH>", // search (optional) false, // total (optional) new CoroutineCallback<>((result, error) -> { diff --git a/docs/examples/java/tablesdb/update-enum-column.md b/docs/examples/java/tablesdb/update-enum-column.md index 5a8036ae..0f182b76 100644 --- a/docs/examples/java/tablesdb/update-enum-column.md +++ b/docs/examples/java/tablesdb/update-enum-column.md @@ -13,7 +13,7 @@ tablesDB.updateEnumColumn( "<DATABASE_ID>", // databaseId "<TABLE_ID>", // tableId "", // key - listOf(), // elements + List.of(), // elements false, // required "<DEFAULT>", // default "", // newKey (optional) diff --git a/docs/examples/java/tablesdb/update-line-column.md b/docs/examples/java/tablesdb/update-line-column.md index 4c65a907..4ef648fb 100644 --- a/docs/examples/java/tablesdb/update-line-column.md +++ b/docs/examples/java/tablesdb/update-line-column.md @@ -14,7 +14,7 @@ tablesDB.updateLineColumn( "<TABLE_ID>", // tableId "", // key false, // required - listOf([1, 2], [3, 4], [5, 6]), // default (optional) + List.of(List.of(1, 2), List.of(3, 4), List.of(5, 6)), // default (optional) "", // newKey (optional) new CoroutineCallback<>((result, error) -> { if (error != null) { diff --git a/docs/examples/java/tablesdb/update-point-column.md b/docs/examples/java/tablesdb/update-point-column.md index 56ac86a6..729595df 100644 --- a/docs/examples/java/tablesdb/update-point-column.md +++ b/docs/examples/java/tablesdb/update-point-column.md @@ -14,7 +14,7 @@ tablesDB.updatePointColumn( "<TABLE_ID>", // tableId "", // key false, // required - listOf(1, 2), // default (optional) + List.of(1, 2), // default (optional) "", // newKey (optional) new CoroutineCallback<>((result, error) -> { if (error != null) { diff --git a/docs/examples/java/tablesdb/update-polygon-column.md b/docs/examples/java/tablesdb/update-polygon-column.md index 189d4731..bc6ccc93 100644 --- a/docs/examples/java/tablesdb/update-polygon-column.md +++ b/docs/examples/java/tablesdb/update-polygon-column.md @@ -14,7 +14,7 @@ tablesDB.updatePolygonColumn( "<TABLE_ID>", // tableId "", // key false, // required - listOf([[1, 2], [3, 4], [5, 6], [1, 2]]), // default (optional) + List.of(List.of(List.of(1, 2), List.of(3, 4), List.of(5, 6), List.of(1, 2))), // default (optional) "", // newKey (optional) new CoroutineCallback<>((result, error) -> { if (error != null) { diff --git a/docs/examples/java/tablesdb/update-relationship-column.md b/docs/examples/java/tablesdb/update-relationship-column.md index 45aea8ae..eaf6b1ba 100644 --- a/docs/examples/java/tablesdb/update-relationship-column.md +++ b/docs/examples/java/tablesdb/update-relationship-column.md @@ -1,6 +1,7 @@ import io.appwrite.Client; import io.appwrite.coroutines.CoroutineCallback; import io.appwrite.services.TablesDB; +import io.appwrite.enums.RelationMutate; Client client = new Client() .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint diff --git a/docs/examples/java/tablesdb/update-row.md b/docs/examples/java/tablesdb/update-row.md index 835f63b1..5585274c 100644 --- a/docs/examples/java/tablesdb/update-row.md +++ b/docs/examples/java/tablesdb/update-row.md @@ -1,8 +1,8 @@ import io.appwrite.Client; import io.appwrite.coroutines.CoroutineCallback; -import io.appwrite.services.TablesDB; import io.appwrite.Permission; import io.appwrite.Role; +import io.appwrite.services.TablesDB; Client client = new Client() .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint @@ -15,8 +15,8 @@ tablesDB.updateRow( "<DATABASE_ID>", // databaseId "<TABLE_ID>", // tableId "<ROW_ID>", // rowId - mapOf( "a" to "b" ), // data (optional) - listOf(Permission.read(Role.any())), // permissions (optional) + Map.of("a", "b"), // data (optional) + List.of(Permission.read(Role.any())), // permissions (optional) "<TRANSACTION_ID>", // transactionId (optional) new CoroutineCallback<>((result, error) -> { if (error != null) { diff --git a/docs/examples/java/tablesdb/update-rows.md b/docs/examples/java/tablesdb/update-rows.md index 7d39e442..b4796138 100644 --- a/docs/examples/java/tablesdb/update-rows.md +++ b/docs/examples/java/tablesdb/update-rows.md @@ -12,8 +12,8 @@ TablesDB tablesDB = new TablesDB(client); tablesDB.updateRows( "<DATABASE_ID>", // databaseId "<TABLE_ID>", // tableId - mapOf( "a" to "b" ), // data (optional) - listOf(), // queries (optional) + Map.of("a", "b"), // data (optional) + List.of(), // queries (optional) "<TRANSACTION_ID>", // transactionId (optional) new CoroutineCallback<>((result, error) -> { if (error != null) { diff --git a/docs/examples/java/tablesdb/update-table.md b/docs/examples/java/tablesdb/update-table.md index 257803b9..cf0c2fbc 100644 --- a/docs/examples/java/tablesdb/update-table.md +++ b/docs/examples/java/tablesdb/update-table.md @@ -1,8 +1,8 @@ import io.appwrite.Client; import io.appwrite.coroutines.CoroutineCallback; -import io.appwrite.services.TablesDB; import io.appwrite.Permission; import io.appwrite.Role; +import io.appwrite.services.TablesDB; Client client = new Client() .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint @@ -15,7 +15,7 @@ tablesDB.updateTable( "<DATABASE_ID>", // databaseId "<TABLE_ID>", // tableId "<NAME>", // name - listOf(Permission.read(Role.any())), // permissions (optional) + List.of(Permission.read(Role.any())), // permissions (optional) false, // rowSecurity (optional) false, // enabled (optional) new CoroutineCallback<>((result, error) -> { diff --git a/docs/examples/java/tablesdb/upsert-row.md b/docs/examples/java/tablesdb/upsert-row.md index 6ea29e3e..adb2095f 100644 --- a/docs/examples/java/tablesdb/upsert-row.md +++ b/docs/examples/java/tablesdb/upsert-row.md @@ -1,8 +1,8 @@ import io.appwrite.Client; import io.appwrite.coroutines.CoroutineCallback; -import io.appwrite.services.TablesDB; import io.appwrite.Permission; import io.appwrite.Role; +import io.appwrite.services.TablesDB; Client client = new Client() .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint @@ -15,8 +15,8 @@ tablesDB.upsertRow( "<DATABASE_ID>", // databaseId "<TABLE_ID>", // tableId "<ROW_ID>", // rowId - mapOf( "a" to "b" ), // data (optional) - listOf(Permission.read(Role.any())), // permissions (optional) + Map.of("a", "b"), // data (optional) + List.of(Permission.read(Role.any())), // permissions (optional) "<TRANSACTION_ID>", // transactionId (optional) new CoroutineCallback<>((result, error) -> { if (error != null) { diff --git a/docs/examples/java/tablesdb/upsert-rows.md b/docs/examples/java/tablesdb/upsert-rows.md index c4b2bf38..e16ecb35 100644 --- a/docs/examples/java/tablesdb/upsert-rows.md +++ b/docs/examples/java/tablesdb/upsert-rows.md @@ -12,7 +12,7 @@ TablesDB tablesDB = new TablesDB(client); tablesDB.upsertRows( "<DATABASE_ID>", // databaseId "<TABLE_ID>", // tableId - listOf(), // rows + List.of(), // rows "<TRANSACTION_ID>", // transactionId (optional) new CoroutineCallback<>((result, error) -> { if (error != null) { diff --git a/docs/examples/java/teams/create-membership.md b/docs/examples/java/teams/create-membership.md index 89e9d96e..e71ea2e5 100644 --- a/docs/examples/java/teams/create-membership.md +++ b/docs/examples/java/teams/create-membership.md @@ -11,7 +11,7 @@ Teams teams = new Teams(client); teams.createMembership( "<TEAM_ID>", // teamId - listOf(), // roles + List.of(), // roles "email@example.com", // email (optional) "<USER_ID>", // userId (optional) "+12065550100", // phone (optional) diff --git a/docs/examples/java/teams/create.md b/docs/examples/java/teams/create.md index 28cc3dad..bc82cb47 100644 --- a/docs/examples/java/teams/create.md +++ b/docs/examples/java/teams/create.md @@ -12,7 +12,7 @@ Teams teams = new Teams(client); teams.create( "<TEAM_ID>", // teamId "<NAME>", // name - listOf(), // roles (optional) + List.of(), // roles (optional) new CoroutineCallback<>((result, error) -> { if (error != null) { error.printStackTrace(); diff --git a/docs/examples/java/teams/list-memberships.md b/docs/examples/java/teams/list-memberships.md index bfbf519d..5437e604 100644 --- a/docs/examples/java/teams/list-memberships.md +++ b/docs/examples/java/teams/list-memberships.md @@ -11,7 +11,7 @@ Teams teams = new Teams(client); teams.listMemberships( "<TEAM_ID>", // teamId - listOf(), // queries (optional) + List.of(), // queries (optional) "<SEARCH>", // search (optional) false, // total (optional) new CoroutineCallback<>((result, error) -> { diff --git a/docs/examples/java/teams/list.md b/docs/examples/java/teams/list.md index 7ff98ad8..06f0034b 100644 --- a/docs/examples/java/teams/list.md +++ b/docs/examples/java/teams/list.md @@ -10,7 +10,7 @@ Client client = new Client() Teams teams = new Teams(client); teams.list( - listOf(), // queries (optional) + List.of(), // queries (optional) "<SEARCH>", // search (optional) false, // total (optional) new CoroutineCallback<>((result, error) -> { diff --git a/docs/examples/java/teams/update-membership.md b/docs/examples/java/teams/update-membership.md index d4816c57..2e0de4e3 100644 --- a/docs/examples/java/teams/update-membership.md +++ b/docs/examples/java/teams/update-membership.md @@ -12,7 +12,7 @@ Teams teams = new Teams(client); teams.updateMembership( "<TEAM_ID>", // teamId "<MEMBERSHIP_ID>", // membershipId - listOf(), // roles + List.of(), // roles new CoroutineCallback<>((result, error) -> { if (error != null) { error.printStackTrace(); diff --git a/docs/examples/java/teams/update-prefs.md b/docs/examples/java/teams/update-prefs.md index 2ef05222..85f18aef 100644 --- a/docs/examples/java/teams/update-prefs.md +++ b/docs/examples/java/teams/update-prefs.md @@ -11,7 +11,7 @@ Teams teams = new Teams(client); teams.updatePrefs( "<TEAM_ID>", // teamId - mapOf( "a" to "b" ), // prefs + Map.of("a", "b"), // prefs new CoroutineCallback<>((result, error) -> { if (error != null) { error.printStackTrace(); diff --git a/docs/examples/java/tokens/list.md b/docs/examples/java/tokens/list.md index 23c51a64..1147f6f5 100644 --- a/docs/examples/java/tokens/list.md +++ b/docs/examples/java/tokens/list.md @@ -12,7 +12,7 @@ Tokens tokens = new Tokens(client); tokens.list( "<BUCKET_ID>", // bucketId "<FILE_ID>", // fileId - listOf(), // queries (optional) + List.of(), // queries (optional) false, // total (optional) new CoroutineCallback<>((result, error) -> { if (error != null) { diff --git a/docs/examples/java/users/create-sha-user.md b/docs/examples/java/users/create-sha-user.md index ad729071..3a37ddce 100644 --- a/docs/examples/java/users/create-sha-user.md +++ b/docs/examples/java/users/create-sha-user.md @@ -1,6 +1,7 @@ import io.appwrite.Client; import io.appwrite.coroutines.CoroutineCallback; import io.appwrite.services.Users; +import io.appwrite.enums.PasswordHash; Client client = new Client() .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint diff --git a/docs/examples/java/users/list-identities.md b/docs/examples/java/users/list-identities.md index fc95c8e4..2dfa2975 100644 --- a/docs/examples/java/users/list-identities.md +++ b/docs/examples/java/users/list-identities.md @@ -10,7 +10,7 @@ Client client = new Client() Users users = new Users(client); users.listIdentities( - listOf(), // queries (optional) + List.of(), // queries (optional) "<SEARCH>", // search (optional) false, // total (optional) new CoroutineCallback<>((result, error) -> { diff --git a/docs/examples/java/users/list-logs.md b/docs/examples/java/users/list-logs.md index 4a2e549e..ebaa749f 100644 --- a/docs/examples/java/users/list-logs.md +++ b/docs/examples/java/users/list-logs.md @@ -11,7 +11,7 @@ Users users = new Users(client); users.listLogs( "<USER_ID>", // userId - listOf(), // queries (optional) + List.of(), // queries (optional) false, // total (optional) new CoroutineCallback<>((result, error) -> { if (error != null) { diff --git a/docs/examples/java/users/list-memberships.md b/docs/examples/java/users/list-memberships.md index 36e67ae3..3335e18b 100644 --- a/docs/examples/java/users/list-memberships.md +++ b/docs/examples/java/users/list-memberships.md @@ -11,7 +11,7 @@ Users users = new Users(client); users.listMemberships( "<USER_ID>", // userId - listOf(), // queries (optional) + List.of(), // queries (optional) "<SEARCH>", // search (optional) false, // total (optional) new CoroutineCallback<>((result, error) -> { diff --git a/docs/examples/java/users/list-targets.md b/docs/examples/java/users/list-targets.md index 156aaefa..02fd291c 100644 --- a/docs/examples/java/users/list-targets.md +++ b/docs/examples/java/users/list-targets.md @@ -11,7 +11,7 @@ Users users = new Users(client); users.listTargets( "<USER_ID>", // userId - listOf(), // queries (optional) + List.of(), // queries (optional) false, // total (optional) new CoroutineCallback<>((result, error) -> { if (error != null) { diff --git a/docs/examples/java/users/list.md b/docs/examples/java/users/list.md index ec038afd..65ed4b00 100644 --- a/docs/examples/java/users/list.md +++ b/docs/examples/java/users/list.md @@ -10,7 +10,7 @@ Client client = new Client() Users users = new Users(client); users.list( - listOf(), // queries (optional) + List.of(), // queries (optional) "<SEARCH>", // search (optional) false, // total (optional) new CoroutineCallback<>((result, error) -> { diff --git a/docs/examples/java/users/update-labels.md b/docs/examples/java/users/update-labels.md index 379200a5..953f4662 100644 --- a/docs/examples/java/users/update-labels.md +++ b/docs/examples/java/users/update-labels.md @@ -11,7 +11,7 @@ Users users = new Users(client); users.updateLabels( "<USER_ID>", // userId - listOf(), // labels + List.of(), // labels new CoroutineCallback<>((result, error) -> { if (error != null) { error.printStackTrace(); diff --git a/docs/examples/java/users/update-prefs.md b/docs/examples/java/users/update-prefs.md index c5a9677a..5a128aa7 100644 --- a/docs/examples/java/users/update-prefs.md +++ b/docs/examples/java/users/update-prefs.md @@ -11,7 +11,7 @@ Users users = new Users(client); users.updatePrefs( "<USER_ID>", // userId - mapOf( "a" to "b" ), // prefs + Map.of("a", "b"), // prefs new CoroutineCallback<>((result, error) -> { if (error != null) { error.printStackTrace(); diff --git a/docs/examples/kotlin/avatars/get-screenshot.md b/docs/examples/kotlin/avatars/get-screenshot.md new file mode 100644 index 00000000..eca5493c --- /dev/null +++ b/docs/examples/kotlin/avatars/get-screenshot.md @@ -0,0 +1,36 @@ +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Avatars +import io.appwrite.enums.Theme +import io.appwrite.enums.Timezone +import io.appwrite.enums.Output + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +val avatars = Avatars(client) + +val result = avatars.getScreenshot( + url = "https://example.com", + headers = mapOf( "a" to "b" ), // optional + viewportWidth = 1, // optional + viewportHeight = 1, // optional + scale = 0.1, // optional + theme = "light", // optional + userAgent = "<USER_AGENT>", // optional + fullpage = false, // optional + locale = "<LOCALE>", // optional + timezone = "africa/abidjan", // optional + latitude = -90, // optional + longitude = -180, // optional + accuracy = 0, // optional + touch = false, // optional + permissions = listOf(), // optional + sleep = 0, // optional + width = 0, // optional + height = 0, // optional + quality = -1, // optional + output = "jpg" // optional +) diff --git a/docs/examples/kotlin/databases/create-line-attribute.md b/docs/examples/kotlin/databases/create-line-attribute.md index af9a4d24..8f1322b3 100644 --- a/docs/examples/kotlin/databases/create-line-attribute.md +++ b/docs/examples/kotlin/databases/create-line-attribute.md @@ -14,5 +14,5 @@ val response = databases.createLineAttribute( collectionId = "<COLLECTION_ID>", key = "", required = false, - default = listOf([1, 2], [3, 4], [5, 6]) // optional + default = listOf(listOf(1, 2), listOf(3, 4), listOf(5, 6)) // optional ) diff --git a/docs/examples/kotlin/databases/create-operations.md b/docs/examples/kotlin/databases/create-operations.md index 1c741818..eae10ab6 100644 --- a/docs/examples/kotlin/databases/create-operations.md +++ b/docs/examples/kotlin/databases/create-operations.md @@ -11,15 +11,13 @@ val databases = Databases(client) val response = databases.createOperations( transactionId = "<TRANSACTION_ID>", - operations = listOf( - { - "action": "create", - "databaseId": "<DATABASE_ID>", - "collectionId": "<COLLECTION_ID>", - "documentId": "<DOCUMENT_ID>", - "data": { - "name": "Walter O'Brien" - } - } - ) // optional + operations = listOf(mapOf( + "action" to "create", + "databaseId" to "<DATABASE_ID>", + "collectionId" to "<COLLECTION_ID>", + "documentId" to "<DOCUMENT_ID>", + "data" to mapOf( + "name" to "Walter O'Brien" + ) + )) // optional ) diff --git a/docs/examples/kotlin/databases/create-polygon-attribute.md b/docs/examples/kotlin/databases/create-polygon-attribute.md index ffeb3c43..5a3491c4 100644 --- a/docs/examples/kotlin/databases/create-polygon-attribute.md +++ b/docs/examples/kotlin/databases/create-polygon-attribute.md @@ -14,5 +14,5 @@ val response = databases.createPolygonAttribute( collectionId = "<COLLECTION_ID>", key = "", required = false, - default = listOf([[1, 2], [3, 4], [5, 6], [1, 2]]) // optional + default = listOf(listOf(listOf(1, 2), listOf(3, 4), listOf(5, 6), listOf(1, 2))) // optional ) diff --git a/docs/examples/kotlin/databases/create-relationship-attribute.md b/docs/examples/kotlin/databases/create-relationship-attribute.md index 1bf61032..48389f52 100644 --- a/docs/examples/kotlin/databases/create-relationship-attribute.md +++ b/docs/examples/kotlin/databases/create-relationship-attribute.md @@ -2,6 +2,7 @@ import io.appwrite.Client import io.appwrite.coroutines.CoroutineCallback import io.appwrite.services.Databases import io.appwrite.enums.RelationshipType +import io.appwrite.enums.RelationMutate val client = Client() .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint diff --git a/docs/examples/kotlin/databases/update-line-attribute.md b/docs/examples/kotlin/databases/update-line-attribute.md index 0d6b40a2..0a8b50a3 100644 --- a/docs/examples/kotlin/databases/update-line-attribute.md +++ b/docs/examples/kotlin/databases/update-line-attribute.md @@ -14,6 +14,6 @@ val response = databases.updateLineAttribute( collectionId = "<COLLECTION_ID>", key = "", required = false, - default = listOf([1, 2], [3, 4], [5, 6]), // optional + default = listOf(listOf(1, 2), listOf(3, 4), listOf(5, 6)), // optional newKey = "" // optional ) diff --git a/docs/examples/kotlin/databases/update-polygon-attribute.md b/docs/examples/kotlin/databases/update-polygon-attribute.md index 66bbdea1..37df6ace 100644 --- a/docs/examples/kotlin/databases/update-polygon-attribute.md +++ b/docs/examples/kotlin/databases/update-polygon-attribute.md @@ -14,6 +14,6 @@ val response = databases.updatePolygonAttribute( collectionId = "<COLLECTION_ID>", key = "", required = false, - default = listOf([[1, 2], [3, 4], [5, 6], [1, 2]]), // optional + default = listOf(listOf(listOf(1, 2), listOf(3, 4), listOf(5, 6), listOf(1, 2))), // optional newKey = "" // optional ) diff --git a/docs/examples/kotlin/databases/update-relationship-attribute.md b/docs/examples/kotlin/databases/update-relationship-attribute.md index 001dd1a3..baf69e36 100644 --- a/docs/examples/kotlin/databases/update-relationship-attribute.md +++ b/docs/examples/kotlin/databases/update-relationship-attribute.md @@ -1,6 +1,7 @@ import io.appwrite.Client import io.appwrite.coroutines.CoroutineCallback import io.appwrite.services.Databases +import io.appwrite.enums.RelationMutate val client = Client() .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint diff --git a/docs/examples/kotlin/functions/create-execution.md b/docs/examples/kotlin/functions/create-execution.md index 27344122..9458be08 100644 --- a/docs/examples/kotlin/functions/create-execution.md +++ b/docs/examples/kotlin/functions/create-execution.md @@ -1,6 +1,7 @@ import io.appwrite.Client import io.appwrite.coroutines.CoroutineCallback import io.appwrite.services.Functions +import io.appwrite.enums.ExecutionMethod val client = Client() .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint diff --git a/docs/examples/kotlin/functions/create-template-deployment.md b/docs/examples/kotlin/functions/create-template-deployment.md index 90c311ec..176620e1 100644 --- a/docs/examples/kotlin/functions/create-template-deployment.md +++ b/docs/examples/kotlin/functions/create-template-deployment.md @@ -1,6 +1,7 @@ import io.appwrite.Client import io.appwrite.coroutines.CoroutineCallback import io.appwrite.services.Functions +import io.appwrite.enums.TemplateReferenceType val client = Client() .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint @@ -14,6 +15,7 @@ val response = functions.createTemplateDeployment( repository = "<REPOSITORY>", owner = "<OWNER>", rootDirectory = "<ROOT_DIRECTORY>", - version = "<VERSION>", + type = TemplateReferenceType.COMMIT, + reference = "<REFERENCE>", activate = false // optional ) diff --git a/docs/examples/kotlin/functions/create-vcs-deployment.md b/docs/examples/kotlin/functions/create-vcs-deployment.md index 08bb5a30..4e1c21da 100644 --- a/docs/examples/kotlin/functions/create-vcs-deployment.md +++ b/docs/examples/kotlin/functions/create-vcs-deployment.md @@ -1,7 +1,7 @@ import io.appwrite.Client import io.appwrite.coroutines.CoroutineCallback import io.appwrite.services.Functions -import io.appwrite.enums.VCSDeploymentType +import io.appwrite.enums.VCSReferenceType val client = Client() .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint @@ -12,7 +12,7 @@ val functions = Functions(client) val response = functions.createVcsDeployment( functionId = "<FUNCTION_ID>", - type = VCSDeploymentType.BRANCH, + type = VCSReferenceType.BRANCH, reference = "<REFERENCE>", activate = false // optional ) diff --git a/docs/examples/kotlin/functions/create.md b/docs/examples/kotlin/functions/create.md index c0ea4de2..de5b191b 100644 --- a/docs/examples/kotlin/functions/create.md +++ b/docs/examples/kotlin/functions/create.md @@ -13,7 +13,7 @@ val functions = Functions(client) val response = functions.create( functionId = "<FUNCTION_ID>", name = "<NAME>", - runtime = .NODE_14_5, + runtime = Runtime.NODE_14_5, execute = listOf("any"), // optional events = listOf(), // optional schedule = "", // optional diff --git a/docs/examples/kotlin/functions/get-deployment-download.md b/docs/examples/kotlin/functions/get-deployment-download.md index 634cfae3..8a16397d 100644 --- a/docs/examples/kotlin/functions/get-deployment-download.md +++ b/docs/examples/kotlin/functions/get-deployment-download.md @@ -1,6 +1,7 @@ import io.appwrite.Client import io.appwrite.coroutines.CoroutineCallback import io.appwrite.services.Functions +import io.appwrite.enums.DeploymentDownloadType val client = Client() .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint diff --git a/docs/examples/kotlin/functions/update.md b/docs/examples/kotlin/functions/update.md index 7f0b33eb..1b7db783 100644 --- a/docs/examples/kotlin/functions/update.md +++ b/docs/examples/kotlin/functions/update.md @@ -1,6 +1,7 @@ import io.appwrite.Client import io.appwrite.coroutines.CoroutineCallback import io.appwrite.services.Functions +import io.appwrite.enums.Runtime val client = Client() .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint diff --git a/docs/examples/kotlin/health/get-failed-jobs.md b/docs/examples/kotlin/health/get-failed-jobs.md index 027df127..646d9b36 100644 --- a/docs/examples/kotlin/health/get-failed-jobs.md +++ b/docs/examples/kotlin/health/get-failed-jobs.md @@ -11,6 +11,6 @@ val client = Client() val health = Health(client) val response = health.getFailedJobs( - name = .V1_DATABASE, + name = Name.V1_DATABASE, threshold = 0 // optional ) diff --git a/docs/examples/kotlin/messaging/create-push.md b/docs/examples/kotlin/messaging/create-push.md index d0d765a3..e1740691 100644 --- a/docs/examples/kotlin/messaging/create-push.md +++ b/docs/examples/kotlin/messaging/create-push.md @@ -1,6 +1,7 @@ import io.appwrite.Client import io.appwrite.coroutines.CoroutineCallback import io.appwrite.services.Messaging +import io.appwrite.enums.MessagePriority val client = Client() .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint diff --git a/docs/examples/kotlin/messaging/create-smtp-provider.md b/docs/examples/kotlin/messaging/create-smtp-provider.md index ce50130e..c7dca020 100644 --- a/docs/examples/kotlin/messaging/create-smtp-provider.md +++ b/docs/examples/kotlin/messaging/create-smtp-provider.md @@ -1,6 +1,7 @@ import io.appwrite.Client import io.appwrite.coroutines.CoroutineCallback import io.appwrite.services.Messaging +import io.appwrite.enums.SmtpEncryption val client = Client() .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint diff --git a/docs/examples/kotlin/messaging/update-push.md b/docs/examples/kotlin/messaging/update-push.md index 0b9c4c65..5e2c77d5 100644 --- a/docs/examples/kotlin/messaging/update-push.md +++ b/docs/examples/kotlin/messaging/update-push.md @@ -1,6 +1,7 @@ import io.appwrite.Client import io.appwrite.coroutines.CoroutineCallback import io.appwrite.services.Messaging +import io.appwrite.enums.MessagePriority val client = Client() .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint diff --git a/docs/examples/kotlin/messaging/update-smtp-provider.md b/docs/examples/kotlin/messaging/update-smtp-provider.md index 7652e531..66900e74 100644 --- a/docs/examples/kotlin/messaging/update-smtp-provider.md +++ b/docs/examples/kotlin/messaging/update-smtp-provider.md @@ -1,6 +1,7 @@ import io.appwrite.Client import io.appwrite.coroutines.CoroutineCallback import io.appwrite.services.Messaging +import io.appwrite.enums.SmtpEncryption val client = Client() .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint diff --git a/docs/examples/kotlin/sites/create-template-deployment.md b/docs/examples/kotlin/sites/create-template-deployment.md index bf246be0..6ef7414b 100644 --- a/docs/examples/kotlin/sites/create-template-deployment.md +++ b/docs/examples/kotlin/sites/create-template-deployment.md @@ -1,6 +1,7 @@ import io.appwrite.Client import io.appwrite.coroutines.CoroutineCallback import io.appwrite.services.Sites +import io.appwrite.enums.TemplateReferenceType val client = Client() .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint @@ -14,6 +15,7 @@ val response = sites.createTemplateDeployment( repository = "<REPOSITORY>", owner = "<OWNER>", rootDirectory = "<ROOT_DIRECTORY>", - version = "<VERSION>", + type = TemplateReferenceType.BRANCH, + reference = "<REFERENCE>", activate = false // optional ) diff --git a/docs/examples/kotlin/sites/create-vcs-deployment.md b/docs/examples/kotlin/sites/create-vcs-deployment.md index 141cf3e6..c11e890f 100644 --- a/docs/examples/kotlin/sites/create-vcs-deployment.md +++ b/docs/examples/kotlin/sites/create-vcs-deployment.md @@ -1,7 +1,7 @@ import io.appwrite.Client import io.appwrite.coroutines.CoroutineCallback import io.appwrite.services.Sites -import io.appwrite.enums.VCSDeploymentType +import io.appwrite.enums.VCSReferenceType val client = Client() .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint @@ -12,7 +12,7 @@ val sites = Sites(client) val response = sites.createVcsDeployment( siteId = "<SITE_ID>", - type = VCSDeploymentType.BRANCH, + type = VCSReferenceType.BRANCH, reference = "<REFERENCE>", activate = false // optional ) diff --git a/docs/examples/kotlin/sites/create.md b/docs/examples/kotlin/sites/create.md index a5e9719f..8df2d070 100644 --- a/docs/examples/kotlin/sites/create.md +++ b/docs/examples/kotlin/sites/create.md @@ -3,6 +3,7 @@ import io.appwrite.coroutines.CoroutineCallback import io.appwrite.services.Sites import io.appwrite.enums.Framework import io.appwrite.enums.BuildRuntime +import io.appwrite.enums.Adapter val client = Client() .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint @@ -14,8 +15,8 @@ val sites = Sites(client) val response = sites.create( siteId = "<SITE_ID>", name = "<NAME>", - framework = .ANALOG, - buildRuntime = .NODE_14_5, + framework = Framework.ANALOG, + buildRuntime = BuildRuntime.NODE_14_5, enabled = false, // optional logging = false, // optional timeout = 1, // optional diff --git a/docs/examples/kotlin/sites/get-deployment-download.md b/docs/examples/kotlin/sites/get-deployment-download.md index 84324762..a313a5de 100644 --- a/docs/examples/kotlin/sites/get-deployment-download.md +++ b/docs/examples/kotlin/sites/get-deployment-download.md @@ -1,6 +1,7 @@ import io.appwrite.Client import io.appwrite.coroutines.CoroutineCallback import io.appwrite.services.Sites +import io.appwrite.enums.DeploymentDownloadType val client = Client() .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint diff --git a/docs/examples/kotlin/sites/update.md b/docs/examples/kotlin/sites/update.md index 4b4a938d..ee6f7db7 100644 --- a/docs/examples/kotlin/sites/update.md +++ b/docs/examples/kotlin/sites/update.md @@ -2,6 +2,8 @@ import io.appwrite.Client import io.appwrite.coroutines.CoroutineCallback import io.appwrite.services.Sites import io.appwrite.enums.Framework +import io.appwrite.enums.BuildRuntime +import io.appwrite.enums.Adapter val client = Client() .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint @@ -13,7 +15,7 @@ val sites = Sites(client) val response = sites.update( siteId = "<SITE_ID>", name = "<NAME>", - framework = .ANALOG, + framework = Framework.ANALOG, enabled = false, // optional logging = false, // optional timeout = 1, // optional diff --git a/docs/examples/kotlin/storage/create-bucket.md b/docs/examples/kotlin/storage/create-bucket.md index 872932ee..9fb09138 100644 --- a/docs/examples/kotlin/storage/create-bucket.md +++ b/docs/examples/kotlin/storage/create-bucket.md @@ -1,6 +1,7 @@ import io.appwrite.Client import io.appwrite.coroutines.CoroutineCallback import io.appwrite.services.Storage +import io.appwrite.enums.Compression import io.appwrite.Permission import io.appwrite.Role @@ -21,5 +22,6 @@ val response = storage.createBucket( allowedFileExtensions = listOf(), // optional compression = "none", // optional encryption = false, // optional - antivirus = false // optional + antivirus = false, // optional + transformations = false // optional ) diff --git a/docs/examples/kotlin/storage/get-file-preview.md b/docs/examples/kotlin/storage/get-file-preview.md index 45122de2..7b39d85c 100644 --- a/docs/examples/kotlin/storage/get-file-preview.md +++ b/docs/examples/kotlin/storage/get-file-preview.md @@ -1,6 +1,8 @@ import io.appwrite.Client import io.appwrite.coroutines.CoroutineCallback import io.appwrite.services.Storage +import io.appwrite.enums.ImageGravity +import io.appwrite.enums.ImageFormat val client = Client() .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint diff --git a/docs/examples/kotlin/storage/update-bucket.md b/docs/examples/kotlin/storage/update-bucket.md index cb818734..74de079d 100644 --- a/docs/examples/kotlin/storage/update-bucket.md +++ b/docs/examples/kotlin/storage/update-bucket.md @@ -1,6 +1,7 @@ import io.appwrite.Client import io.appwrite.coroutines.CoroutineCallback import io.appwrite.services.Storage +import io.appwrite.enums.Compression import io.appwrite.Permission import io.appwrite.Role @@ -21,5 +22,6 @@ val response = storage.updateBucket( allowedFileExtensions = listOf(), // optional compression = "none", // optional encryption = false, // optional - antivirus = false // optional + antivirus = false, // optional + transformations = false // optional ) diff --git a/docs/examples/kotlin/tablesdb/create-line-column.md b/docs/examples/kotlin/tablesdb/create-line-column.md index 3dd9ebd0..cede2894 100644 --- a/docs/examples/kotlin/tablesdb/create-line-column.md +++ b/docs/examples/kotlin/tablesdb/create-line-column.md @@ -14,5 +14,5 @@ val response = tablesDB.createLineColumn( tableId = "<TABLE_ID>", key = "", required = false, - default = listOf([1, 2], [3, 4], [5, 6]) // optional + default = listOf(listOf(1, 2), listOf(3, 4), listOf(5, 6)) // optional ) diff --git a/docs/examples/kotlin/tablesdb/create-operations.md b/docs/examples/kotlin/tablesdb/create-operations.md index 40c98d1c..5b059497 100644 --- a/docs/examples/kotlin/tablesdb/create-operations.md +++ b/docs/examples/kotlin/tablesdb/create-operations.md @@ -11,15 +11,13 @@ val tablesDB = TablesDB(client) val response = tablesDB.createOperations( transactionId = "<TRANSACTION_ID>", - operations = listOf( - { - "action": "create", - "databaseId": "<DATABASE_ID>", - "tableId": "<TABLE_ID>", - "rowId": "<ROW_ID>", - "data": { - "name": "Walter O'Brien" - } - } - ) // optional + operations = listOf(mapOf( + "action" to "create", + "databaseId" to "<DATABASE_ID>", + "tableId" to "<TABLE_ID>", + "rowId" to "<ROW_ID>", + "data" to mapOf( + "name" to "Walter O'Brien" + ) + )) // optional ) diff --git a/docs/examples/kotlin/tablesdb/create-polygon-column.md b/docs/examples/kotlin/tablesdb/create-polygon-column.md index 218b4cba..c4282d1b 100644 --- a/docs/examples/kotlin/tablesdb/create-polygon-column.md +++ b/docs/examples/kotlin/tablesdb/create-polygon-column.md @@ -14,5 +14,5 @@ val response = tablesDB.createPolygonColumn( tableId = "<TABLE_ID>", key = "", required = false, - default = listOf([[1, 2], [3, 4], [5, 6], [1, 2]]) // optional + default = listOf(listOf(listOf(1, 2), listOf(3, 4), listOf(5, 6), listOf(1, 2))) // optional ) diff --git a/docs/examples/kotlin/tablesdb/create-relationship-column.md b/docs/examples/kotlin/tablesdb/create-relationship-column.md index fbdf3653..3ece593a 100644 --- a/docs/examples/kotlin/tablesdb/create-relationship-column.md +++ b/docs/examples/kotlin/tablesdb/create-relationship-column.md @@ -2,6 +2,7 @@ import io.appwrite.Client import io.appwrite.coroutines.CoroutineCallback import io.appwrite.services.TablesDB import io.appwrite.enums.RelationshipType +import io.appwrite.enums.RelationMutate val client = Client() .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint diff --git a/docs/examples/kotlin/tablesdb/update-line-column.md b/docs/examples/kotlin/tablesdb/update-line-column.md index 571d2520..4b975c0e 100644 --- a/docs/examples/kotlin/tablesdb/update-line-column.md +++ b/docs/examples/kotlin/tablesdb/update-line-column.md @@ -14,6 +14,6 @@ val response = tablesDB.updateLineColumn( tableId = "<TABLE_ID>", key = "", required = false, - default = listOf([1, 2], [3, 4], [5, 6]), // optional + default = listOf(listOf(1, 2), listOf(3, 4), listOf(5, 6)), // optional newKey = "" // optional ) diff --git a/docs/examples/kotlin/tablesdb/update-polygon-column.md b/docs/examples/kotlin/tablesdb/update-polygon-column.md index db3a46bc..40428471 100644 --- a/docs/examples/kotlin/tablesdb/update-polygon-column.md +++ b/docs/examples/kotlin/tablesdb/update-polygon-column.md @@ -14,6 +14,6 @@ val response = tablesDB.updatePolygonColumn( tableId = "<TABLE_ID>", key = "", required = false, - default = listOf([[1, 2], [3, 4], [5, 6], [1, 2]]), // optional + default = listOf(listOf(listOf(1, 2), listOf(3, 4), listOf(5, 6), listOf(1, 2))), // optional newKey = "" // optional ) diff --git a/docs/examples/kotlin/tablesdb/update-relationship-column.md b/docs/examples/kotlin/tablesdb/update-relationship-column.md index f69defd8..357a57cd 100644 --- a/docs/examples/kotlin/tablesdb/update-relationship-column.md +++ b/docs/examples/kotlin/tablesdb/update-relationship-column.md @@ -1,6 +1,7 @@ import io.appwrite.Client import io.appwrite.coroutines.CoroutineCallback import io.appwrite.services.TablesDB +import io.appwrite.enums.RelationMutate val client = Client() .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint diff --git a/docs/examples/kotlin/users/create-sha-user.md b/docs/examples/kotlin/users/create-sha-user.md index 17a157b2..b286f8a5 100644 --- a/docs/examples/kotlin/users/create-sha-user.md +++ b/docs/examples/kotlin/users/create-sha-user.md @@ -1,6 +1,7 @@ import io.appwrite.Client import io.appwrite.coroutines.CoroutineCallback import io.appwrite.services.Users +import io.appwrite.enums.PasswordHash val client = Client() .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint diff --git a/src/main/kotlin/io/appwrite/Client.kt b/src/main/kotlin/io/appwrite/Client.kt index 1ad2434f..8acddf10 100644 --- a/src/main/kotlin/io/appwrite/Client.kt +++ b/src/main/kotlin/io/appwrite/Client.kt @@ -58,11 +58,11 @@ class Client @JvmOverloads constructor( init { headers = mutableMapOf( "content-type" to "application/json", - "user-agent" to "AppwriteKotlinSDK/12.3.0 ${System.getProperty("http.agent")}", + "user-agent" to "AppwriteKotlinSDK/12.4.0 ${System.getProperty("http.agent")}", "x-sdk-name" to "Kotlin", "x-sdk-platform" to "server", "x-sdk-language" to "kotlin", - "x-sdk-version" to "12.3.0", + "x-sdk-version" to "12.4.0", "x-appwrite-response-format" to "1.8.0", ) diff --git a/src/main/kotlin/io/appwrite/enums/BuildRuntime.kt b/src/main/kotlin/io/appwrite/enums/BuildRuntime.kt index daa15891..e553aac4 100644 --- a/src/main/kotlin/io/appwrite/enums/BuildRuntime.kt +++ b/src/main/kotlin/io/appwrite/enums/BuildRuntime.kt @@ -79,6 +79,8 @@ enum class BuildRuntime(val value: String) { DART_3_5("dart-3.5"), @SerializedName("dart-3.8") DART_3_8("dart-3.8"), + @SerializedName("dart-3.9") + DART_3_9("dart-3.9"), @SerializedName("dotnet-6.0") DOTNET_6_0("dotnet-6.0"), @SerializedName("dotnet-7.0") @@ -132,7 +134,9 @@ enum class BuildRuntime(val value: String) { @SerializedName("flutter-3.29") FLUTTER_3_29("flutter-3.29"), @SerializedName("flutter-3.32") - FLUTTER_3_32("flutter-3.32"); + FLUTTER_3_32("flutter-3.32"), + @SerializedName("flutter-3.35") + FLUTTER_3_35("flutter-3.35"); override fun toString() = value } \ No newline at end of file diff --git a/src/main/kotlin/io/appwrite/enums/Output.kt b/src/main/kotlin/io/appwrite/enums/Output.kt new file mode 100644 index 00000000..819b29b4 --- /dev/null +++ b/src/main/kotlin/io/appwrite/enums/Output.kt @@ -0,0 +1,22 @@ +package io.appwrite.enums + +import com.google.gson.annotations.SerializedName + +enum class Output(val value: String) { + @SerializedName("jpg") + JPG("jpg"), + @SerializedName("jpeg") + JPEG("jpeg"), + @SerializedName("png") + PNG("png"), + @SerializedName("webp") + WEBP("webp"), + @SerializedName("heic") + HEIC("heic"), + @SerializedName("avif") + AVIF("avif"), + @SerializedName("gif") + GIF("gif"); + + override fun toString() = value +} \ No newline at end of file diff --git a/src/main/kotlin/io/appwrite/enums/Runtime.kt b/src/main/kotlin/io/appwrite/enums/Runtime.kt index 084811ee..9d0ad11b 100644 --- a/src/main/kotlin/io/appwrite/enums/Runtime.kt +++ b/src/main/kotlin/io/appwrite/enums/Runtime.kt @@ -79,6 +79,8 @@ enum class Runtime(val value: String) { DART_3_5("dart-3.5"), @SerializedName("dart-3.8") DART_3_8("dart-3.8"), + @SerializedName("dart-3.9") + DART_3_9("dart-3.9"), @SerializedName("dotnet-6.0") DOTNET_6_0("dotnet-6.0"), @SerializedName("dotnet-7.0") @@ -132,7 +134,9 @@ enum class Runtime(val value: String) { @SerializedName("flutter-3.29") FLUTTER_3_29("flutter-3.29"), @SerializedName("flutter-3.32") - FLUTTER_3_32("flutter-3.32"); + FLUTTER_3_32("flutter-3.32"), + @SerializedName("flutter-3.35") + FLUTTER_3_35("flutter-3.35"); override fun toString() = value } \ No newline at end of file diff --git a/src/main/kotlin/io/appwrite/enums/TemplateReferenceType.kt b/src/main/kotlin/io/appwrite/enums/TemplateReferenceType.kt new file mode 100644 index 00000000..1f258b7e --- /dev/null +++ b/src/main/kotlin/io/appwrite/enums/TemplateReferenceType.kt @@ -0,0 +1,14 @@ +package io.appwrite.enums + +import com.google.gson.annotations.SerializedName + +enum class TemplateReferenceType(val value: String) { + @SerializedName("branch") + BRANCH("branch"), + @SerializedName("commit") + COMMIT("commit"), + @SerializedName("tag") + TAG("tag"); + + override fun toString() = value +} \ No newline at end of file diff --git a/src/main/kotlin/io/appwrite/enums/Theme.kt b/src/main/kotlin/io/appwrite/enums/Theme.kt new file mode 100644 index 00000000..d62acaf2 --- /dev/null +++ b/src/main/kotlin/io/appwrite/enums/Theme.kt @@ -0,0 +1,12 @@ +package io.appwrite.enums + +import com.google.gson.annotations.SerializedName + +enum class Theme(val value: String) { + @SerializedName("light") + LIGHT("light"), + @SerializedName("dark") + DARK("dark"); + + override fun toString() = value +} \ No newline at end of file diff --git a/src/main/kotlin/io/appwrite/enums/Timezone.kt b/src/main/kotlin/io/appwrite/enums/Timezone.kt new file mode 100644 index 00000000..61d3920e --- /dev/null +++ b/src/main/kotlin/io/appwrite/enums/Timezone.kt @@ -0,0 +1,846 @@ +package io.appwrite.enums + +import com.google.gson.annotations.SerializedName + +enum class Timezone(val value: String) { + @SerializedName("africa/abidjan") + AFRICA_ABIDJAN("africa/abidjan"), + @SerializedName("africa/accra") + AFRICA_ACCRA("africa/accra"), + @SerializedName("africa/addis_ababa") + AFRICA_ADDIS_ABABA("africa/addis_ababa"), + @SerializedName("africa/algiers") + AFRICA_ALGIERS("africa/algiers"), + @SerializedName("africa/asmara") + AFRICA_ASMARA("africa/asmara"), + @SerializedName("africa/bamako") + AFRICA_BAMAKO("africa/bamako"), + @SerializedName("africa/bangui") + AFRICA_BANGUI("africa/bangui"), + @SerializedName("africa/banjul") + AFRICA_BANJUL("africa/banjul"), + @SerializedName("africa/bissau") + AFRICA_BISSAU("africa/bissau"), + @SerializedName("africa/blantyre") + AFRICA_BLANTYRE("africa/blantyre"), + @SerializedName("africa/brazzaville") + AFRICA_BRAZZAVILLE("africa/brazzaville"), + @SerializedName("africa/bujumbura") + AFRICA_BUJUMBURA("africa/bujumbura"), + @SerializedName("africa/cairo") + AFRICA_CAIRO("africa/cairo"), + @SerializedName("africa/casablanca") + AFRICA_CASABLANCA("africa/casablanca"), + @SerializedName("africa/ceuta") + AFRICA_CEUTA("africa/ceuta"), + @SerializedName("africa/conakry") + AFRICA_CONAKRY("africa/conakry"), + @SerializedName("africa/dakar") + AFRICA_DAKAR("africa/dakar"), + @SerializedName("africa/dar_es_salaam") + AFRICA_DAR_ES_SALAAM("africa/dar_es_salaam"), + @SerializedName("africa/djibouti") + AFRICA_DJIBOUTI("africa/djibouti"), + @SerializedName("africa/douala") + AFRICA_DOUALA("africa/douala"), + @SerializedName("africa/el_aaiun") + AFRICA_EL_AAIUN("africa/el_aaiun"), + @SerializedName("africa/freetown") + AFRICA_FREETOWN("africa/freetown"), + @SerializedName("africa/gaborone") + AFRICA_GABORONE("africa/gaborone"), + @SerializedName("africa/harare") + AFRICA_HARARE("africa/harare"), + @SerializedName("africa/johannesburg") + AFRICA_JOHANNESBURG("africa/johannesburg"), + @SerializedName("africa/juba") + AFRICA_JUBA("africa/juba"), + @SerializedName("africa/kampala") + AFRICA_KAMPALA("africa/kampala"), + @SerializedName("africa/khartoum") + AFRICA_KHARTOUM("africa/khartoum"), + @SerializedName("africa/kigali") + AFRICA_KIGALI("africa/kigali"), + @SerializedName("africa/kinshasa") + AFRICA_KINSHASA("africa/kinshasa"), + @SerializedName("africa/lagos") + AFRICA_LAGOS("africa/lagos"), + @SerializedName("africa/libreville") + AFRICA_LIBREVILLE("africa/libreville"), + @SerializedName("africa/lome") + AFRICA_LOME("africa/lome"), + @SerializedName("africa/luanda") + AFRICA_LUANDA("africa/luanda"), + @SerializedName("africa/lubumbashi") + AFRICA_LUBUMBASHI("africa/lubumbashi"), + @SerializedName("africa/lusaka") + AFRICA_LUSAKA("africa/lusaka"), + @SerializedName("africa/malabo") + AFRICA_MALABO("africa/malabo"), + @SerializedName("africa/maputo") + AFRICA_MAPUTO("africa/maputo"), + @SerializedName("africa/maseru") + AFRICA_MASERU("africa/maseru"), + @SerializedName("africa/mbabane") + AFRICA_MBABANE("africa/mbabane"), + @SerializedName("africa/mogadishu") + AFRICA_MOGADISHU("africa/mogadishu"), + @SerializedName("africa/monrovia") + AFRICA_MONROVIA("africa/monrovia"), + @SerializedName("africa/nairobi") + AFRICA_NAIROBI("africa/nairobi"), + @SerializedName("africa/ndjamena") + AFRICA_NDJAMENA("africa/ndjamena"), + @SerializedName("africa/niamey") + AFRICA_NIAMEY("africa/niamey"), + @SerializedName("africa/nouakchott") + AFRICA_NOUAKCHOTT("africa/nouakchott"), + @SerializedName("africa/ouagadougou") + AFRICA_OUAGADOUGOU("africa/ouagadougou"), + @SerializedName("africa/porto-novo") + AFRICA_PORTO_NOVO("africa/porto-novo"), + @SerializedName("africa/sao_tome") + AFRICA_SAO_TOME("africa/sao_tome"), + @SerializedName("africa/tripoli") + AFRICA_TRIPOLI("africa/tripoli"), + @SerializedName("africa/tunis") + AFRICA_TUNIS("africa/tunis"), + @SerializedName("africa/windhoek") + AFRICA_WINDHOEK("africa/windhoek"), + @SerializedName("america/adak") + AMERICA_ADAK("america/adak"), + @SerializedName("america/anchorage") + AMERICA_ANCHORAGE("america/anchorage"), + @SerializedName("america/anguilla") + AMERICA_ANGUILLA("america/anguilla"), + @SerializedName("america/antigua") + AMERICA_ANTIGUA("america/antigua"), + @SerializedName("america/araguaina") + AMERICA_ARAGUAINA("america/araguaina"), + @SerializedName("america/argentina/buenos_aires") + AMERICA_ARGENTINA_BUENOS_AIRES("america/argentina/buenos_aires"), + @SerializedName("america/argentina/catamarca") + AMERICA_ARGENTINA_CATAMARCA("america/argentina/catamarca"), + @SerializedName("america/argentina/cordoba") + AMERICA_ARGENTINA_CORDOBA("america/argentina/cordoba"), + @SerializedName("america/argentina/jujuy") + AMERICA_ARGENTINA_JUJUY("america/argentina/jujuy"), + @SerializedName("america/argentina/la_rioja") + AMERICA_ARGENTINA_LA_RIOJA("america/argentina/la_rioja"), + @SerializedName("america/argentina/mendoza") + AMERICA_ARGENTINA_MENDOZA("america/argentina/mendoza"), + @SerializedName("america/argentina/rio_gallegos") + AMERICA_ARGENTINA_RIO_GALLEGOS("america/argentina/rio_gallegos"), + @SerializedName("america/argentina/salta") + AMERICA_ARGENTINA_SALTA("america/argentina/salta"), + @SerializedName("america/argentina/san_juan") + AMERICA_ARGENTINA_SAN_JUAN("america/argentina/san_juan"), + @SerializedName("america/argentina/san_luis") + AMERICA_ARGENTINA_SAN_LUIS("america/argentina/san_luis"), + @SerializedName("america/argentina/tucuman") + AMERICA_ARGENTINA_TUCUMAN("america/argentina/tucuman"), + @SerializedName("america/argentina/ushuaia") + AMERICA_ARGENTINA_USHUAIA("america/argentina/ushuaia"), + @SerializedName("america/aruba") + AMERICA_ARUBA("america/aruba"), + @SerializedName("america/asuncion") + AMERICA_ASUNCION("america/asuncion"), + @SerializedName("america/atikokan") + AMERICA_ATIKOKAN("america/atikokan"), + @SerializedName("america/bahia") + AMERICA_BAHIA("america/bahia"), + @SerializedName("america/bahia_banderas") + AMERICA_BAHIA_BANDERAS("america/bahia_banderas"), + @SerializedName("america/barbados") + AMERICA_BARBADOS("america/barbados"), + @SerializedName("america/belem") + AMERICA_BELEM("america/belem"), + @SerializedName("america/belize") + AMERICA_BELIZE("america/belize"), + @SerializedName("america/blanc-sablon") + AMERICA_BLANC_SABLON("america/blanc-sablon"), + @SerializedName("america/boa_vista") + AMERICA_BOA_VISTA("america/boa_vista"), + @SerializedName("america/bogota") + AMERICA_BOGOTA("america/bogota"), + @SerializedName("america/boise") + AMERICA_BOISE("america/boise"), + @SerializedName("america/cambridge_bay") + AMERICA_CAMBRIDGE_BAY("america/cambridge_bay"), + @SerializedName("america/campo_grande") + AMERICA_CAMPO_GRANDE("america/campo_grande"), + @SerializedName("america/cancun") + AMERICA_CANCUN("america/cancun"), + @SerializedName("america/caracas") + AMERICA_CARACAS("america/caracas"), + @SerializedName("america/cayenne") + AMERICA_CAYENNE("america/cayenne"), + @SerializedName("america/cayman") + AMERICA_CAYMAN("america/cayman"), + @SerializedName("america/chicago") + AMERICA_CHICAGO("america/chicago"), + @SerializedName("america/chihuahua") + AMERICA_CHIHUAHUA("america/chihuahua"), + @SerializedName("america/ciudad_juarez") + AMERICA_CIUDAD_JUAREZ("america/ciudad_juarez"), + @SerializedName("america/costa_rica") + AMERICA_COSTA_RICA("america/costa_rica"), + @SerializedName("america/coyhaique") + AMERICA_COYHAIQUE("america/coyhaique"), + @SerializedName("america/creston") + AMERICA_CRESTON("america/creston"), + @SerializedName("america/cuiaba") + AMERICA_CUIABA("america/cuiaba"), + @SerializedName("america/curacao") + AMERICA_CURACAO("america/curacao"), + @SerializedName("america/danmarkshavn") + AMERICA_DANMARKSHAVN("america/danmarkshavn"), + @SerializedName("america/dawson") + AMERICA_DAWSON("america/dawson"), + @SerializedName("america/dawson_creek") + AMERICA_DAWSON_CREEK("america/dawson_creek"), + @SerializedName("america/denver") + AMERICA_DENVER("america/denver"), + @SerializedName("america/detroit") + AMERICA_DETROIT("america/detroit"), + @SerializedName("america/dominica") + AMERICA_DOMINICA("america/dominica"), + @SerializedName("america/edmonton") + AMERICA_EDMONTON("america/edmonton"), + @SerializedName("america/eirunepe") + AMERICA_EIRUNEPE("america/eirunepe"), + @SerializedName("america/el_salvador") + AMERICA_EL_SALVADOR("america/el_salvador"), + @SerializedName("america/fort_nelson") + AMERICA_FORT_NELSON("america/fort_nelson"), + @SerializedName("america/fortaleza") + AMERICA_FORTALEZA("america/fortaleza"), + @SerializedName("america/glace_bay") + AMERICA_GLACE_BAY("america/glace_bay"), + @SerializedName("america/goose_bay") + AMERICA_GOOSE_BAY("america/goose_bay"), + @SerializedName("america/grand_turk") + AMERICA_GRAND_TURK("america/grand_turk"), + @SerializedName("america/grenada") + AMERICA_GRENADA("america/grenada"), + @SerializedName("america/guadeloupe") + AMERICA_GUADELOUPE("america/guadeloupe"), + @SerializedName("america/guatemala") + AMERICA_GUATEMALA("america/guatemala"), + @SerializedName("america/guayaquil") + AMERICA_GUAYAQUIL("america/guayaquil"), + @SerializedName("america/guyana") + AMERICA_GUYANA("america/guyana"), + @SerializedName("america/halifax") + AMERICA_HALIFAX("america/halifax"), + @SerializedName("america/havana") + AMERICA_HAVANA("america/havana"), + @SerializedName("america/hermosillo") + AMERICA_HERMOSILLO("america/hermosillo"), + @SerializedName("america/indiana/indianapolis") + AMERICA_INDIANA_INDIANAPOLIS("america/indiana/indianapolis"), + @SerializedName("america/indiana/knox") + AMERICA_INDIANA_KNOX("america/indiana/knox"), + @SerializedName("america/indiana/marengo") + AMERICA_INDIANA_MARENGO("america/indiana/marengo"), + @SerializedName("america/indiana/petersburg") + AMERICA_INDIANA_PETERSBURG("america/indiana/petersburg"), + @SerializedName("america/indiana/tell_city") + AMERICA_INDIANA_TELL_CITY("america/indiana/tell_city"), + @SerializedName("america/indiana/vevay") + AMERICA_INDIANA_VEVAY("america/indiana/vevay"), + @SerializedName("america/indiana/vincennes") + AMERICA_INDIANA_VINCENNES("america/indiana/vincennes"), + @SerializedName("america/indiana/winamac") + AMERICA_INDIANA_WINAMAC("america/indiana/winamac"), + @SerializedName("america/inuvik") + AMERICA_INUVIK("america/inuvik"), + @SerializedName("america/iqaluit") + AMERICA_IQALUIT("america/iqaluit"), + @SerializedName("america/jamaica") + AMERICA_JAMAICA("america/jamaica"), + @SerializedName("america/juneau") + AMERICA_JUNEAU("america/juneau"), + @SerializedName("america/kentucky/louisville") + AMERICA_KENTUCKY_LOUISVILLE("america/kentucky/louisville"), + @SerializedName("america/kentucky/monticello") + AMERICA_KENTUCKY_MONTICELLO("america/kentucky/monticello"), + @SerializedName("america/kralendijk") + AMERICA_KRALENDIJK("america/kralendijk"), + @SerializedName("america/la_paz") + AMERICA_LA_PAZ("america/la_paz"), + @SerializedName("america/lima") + AMERICA_LIMA("america/lima"), + @SerializedName("america/los_angeles") + AMERICA_LOS_ANGELES("america/los_angeles"), + @SerializedName("america/lower_princes") + AMERICA_LOWER_PRINCES("america/lower_princes"), + @SerializedName("america/maceio") + AMERICA_MACEIO("america/maceio"), + @SerializedName("america/managua") + AMERICA_MANAGUA("america/managua"), + @SerializedName("america/manaus") + AMERICA_MANAUS("america/manaus"), + @SerializedName("america/marigot") + AMERICA_MARIGOT("america/marigot"), + @SerializedName("america/martinique") + AMERICA_MARTINIQUE("america/martinique"), + @SerializedName("america/matamoros") + AMERICA_MATAMOROS("america/matamoros"), + @SerializedName("america/mazatlan") + AMERICA_MAZATLAN("america/mazatlan"), + @SerializedName("america/menominee") + AMERICA_MENOMINEE("america/menominee"), + @SerializedName("america/merida") + AMERICA_MERIDA("america/merida"), + @SerializedName("america/metlakatla") + AMERICA_METLAKATLA("america/metlakatla"), + @SerializedName("america/mexico_city") + AMERICA_MEXICO_CITY("america/mexico_city"), + @SerializedName("america/miquelon") + AMERICA_MIQUELON("america/miquelon"), + @SerializedName("america/moncton") + AMERICA_MONCTON("america/moncton"), + @SerializedName("america/monterrey") + AMERICA_MONTERREY("america/monterrey"), + @SerializedName("america/montevideo") + AMERICA_MONTEVIDEO("america/montevideo"), + @SerializedName("america/montserrat") + AMERICA_MONTSERRAT("america/montserrat"), + @SerializedName("america/nassau") + AMERICA_NASSAU("america/nassau"), + @SerializedName("america/new_york") + AMERICA_NEW_YORK("america/new_york"), + @SerializedName("america/nome") + AMERICA_NOME("america/nome"), + @SerializedName("america/noronha") + AMERICA_NORONHA("america/noronha"), + @SerializedName("america/north_dakota/beulah") + AMERICA_NORTH_DAKOTA_BEULAH("america/north_dakota/beulah"), + @SerializedName("america/north_dakota/center") + AMERICA_NORTH_DAKOTA_CENTER("america/north_dakota/center"), + @SerializedName("america/north_dakota/new_salem") + AMERICA_NORTH_DAKOTA_NEW_SALEM("america/north_dakota/new_salem"), + @SerializedName("america/nuuk") + AMERICA_NUUK("america/nuuk"), + @SerializedName("america/ojinaga") + AMERICA_OJINAGA("america/ojinaga"), + @SerializedName("america/panama") + AMERICA_PANAMA("america/panama"), + @SerializedName("america/paramaribo") + AMERICA_PARAMARIBO("america/paramaribo"), + @SerializedName("america/phoenix") + AMERICA_PHOENIX("america/phoenix"), + @SerializedName("america/port-au-prince") + AMERICA_PORT_AU_PRINCE("america/port-au-prince"), + @SerializedName("america/port_of_spain") + AMERICA_PORT_OF_SPAIN("america/port_of_spain"), + @SerializedName("america/porto_velho") + AMERICA_PORTO_VELHO("america/porto_velho"), + @SerializedName("america/puerto_rico") + AMERICA_PUERTO_RICO("america/puerto_rico"), + @SerializedName("america/punta_arenas") + AMERICA_PUNTA_ARENAS("america/punta_arenas"), + @SerializedName("america/rankin_inlet") + AMERICA_RANKIN_INLET("america/rankin_inlet"), + @SerializedName("america/recife") + AMERICA_RECIFE("america/recife"), + @SerializedName("america/regina") + AMERICA_REGINA("america/regina"), + @SerializedName("america/resolute") + AMERICA_RESOLUTE("america/resolute"), + @SerializedName("america/rio_branco") + AMERICA_RIO_BRANCO("america/rio_branco"), + @SerializedName("america/santarem") + AMERICA_SANTAREM("america/santarem"), + @SerializedName("america/santiago") + AMERICA_SANTIAGO("america/santiago"), + @SerializedName("america/santo_domingo") + AMERICA_SANTO_DOMINGO("america/santo_domingo"), + @SerializedName("america/sao_paulo") + AMERICA_SAO_PAULO("america/sao_paulo"), + @SerializedName("america/scoresbysund") + AMERICA_SCORESBYSUND("america/scoresbysund"), + @SerializedName("america/sitka") + AMERICA_SITKA("america/sitka"), + @SerializedName("america/st_barthelemy") + AMERICA_ST_BARTHELEMY("america/st_barthelemy"), + @SerializedName("america/st_johns") + AMERICA_ST_JOHNS("america/st_johns"), + @SerializedName("america/st_kitts") + AMERICA_ST_KITTS("america/st_kitts"), + @SerializedName("america/st_lucia") + AMERICA_ST_LUCIA("america/st_lucia"), + @SerializedName("america/st_thomas") + AMERICA_ST_THOMAS("america/st_thomas"), + @SerializedName("america/st_vincent") + AMERICA_ST_VINCENT("america/st_vincent"), + @SerializedName("america/swift_current") + AMERICA_SWIFT_CURRENT("america/swift_current"), + @SerializedName("america/tegucigalpa") + AMERICA_TEGUCIGALPA("america/tegucigalpa"), + @SerializedName("america/thule") + AMERICA_THULE("america/thule"), + @SerializedName("america/tijuana") + AMERICA_TIJUANA("america/tijuana"), + @SerializedName("america/toronto") + AMERICA_TORONTO("america/toronto"), + @SerializedName("america/tortola") + AMERICA_TORTOLA("america/tortola"), + @SerializedName("america/vancouver") + AMERICA_VANCOUVER("america/vancouver"), + @SerializedName("america/whitehorse") + AMERICA_WHITEHORSE("america/whitehorse"), + @SerializedName("america/winnipeg") + AMERICA_WINNIPEG("america/winnipeg"), + @SerializedName("america/yakutat") + AMERICA_YAKUTAT("america/yakutat"), + @SerializedName("antarctica/casey") + ANTARCTICA_CASEY("antarctica/casey"), + @SerializedName("antarctica/davis") + ANTARCTICA_DAVIS("antarctica/davis"), + @SerializedName("antarctica/dumontdurville") + ANTARCTICA_DUMONTDURVILLE("antarctica/dumontdurville"), + @SerializedName("antarctica/macquarie") + ANTARCTICA_MACQUARIE("antarctica/macquarie"), + @SerializedName("antarctica/mawson") + ANTARCTICA_MAWSON("antarctica/mawson"), + @SerializedName("antarctica/mcmurdo") + ANTARCTICA_MCMURDO("antarctica/mcmurdo"), + @SerializedName("antarctica/palmer") + ANTARCTICA_PALMER("antarctica/palmer"), + @SerializedName("antarctica/rothera") + ANTARCTICA_ROTHERA("antarctica/rothera"), + @SerializedName("antarctica/syowa") + ANTARCTICA_SYOWA("antarctica/syowa"), + @SerializedName("antarctica/troll") + ANTARCTICA_TROLL("antarctica/troll"), + @SerializedName("antarctica/vostok") + ANTARCTICA_VOSTOK("antarctica/vostok"), + @SerializedName("arctic/longyearbyen") + ARCTIC_LONGYEARBYEN("arctic/longyearbyen"), + @SerializedName("asia/aden") + ASIA_ADEN("asia/aden"), + @SerializedName("asia/almaty") + ASIA_ALMATY("asia/almaty"), + @SerializedName("asia/amman") + ASIA_AMMAN("asia/amman"), + @SerializedName("asia/anadyr") + ASIA_ANADYR("asia/anadyr"), + @SerializedName("asia/aqtau") + ASIA_AQTAU("asia/aqtau"), + @SerializedName("asia/aqtobe") + ASIA_AQTOBE("asia/aqtobe"), + @SerializedName("asia/ashgabat") + ASIA_ASHGABAT("asia/ashgabat"), + @SerializedName("asia/atyrau") + ASIA_ATYRAU("asia/atyrau"), + @SerializedName("asia/baghdad") + ASIA_BAGHDAD("asia/baghdad"), + @SerializedName("asia/bahrain") + ASIA_BAHRAIN("asia/bahrain"), + @SerializedName("asia/baku") + ASIA_BAKU("asia/baku"), + @SerializedName("asia/bangkok") + ASIA_BANGKOK("asia/bangkok"), + @SerializedName("asia/barnaul") + ASIA_BARNAUL("asia/barnaul"), + @SerializedName("asia/beirut") + ASIA_BEIRUT("asia/beirut"), + @SerializedName("asia/bishkek") + ASIA_BISHKEK("asia/bishkek"), + @SerializedName("asia/brunei") + ASIA_BRUNEI("asia/brunei"), + @SerializedName("asia/chita") + ASIA_CHITA("asia/chita"), + @SerializedName("asia/colombo") + ASIA_COLOMBO("asia/colombo"), + @SerializedName("asia/damascus") + ASIA_DAMASCUS("asia/damascus"), + @SerializedName("asia/dhaka") + ASIA_DHAKA("asia/dhaka"), + @SerializedName("asia/dili") + ASIA_DILI("asia/dili"), + @SerializedName("asia/dubai") + ASIA_DUBAI("asia/dubai"), + @SerializedName("asia/dushanbe") + ASIA_DUSHANBE("asia/dushanbe"), + @SerializedName("asia/famagusta") + ASIA_FAMAGUSTA("asia/famagusta"), + @SerializedName("asia/gaza") + ASIA_GAZA("asia/gaza"), + @SerializedName("asia/hebron") + ASIA_HEBRON("asia/hebron"), + @SerializedName("asia/ho_chi_minh") + ASIA_HO_CHI_MINH("asia/ho_chi_minh"), + @SerializedName("asia/hong_kong") + ASIA_HONG_KONG("asia/hong_kong"), + @SerializedName("asia/hovd") + ASIA_HOVD("asia/hovd"), + @SerializedName("asia/irkutsk") + ASIA_IRKUTSK("asia/irkutsk"), + @SerializedName("asia/jakarta") + ASIA_JAKARTA("asia/jakarta"), + @SerializedName("asia/jayapura") + ASIA_JAYAPURA("asia/jayapura"), + @SerializedName("asia/jerusalem") + ASIA_JERUSALEM("asia/jerusalem"), + @SerializedName("asia/kabul") + ASIA_KABUL("asia/kabul"), + @SerializedName("asia/kamchatka") + ASIA_KAMCHATKA("asia/kamchatka"), + @SerializedName("asia/karachi") + ASIA_KARACHI("asia/karachi"), + @SerializedName("asia/kathmandu") + ASIA_KATHMANDU("asia/kathmandu"), + @SerializedName("asia/khandyga") + ASIA_KHANDYGA("asia/khandyga"), + @SerializedName("asia/kolkata") + ASIA_KOLKATA("asia/kolkata"), + @SerializedName("asia/krasnoyarsk") + ASIA_KRASNOYARSK("asia/krasnoyarsk"), + @SerializedName("asia/kuala_lumpur") + ASIA_KUALA_LUMPUR("asia/kuala_lumpur"), + @SerializedName("asia/kuching") + ASIA_KUCHING("asia/kuching"), + @SerializedName("asia/kuwait") + ASIA_KUWAIT("asia/kuwait"), + @SerializedName("asia/macau") + ASIA_MACAU("asia/macau"), + @SerializedName("asia/magadan") + ASIA_MAGADAN("asia/magadan"), + @SerializedName("asia/makassar") + ASIA_MAKASSAR("asia/makassar"), + @SerializedName("asia/manila") + ASIA_MANILA("asia/manila"), + @SerializedName("asia/muscat") + ASIA_MUSCAT("asia/muscat"), + @SerializedName("asia/nicosia") + ASIA_NICOSIA("asia/nicosia"), + @SerializedName("asia/novokuznetsk") + ASIA_NOVOKUZNETSK("asia/novokuznetsk"), + @SerializedName("asia/novosibirsk") + ASIA_NOVOSIBIRSK("asia/novosibirsk"), + @SerializedName("asia/omsk") + ASIA_OMSK("asia/omsk"), + @SerializedName("asia/oral") + ASIA_ORAL("asia/oral"), + @SerializedName("asia/phnom_penh") + ASIA_PHNOM_PENH("asia/phnom_penh"), + @SerializedName("asia/pontianak") + ASIA_PONTIANAK("asia/pontianak"), + @SerializedName("asia/pyongyang") + ASIA_PYONGYANG("asia/pyongyang"), + @SerializedName("asia/qatar") + ASIA_QATAR("asia/qatar"), + @SerializedName("asia/qostanay") + ASIA_QOSTANAY("asia/qostanay"), + @SerializedName("asia/qyzylorda") + ASIA_QYZYLORDA("asia/qyzylorda"), + @SerializedName("asia/riyadh") + ASIA_RIYADH("asia/riyadh"), + @SerializedName("asia/sakhalin") + ASIA_SAKHALIN("asia/sakhalin"), + @SerializedName("asia/samarkand") + ASIA_SAMARKAND("asia/samarkand"), + @SerializedName("asia/seoul") + ASIA_SEOUL("asia/seoul"), + @SerializedName("asia/shanghai") + ASIA_SHANGHAI("asia/shanghai"), + @SerializedName("asia/singapore") + ASIA_SINGAPORE("asia/singapore"), + @SerializedName("asia/srednekolymsk") + ASIA_SREDNEKOLYMSK("asia/srednekolymsk"), + @SerializedName("asia/taipei") + ASIA_TAIPEI("asia/taipei"), + @SerializedName("asia/tashkent") + ASIA_TASHKENT("asia/tashkent"), + @SerializedName("asia/tbilisi") + ASIA_TBILISI("asia/tbilisi"), + @SerializedName("asia/tehran") + ASIA_TEHRAN("asia/tehran"), + @SerializedName("asia/thimphu") + ASIA_THIMPHU("asia/thimphu"), + @SerializedName("asia/tokyo") + ASIA_TOKYO("asia/tokyo"), + @SerializedName("asia/tomsk") + ASIA_TOMSK("asia/tomsk"), + @SerializedName("asia/ulaanbaatar") + ASIA_ULAANBAATAR("asia/ulaanbaatar"), + @SerializedName("asia/urumqi") + ASIA_URUMQI("asia/urumqi"), + @SerializedName("asia/ust-nera") + ASIA_UST_NERA("asia/ust-nera"), + @SerializedName("asia/vientiane") + ASIA_VIENTIANE("asia/vientiane"), + @SerializedName("asia/vladivostok") + ASIA_VLADIVOSTOK("asia/vladivostok"), + @SerializedName("asia/yakutsk") + ASIA_YAKUTSK("asia/yakutsk"), + @SerializedName("asia/yangon") + ASIA_YANGON("asia/yangon"), + @SerializedName("asia/yekaterinburg") + ASIA_YEKATERINBURG("asia/yekaterinburg"), + @SerializedName("asia/yerevan") + ASIA_YEREVAN("asia/yerevan"), + @SerializedName("atlantic/azores") + ATLANTIC_AZORES("atlantic/azores"), + @SerializedName("atlantic/bermuda") + ATLANTIC_BERMUDA("atlantic/bermuda"), + @SerializedName("atlantic/canary") + ATLANTIC_CANARY("atlantic/canary"), + @SerializedName("atlantic/cape_verde") + ATLANTIC_CAPE_VERDE("atlantic/cape_verde"), + @SerializedName("atlantic/faroe") + ATLANTIC_FAROE("atlantic/faroe"), + @SerializedName("atlantic/madeira") + ATLANTIC_MADEIRA("atlantic/madeira"), + @SerializedName("atlantic/reykjavik") + ATLANTIC_REYKJAVIK("atlantic/reykjavik"), + @SerializedName("atlantic/south_georgia") + ATLANTIC_SOUTH_GEORGIA("atlantic/south_georgia"), + @SerializedName("atlantic/st_helena") + ATLANTIC_ST_HELENA("atlantic/st_helena"), + @SerializedName("atlantic/stanley") + ATLANTIC_STANLEY("atlantic/stanley"), + @SerializedName("australia/adelaide") + AUSTRALIA_ADELAIDE("australia/adelaide"), + @SerializedName("australia/brisbane") + AUSTRALIA_BRISBANE("australia/brisbane"), + @SerializedName("australia/broken_hill") + AUSTRALIA_BROKEN_HILL("australia/broken_hill"), + @SerializedName("australia/darwin") + AUSTRALIA_DARWIN("australia/darwin"), + @SerializedName("australia/eucla") + AUSTRALIA_EUCLA("australia/eucla"), + @SerializedName("australia/hobart") + AUSTRALIA_HOBART("australia/hobart"), + @SerializedName("australia/lindeman") + AUSTRALIA_LINDEMAN("australia/lindeman"), + @SerializedName("australia/lord_howe") + AUSTRALIA_LORD_HOWE("australia/lord_howe"), + @SerializedName("australia/melbourne") + AUSTRALIA_MELBOURNE("australia/melbourne"), + @SerializedName("australia/perth") + AUSTRALIA_PERTH("australia/perth"), + @SerializedName("australia/sydney") + AUSTRALIA_SYDNEY("australia/sydney"), + @SerializedName("europe/amsterdam") + EUROPE_AMSTERDAM("europe/amsterdam"), + @SerializedName("europe/andorra") + EUROPE_ANDORRA("europe/andorra"), + @SerializedName("europe/astrakhan") + EUROPE_ASTRAKHAN("europe/astrakhan"), + @SerializedName("europe/athens") + EUROPE_ATHENS("europe/athens"), + @SerializedName("europe/belgrade") + EUROPE_BELGRADE("europe/belgrade"), + @SerializedName("europe/berlin") + EUROPE_BERLIN("europe/berlin"), + @SerializedName("europe/bratislava") + EUROPE_BRATISLAVA("europe/bratislava"), + @SerializedName("europe/brussels") + EUROPE_BRUSSELS("europe/brussels"), + @SerializedName("europe/bucharest") + EUROPE_BUCHAREST("europe/bucharest"), + @SerializedName("europe/budapest") + EUROPE_BUDAPEST("europe/budapest"), + @SerializedName("europe/busingen") + EUROPE_BUSINGEN("europe/busingen"), + @SerializedName("europe/chisinau") + EUROPE_CHISINAU("europe/chisinau"), + @SerializedName("europe/copenhagen") + EUROPE_COPENHAGEN("europe/copenhagen"), + @SerializedName("europe/dublin") + EUROPE_DUBLIN("europe/dublin"), + @SerializedName("europe/gibraltar") + EUROPE_GIBRALTAR("europe/gibraltar"), + @SerializedName("europe/guernsey") + EUROPE_GUERNSEY("europe/guernsey"), + @SerializedName("europe/helsinki") + EUROPE_HELSINKI("europe/helsinki"), + @SerializedName("europe/isle_of_man") + EUROPE_ISLE_OF_MAN("europe/isle_of_man"), + @SerializedName("europe/istanbul") + EUROPE_ISTANBUL("europe/istanbul"), + @SerializedName("europe/jersey") + EUROPE_JERSEY("europe/jersey"), + @SerializedName("europe/kaliningrad") + EUROPE_KALININGRAD("europe/kaliningrad"), + @SerializedName("europe/kirov") + EUROPE_KIROV("europe/kirov"), + @SerializedName("europe/kyiv") + EUROPE_KYIV("europe/kyiv"), + @SerializedName("europe/lisbon") + EUROPE_LISBON("europe/lisbon"), + @SerializedName("europe/ljubljana") + EUROPE_LJUBLJANA("europe/ljubljana"), + @SerializedName("europe/london") + EUROPE_LONDON("europe/london"), + @SerializedName("europe/luxembourg") + EUROPE_LUXEMBOURG("europe/luxembourg"), + @SerializedName("europe/madrid") + EUROPE_MADRID("europe/madrid"), + @SerializedName("europe/malta") + EUROPE_MALTA("europe/malta"), + @SerializedName("europe/mariehamn") + EUROPE_MARIEHAMN("europe/mariehamn"), + @SerializedName("europe/minsk") + EUROPE_MINSK("europe/minsk"), + @SerializedName("europe/monaco") + EUROPE_MONACO("europe/monaco"), + @SerializedName("europe/moscow") + EUROPE_MOSCOW("europe/moscow"), + @SerializedName("europe/oslo") + EUROPE_OSLO("europe/oslo"), + @SerializedName("europe/paris") + EUROPE_PARIS("europe/paris"), + @SerializedName("europe/podgorica") + EUROPE_PODGORICA("europe/podgorica"), + @SerializedName("europe/prague") + EUROPE_PRAGUE("europe/prague"), + @SerializedName("europe/riga") + EUROPE_RIGA("europe/riga"), + @SerializedName("europe/rome") + EUROPE_ROME("europe/rome"), + @SerializedName("europe/samara") + EUROPE_SAMARA("europe/samara"), + @SerializedName("europe/san_marino") + EUROPE_SAN_MARINO("europe/san_marino"), + @SerializedName("europe/sarajevo") + EUROPE_SARAJEVO("europe/sarajevo"), + @SerializedName("europe/saratov") + EUROPE_SARATOV("europe/saratov"), + @SerializedName("europe/simferopol") + EUROPE_SIMFEROPOL("europe/simferopol"), + @SerializedName("europe/skopje") + EUROPE_SKOPJE("europe/skopje"), + @SerializedName("europe/sofia") + EUROPE_SOFIA("europe/sofia"), + @SerializedName("europe/stockholm") + EUROPE_STOCKHOLM("europe/stockholm"), + @SerializedName("europe/tallinn") + EUROPE_TALLINN("europe/tallinn"), + @SerializedName("europe/tirane") + EUROPE_TIRANE("europe/tirane"), + @SerializedName("europe/ulyanovsk") + EUROPE_ULYANOVSK("europe/ulyanovsk"), + @SerializedName("europe/vaduz") + EUROPE_VADUZ("europe/vaduz"), + @SerializedName("europe/vatican") + EUROPE_VATICAN("europe/vatican"), + @SerializedName("europe/vienna") + EUROPE_VIENNA("europe/vienna"), + @SerializedName("europe/vilnius") + EUROPE_VILNIUS("europe/vilnius"), + @SerializedName("europe/volgograd") + EUROPE_VOLGOGRAD("europe/volgograd"), + @SerializedName("europe/warsaw") + EUROPE_WARSAW("europe/warsaw"), + @SerializedName("europe/zagreb") + EUROPE_ZAGREB("europe/zagreb"), + @SerializedName("europe/zurich") + EUROPE_ZURICH("europe/zurich"), + @SerializedName("indian/antananarivo") + INDIAN_ANTANANARIVO("indian/antananarivo"), + @SerializedName("indian/chagos") + INDIAN_CHAGOS("indian/chagos"), + @SerializedName("indian/christmas") + INDIAN_CHRISTMAS("indian/christmas"), + @SerializedName("indian/cocos") + INDIAN_COCOS("indian/cocos"), + @SerializedName("indian/comoro") + INDIAN_COMORO("indian/comoro"), + @SerializedName("indian/kerguelen") + INDIAN_KERGUELEN("indian/kerguelen"), + @SerializedName("indian/mahe") + INDIAN_MAHE("indian/mahe"), + @SerializedName("indian/maldives") + INDIAN_MALDIVES("indian/maldives"), + @SerializedName("indian/mauritius") + INDIAN_MAURITIUS("indian/mauritius"), + @SerializedName("indian/mayotte") + INDIAN_MAYOTTE("indian/mayotte"), + @SerializedName("indian/reunion") + INDIAN_REUNION("indian/reunion"), + @SerializedName("pacific/apia") + PACIFIC_APIA("pacific/apia"), + @SerializedName("pacific/auckland") + PACIFIC_AUCKLAND("pacific/auckland"), + @SerializedName("pacific/bougainville") + PACIFIC_BOUGAINVILLE("pacific/bougainville"), + @SerializedName("pacific/chatham") + PACIFIC_CHATHAM("pacific/chatham"), + @SerializedName("pacific/chuuk") + PACIFIC_CHUUK("pacific/chuuk"), + @SerializedName("pacific/easter") + PACIFIC_EASTER("pacific/easter"), + @SerializedName("pacific/efate") + PACIFIC_EFATE("pacific/efate"), + @SerializedName("pacific/fakaofo") + PACIFIC_FAKAOFO("pacific/fakaofo"), + @SerializedName("pacific/fiji") + PACIFIC_FIJI("pacific/fiji"), + @SerializedName("pacific/funafuti") + PACIFIC_FUNAFUTI("pacific/funafuti"), + @SerializedName("pacific/galapagos") + PACIFIC_GALAPAGOS("pacific/galapagos"), + @SerializedName("pacific/gambier") + PACIFIC_GAMBIER("pacific/gambier"), + @SerializedName("pacific/guadalcanal") + PACIFIC_GUADALCANAL("pacific/guadalcanal"), + @SerializedName("pacific/guam") + PACIFIC_GUAM("pacific/guam"), + @SerializedName("pacific/honolulu") + PACIFIC_HONOLULU("pacific/honolulu"), + @SerializedName("pacific/kanton") + PACIFIC_KANTON("pacific/kanton"), + @SerializedName("pacific/kiritimati") + PACIFIC_KIRITIMATI("pacific/kiritimati"), + @SerializedName("pacific/kosrae") + PACIFIC_KOSRAE("pacific/kosrae"), + @SerializedName("pacific/kwajalein") + PACIFIC_KWAJALEIN("pacific/kwajalein"), + @SerializedName("pacific/majuro") + PACIFIC_MAJURO("pacific/majuro"), + @SerializedName("pacific/marquesas") + PACIFIC_MARQUESAS("pacific/marquesas"), + @SerializedName("pacific/midway") + PACIFIC_MIDWAY("pacific/midway"), + @SerializedName("pacific/nauru") + PACIFIC_NAURU("pacific/nauru"), + @SerializedName("pacific/niue") + PACIFIC_NIUE("pacific/niue"), + @SerializedName("pacific/norfolk") + PACIFIC_NORFOLK("pacific/norfolk"), + @SerializedName("pacific/noumea") + PACIFIC_NOUMEA("pacific/noumea"), + @SerializedName("pacific/pago_pago") + PACIFIC_PAGO_PAGO("pacific/pago_pago"), + @SerializedName("pacific/palau") + PACIFIC_PALAU("pacific/palau"), + @SerializedName("pacific/pitcairn") + PACIFIC_PITCAIRN("pacific/pitcairn"), + @SerializedName("pacific/pohnpei") + PACIFIC_POHNPEI("pacific/pohnpei"), + @SerializedName("pacific/port_moresby") + PACIFIC_PORT_MORESBY("pacific/port_moresby"), + @SerializedName("pacific/rarotonga") + PACIFIC_RAROTONGA("pacific/rarotonga"), + @SerializedName("pacific/saipan") + PACIFIC_SAIPAN("pacific/saipan"), + @SerializedName("pacific/tahiti") + PACIFIC_TAHITI("pacific/tahiti"), + @SerializedName("pacific/tarawa") + PACIFIC_TARAWA("pacific/tarawa"), + @SerializedName("pacific/tongatapu") + PACIFIC_TONGATAPU("pacific/tongatapu"), + @SerializedName("pacific/wake") + PACIFIC_WAKE("pacific/wake"), + @SerializedName("pacific/wallis") + PACIFIC_WALLIS("pacific/wallis"), + @SerializedName("utc") + UTC("utc"); + + override fun toString() = value +} \ No newline at end of file diff --git a/src/main/kotlin/io/appwrite/enums/VCSDeploymentType.kt b/src/main/kotlin/io/appwrite/enums/VCSReferenceType.kt similarity index 84% rename from src/main/kotlin/io/appwrite/enums/VCSDeploymentType.kt rename to src/main/kotlin/io/appwrite/enums/VCSReferenceType.kt index ef7147bc..010b5e99 100644 --- a/src/main/kotlin/io/appwrite/enums/VCSDeploymentType.kt +++ b/src/main/kotlin/io/appwrite/enums/VCSReferenceType.kt @@ -2,7 +2,7 @@ package io.appwrite.enums import com.google.gson.annotations.SerializedName -enum class VCSDeploymentType(val value: String) { +enum class VCSReferenceType(val value: String) { @SerializedName("branch") BRANCH("branch"), @SerializedName("commit") diff --git a/src/main/kotlin/io/appwrite/models/Bucket.kt b/src/main/kotlin/io/appwrite/models/Bucket.kt index 9faeb359..c69d892f 100644 --- a/src/main/kotlin/io/appwrite/models/Bucket.kt +++ b/src/main/kotlin/io/appwrite/models/Bucket.kt @@ -79,6 +79,12 @@ data class Bucket( @SerializedName("antivirus") val antivirus: Boolean, + /** + * Image transformations are enabled. + */ + @SerializedName("transformations") + val transformations: Boolean, + ) { fun toMap(): Map<String, Any> = mapOf( "\$id" to id as Any, @@ -93,6 +99,7 @@ data class Bucket( "compression" to compression as Any, "encryption" to encryption as Any, "antivirus" to antivirus as Any, + "transformations" to transformations as Any, ) companion object { @@ -113,6 +120,7 @@ data class Bucket( compression = map["compression"] as String, encryption = map["encryption"] as Boolean, antivirus = map["antivirus"] as Boolean, + transformations = map["transformations"] as Boolean, ) } } \ No newline at end of file diff --git a/src/main/kotlin/io/appwrite/services/Avatars.kt b/src/main/kotlin/io/appwrite/services/Avatars.kt index ed85e1ad..525dcfd8 100644 --- a/src/main/kotlin/io/appwrite/services/Avatars.kt +++ b/src/main/kotlin/io/appwrite/services/Avatars.kt @@ -267,4 +267,91 @@ class Avatars(client: Client) : Service(client) { ) } + /** + * Use this endpoint to capture a screenshot of any website URL. This endpoint uses a headless browser to render the webpage and capture it as an image. + * + * You can configure the browser viewport size, theme, user agent, geolocation, permissions, and more. Capture either just the viewport or the full page scroll. + * + * When width and height are specified, the image is resized accordingly. If both dimensions are 0, the API provides an image at original size. If dimensions are not specified, the default viewport size is 1280x720px. + * + * @param url Website URL which you want to capture. + * @param headers HTTP headers to send with the browser request. Defaults to empty. + * @param viewportWidth Browser viewport width. Pass an integer between 1 to 1920. Defaults to 1280. + * @param viewportHeight Browser viewport height. Pass an integer between 1 to 1080. Defaults to 720. + * @param scale Browser scale factor. Pass a number between 0.1 to 3. Defaults to 1. + * @param theme Browser theme. Pass "light" or "dark". Defaults to "light". + * @param userAgent Custom user agent string. Defaults to browser default. + * @param fullpage Capture full page scroll. Pass 0 for viewport only, or 1 for full page. Defaults to 0. + * @param locale Browser locale (e.g., "en-US", "fr-FR"). Defaults to browser default. + * @param timezone IANA timezone identifier (e.g., "America/New_York", "Europe/London"). Defaults to browser default. + * @param latitude Geolocation latitude. Pass a number between -90 to 90. Defaults to 0. + * @param longitude Geolocation longitude. Pass a number between -180 to 180. Defaults to 0. + * @param accuracy Geolocation accuracy in meters. Pass a number between 0 to 100000. Defaults to 0. + * @param touch Enable touch support. Pass 0 for no touch, or 1 for touch enabled. Defaults to 0. + * @param permissions Browser permissions to grant. Pass an array of permission names like ["geolocation", "camera", "microphone"]. Defaults to empty. + * @param sleep Wait time in seconds before taking the screenshot. Pass an integer between 0 to 10. Defaults to 0. + * @param width Output image width. Pass 0 to use original width, or an integer between 1 to 2000. Defaults to 0 (original width). + * @param height Output image height. Pass 0 to use original height, or an integer between 1 to 2000. Defaults to 0 (original height). + * @param quality Screenshot quality. Pass an integer between 0 to 100. Defaults to keep existing image quality. + * @param output Output format type (jpeg, jpg, png, gif and webp). + * @return [ByteArray] + */ + @JvmOverloads + @Throws(AppwriteException::class) + suspend fun getScreenshot( + url: String, + headers: Any? = null, + viewportWidth: Long? = null, + viewportHeight: Long? = null, + scale: Double? = null, + theme: io.appwrite.enums.Theme? = null, + userAgent: String? = null, + fullpage: Boolean? = null, + locale: String? = null, + timezone: io.appwrite.enums.Timezone? = null, + latitude: Double? = null, + longitude: Double? = null, + accuracy: Double? = null, + touch: Boolean? = null, + permissions: List<String>? = null, + sleep: Long? = null, + width: Long? = null, + height: Long? = null, + quality: Long? = null, + output: io.appwrite.enums.Output? = null, + ): ByteArray { + val apiPath = "/avatars/screenshots" + + val apiParams = mutableMapOf<String, Any?>( + "url" to url, + "headers" to headers, + "viewportWidth" to viewportWidth, + "viewportHeight" to viewportHeight, + "scale" to scale, + "theme" to theme, + "userAgent" to userAgent, + "fullpage" to fullpage, + "locale" to locale, + "timezone" to timezone, + "latitude" to latitude, + "longitude" to longitude, + "accuracy" to accuracy, + "touch" to touch, + "permissions" to permissions, + "sleep" to sleep, + "width" to width, + "height" to height, + "quality" to quality, + "output" to output, + ) + val apiHeaders = mutableMapOf<String, String>( + ) + return client.call( + "GET", + apiPath, + params = apiParams, + responseType = ByteArray::class.java + ) + } + } \ No newline at end of file diff --git a/src/main/kotlin/io/appwrite/services/Functions.kt b/src/main/kotlin/io/appwrite/services/Functions.kt index 41480ece..3f64e887 100644 --- a/src/main/kotlin/io/appwrite/services/Functions.kt +++ b/src/main/kotlin/io/appwrite/services/Functions.kt @@ -503,7 +503,8 @@ class Functions(client: Client) : Service(client) { * @param repository Repository name of the template. * @param owner The name of the owner of the template. * @param rootDirectory Path to function code in the template repo. - * @param version Version (tag) for the repo linked to the function template. + * @param type Type for the reference provided. Can be commit, branch, or tag + * @param reference Reference value, can be a commit hash, branch name, or release tag * @param activate Automatically activate the deployment when it is finished building. * @return [io.appwrite.models.Deployment] */ @@ -514,7 +515,8 @@ class Functions(client: Client) : Service(client) { repository: String, owner: String, rootDirectory: String, - version: String, + type: io.appwrite.enums.TemplateReferenceType, + reference: String, activate: Boolean? = null, ): io.appwrite.models.Deployment { val apiPath = "/functions/{functionId}/deployments/template" @@ -524,7 +526,8 @@ class Functions(client: Client) : Service(client) { "repository" to repository, "owner" to owner, "rootDirectory" to rootDirectory, - "version" to version, + "type" to type, + "reference" to reference, "activate" to activate, ) val apiHeaders = mutableMapOf<String, String>( @@ -558,7 +561,7 @@ class Functions(client: Client) : Service(client) { @Throws(AppwriteException::class) suspend fun createVcsDeployment( functionId: String, - type: io.appwrite.enums.VCSDeploymentType, + type: io.appwrite.enums.VCSReferenceType, reference: String, activate: Boolean? = null, ): io.appwrite.models.Deployment { diff --git a/src/main/kotlin/io/appwrite/services/Sites.kt b/src/main/kotlin/io/appwrite/services/Sites.kt index 58685845..e0a745d2 100644 --- a/src/main/kotlin/io/appwrite/services/Sites.kt +++ b/src/main/kotlin/io/appwrite/services/Sites.kt @@ -404,7 +404,7 @@ class Sites(client: Client) : Service(client) { } /** - * Create a new site code deployment. Use this endpoint to upload a new version of your site code. To activate your newly uploaded code, you'll need to update the function's deployment to use your new deployment ID. + * Create a new site code deployment. Use this endpoint to upload a new version of your site code. To activate your newly uploaded code, you'll need to update the site's deployment to use your new deployment ID. * * @param siteId Site ID. * @param code Gzip file with your code package. When used with the Appwrite CLI, pass the path to your code directory, and the CLI will automatically package your code. Use a path that is within the current directory. @@ -498,7 +498,8 @@ class Sites(client: Client) : Service(client) { * @param repository Repository name of the template. * @param owner The name of the owner of the template. * @param rootDirectory Path to site code in the template repo. - * @param version Version (tag) for the repo linked to the site template. + * @param type Type for the reference provided. Can be commit, branch, or tag + * @param reference Reference value, can be a commit hash, branch name, or release tag * @param activate Automatically activate the deployment when it is finished building. * @return [io.appwrite.models.Deployment] */ @@ -509,7 +510,8 @@ class Sites(client: Client) : Service(client) { repository: String, owner: String, rootDirectory: String, - version: String, + type: io.appwrite.enums.TemplateReferenceType, + reference: String, activate: Boolean? = null, ): io.appwrite.models.Deployment { val apiPath = "/sites/{siteId}/deployments/template" @@ -519,7 +521,8 @@ class Sites(client: Client) : Service(client) { "repository" to repository, "owner" to owner, "rootDirectory" to rootDirectory, - "version" to version, + "type" to type, + "reference" to reference, "activate" to activate, ) val apiHeaders = mutableMapOf<String, String>( @@ -553,7 +556,7 @@ class Sites(client: Client) : Service(client) { @Throws(AppwriteException::class) suspend fun createVcsDeployment( siteId: String, - type: io.appwrite.enums.VCSDeploymentType, + type: io.appwrite.enums.VCSReferenceType, reference: String, activate: Boolean? = null, ): io.appwrite.models.Deployment { diff --git a/src/main/kotlin/io/appwrite/services/Storage.kt b/src/main/kotlin/io/appwrite/services/Storage.kt index 3f899bd0..279cc5d2 100644 --- a/src/main/kotlin/io/appwrite/services/Storage.kt +++ b/src/main/kotlin/io/appwrite/services/Storage.kt @@ -18,7 +18,7 @@ class Storage(client: Client) : Service(client) { /** * Get a list of all the storage buckets. You can use the query params to filter your results. * - * @param queries Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: enabled, name, fileSecurity, maximumFileSize, encryption, antivirus + * @param queries Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: enabled, name, fileSecurity, maximumFileSize, encryption, antivirus, transformations * @param search Search term to filter your list results. Max length: 256 chars. * @param total When set to false, the total count returned will be 0 and will not be calculated. * @return [io.appwrite.models.BucketList] @@ -65,6 +65,7 @@ class Storage(client: Client) : Service(client) { * @param compression Compression algorithm choosen for compression. Can be one of none, [gzip](https://en.wikipedia.org/wiki/Gzip), or [zstd](https://en.wikipedia.org/wiki/Zstd), For file size above 20MB compression is skipped even if it's enabled * @param encryption Is encryption enabled? For file size above 20MB encryption is skipped even if it's enabled * @param antivirus Is virus scanning enabled? For file size above 20MB AntiVirus scanning is skipped even if it's enabled + * @param transformations Are image transformations enabled? * @return [io.appwrite.models.Bucket] */ @JvmOverloads @@ -80,6 +81,7 @@ class Storage(client: Client) : Service(client) { compression: io.appwrite.enums.Compression? = null, encryption: Boolean? = null, antivirus: Boolean? = null, + transformations: Boolean? = null, ): io.appwrite.models.Bucket { val apiPath = "/storage/buckets" @@ -94,6 +96,7 @@ class Storage(client: Client) : Service(client) { "compression" to compression, "encryption" to encryption, "antivirus" to antivirus, + "transformations" to transformations, ) val apiHeaders = mutableMapOf<String, String>( "content-type" to "application/json", @@ -154,6 +157,7 @@ class Storage(client: Client) : Service(client) { * @param compression Compression algorithm choosen for compression. Can be one of none, [gzip](https://en.wikipedia.org/wiki/Gzip), or [zstd](https://en.wikipedia.org/wiki/Zstd), For file size above 20MB compression is skipped even if it's enabled * @param encryption Is encryption enabled? For file size above 20MB encryption is skipped even if it's enabled * @param antivirus Is virus scanning enabled? For file size above 20MB AntiVirus scanning is skipped even if it's enabled + * @param transformations Are image transformations enabled? * @return [io.appwrite.models.Bucket] */ @JvmOverloads @@ -169,6 +173,7 @@ class Storage(client: Client) : Service(client) { compression: io.appwrite.enums.Compression? = null, encryption: Boolean? = null, antivirus: Boolean? = null, + transformations: Boolean? = null, ): io.appwrite.models.Bucket { val apiPath = "/storage/buckets/{bucketId}" .replace("{bucketId}", bucketId) @@ -183,6 +188,7 @@ class Storage(client: Client) : Service(client) { "compression" to compression, "encryption" to encryption, "antivirus" to antivirus, + "transformations" to transformations, ) val apiHeaders = mutableMapOf<String, String>( "content-type" to "application/json", diff --git a/src/main/kotlin/io/appwrite/services/TablesDb.kt b/src/main/kotlin/io/appwrite/services/TablesDB.kt similarity index 99% rename from src/main/kotlin/io/appwrite/services/TablesDb.kt rename to src/main/kotlin/io/appwrite/services/TablesDB.kt index 32013488..986ac748 100644 --- a/src/main/kotlin/io/appwrite/services/TablesDb.kt +++ b/src/main/kotlin/io/appwrite/services/TablesDB.kt @@ -504,7 +504,7 @@ class TablesDB(client: Client) : Service(client) { * @param tableId Table ID. * @param name Table name. Max length: 128 chars. * @param permissions An array of permission strings. By default, the current permissions are inherited. [Learn more about permissions](https://appwrite.io/docs/permissions). - * @param rowSecurity Enables configuring permissions for individual rows. A user needs one of row or table level permissions to access a document. [Learn more about permissions](https://appwrite.io/docs/permissions). + * @param rowSecurity Enables configuring permissions for individual rows. A user needs one of row or table-level permissions to access a row. [Learn more about permissions](https://appwrite.io/docs/permissions). * @param enabled Is table enabled? When set to 'disabled', users cannot access the table but Server SDKs with and API key can still read and write to the table. No data is lost when this is toggled. * @return [io.appwrite.models.Table] */ From f727852966977225c6a361a1e7294d17cfa2fd47 Mon Sep 17 00:00:00 2001 From: root <chiragaggarwal5k@gmail.com> Date: Fri, 28 Nov 2025 19:30:59 +0000 Subject: [PATCH 2/3] fix changelog --- CHANGELOG.md | 5 ++++- README.md | 4 ++-- src/main/kotlin/io/appwrite/Client.kt | 4 ++-- 3 files changed, 8 insertions(+), 5 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index b98dc745..07e9d964 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,8 +1,11 @@ # Change Log -## 12.4.0 +## 13.0.0 +* Rename `VCSDeploymentType` enum to `VCSReferenceType` +* Change `createTemplateDeployment` method signature: replace `version` parameter with `type` (TemplateReferenceType) and `reference` parameters * Add `getScreenshot` method to `Avatars` service +* Add `Theme`, `Timezone` and `Output` enums ## 12.3.0 diff --git a/README.md b/README.md index 8bd1ef98..da881e0c 100644 --- a/README.md +++ b/README.md @@ -39,7 +39,7 @@ repositories { Next, add the dependency to your project's `build.gradle(.kts)` file: ```groovy -implementation("io.appwrite:sdk-for-kotlin:12.4.0") +implementation("io.appwrite:sdk-for-kotlin:13.0.0") ``` ### Maven @@ -50,7 +50,7 @@ Add this to your project's `pom.xml` file: <dependency> <groupId>io.appwrite</groupId> <artifactId>sdk-for-kotlin</artifactId> - <version>12.4.0</version> + <version>13.0.0</version> </dependency> </dependencies> ``` diff --git a/src/main/kotlin/io/appwrite/Client.kt b/src/main/kotlin/io/appwrite/Client.kt index 8acddf10..d3005544 100644 --- a/src/main/kotlin/io/appwrite/Client.kt +++ b/src/main/kotlin/io/appwrite/Client.kt @@ -58,11 +58,11 @@ class Client @JvmOverloads constructor( init { headers = mutableMapOf( "content-type" to "application/json", - "user-agent" to "AppwriteKotlinSDK/12.4.0 ${System.getProperty("http.agent")}", + "user-agent" to "AppwriteKotlinSDK/13.0.0 ${System.getProperty("http.agent")}", "x-sdk-name" to "Kotlin", "x-sdk-platform" to "server", "x-sdk-language" to "kotlin", - "x-sdk-version" to "12.4.0", + "x-sdk-version" to "13.0.0", "x-appwrite-response-format" to "1.8.0", ) From abbe4d3124d675880db8fc612a90770c7415c873 Mon Sep 17 00:00:00 2001 From: root <chiragaggarwal5k@gmail.com> Date: Mon, 1 Dec 2025 13:56:19 +0000 Subject: [PATCH 3/3] update examples --- docs/examples/java/avatars/get-screenshot.md | 35 ++++++++-------- .../examples/kotlin/avatars/get-screenshot.md | 41 ++++++++++--------- .../kotlin/io/appwrite/services/Account.kt | 8 ++-- 3 files changed, 45 insertions(+), 39 deletions(-) diff --git a/docs/examples/java/avatars/get-screenshot.md b/docs/examples/java/avatars/get-screenshot.md index 18743583..5eea0967 100644 --- a/docs/examples/java/avatars/get-screenshot.md +++ b/docs/examples/java/avatars/get-screenshot.md @@ -14,24 +14,27 @@ Avatars avatars = new Avatars(client); avatars.getScreenshot( "https://example.com", // url - Map.of("a", "b"), // headers (optional) - 1, // viewportWidth (optional) - 1, // viewportHeight (optional) - 0.1, // scale (optional) + Map.of( + "Authorization", "Bearer token123", + "X-Custom-Header", "value" + ), // headers (optional) + 1920, // viewportWidth (optional) + 1080, // viewportHeight (optional) + 2, // scale (optional) Theme.LIGHT, // theme (optional) - "<USER_AGENT>", // userAgent (optional) - false, // fullpage (optional) - "<LOCALE>", // locale (optional) + "Mozilla/5.0 (iPhone; CPU iPhone OS 14_0 like Mac OS X) AppleWebKit/605.1.15", // userAgent (optional) + true, // fullpage (optional) + "en-US", // locale (optional) Timezone.AFRICA_ABIDJAN, // timezone (optional) - -90, // latitude (optional) - -180, // longitude (optional) - 0, // accuracy (optional) - false, // touch (optional) - List.of(), // permissions (optional) - 0, // sleep (optional) - 0, // width (optional) - 0, // height (optional) - -1, // quality (optional) + 37.7749, // latitude (optional) + -122.4194, // longitude (optional) + 100, // accuracy (optional) + true, // touch (optional) + List.of("geolocation", "notifications"), // permissions (optional) + 3, // sleep (optional) + 800, // width (optional) + 600, // height (optional) + 85, // quality (optional) Output.JPG, // output (optional) new CoroutineCallback<>((result, error) -> { if (error != null) { diff --git a/docs/examples/kotlin/avatars/get-screenshot.md b/docs/examples/kotlin/avatars/get-screenshot.md index eca5493c..a2de2e5a 100644 --- a/docs/examples/kotlin/avatars/get-screenshot.md +++ b/docs/examples/kotlin/avatars/get-screenshot.md @@ -14,23 +14,26 @@ val avatars = Avatars(client) val result = avatars.getScreenshot( url = "https://example.com", - headers = mapOf( "a" to "b" ), // optional - viewportWidth = 1, // optional - viewportHeight = 1, // optional - scale = 0.1, // optional - theme = "light", // optional - userAgent = "<USER_AGENT>", // optional - fullpage = false, // optional - locale = "<LOCALE>", // optional - timezone = "africa/abidjan", // optional - latitude = -90, // optional - longitude = -180, // optional - accuracy = 0, // optional - touch = false, // optional - permissions = listOf(), // optional - sleep = 0, // optional - width = 0, // optional - height = 0, // optional - quality = -1, // optional - output = "jpg" // optional + headers = mapOf( + "Authorization" to "Bearer token123", + "X-Custom-Header" to "value" + ), // optional + viewportWidth = 1920, // optional + viewportHeight = 1080, // optional + scale = 2, // optional + theme = "dark", // optional + userAgent = "Mozilla/5.0 (iPhone; CPU iPhone OS 14_0 like Mac OS X) AppleWebKit/605.1.15", // optional + fullpage = true, // optional + locale = "en-US", // optional + timezone = "America/New_York", // optional + latitude = 37.7749, // optional + longitude = -122.4194, // optional + accuracy = 100, // optional + touch = true, // optional + permissions = listOf("geolocation", "notifications"), // optional + sleep = 3, // optional + width = 800, // optional + height = 600, // optional + quality = 85, // optional + output = "jpeg" // optional ) diff --git a/src/main/kotlin/io/appwrite/services/Account.kt b/src/main/kotlin/io/appwrite/services/Account.kt index b804a70e..97067712 100644 --- a/src/main/kotlin/io/appwrite/services/Account.kt +++ b/src/main/kotlin/io/appwrite/services/Account.kt @@ -593,7 +593,7 @@ class Account(client: Client) : Service(client) { suspend fun createMfaChallenge( factor: io.appwrite.enums.AuthenticationFactor, ): io.appwrite.models.MfaChallenge { - val apiPath = "/account/mfa/challenge" + val apiPath = "/account/mfa/challenges" val apiParams = mutableMapOf<String, Any?>( "factor" to factor, @@ -624,7 +624,7 @@ class Account(client: Client) : Service(client) { suspend fun createMFAChallenge( factor: io.appwrite.enums.AuthenticationFactor, ): io.appwrite.models.MfaChallenge { - val apiPath = "/account/mfa/challenge" + val apiPath = "/account/mfa/challenges" val apiParams = mutableMapOf<String, Any?>( "factor" to factor, @@ -661,7 +661,7 @@ class Account(client: Client) : Service(client) { challengeId: String, otp: String, ): io.appwrite.models.Session { - val apiPath = "/account/mfa/challenge" + val apiPath = "/account/mfa/challenges" val apiParams = mutableMapOf<String, Any?>( "challengeId" to challengeId, @@ -695,7 +695,7 @@ class Account(client: Client) : Service(client) { challengeId: String, otp: String, ): io.appwrite.models.Session { - val apiPath = "/account/mfa/challenge" + val apiPath = "/account/mfa/challenges" val apiParams = mutableMapOf<String, Any?>( "challengeId" to challengeId,