diff --git a/docs/examples/java/assistant/chat.md b/docs/examples/java/assistant/chat.md deleted file mode 100644 index 62cf301..0000000 --- a/docs/examples/java/assistant/chat.md +++ /dev/null @@ -1,21 +0,0 @@ -import io.appwrite.Client; -import io.appwrite.coroutines.CoroutineCallback; -import io.appwrite.services.Assistant; - -Client client = new Client(context) - .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint - .setProject("5df5acd0d48c2"); // Your project ID - -Assistant assistant = new Assistant(client); - -assistant.chat( - "[PROMPT]" - new CoroutineCallback<>((result, error) -> { - if (error != null) { - error.printStackTrace(); - return; - } - - Log.d("Appwrite", result.toString()); - }) -); diff --git a/docs/examples/java/migrations/delete-firebase-auth.md b/docs/examples/java/migrations/delete-firebase-auth.md deleted file mode 100644 index ab56fe9..0000000 --- a/docs/examples/java/migrations/delete-firebase-auth.md +++ /dev/null @@ -1,18 +0,0 @@ -import io.appwrite.Client; -import io.appwrite.coroutines.CoroutineCallback; -import io.appwrite.services.Migrations; - -Client client = new Client(context) - .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint - .setProject("5df5acd0d48c2"); // Your project ID - -Migrations migrations = new Migrations(client); - -migrations.deleteFirebaseAuth(new CoroutineCallback<>((result, error) -> { - if (error != null) - error.printStackTrace(); - return; - } - - Log.d("Appwrite", result.toString()); -})); diff --git a/docs/examples/java/migrations/list-firebase-projects.md b/docs/examples/java/migrations/list-firebase-projects.md deleted file mode 100644 index 7dba57e..0000000 --- a/docs/examples/java/migrations/list-firebase-projects.md +++ /dev/null @@ -1,18 +0,0 @@ -import io.appwrite.Client; -import io.appwrite.coroutines.CoroutineCallback; -import io.appwrite.services.Migrations; - -Client client = new Client(context) - .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint - .setProject("5df5acd0d48c2"); // Your project ID - -Migrations migrations = new Migrations(client); - -migrations.listFirebaseProjects(new CoroutineCallback<>((result, error) -> { - if (error != null) - error.printStackTrace(); - return; - } - - Log.d("Appwrite", result.toString()); -})); diff --git a/docs/examples/java/vcs/create-repository-detection.md b/docs/examples/java/vcs/create-repository-detection.md deleted file mode 100644 index 640414c..0000000 --- a/docs/examples/java/vcs/create-repository-detection.md +++ /dev/null @@ -1,22 +0,0 @@ -import io.appwrite.Client; -import io.appwrite.coroutines.CoroutineCallback; -import io.appwrite.services.Vcs; - -Client client = new Client(context) - .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint - .setProject("5df5acd0d48c2"); // Your project ID - -Vcs vcs = new Vcs(client); - -vcs.createRepositoryDetection( - "[INSTALLATION_ID]", - "[PROVIDER_REPOSITORY_ID]", - new CoroutineCallback<>((result, error) -> { - if (error != null) { - error.printStackTrace(); - return; - } - - Log.d("Appwrite", result.toString()); - }) -); diff --git a/docs/examples/java/vcs/create-repository.md b/docs/examples/java/vcs/create-repository.md deleted file mode 100644 index ebc22b3..0000000 --- a/docs/examples/java/vcs/create-repository.md +++ /dev/null @@ -1,23 +0,0 @@ -import io.appwrite.Client; -import io.appwrite.coroutines.CoroutineCallback; -import io.appwrite.services.Vcs; - -Client client = new Client(context) - .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint - .setProject("5df5acd0d48c2"); // Your project ID - -Vcs vcs = new Vcs(client); - -vcs.createRepository( - "[INSTALLATION_ID]", - "[NAME]", - false - new CoroutineCallback<>((result, error) -> { - if (error != null) { - error.printStackTrace(); - return; - } - - Log.d("Appwrite", result.toString()); - }) -); diff --git a/docs/examples/java/vcs/get-repository.md b/docs/examples/java/vcs/get-repository.md deleted file mode 100644 index 2e03db2..0000000 --- a/docs/examples/java/vcs/get-repository.md +++ /dev/null @@ -1,22 +0,0 @@ -import io.appwrite.Client; -import io.appwrite.coroutines.CoroutineCallback; -import io.appwrite.services.Vcs; - -Client client = new Client(context) - .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint - .setProject("5df5acd0d48c2"); // Your project ID - -Vcs vcs = new Vcs(client); - -vcs.getRepository( - "[INSTALLATION_ID]", - "[PROVIDER_REPOSITORY_ID]" - new CoroutineCallback<>((result, error) -> { - if (error != null) { - error.printStackTrace(); - return; - } - - Log.d("Appwrite", result.toString()); - }) -); diff --git a/docs/examples/java/vcs/list-repositories.md b/docs/examples/java/vcs/list-repositories.md deleted file mode 100644 index 3ebd41d..0000000 --- a/docs/examples/java/vcs/list-repositories.md +++ /dev/null @@ -1,21 +0,0 @@ -import io.appwrite.Client; -import io.appwrite.coroutines.CoroutineCallback; -import io.appwrite.services.Vcs; - -Client client = new Client(context) - .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint - .setProject("5df5acd0d48c2"); // Your project ID - -Vcs vcs = new Vcs(client); - -vcs.listRepositories( - "[INSTALLATION_ID]", - new CoroutineCallback<>((result, error) -> { - if (error != null) { - error.printStackTrace(); - return; - } - - Log.d("Appwrite", result.toString()); - }) -); diff --git a/docs/examples/java/vcs/list-repository-branches.md b/docs/examples/java/vcs/list-repository-branches.md deleted file mode 100644 index 3cb3663..0000000 --- a/docs/examples/java/vcs/list-repository-branches.md +++ /dev/null @@ -1,22 +0,0 @@ -import io.appwrite.Client; -import io.appwrite.coroutines.CoroutineCallback; -import io.appwrite.services.Vcs; - -Client client = new Client(context) - .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint - .setProject("5df5acd0d48c2"); // Your project ID - -Vcs vcs = new Vcs(client); - -vcs.listRepositoryBranches( - "[INSTALLATION_ID]", - "[PROVIDER_REPOSITORY_ID]" - new CoroutineCallback<>((result, error) -> { - if (error != null) { - error.printStackTrace(); - return; - } - - Log.d("Appwrite", result.toString()); - }) -); diff --git a/docs/examples/java/vcs/update-external-deployments.md b/docs/examples/java/vcs/update-external-deployments.md deleted file mode 100644 index 0f27f4a..0000000 --- a/docs/examples/java/vcs/update-external-deployments.md +++ /dev/null @@ -1,23 +0,0 @@ -import io.appwrite.Client; -import io.appwrite.coroutines.CoroutineCallback; -import io.appwrite.services.Vcs; - -Client client = new Client(context) - .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint - .setProject("5df5acd0d48c2"); // Your project ID - -Vcs vcs = new Vcs(client); - -vcs.updateExternalDeployments( - "[INSTALLATION_ID]", - "[REPOSITORY_ID]", - "[PROVIDER_PULL_REQUEST_ID]" - new CoroutineCallback<>((result, error) -> { - if (error != null) { - error.printStackTrace(); - return; - } - - Log.d("Appwrite", result.toString()); - }) -); diff --git a/docs/examples/kotlin/assistant/chat.md b/docs/examples/kotlin/assistant/chat.md deleted file mode 100644 index ef4381b..0000000 --- a/docs/examples/kotlin/assistant/chat.md +++ /dev/null @@ -1,12 +0,0 @@ -import io.appwrite.Client -import io.appwrite.services.Assistant - -val client = Client(context) - .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint - .setProject("5df5acd0d48c2") // Your project ID - -val assistant = Assistant(client) - -val response = assistant.chat( - prompt = "[PROMPT]" -) diff --git a/docs/examples/kotlin/migrations/delete-firebase-auth.md b/docs/examples/kotlin/migrations/delete-firebase-auth.md deleted file mode 100644 index 0aae427..0000000 --- a/docs/examples/kotlin/migrations/delete-firebase-auth.md +++ /dev/null @@ -1,10 +0,0 @@ -import io.appwrite.Client -import io.appwrite.services.Migrations - -val client = Client(context) - .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint - .setProject("5df5acd0d48c2") // Your project ID - -val migrations = Migrations(client) - -val response = migrations.deleteFirebaseAuth() diff --git a/docs/examples/kotlin/migrations/list-firebase-projects.md b/docs/examples/kotlin/migrations/list-firebase-projects.md deleted file mode 100644 index fe33e4a..0000000 --- a/docs/examples/kotlin/migrations/list-firebase-projects.md +++ /dev/null @@ -1,10 +0,0 @@ -import io.appwrite.Client -import io.appwrite.services.Migrations - -val client = Client(context) - .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint - .setProject("5df5acd0d48c2") // Your project ID - -val migrations = Migrations(client) - -val response = migrations.listFirebaseProjects() diff --git a/docs/examples/kotlin/vcs/create-repository-detection.md b/docs/examples/kotlin/vcs/create-repository-detection.md deleted file mode 100644 index 02dece0..0000000 --- a/docs/examples/kotlin/vcs/create-repository-detection.md +++ /dev/null @@ -1,13 +0,0 @@ -import io.appwrite.Client -import io.appwrite.services.Vcs - -val client = Client(context) - .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint - .setProject("5df5acd0d48c2") // Your project ID - -val vcs = Vcs(client) - -val response = vcs.createRepositoryDetection( - installationId = "[INSTALLATION_ID]", - providerRepositoryId = "[PROVIDER_REPOSITORY_ID]", -) diff --git a/docs/examples/kotlin/vcs/create-repository.md b/docs/examples/kotlin/vcs/create-repository.md deleted file mode 100644 index 1c9d9f0..0000000 --- a/docs/examples/kotlin/vcs/create-repository.md +++ /dev/null @@ -1,14 +0,0 @@ -import io.appwrite.Client -import io.appwrite.services.Vcs - -val client = Client(context) - .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint - .setProject("5df5acd0d48c2") // Your project ID - -val vcs = Vcs(client) - -val response = vcs.createRepository( - installationId = "[INSTALLATION_ID]", - name = "[NAME]", - private = false -) diff --git a/docs/examples/kotlin/vcs/get-repository.md b/docs/examples/kotlin/vcs/get-repository.md deleted file mode 100644 index 0f2964a..0000000 --- a/docs/examples/kotlin/vcs/get-repository.md +++ /dev/null @@ -1,13 +0,0 @@ -import io.appwrite.Client -import io.appwrite.services.Vcs - -val client = Client(context) - .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint - .setProject("5df5acd0d48c2") // Your project ID - -val vcs = Vcs(client) - -val response = vcs.getRepository( - installationId = "[INSTALLATION_ID]", - providerRepositoryId = "[PROVIDER_REPOSITORY_ID]" -) diff --git a/docs/examples/kotlin/vcs/list-repositories.md b/docs/examples/kotlin/vcs/list-repositories.md deleted file mode 100644 index 471f00d..0000000 --- a/docs/examples/kotlin/vcs/list-repositories.md +++ /dev/null @@ -1,12 +0,0 @@ -import io.appwrite.Client -import io.appwrite.services.Vcs - -val client = Client(context) - .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint - .setProject("5df5acd0d48c2") // Your project ID - -val vcs = Vcs(client) - -val response = vcs.listRepositories( - installationId = "[INSTALLATION_ID]", -) diff --git a/docs/examples/kotlin/vcs/list-repository-branches.md b/docs/examples/kotlin/vcs/list-repository-branches.md deleted file mode 100644 index dd891fe..0000000 --- a/docs/examples/kotlin/vcs/list-repository-branches.md +++ /dev/null @@ -1,13 +0,0 @@ -import io.appwrite.Client -import io.appwrite.services.Vcs - -val client = Client(context) - .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint - .setProject("5df5acd0d48c2") // Your project ID - -val vcs = Vcs(client) - -val response = vcs.listRepositoryBranches( - installationId = "[INSTALLATION_ID]", - providerRepositoryId = "[PROVIDER_REPOSITORY_ID]" -) diff --git a/docs/examples/kotlin/vcs/update-external-deployments.md b/docs/examples/kotlin/vcs/update-external-deployments.md deleted file mode 100644 index 32164cc..0000000 --- a/docs/examples/kotlin/vcs/update-external-deployments.md +++ /dev/null @@ -1,14 +0,0 @@ -import io.appwrite.Client -import io.appwrite.services.Vcs - -val client = Client(context) - .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint - .setProject("5df5acd0d48c2") // Your project ID - -val vcs = Vcs(client) - -val response = vcs.updateExternalDeployments( - installationId = "[INSTALLATION_ID]", - repositoryId = "[REPOSITORY_ID]", - providerPullRequestId = "[PROVIDER_PULL_REQUEST_ID]" -) diff --git a/library/src/main/java/io/appwrite/models/Branch.kt b/library/src/main/java/io/appwrite/models/Branch.kt deleted file mode 100644 index 674deef..0000000 --- a/library/src/main/java/io/appwrite/models/Branch.kt +++ /dev/null @@ -1,30 +0,0 @@ -package io.appwrite.models - -import com.google.gson.annotations.SerializedName -import io.appwrite.extensions.jsonCast - -/** - * Branch - */ -data class Branch( - /** - * Branch Name. - */ - @SerializedName("name") - val name: String, - -) { - fun toMap(): Map = mapOf( - "name" to name as Any, - ) - - companion object { - - @Suppress("UNCHECKED_CAST") - fun from( - map: Map, - ) = Branch( - name = map["name"] as String, - ) - } -} \ No newline at end of file diff --git a/library/src/main/java/io/appwrite/models/BranchList.kt b/library/src/main/java/io/appwrite/models/BranchList.kt deleted file mode 100644 index d87248b..0000000 --- a/library/src/main/java/io/appwrite/models/BranchList.kt +++ /dev/null @@ -1,38 +0,0 @@ -package io.appwrite.models - -import com.google.gson.annotations.SerializedName -import io.appwrite.extensions.jsonCast - -/** - * Branches List - */ -data class BranchList( - /** - * Total number of branches documents that matched your query. - */ - @SerializedName("total") - val total: Long, - - /** - * List of branches. - */ - @SerializedName("branches") - val branches: List, - -) { - fun toMap(): Map = mapOf( - "total" to total as Any, - "branches" to branches.map { it.toMap() } as Any, - ) - - companion object { - - @Suppress("UNCHECKED_CAST") - fun from( - map: Map, - ) = BranchList( - total = (map["total"] as Number).toLong(), - branches = (map["branches"] as List>).map { Branch.from(map = it) }, - ) - } -} \ No newline at end of file diff --git a/library/src/main/java/io/appwrite/models/Detection.kt b/library/src/main/java/io/appwrite/models/Detection.kt deleted file mode 100644 index 3ed4631..0000000 --- a/library/src/main/java/io/appwrite/models/Detection.kt +++ /dev/null @@ -1,30 +0,0 @@ -package io.appwrite.models - -import com.google.gson.annotations.SerializedName -import io.appwrite.extensions.jsonCast - -/** - * Detection - */ -data class Detection( - /** - * Runtime - */ - @SerializedName("runtime") - val runtime: String, - -) { - fun toMap(): Map = mapOf( - "runtime" to runtime as Any, - ) - - companion object { - - @Suppress("UNCHECKED_CAST") - fun from( - map: Map, - ) = Detection( - runtime = map["runtime"] as String, - ) - } -} \ No newline at end of file diff --git a/library/src/main/java/io/appwrite/models/FirebaseProject.kt b/library/src/main/java/io/appwrite/models/FirebaseProject.kt deleted file mode 100644 index 7f27597..0000000 --- a/library/src/main/java/io/appwrite/models/FirebaseProject.kt +++ /dev/null @@ -1,38 +0,0 @@ -package io.appwrite.models - -import com.google.gson.annotations.SerializedName -import io.appwrite.extensions.jsonCast - -/** - * MigrationFirebaseProject - */ -data class FirebaseProject( - /** - * Project ID. - */ - @SerializedName("projectId") - val projectId: String, - - /** - * Project display name. - */ - @SerializedName("displayName") - val displayName: String, - -) { - fun toMap(): Map = mapOf( - "projectId" to projectId as Any, - "displayName" to displayName as Any, - ) - - companion object { - - @Suppress("UNCHECKED_CAST") - fun from( - map: Map, - ) = FirebaseProject( - projectId = map["projectId"] as String, - displayName = map["displayName"] as String, - ) - } -} \ No newline at end of file diff --git a/library/src/main/java/io/appwrite/models/FirebaseProjectList.kt b/library/src/main/java/io/appwrite/models/FirebaseProjectList.kt deleted file mode 100644 index 510ad8a..0000000 --- a/library/src/main/java/io/appwrite/models/FirebaseProjectList.kt +++ /dev/null @@ -1,38 +0,0 @@ -package io.appwrite.models - -import com.google.gson.annotations.SerializedName -import io.appwrite.extensions.jsonCast - -/** - * Migrations Firebase Projects List - */ -data class FirebaseProjectList( - /** - * Total number of projects documents that matched your query. - */ - @SerializedName("total") - val total: Long, - - /** - * List of projects. - */ - @SerializedName("projects") - val projects: List, - -) { - fun toMap(): Map = mapOf( - "total" to total as Any, - "projects" to projects.map { it.toMap() } as Any, - ) - - companion object { - - @Suppress("UNCHECKED_CAST") - fun from( - map: Map, - ) = FirebaseProjectList( - total = (map["total"] as Number).toLong(), - projects = (map["projects"] as List>).map { FirebaseProject.from(map = it) }, - ) - } -} \ No newline at end of file diff --git a/library/src/main/java/io/appwrite/models/ProviderRepository.kt b/library/src/main/java/io/appwrite/models/ProviderRepository.kt deleted file mode 100644 index bf4f7ad..0000000 --- a/library/src/main/java/io/appwrite/models/ProviderRepository.kt +++ /dev/null @@ -1,78 +0,0 @@ -package io.appwrite.models - -import com.google.gson.annotations.SerializedName -import io.appwrite.extensions.jsonCast - -/** - * ProviderRepository - */ -data class ProviderRepository( - /** - * VCS (Version Control System) repository ID. - */ - @SerializedName("id") - val id: String, - - /** - * VCS (Version Control System) repository name. - */ - @SerializedName("name") - val name: String, - - /** - * VCS (Version Control System) organization name - */ - @SerializedName("organization") - val organization: String, - - /** - * VCS (Version Control System) provider name. - */ - @SerializedName("provider") - val provider: String, - - /** - * Is VCS (Version Control System) repository private? - */ - @SerializedName("xprivate") - val xprivate: Boolean, - - /** - * Auto-detected runtime suggestion. Empty if getting response of getRuntime(). - */ - @SerializedName("runtime") - val runtime: String, - - /** - * Last commit date in ISO 8601 format. - */ - @SerializedName("pushedAt") - val pushedAt: String, - -) { - fun toMap(): Map = mapOf( - "id" to id as Any, - "name" to name as Any, - "organization" to organization as Any, - "provider" to provider as Any, - "private" to xprivate as Any, - "runtime" to runtime as Any, - "pushedAt" to pushedAt as Any, - ) - - companion object { - - @Suppress("UNCHECKED_CAST") - fun from( - map: Map, - ) = ProviderRepository( - id = map["id"] as String, - name = map["name"] as String, - organization = map["organization"] as String, - provider = map["provider"] as String, - xprivate = map["private"] as Boolean, - runtime = map["runtime"] as String, - pushedAt = map["pushedAt"] as String, - ) - } -} \ No newline at end of file diff --git a/library/src/main/java/io/appwrite/models/ProviderRepositoryList.kt b/library/src/main/java/io/appwrite/models/ProviderRepositoryList.kt deleted file mode 100644 index 129527d..0000000 --- a/library/src/main/java/io/appwrite/models/ProviderRepositoryList.kt +++ /dev/null @@ -1,38 +0,0 @@ -package io.appwrite.models - -import com.google.gson.annotations.SerializedName -import io.appwrite.extensions.jsonCast - -/** - * Provider Repositories List - */ -data class ProviderRepositoryList( - /** - * Total number of providerRepositories documents that matched your query. - */ - @SerializedName("total") - val total: Long, - - /** - * List of providerRepositories. - */ - @SerializedName("providerRepositories") - val providerRepositories: List, - -) { - fun toMap(): Map = mapOf( - "total" to total as Any, - "providerRepositories" to providerRepositories.map { it.toMap() } as Any, - ) - - companion object { - - @Suppress("UNCHECKED_CAST") - fun from( - map: Map, - ) = ProviderRepositoryList( - total = (map["total"] as Number).toLong(), - providerRepositories = (map["providerRepositories"] as List>).map { ProviderRepository.from(map = it) }, - ) - } -} \ No newline at end of file diff --git a/library/src/main/java/io/appwrite/services/Assistant.kt b/library/src/main/java/io/appwrite/services/Assistant.kt deleted file mode 100644 index c38a2eb..0000000 --- a/library/src/main/java/io/appwrite/services/Assistant.kt +++ /dev/null @@ -1,47 +0,0 @@ -package io.appwrite.services - -import android.net.Uri -import io.appwrite.Client -import io.appwrite.models.* -import io.appwrite.exceptions.AppwriteException -import io.appwrite.extensions.classOf -import okhttp3.Cookie -import java.io.File - -/** - * -**/ -class Assistant : Service { - - public constructor (client: Client) : super(client) { } - - /** - * Ask Query - * - * - * - * @param prompt Prompt. A string containing questions asked to the AI assistant. - * @return [Any] - */ - suspend fun chat( - prompt: String, - ): Any { - val apiPath = "/console/assistant" - - val params = mutableMapOf( - "prompt" to prompt, - ) - val headers = mutableMapOf( - "content-type" to "application/json", - ) - return client.call( - "POST", - apiPath, - headers, - params, - responseType = Any::class.java, - ) - } - - -} \ No newline at end of file diff --git a/library/src/main/java/io/appwrite/services/Migrations.kt b/library/src/main/java/io/appwrite/services/Migrations.kt deleted file mode 100644 index 4fd3163..0000000 --- a/library/src/main/java/io/appwrite/services/Migrations.kt +++ /dev/null @@ -1,74 +0,0 @@ -package io.appwrite.services - -import android.net.Uri -import io.appwrite.Client -import io.appwrite.models.* -import io.appwrite.exceptions.AppwriteException -import io.appwrite.extensions.classOf -import okhttp3.Cookie -import java.io.File - -/** - * The Migrations service allows you to migrate third-party data to your Appwrite project. -**/ -class Migrations : Service { - - public constructor (client: Client) : super(client) { } - - /** - * Revoke Appwrite's authorization to access Firebase Projects - * - * - * - * @return [Any] - */ - suspend fun deleteFirebaseAuth( - ): Any { - val apiPath = "/migrations/firebase/deauthorize" - - val params = mutableMapOf( - ) - val headers = mutableMapOf( - "content-type" to "application/json", - ) - return client.call( - "GET", - apiPath, - headers, - params, - responseType = Any::class.java, - ) - } - - - /** - * List Firebase Projects - * - * - * - * @return [io.appwrite.models.FirebaseProjectList] - */ - suspend fun listFirebaseProjects( - ): io.appwrite.models.FirebaseProjectList { - val apiPath = "/migrations/firebase/projects" - - val params = mutableMapOf( - ) - val headers = mutableMapOf( - "content-type" to "application/json", - ) - val converter: (Any) -> io.appwrite.models.FirebaseProjectList = { - io.appwrite.models.FirebaseProjectList.from(map = it as Map) - } - return client.call( - "GET", - apiPath, - headers, - params, - responseType = io.appwrite.models.FirebaseProjectList::class.java, - converter, - ) - } - - -} \ No newline at end of file diff --git a/library/src/main/java/io/appwrite/services/Vcs.kt b/library/src/main/java/io/appwrite/services/Vcs.kt deleted file mode 100644 index 21c2b02..0000000 --- a/library/src/main/java/io/appwrite/services/Vcs.kt +++ /dev/null @@ -1,241 +0,0 @@ -package io.appwrite.services - -import android.net.Uri -import io.appwrite.Client -import io.appwrite.models.* -import io.appwrite.exceptions.AppwriteException -import io.appwrite.extensions.classOf -import okhttp3.Cookie -import java.io.File - -/** - * -**/ -class Vcs : Service { - - public constructor (client: Client) : super(client) { } - - /** - * List Repositories - * - * - * - * @param installationId Installation Id - * @param search Search term to filter your list results. Max length: 256 chars. - * @return [io.appwrite.models.ProviderRepositoryList] - */ - @JvmOverloads - suspend fun listRepositories( - installationId: String, - search: String? = null, - ): io.appwrite.models.ProviderRepositoryList { - val apiPath = "/vcs/github/installations/{installationId}/providerRepositories" - .replace("{installationId}", installationId) - - val params = mutableMapOf( - "search" to search, - ) - val headers = mutableMapOf( - "content-type" to "application/json", - ) - val converter: (Any) -> io.appwrite.models.ProviderRepositoryList = { - io.appwrite.models.ProviderRepositoryList.from(map = it as Map) - } - return client.call( - "GET", - apiPath, - headers, - params, - responseType = io.appwrite.models.ProviderRepositoryList::class.java, - converter, - ) - } - - - /** - * Create repository - * - * - * - * @param installationId Installation Id - * @param name Repository name (slug) - * @param private Mark repository public or private - * @return [io.appwrite.models.ProviderRepository] - */ - suspend fun createRepository( - installationId: String, - name: String, - private: Boolean, - ): io.appwrite.models.ProviderRepository { - val apiPath = "/vcs/github/installations/{installationId}/providerRepositories" - .replace("{installationId}", installationId) - - val params = mutableMapOf( - "name" to name, - "private" to private, - ) - val headers = mutableMapOf( - "content-type" to "application/json", - ) - val converter: (Any) -> io.appwrite.models.ProviderRepository = { - io.appwrite.models.ProviderRepository.from(map = it as Map) - } - return client.call( - "POST", - apiPath, - headers, - params, - responseType = io.appwrite.models.ProviderRepository::class.java, - converter, - ) - } - - - /** - * Get repository - * - * - * - * @param installationId Installation Id - * @param providerRepositoryId Repository Id - * @return [io.appwrite.models.ProviderRepository] - */ - suspend fun getRepository( - installationId: String, - providerRepositoryId: String, - ): io.appwrite.models.ProviderRepository { - val apiPath = "/vcs/github/installations/{installationId}/providerRepositories/{providerRepositoryId}" - .replace("{installationId}", installationId) - .replace("{providerRepositoryId}", providerRepositoryId) - - val params = mutableMapOf( - ) - val headers = mutableMapOf( - "content-type" to "application/json", - ) - val converter: (Any) -> io.appwrite.models.ProviderRepository = { - io.appwrite.models.ProviderRepository.from(map = it as Map) - } - return client.call( - "GET", - apiPath, - headers, - params, - responseType = io.appwrite.models.ProviderRepository::class.java, - converter, - ) - } - - - /** - * List Repository Branches - * - * - * - * @param installationId Installation Id - * @param providerRepositoryId Repository Id - * @return [io.appwrite.models.BranchList] - */ - suspend fun listRepositoryBranches( - installationId: String, - providerRepositoryId: String, - ): io.appwrite.models.BranchList { - val apiPath = "/vcs/github/installations/{installationId}/providerRepositories/{providerRepositoryId}/branches" - .replace("{installationId}", installationId) - .replace("{providerRepositoryId}", providerRepositoryId) - - val params = mutableMapOf( - ) - val headers = mutableMapOf( - "content-type" to "application/json", - ) - val converter: (Any) -> io.appwrite.models.BranchList = { - io.appwrite.models.BranchList.from(map = it as Map) - } - return client.call( - "GET", - apiPath, - headers, - params, - responseType = io.appwrite.models.BranchList::class.java, - converter, - ) - } - - - /** - * Detect runtime settings from source code - * - * - * - * @param installationId Installation Id - * @param providerRepositoryId Repository Id - * @param providerRootDirectory Path to Root Directory - * @return [io.appwrite.models.Detection] - */ - @JvmOverloads - suspend fun createRepositoryDetection( - installationId: String, - providerRepositoryId: String, - providerRootDirectory: String? = null, - ): io.appwrite.models.Detection { - val apiPath = "/vcs/github/installations/{installationId}/providerRepositories/{providerRepositoryId}/detection" - .replace("{installationId}", installationId) - .replace("{providerRepositoryId}", providerRepositoryId) - - val params = mutableMapOf( - "providerRootDirectory" to providerRootDirectory, - ) - val headers = mutableMapOf( - "content-type" to "application/json", - ) - val converter: (Any) -> io.appwrite.models.Detection = { - io.appwrite.models.Detection.from(map = it as Map) - } - return client.call( - "POST", - apiPath, - headers, - params, - responseType = io.appwrite.models.Detection::class.java, - converter, - ) - } - - - /** - * Authorize external deployment - * - * - * - * @param installationId Installation Id - * @param repositoryId VCS Repository Id - * @param providerPullRequestId GitHub Pull Request Id - * @return [Any] - */ - suspend fun updateExternalDeployments( - installationId: String, - repositoryId: String, - providerPullRequestId: String, - ): Any { - val apiPath = "/vcs/github/installations/{installationId}/repositories/{repositoryId}" - .replace("{installationId}", installationId) - .replace("{repositoryId}", repositoryId) - - val params = mutableMapOf( - "providerPullRequestId" to providerPullRequestId, - ) - val headers = mutableMapOf( - "content-type" to "application/json", - ) - return client.call( - "PATCH", - apiPath, - headers, - params, - responseType = Any::class.java, - ) - } - - -} \ No newline at end of file