diff --git a/examples/1.9.x/client-android/java/organization/create-installation.md b/examples/1.9.x/client-android/java/organization/create-installation.md new file mode 100644 index 000000000..d4a86f886 --- /dev/null +++ b/examples/1.9.x/client-android/java/organization/create-installation.md @@ -0,0 +1,25 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Organization; + +Client client = new Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject(""); // Your project ID + +Organization organization = new Organization(client); + +organization.createInstallation( + "", // appId + "", // authorizationDetails (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + Log.d("Appwrite", result.toString()); + }) +); + +``` diff --git a/examples/1.9.x/client-android/java/organization/delete-installation.md b/examples/1.9.x/client-android/java/organization/delete-installation.md new file mode 100644 index 000000000..f8cdccb82 --- /dev/null +++ b/examples/1.9.x/client-android/java/organization/delete-installation.md @@ -0,0 +1,24 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Organization; + +Client client = new Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject(""); // Your project ID + +Organization organization = new Organization(client); + +organization.deleteInstallation( + "", // installationId + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + Log.d("Appwrite", result.toString()); + }) +); + +``` diff --git a/examples/1.9.x/client-android/java/organization/get-installation.md b/examples/1.9.x/client-android/java/organization/get-installation.md new file mode 100644 index 000000000..958fc61c4 --- /dev/null +++ b/examples/1.9.x/client-android/java/organization/get-installation.md @@ -0,0 +1,24 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Organization; + +Client client = new Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject(""); // Your project ID + +Organization organization = new Organization(client); + +organization.getInstallation( + "", // installationId + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + Log.d("Appwrite", result.toString()); + }) +); + +``` diff --git a/examples/1.9.x/client-android/java/organization/list-installations.md b/examples/1.9.x/client-android/java/organization/list-installations.md new file mode 100644 index 000000000..758d4edbb --- /dev/null +++ b/examples/1.9.x/client-android/java/organization/list-installations.md @@ -0,0 +1,25 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Organization; + +Client client = new Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject(""); // Your project ID + +Organization organization = new Organization(client); + +organization.listInstallations( + List.of(), // queries (optional) + false, // total (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + Log.d("Appwrite", result.toString()); + }) +); + +``` diff --git a/examples/1.9.x/client-android/java/organization/update-installation.md b/examples/1.9.x/client-android/java/organization/update-installation.md new file mode 100644 index 000000000..581140bd2 --- /dev/null +++ b/examples/1.9.x/client-android/java/organization/update-installation.md @@ -0,0 +1,25 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Organization; + +Client client = new Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject(""); // Your project ID + +Organization organization = new Organization(client); + +organization.updateInstallation( + "", // installationId + "", // authorizationDetails (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + Log.d("Appwrite", result.toString()); + }) +); + +``` diff --git a/examples/1.9.x/client-android/java/teams/create-installation.md b/examples/1.9.x/client-android/java/teams/create-installation.md new file mode 100644 index 000000000..f0999bce5 --- /dev/null +++ b/examples/1.9.x/client-android/java/teams/create-installation.md @@ -0,0 +1,26 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Teams; + +Client client = new Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject(""); // Your project ID + +Teams teams = new Teams(client); + +teams.createInstallation( + "", // teamId + "", // appId + "", // authorizationDetails (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + Log.d("Appwrite", result.toString()); + }) +); + +``` diff --git a/examples/1.9.x/client-android/java/teams/delete-installation.md b/examples/1.9.x/client-android/java/teams/delete-installation.md new file mode 100644 index 000000000..2c20c27a4 --- /dev/null +++ b/examples/1.9.x/client-android/java/teams/delete-installation.md @@ -0,0 +1,25 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Teams; + +Client client = new Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject(""); // Your project ID + +Teams teams = new Teams(client); + +teams.deleteInstallation( + "", // teamId + "", // installationId + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + Log.d("Appwrite", result.toString()); + }) +); + +``` diff --git a/examples/1.9.x/client-android/java/teams/get-installation.md b/examples/1.9.x/client-android/java/teams/get-installation.md new file mode 100644 index 000000000..f1313b2e3 --- /dev/null +++ b/examples/1.9.x/client-android/java/teams/get-installation.md @@ -0,0 +1,25 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Teams; + +Client client = new Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject(""); // Your project ID + +Teams teams = new Teams(client); + +teams.getInstallation( + "", // teamId + "", // installationId + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + Log.d("Appwrite", result.toString()); + }) +); + +``` diff --git a/examples/1.9.x/client-android/java/teams/list-installations.md b/examples/1.9.x/client-android/java/teams/list-installations.md new file mode 100644 index 000000000..442b24e6b --- /dev/null +++ b/examples/1.9.x/client-android/java/teams/list-installations.md @@ -0,0 +1,26 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Teams; + +Client client = new Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject(""); // Your project ID + +Teams teams = new Teams(client); + +teams.listInstallations( + "", // teamId + List.of(), // queries (optional) + false, // total (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + Log.d("Appwrite", result.toString()); + }) +); + +``` diff --git a/examples/1.9.x/client-android/java/teams/update-installation.md b/examples/1.9.x/client-android/java/teams/update-installation.md new file mode 100644 index 000000000..4ba8a9f2d --- /dev/null +++ b/examples/1.9.x/client-android/java/teams/update-installation.md @@ -0,0 +1,26 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Teams; + +Client client = new Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject(""); // Your project ID + +Teams teams = new Teams(client); + +teams.updateInstallation( + "", // teamId + "", // installationId + "", // authorizationDetails (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + Log.d("Appwrite", result.toString()); + }) +); + +``` diff --git a/examples/1.9.x/client-android/kotlin/organization/create-installation.md b/examples/1.9.x/client-android/kotlin/organization/create-installation.md new file mode 100644 index 000000000..f5f79b423 --- /dev/null +++ b/examples/1.9.x/client-android/kotlin/organization/create-installation.md @@ -0,0 +1,16 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Organization + +val client = Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +val organization = Organization(client) + +val result = organization.createInstallation( + appId = "", + authorizationDetails = "", // (optional) +) +``` diff --git a/examples/1.9.x/client-android/kotlin/organization/delete-installation.md b/examples/1.9.x/client-android/kotlin/organization/delete-installation.md new file mode 100644 index 000000000..c0f1b11d1 --- /dev/null +++ b/examples/1.9.x/client-android/kotlin/organization/delete-installation.md @@ -0,0 +1,15 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Organization + +val client = Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +val organization = Organization(client) + +val result = organization.deleteInstallation( + installationId = "", +) +``` diff --git a/examples/1.9.x/client-android/kotlin/organization/get-installation.md b/examples/1.9.x/client-android/kotlin/organization/get-installation.md new file mode 100644 index 000000000..8a512807c --- /dev/null +++ b/examples/1.9.x/client-android/kotlin/organization/get-installation.md @@ -0,0 +1,15 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Organization + +val client = Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +val organization = Organization(client) + +val result = organization.getInstallation( + installationId = "", +) +``` diff --git a/examples/1.9.x/client-android/kotlin/organization/list-installations.md b/examples/1.9.x/client-android/kotlin/organization/list-installations.md new file mode 100644 index 000000000..3f6d83900 --- /dev/null +++ b/examples/1.9.x/client-android/kotlin/organization/list-installations.md @@ -0,0 +1,16 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Organization + +val client = Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +val organization = Organization(client) + +val result = organization.listInstallations( + queries = listOf(), // (optional) + total = false, // (optional) +) +``` diff --git a/examples/1.9.x/client-android/kotlin/organization/update-installation.md b/examples/1.9.x/client-android/kotlin/organization/update-installation.md new file mode 100644 index 000000000..b5dbb792b --- /dev/null +++ b/examples/1.9.x/client-android/kotlin/organization/update-installation.md @@ -0,0 +1,16 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Organization + +val client = Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +val organization = Organization(client) + +val result = organization.updateInstallation( + installationId = "", + authorizationDetails = "", // (optional) +) +``` diff --git a/examples/1.9.x/client-android/kotlin/teams/create-installation.md b/examples/1.9.x/client-android/kotlin/teams/create-installation.md new file mode 100644 index 000000000..975cab997 --- /dev/null +++ b/examples/1.9.x/client-android/kotlin/teams/create-installation.md @@ -0,0 +1,17 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Teams + +val client = Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +val teams = Teams(client) + +val result = teams.createInstallation( + teamId = "", + appId = "", + authorizationDetails = "", // (optional) +) +``` diff --git a/examples/1.9.x/client-android/kotlin/teams/delete-installation.md b/examples/1.9.x/client-android/kotlin/teams/delete-installation.md new file mode 100644 index 000000000..7db6a2c54 --- /dev/null +++ b/examples/1.9.x/client-android/kotlin/teams/delete-installation.md @@ -0,0 +1,16 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Teams + +val client = Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +val teams = Teams(client) + +val result = teams.deleteInstallation( + teamId = "", + installationId = "", +) +``` diff --git a/examples/1.9.x/client-android/kotlin/teams/get-installation.md b/examples/1.9.x/client-android/kotlin/teams/get-installation.md new file mode 100644 index 000000000..805e97b32 --- /dev/null +++ b/examples/1.9.x/client-android/kotlin/teams/get-installation.md @@ -0,0 +1,16 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Teams + +val client = Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +val teams = Teams(client) + +val result = teams.getInstallation( + teamId = "", + installationId = "", +) +``` diff --git a/examples/1.9.x/client-android/kotlin/teams/list-installations.md b/examples/1.9.x/client-android/kotlin/teams/list-installations.md new file mode 100644 index 000000000..6143b5b1d --- /dev/null +++ b/examples/1.9.x/client-android/kotlin/teams/list-installations.md @@ -0,0 +1,17 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Teams + +val client = Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +val teams = Teams(client) + +val result = teams.listInstallations( + teamId = "", + queries = listOf(), // (optional) + total = false, // (optional) +) +``` diff --git a/examples/1.9.x/client-android/kotlin/teams/update-installation.md b/examples/1.9.x/client-android/kotlin/teams/update-installation.md new file mode 100644 index 000000000..e80ff3fd0 --- /dev/null +++ b/examples/1.9.x/client-android/kotlin/teams/update-installation.md @@ -0,0 +1,17 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Teams + +val client = Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +val teams = Teams(client) + +val result = teams.updateInstallation( + teamId = "", + installationId = "", + authorizationDetails = "", // (optional) +) +``` diff --git a/examples/1.9.x/client-apple/examples/organization/create-installation.md b/examples/1.9.x/client-apple/examples/organization/create-installation.md new file mode 100644 index 000000000..b2eb34ab3 --- /dev/null +++ b/examples/1.9.x/client-apple/examples/organization/create-installation.md @@ -0,0 +1,15 @@ +```swift +import Appwrite + +let client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +let organization = Organization(client) + +let appInstallation = try await organization.createInstallation( + appId: "", + authorizationDetails: "" // optional +) + +``` diff --git a/examples/1.9.x/client-apple/examples/organization/delete-installation.md b/examples/1.9.x/client-apple/examples/organization/delete-installation.md new file mode 100644 index 000000000..3124453f0 --- /dev/null +++ b/examples/1.9.x/client-apple/examples/organization/delete-installation.md @@ -0,0 +1,14 @@ +```swift +import Appwrite + +let client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +let organization = Organization(client) + +let result = try await organization.deleteInstallation( + installationId: "" +) + +``` diff --git a/examples/1.9.x/client-apple/examples/organization/get-installation.md b/examples/1.9.x/client-apple/examples/organization/get-installation.md new file mode 100644 index 000000000..f9bbcabab --- /dev/null +++ b/examples/1.9.x/client-apple/examples/organization/get-installation.md @@ -0,0 +1,14 @@ +```swift +import Appwrite + +let client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +let organization = Organization(client) + +let appInstallation = try await organization.getInstallation( + installationId: "" +) + +``` diff --git a/examples/1.9.x/client-apple/examples/organization/list-installations.md b/examples/1.9.x/client-apple/examples/organization/list-installations.md new file mode 100644 index 000000000..56c8b0541 --- /dev/null +++ b/examples/1.9.x/client-apple/examples/organization/list-installations.md @@ -0,0 +1,15 @@ +```swift +import Appwrite + +let client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +let organization = Organization(client) + +let appInstallationList = try await organization.listInstallations( + queries: [], // optional + total: false // optional +) + +``` diff --git a/examples/1.9.x/client-apple/examples/organization/update-installation.md b/examples/1.9.x/client-apple/examples/organization/update-installation.md new file mode 100644 index 000000000..e0be7adfc --- /dev/null +++ b/examples/1.9.x/client-apple/examples/organization/update-installation.md @@ -0,0 +1,15 @@ +```swift +import Appwrite + +let client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +let organization = Organization(client) + +let appInstallation = try await organization.updateInstallation( + installationId: "", + authorizationDetails: "" // optional +) + +``` diff --git a/examples/1.9.x/client-apple/examples/teams/create-installation.md b/examples/1.9.x/client-apple/examples/teams/create-installation.md new file mode 100644 index 000000000..71f64aae4 --- /dev/null +++ b/examples/1.9.x/client-apple/examples/teams/create-installation.md @@ -0,0 +1,16 @@ +```swift +import Appwrite + +let client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +let teams = Teams(client) + +let appInstallation = try await teams.createInstallation( + teamId: "", + appId: "", + authorizationDetails: "" // optional +) + +``` diff --git a/examples/1.9.x/client-apple/examples/teams/delete-installation.md b/examples/1.9.x/client-apple/examples/teams/delete-installation.md new file mode 100644 index 000000000..66ef934c6 --- /dev/null +++ b/examples/1.9.x/client-apple/examples/teams/delete-installation.md @@ -0,0 +1,15 @@ +```swift +import Appwrite + +let client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +let teams = Teams(client) + +let result = try await teams.deleteInstallation( + teamId: "", + installationId: "" +) + +``` diff --git a/examples/1.9.x/client-apple/examples/teams/get-installation.md b/examples/1.9.x/client-apple/examples/teams/get-installation.md new file mode 100644 index 000000000..c4420115b --- /dev/null +++ b/examples/1.9.x/client-apple/examples/teams/get-installation.md @@ -0,0 +1,15 @@ +```swift +import Appwrite + +let client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +let teams = Teams(client) + +let appInstallation = try await teams.getInstallation( + teamId: "", + installationId: "" +) + +``` diff --git a/examples/1.9.x/client-apple/examples/teams/list-installations.md b/examples/1.9.x/client-apple/examples/teams/list-installations.md new file mode 100644 index 000000000..c64ae7d84 --- /dev/null +++ b/examples/1.9.x/client-apple/examples/teams/list-installations.md @@ -0,0 +1,16 @@ +```swift +import Appwrite + +let client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +let teams = Teams(client) + +let appInstallationList = try await teams.listInstallations( + teamId: "", + queries: [], // optional + total: false // optional +) + +``` diff --git a/examples/1.9.x/client-apple/examples/teams/update-installation.md b/examples/1.9.x/client-apple/examples/teams/update-installation.md new file mode 100644 index 000000000..7b5029308 --- /dev/null +++ b/examples/1.9.x/client-apple/examples/teams/update-installation.md @@ -0,0 +1,16 @@ +```swift +import Appwrite + +let client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +let teams = Teams(client) + +let appInstallation = try await teams.updateInstallation( + teamId: "", + installationId: "", + authorizationDetails: "" // optional +) + +``` diff --git a/examples/1.9.x/client-flutter/examples/organization/create-installation.md b/examples/1.9.x/client-flutter/examples/organization/create-installation.md new file mode 100644 index 000000000..d28dacfc2 --- /dev/null +++ b/examples/1.9.x/client-flutter/examples/organization/create-installation.md @@ -0,0 +1,14 @@ +```dart +import 'package:appwrite/appwrite.dart'; + +Client client = Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +Organization organization = Organization(client); + +AppInstallation result = await organization.createInstallation( + appId: '', + authorizationDetails: '', // optional +); +``` diff --git a/examples/1.9.x/client-flutter/examples/organization/delete-installation.md b/examples/1.9.x/client-flutter/examples/organization/delete-installation.md new file mode 100644 index 000000000..3142e2450 --- /dev/null +++ b/examples/1.9.x/client-flutter/examples/organization/delete-installation.md @@ -0,0 +1,13 @@ +```dart +import 'package:appwrite/appwrite.dart'; + +Client client = Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +Organization organization = Organization(client); + +await organization.deleteInstallation( + installationId: '', +); +``` diff --git a/examples/1.9.x/client-flutter/examples/organization/get-installation.md b/examples/1.9.x/client-flutter/examples/organization/get-installation.md new file mode 100644 index 000000000..dd2d7ac71 --- /dev/null +++ b/examples/1.9.x/client-flutter/examples/organization/get-installation.md @@ -0,0 +1,13 @@ +```dart +import 'package:appwrite/appwrite.dart'; + +Client client = Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +Organization organization = Organization(client); + +AppInstallation result = await organization.getInstallation( + installationId: '', +); +``` diff --git a/examples/1.9.x/client-flutter/examples/organization/list-installations.md b/examples/1.9.x/client-flutter/examples/organization/list-installations.md new file mode 100644 index 000000000..bdecb1083 --- /dev/null +++ b/examples/1.9.x/client-flutter/examples/organization/list-installations.md @@ -0,0 +1,14 @@ +```dart +import 'package:appwrite/appwrite.dart'; + +Client client = Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +Organization organization = Organization(client); + +AppInstallationList result = await organization.listInstallations( + queries: [], // optional + total: false, // optional +); +``` diff --git a/examples/1.9.x/client-flutter/examples/organization/update-installation.md b/examples/1.9.x/client-flutter/examples/organization/update-installation.md new file mode 100644 index 000000000..fa834d49f --- /dev/null +++ b/examples/1.9.x/client-flutter/examples/organization/update-installation.md @@ -0,0 +1,14 @@ +```dart +import 'package:appwrite/appwrite.dart'; + +Client client = Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +Organization organization = Organization(client); + +AppInstallation result = await organization.updateInstallation( + installationId: '', + authorizationDetails: '', // optional +); +``` diff --git a/examples/1.9.x/client-flutter/examples/teams/create-installation.md b/examples/1.9.x/client-flutter/examples/teams/create-installation.md new file mode 100644 index 000000000..4ad63b8de --- /dev/null +++ b/examples/1.9.x/client-flutter/examples/teams/create-installation.md @@ -0,0 +1,15 @@ +```dart +import 'package:appwrite/appwrite.dart'; + +Client client = Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +Teams teams = Teams(client); + +AppInstallation result = await teams.createInstallation( + teamId: '', + appId: '', + authorizationDetails: '', // optional +); +``` diff --git a/examples/1.9.x/client-flutter/examples/teams/delete-installation.md b/examples/1.9.x/client-flutter/examples/teams/delete-installation.md new file mode 100644 index 000000000..4c872cec0 --- /dev/null +++ b/examples/1.9.x/client-flutter/examples/teams/delete-installation.md @@ -0,0 +1,14 @@ +```dart +import 'package:appwrite/appwrite.dart'; + +Client client = Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +Teams teams = Teams(client); + +await teams.deleteInstallation( + teamId: '', + installationId: '', +); +``` diff --git a/examples/1.9.x/client-flutter/examples/teams/get-installation.md b/examples/1.9.x/client-flutter/examples/teams/get-installation.md new file mode 100644 index 000000000..eec876623 --- /dev/null +++ b/examples/1.9.x/client-flutter/examples/teams/get-installation.md @@ -0,0 +1,14 @@ +```dart +import 'package:appwrite/appwrite.dart'; + +Client client = Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +Teams teams = Teams(client); + +AppInstallation result = await teams.getInstallation( + teamId: '', + installationId: '', +); +``` diff --git a/examples/1.9.x/client-flutter/examples/teams/list-installations.md b/examples/1.9.x/client-flutter/examples/teams/list-installations.md new file mode 100644 index 000000000..9c3aa8524 --- /dev/null +++ b/examples/1.9.x/client-flutter/examples/teams/list-installations.md @@ -0,0 +1,15 @@ +```dart +import 'package:appwrite/appwrite.dart'; + +Client client = Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +Teams teams = Teams(client); + +AppInstallationList result = await teams.listInstallations( + teamId: '', + queries: [], // optional + total: false, // optional +); +``` diff --git a/examples/1.9.x/client-flutter/examples/teams/update-installation.md b/examples/1.9.x/client-flutter/examples/teams/update-installation.md new file mode 100644 index 000000000..e9e8ba4bf --- /dev/null +++ b/examples/1.9.x/client-flutter/examples/teams/update-installation.md @@ -0,0 +1,15 @@ +```dart +import 'package:appwrite/appwrite.dart'; + +Client client = Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +Teams teams = Teams(client); + +AppInstallation result = await teams.updateInstallation( + teamId: '', + installationId: '', + authorizationDetails: '', // optional +); +``` diff --git a/examples/1.9.x/client-graphql/examples/organization/create-installation.md b/examples/1.9.x/client-graphql/examples/organization/create-installation.md new file mode 100644 index 000000000..7ca3673a7 --- /dev/null +++ b/examples/1.9.x/client-graphql/examples/organization/create-installation.md @@ -0,0 +1,36 @@ +```graphql +mutation { + organizationCreateInstallation( + appId: "", + authorizationDetails: "" + ) { + _id + _createdAt + _updatedAt + appId + teamId + scopes + authorizationDetails + createdById + createdByName + lastAccessedAt + } +} +mutation { + organizationCreateInstallation( + appId: "", + authorizationDetails: "" + ) { + _id + _createdAt + _updatedAt + appId + teamId + scopes + authorizationDetails + createdById + createdByName + lastAccessedAt + } +} +``` diff --git a/examples/1.9.x/client-graphql/examples/organization/delete-installation.md b/examples/1.9.x/client-graphql/examples/organization/delete-installation.md new file mode 100644 index 000000000..3684fd01c --- /dev/null +++ b/examples/1.9.x/client-graphql/examples/organization/delete-installation.md @@ -0,0 +1,16 @@ +```graphql +mutation { + organizationDeleteInstallation( + installationId: "" + ) { + status + } +} +mutation { + organizationDeleteInstallation( + installationId: "" + ) { + status + } +} +``` diff --git a/examples/1.9.x/client-graphql/examples/organization/get-installation.md b/examples/1.9.x/client-graphql/examples/organization/get-installation.md new file mode 100644 index 000000000..d5748da24 --- /dev/null +++ b/examples/1.9.x/client-graphql/examples/organization/get-installation.md @@ -0,0 +1,18 @@ +```graphql +query { + organizationGetInstallation( + installationId: "" + ) { + _id + _createdAt + _updatedAt + appId + teamId + scopes + authorizationDetails + createdById + createdByName + lastAccessedAt + } +} +``` diff --git a/examples/1.9.x/client-graphql/examples/organization/list-installations.md b/examples/1.9.x/client-graphql/examples/organization/list-installations.md new file mode 100644 index 000000000..900a0a2d9 --- /dev/null +++ b/examples/1.9.x/client-graphql/examples/organization/list-installations.md @@ -0,0 +1,22 @@ +```graphql +query { + organizationListInstallations( + queries: [], + total: false + ) { + total + installations { + _id + _createdAt + _updatedAt + appId + teamId + scopes + authorizationDetails + createdById + createdByName + lastAccessedAt + } + } +} +``` diff --git a/examples/1.9.x/client-graphql/examples/organization/update-installation.md b/examples/1.9.x/client-graphql/examples/organization/update-installation.md new file mode 100644 index 000000000..6f6fdc481 --- /dev/null +++ b/examples/1.9.x/client-graphql/examples/organization/update-installation.md @@ -0,0 +1,36 @@ +```graphql +mutation { + organizationUpdateInstallation( + installationId: "", + authorizationDetails: "" + ) { + _id + _createdAt + _updatedAt + appId + teamId + scopes + authorizationDetails + createdById + createdByName + lastAccessedAt + } +} +mutation { + organizationUpdateInstallation( + installationId: "", + authorizationDetails: "" + ) { + _id + _createdAt + _updatedAt + appId + teamId + scopes + authorizationDetails + createdById + createdByName + lastAccessedAt + } +} +``` diff --git a/examples/1.9.x/client-graphql/examples/teams/create-installation.md b/examples/1.9.x/client-graphql/examples/teams/create-installation.md new file mode 100644 index 000000000..4a51462b0 --- /dev/null +++ b/examples/1.9.x/client-graphql/examples/teams/create-installation.md @@ -0,0 +1,38 @@ +```graphql +mutation { + teamsCreateInstallation( + teamId: "", + appId: "", + authorizationDetails: "" + ) { + _id + _createdAt + _updatedAt + appId + teamId + scopes + authorizationDetails + createdById + createdByName + lastAccessedAt + } +} +mutation { + teamsCreateInstallation( + teamId: "", + appId: "", + authorizationDetails: "" + ) { + _id + _createdAt + _updatedAt + appId + teamId + scopes + authorizationDetails + createdById + createdByName + lastAccessedAt + } +} +``` diff --git a/examples/1.9.x/client-graphql/examples/teams/delete-installation.md b/examples/1.9.x/client-graphql/examples/teams/delete-installation.md new file mode 100644 index 000000000..bb5d7ad25 --- /dev/null +++ b/examples/1.9.x/client-graphql/examples/teams/delete-installation.md @@ -0,0 +1,18 @@ +```graphql +mutation { + teamsDeleteInstallation( + teamId: "", + installationId: "" + ) { + status + } +} +mutation { + teamsDeleteInstallation( + teamId: "", + installationId: "" + ) { + status + } +} +``` diff --git a/examples/1.9.x/client-graphql/examples/teams/get-installation.md b/examples/1.9.x/client-graphql/examples/teams/get-installation.md new file mode 100644 index 000000000..051aa484a --- /dev/null +++ b/examples/1.9.x/client-graphql/examples/teams/get-installation.md @@ -0,0 +1,19 @@ +```graphql +query { + teamsGetInstallation( + teamId: "", + installationId: "" + ) { + _id + _createdAt + _updatedAt + appId + teamId + scopes + authorizationDetails + createdById + createdByName + lastAccessedAt + } +} +``` diff --git a/examples/1.9.x/client-graphql/examples/teams/list-installations.md b/examples/1.9.x/client-graphql/examples/teams/list-installations.md new file mode 100644 index 000000000..e67a0d520 --- /dev/null +++ b/examples/1.9.x/client-graphql/examples/teams/list-installations.md @@ -0,0 +1,23 @@ +```graphql +query { + teamsListInstallations( + teamId: "", + queries: [], + total: false + ) { + total + installations { + _id + _createdAt + _updatedAt + appId + teamId + scopes + authorizationDetails + createdById + createdByName + lastAccessedAt + } + } +} +``` diff --git a/examples/1.9.x/client-graphql/examples/teams/update-installation.md b/examples/1.9.x/client-graphql/examples/teams/update-installation.md new file mode 100644 index 000000000..c3c502dac --- /dev/null +++ b/examples/1.9.x/client-graphql/examples/teams/update-installation.md @@ -0,0 +1,38 @@ +```graphql +mutation { + teamsUpdateInstallation( + teamId: "", + installationId: "", + authorizationDetails: "" + ) { + _id + _createdAt + _updatedAt + appId + teamId + scopes + authorizationDetails + createdById + createdByName + lastAccessedAt + } +} +mutation { + teamsUpdateInstallation( + teamId: "", + installationId: "", + authorizationDetails: "" + ) { + _id + _createdAt + _updatedAt + appId + teamId + scopes + authorizationDetails + createdById + createdByName + lastAccessedAt + } +} +``` diff --git a/examples/1.9.x/client-react-native/examples/organization/create-installation.md b/examples/1.9.x/client-react-native/examples/organization/create-installation.md new file mode 100644 index 000000000..6c3d5b53d --- /dev/null +++ b/examples/1.9.x/client-react-native/examples/organization/create-installation.md @@ -0,0 +1,16 @@ +```javascript +import { Client, Organization } from "react-native-appwrite"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const organization = new Organization(client); + +const result = await organization.createInstallation({ + appId: '', + authorizationDetails: '' // optional +}); + +console.log(result); +``` diff --git a/examples/1.9.x/client-react-native/examples/organization/delete-installation.md b/examples/1.9.x/client-react-native/examples/organization/delete-installation.md new file mode 100644 index 000000000..8fb6f72ef --- /dev/null +++ b/examples/1.9.x/client-react-native/examples/organization/delete-installation.md @@ -0,0 +1,15 @@ +```javascript +import { Client, Organization } from "react-native-appwrite"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const organization = new Organization(client); + +const result = await organization.deleteInstallation({ + installationId: '' +}); + +console.log(result); +``` diff --git a/examples/1.9.x/client-react-native/examples/organization/get-installation.md b/examples/1.9.x/client-react-native/examples/organization/get-installation.md new file mode 100644 index 000000000..10925a610 --- /dev/null +++ b/examples/1.9.x/client-react-native/examples/organization/get-installation.md @@ -0,0 +1,15 @@ +```javascript +import { Client, Organization } from "react-native-appwrite"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const organization = new Organization(client); + +const result = await organization.getInstallation({ + installationId: '' +}); + +console.log(result); +``` diff --git a/examples/1.9.x/client-react-native/examples/organization/list-installations.md b/examples/1.9.x/client-react-native/examples/organization/list-installations.md new file mode 100644 index 000000000..2442dd310 --- /dev/null +++ b/examples/1.9.x/client-react-native/examples/organization/list-installations.md @@ -0,0 +1,16 @@ +```javascript +import { Client, Organization } from "react-native-appwrite"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const organization = new Organization(client); + +const result = await organization.listInstallations({ + queries: [], // optional + total: false // optional +}); + +console.log(result); +``` diff --git a/examples/1.9.x/client-react-native/examples/organization/update-installation.md b/examples/1.9.x/client-react-native/examples/organization/update-installation.md new file mode 100644 index 000000000..913af385a --- /dev/null +++ b/examples/1.9.x/client-react-native/examples/organization/update-installation.md @@ -0,0 +1,16 @@ +```javascript +import { Client, Organization } from "react-native-appwrite"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const organization = new Organization(client); + +const result = await organization.updateInstallation({ + installationId: '', + authorizationDetails: '' // optional +}); + +console.log(result); +``` diff --git a/examples/1.9.x/client-react-native/examples/teams/create-installation.md b/examples/1.9.x/client-react-native/examples/teams/create-installation.md new file mode 100644 index 000000000..9eef53f26 --- /dev/null +++ b/examples/1.9.x/client-react-native/examples/teams/create-installation.md @@ -0,0 +1,17 @@ +```javascript +import { Client, Teams } from "react-native-appwrite"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const teams = new Teams(client); + +const result = await teams.createInstallation({ + teamId: '', + appId: '', + authorizationDetails: '' // optional +}); + +console.log(result); +``` diff --git a/examples/1.9.x/client-react-native/examples/teams/delete-installation.md b/examples/1.9.x/client-react-native/examples/teams/delete-installation.md new file mode 100644 index 000000000..2bd84a007 --- /dev/null +++ b/examples/1.9.x/client-react-native/examples/teams/delete-installation.md @@ -0,0 +1,16 @@ +```javascript +import { Client, Teams } from "react-native-appwrite"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const teams = new Teams(client); + +const result = await teams.deleteInstallation({ + teamId: '', + installationId: '' +}); + +console.log(result); +``` diff --git a/examples/1.9.x/client-react-native/examples/teams/get-installation.md b/examples/1.9.x/client-react-native/examples/teams/get-installation.md new file mode 100644 index 000000000..b5d527472 --- /dev/null +++ b/examples/1.9.x/client-react-native/examples/teams/get-installation.md @@ -0,0 +1,16 @@ +```javascript +import { Client, Teams } from "react-native-appwrite"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const teams = new Teams(client); + +const result = await teams.getInstallation({ + teamId: '', + installationId: '' +}); + +console.log(result); +``` diff --git a/examples/1.9.x/client-react-native/examples/teams/list-installations.md b/examples/1.9.x/client-react-native/examples/teams/list-installations.md new file mode 100644 index 000000000..e4a3e740e --- /dev/null +++ b/examples/1.9.x/client-react-native/examples/teams/list-installations.md @@ -0,0 +1,17 @@ +```javascript +import { Client, Teams } from "react-native-appwrite"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const teams = new Teams(client); + +const result = await teams.listInstallations({ + teamId: '', + queries: [], // optional + total: false // optional +}); + +console.log(result); +``` diff --git a/examples/1.9.x/client-react-native/examples/teams/update-installation.md b/examples/1.9.x/client-react-native/examples/teams/update-installation.md new file mode 100644 index 000000000..bf1ef36d5 --- /dev/null +++ b/examples/1.9.x/client-react-native/examples/teams/update-installation.md @@ -0,0 +1,17 @@ +```javascript +import { Client, Teams } from "react-native-appwrite"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const teams = new Teams(client); + +const result = await teams.updateInstallation({ + teamId: '', + installationId: '', + authorizationDetails: '' // optional +}); + +console.log(result); +``` diff --git a/examples/1.9.x/client-rest/examples/organization/create-installation.md b/examples/1.9.x/client-rest/examples/organization/create-installation.md new file mode 100644 index 000000000..f45971a20 --- /dev/null +++ b/examples/1.9.x/client-rest/examples/organization/create-installation.md @@ -0,0 +1,18 @@ +```http +POST /v1/organization/installations HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +Accept: application/json +X-Appwrite-Response-Format: 1.9.5 +X-Appwrite-Project: + +{ + "appId": "", + "authorizationDetails": "" +} + +{ + "appId": "", + "authorizationDetails": "" +} +``` diff --git a/examples/1.9.x/client-rest/examples/organization/delete-installation.md b/examples/1.9.x/client-rest/examples/organization/delete-installation.md new file mode 100644 index 000000000..fe7ad3527 --- /dev/null +++ b/examples/1.9.x/client-rest/examples/organization/delete-installation.md @@ -0,0 +1,10 @@ +```http +DELETE /v1/organization/installations/{installationId} HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +Accept: application/json +X-Appwrite-Response-Format: 1.9.5 +X-Appwrite-Project: + + +``` diff --git a/examples/1.9.x/client-rest/examples/organization/get-installation.md b/examples/1.9.x/client-rest/examples/organization/get-installation.md new file mode 100644 index 000000000..362704b64 --- /dev/null +++ b/examples/1.9.x/client-rest/examples/organization/get-installation.md @@ -0,0 +1,8 @@ +```http +GET /v1/organization/installations/{installationId} HTTP/1.1 +Host: cloud.appwrite.io +Accept: application/json +X-Appwrite-Response-Format: 1.9.5 +X-Appwrite-Project: + +``` diff --git a/examples/1.9.x/client-rest/examples/organization/list-installations.md b/examples/1.9.x/client-rest/examples/organization/list-installations.md new file mode 100644 index 000000000..92686c09f --- /dev/null +++ b/examples/1.9.x/client-rest/examples/organization/list-installations.md @@ -0,0 +1,8 @@ +```http +GET /v1/organization/installations HTTP/1.1 +Host: cloud.appwrite.io +Accept: application/json +X-Appwrite-Response-Format: 1.9.5 +X-Appwrite-Project: + +``` diff --git a/examples/1.9.x/client-rest/examples/organization/update-installation.md b/examples/1.9.x/client-rest/examples/organization/update-installation.md new file mode 100644 index 000000000..55bade3ff --- /dev/null +++ b/examples/1.9.x/client-rest/examples/organization/update-installation.md @@ -0,0 +1,16 @@ +```http +PUT /v1/organization/installations/{installationId} HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +Accept: application/json +X-Appwrite-Response-Format: 1.9.5 +X-Appwrite-Project: + +{ + "authorizationDetails": "" +} + +{ + "authorizationDetails": "" +} +``` diff --git a/examples/1.9.x/client-rest/examples/teams/create-installation.md b/examples/1.9.x/client-rest/examples/teams/create-installation.md new file mode 100644 index 000000000..5b57f4942 --- /dev/null +++ b/examples/1.9.x/client-rest/examples/teams/create-installation.md @@ -0,0 +1,18 @@ +```http +POST /v1/teams/{teamId}/installations HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +Accept: application/json +X-Appwrite-Response-Format: 1.9.5 +X-Appwrite-Project: + +{ + "appId": "", + "authorizationDetails": "" +} + +{ + "appId": "", + "authorizationDetails": "" +} +``` diff --git a/examples/1.9.x/client-rest/examples/teams/delete-installation.md b/examples/1.9.x/client-rest/examples/teams/delete-installation.md new file mode 100644 index 000000000..007ab3c33 --- /dev/null +++ b/examples/1.9.x/client-rest/examples/teams/delete-installation.md @@ -0,0 +1,10 @@ +```http +DELETE /v1/teams/{teamId}/installations/{installationId} HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +Accept: application/json +X-Appwrite-Response-Format: 1.9.5 +X-Appwrite-Project: + + +``` diff --git a/examples/1.9.x/client-rest/examples/teams/get-installation.md b/examples/1.9.x/client-rest/examples/teams/get-installation.md new file mode 100644 index 000000000..28041c473 --- /dev/null +++ b/examples/1.9.x/client-rest/examples/teams/get-installation.md @@ -0,0 +1,8 @@ +```http +GET /v1/teams/{teamId}/installations/{installationId} HTTP/1.1 +Host: cloud.appwrite.io +Accept: application/json +X-Appwrite-Response-Format: 1.9.5 +X-Appwrite-Project: + +``` diff --git a/examples/1.9.x/client-rest/examples/teams/list-installations.md b/examples/1.9.x/client-rest/examples/teams/list-installations.md new file mode 100644 index 000000000..4dda30775 --- /dev/null +++ b/examples/1.9.x/client-rest/examples/teams/list-installations.md @@ -0,0 +1,8 @@ +```http +GET /v1/teams/{teamId}/installations HTTP/1.1 +Host: cloud.appwrite.io +Accept: application/json +X-Appwrite-Response-Format: 1.9.5 +X-Appwrite-Project: + +``` diff --git a/examples/1.9.x/client-rest/examples/teams/update-installation.md b/examples/1.9.x/client-rest/examples/teams/update-installation.md new file mode 100644 index 000000000..6be5630a8 --- /dev/null +++ b/examples/1.9.x/client-rest/examples/teams/update-installation.md @@ -0,0 +1,16 @@ +```http +PUT /v1/teams/{teamId}/installations/{installationId} HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +Accept: application/json +X-Appwrite-Response-Format: 1.9.5 +X-Appwrite-Project: + +{ + "authorizationDetails": "" +} + +{ + "authorizationDetails": "" +} +``` diff --git a/examples/1.9.x/client-web/examples/organization/create-installation.md b/examples/1.9.x/client-web/examples/organization/create-installation.md new file mode 100644 index 000000000..128b6e341 --- /dev/null +++ b/examples/1.9.x/client-web/examples/organization/create-installation.md @@ -0,0 +1,16 @@ +```javascript +import { Client, Organization } from "appwrite"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const organization = new Organization(client); + +const result = await organization.createInstallation({ + appId: '', + authorizationDetails: '' // optional +}); + +console.log(result); +``` diff --git a/examples/1.9.x/client-web/examples/organization/delete-installation.md b/examples/1.9.x/client-web/examples/organization/delete-installation.md new file mode 100644 index 000000000..3e2c92f00 --- /dev/null +++ b/examples/1.9.x/client-web/examples/organization/delete-installation.md @@ -0,0 +1,15 @@ +```javascript +import { Client, Organization } from "appwrite"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const organization = new Organization(client); + +const result = await organization.deleteInstallation({ + installationId: '' +}); + +console.log(result); +``` diff --git a/examples/1.9.x/client-web/examples/organization/get-installation.md b/examples/1.9.x/client-web/examples/organization/get-installation.md new file mode 100644 index 000000000..27ba5271d --- /dev/null +++ b/examples/1.9.x/client-web/examples/organization/get-installation.md @@ -0,0 +1,15 @@ +```javascript +import { Client, Organization } from "appwrite"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const organization = new Organization(client); + +const result = await organization.getInstallation({ + installationId: '' +}); + +console.log(result); +``` diff --git a/examples/1.9.x/client-web/examples/organization/list-installations.md b/examples/1.9.x/client-web/examples/organization/list-installations.md new file mode 100644 index 000000000..17e708c73 --- /dev/null +++ b/examples/1.9.x/client-web/examples/organization/list-installations.md @@ -0,0 +1,16 @@ +```javascript +import { Client, Organization } from "appwrite"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const organization = new Organization(client); + +const result = await organization.listInstallations({ + queries: [], // optional + total: false // optional +}); + +console.log(result); +``` diff --git a/examples/1.9.x/client-web/examples/organization/update-installation.md b/examples/1.9.x/client-web/examples/organization/update-installation.md new file mode 100644 index 000000000..ef7c676a7 --- /dev/null +++ b/examples/1.9.x/client-web/examples/organization/update-installation.md @@ -0,0 +1,16 @@ +```javascript +import { Client, Organization } from "appwrite"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const organization = new Organization(client); + +const result = await organization.updateInstallation({ + installationId: '', + authorizationDetails: '' // optional +}); + +console.log(result); +``` diff --git a/examples/1.9.x/client-web/examples/teams/create-installation.md b/examples/1.9.x/client-web/examples/teams/create-installation.md new file mode 100644 index 000000000..be4fd86b4 --- /dev/null +++ b/examples/1.9.x/client-web/examples/teams/create-installation.md @@ -0,0 +1,17 @@ +```javascript +import { Client, Teams } from "appwrite"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const teams = new Teams(client); + +const result = await teams.createInstallation({ + teamId: '', + appId: '', + authorizationDetails: '' // optional +}); + +console.log(result); +``` diff --git a/examples/1.9.x/client-web/examples/teams/delete-installation.md b/examples/1.9.x/client-web/examples/teams/delete-installation.md new file mode 100644 index 000000000..6802de4a7 --- /dev/null +++ b/examples/1.9.x/client-web/examples/teams/delete-installation.md @@ -0,0 +1,16 @@ +```javascript +import { Client, Teams } from "appwrite"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const teams = new Teams(client); + +const result = await teams.deleteInstallation({ + teamId: '', + installationId: '' +}); + +console.log(result); +``` diff --git a/examples/1.9.x/client-web/examples/teams/get-installation.md b/examples/1.9.x/client-web/examples/teams/get-installation.md new file mode 100644 index 000000000..dc2bb20e8 --- /dev/null +++ b/examples/1.9.x/client-web/examples/teams/get-installation.md @@ -0,0 +1,16 @@ +```javascript +import { Client, Teams } from "appwrite"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const teams = new Teams(client); + +const result = await teams.getInstallation({ + teamId: '', + installationId: '' +}); + +console.log(result); +``` diff --git a/examples/1.9.x/client-web/examples/teams/list-installations.md b/examples/1.9.x/client-web/examples/teams/list-installations.md new file mode 100644 index 000000000..d9943a220 --- /dev/null +++ b/examples/1.9.x/client-web/examples/teams/list-installations.md @@ -0,0 +1,17 @@ +```javascript +import { Client, Teams } from "appwrite"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const teams = new Teams(client); + +const result = await teams.listInstallations({ + teamId: '', + queries: [], // optional + total: false // optional +}); + +console.log(result); +``` diff --git a/examples/1.9.x/client-web/examples/teams/update-installation.md b/examples/1.9.x/client-web/examples/teams/update-installation.md new file mode 100644 index 000000000..60dda7edd --- /dev/null +++ b/examples/1.9.x/client-web/examples/teams/update-installation.md @@ -0,0 +1,17 @@ +```javascript +import { Client, Teams } from "appwrite"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const teams = new Teams(client); + +const result = await teams.updateInstallation({ + teamId: '', + installationId: '', + authorizationDetails: '' // optional +}); + +console.log(result); +``` diff --git a/examples/1.9.x/console-cli/examples/apps/create-key.md b/examples/1.9.x/console-cli/examples/apps/create-key.md new file mode 100644 index 000000000..ed5ee07c9 --- /dev/null +++ b/examples/1.9.x/console-cli/examples/apps/create-key.md @@ -0,0 +1,4 @@ +```bash +appwrite apps create-key \ + --app-id +``` diff --git a/examples/1.9.x/console-cli/examples/apps/create-secret.md b/examples/1.9.x/console-cli/examples/apps/create-secret.md new file mode 100644 index 000000000..acc7f8486 --- /dev/null +++ b/examples/1.9.x/console-cli/examples/apps/create-secret.md @@ -0,0 +1,4 @@ +```bash +appwrite apps create-secret \ + --app-id +``` diff --git a/examples/1.9.x/console-cli/examples/apps/create.md b/examples/1.9.x/console-cli/examples/apps/create.md new file mode 100644 index 000000000..70933ae35 --- /dev/null +++ b/examples/1.9.x/console-cli/examples/apps/create.md @@ -0,0 +1,6 @@ +```bash +appwrite apps create \ + --app-id \ + --name \ + --redirect-uris one two three +``` diff --git a/examples/1.9.x/console-cli/examples/apps/delete-key.md b/examples/1.9.x/console-cli/examples/apps/delete-key.md new file mode 100644 index 000000000..36d6de8ff --- /dev/null +++ b/examples/1.9.x/console-cli/examples/apps/delete-key.md @@ -0,0 +1,5 @@ +```bash +appwrite apps delete-key \ + --app-id \ + --key-id +``` diff --git a/examples/1.9.x/console-cli/examples/apps/delete-secret.md b/examples/1.9.x/console-cli/examples/apps/delete-secret.md new file mode 100644 index 000000000..57a754c28 --- /dev/null +++ b/examples/1.9.x/console-cli/examples/apps/delete-secret.md @@ -0,0 +1,5 @@ +```bash +appwrite apps delete-secret \ + --app-id \ + --secret-id +``` diff --git a/examples/1.9.x/console-cli/examples/apps/delete-tokens.md b/examples/1.9.x/console-cli/examples/apps/delete-tokens.md new file mode 100644 index 000000000..65062c28c --- /dev/null +++ b/examples/1.9.x/console-cli/examples/apps/delete-tokens.md @@ -0,0 +1,4 @@ +```bash +appwrite apps delete-tokens \ + --app-id +``` diff --git a/examples/1.9.x/console-cli/examples/apps/delete.md b/examples/1.9.x/console-cli/examples/apps/delete.md new file mode 100644 index 000000000..18d986e9c --- /dev/null +++ b/examples/1.9.x/console-cli/examples/apps/delete.md @@ -0,0 +1,4 @@ +```bash +appwrite apps delete \ + --app-id +``` diff --git a/examples/1.9.x/console-cli/examples/apps/get-key.md b/examples/1.9.x/console-cli/examples/apps/get-key.md new file mode 100644 index 000000000..a99ad5bd0 --- /dev/null +++ b/examples/1.9.x/console-cli/examples/apps/get-key.md @@ -0,0 +1,5 @@ +```bash +appwrite apps get-key \ + --app-id \ + --key-id +``` diff --git a/examples/1.9.x/console-cli/examples/apps/get-secret.md b/examples/1.9.x/console-cli/examples/apps/get-secret.md new file mode 100644 index 000000000..7aa82c78a --- /dev/null +++ b/examples/1.9.x/console-cli/examples/apps/get-secret.md @@ -0,0 +1,5 @@ +```bash +appwrite apps get-secret \ + --app-id \ + --secret-id +``` diff --git a/examples/1.9.x/console-cli/examples/apps/get.md b/examples/1.9.x/console-cli/examples/apps/get.md new file mode 100644 index 000000000..7a6bf8711 --- /dev/null +++ b/examples/1.9.x/console-cli/examples/apps/get.md @@ -0,0 +1,4 @@ +```bash +appwrite apps get \ + --app-id +``` diff --git a/examples/1.9.x/console-cli/examples/apps/list-installation-scopes.md b/examples/1.9.x/console-cli/examples/apps/list-installation-scopes.md new file mode 100644 index 000000000..e04505bf5 --- /dev/null +++ b/examples/1.9.x/console-cli/examples/apps/list-installation-scopes.md @@ -0,0 +1,3 @@ +```bash +appwrite apps list-installation-scopes +``` diff --git a/examples/1.9.x/console-cli/examples/apps/list-keys.md b/examples/1.9.x/console-cli/examples/apps/list-keys.md new file mode 100644 index 000000000..7f13726a8 --- /dev/null +++ b/examples/1.9.x/console-cli/examples/apps/list-keys.md @@ -0,0 +1,5 @@ +```bash +appwrite apps list-keys \ + --app-id \ + --limit 25 +``` diff --git a/examples/1.9.x/console-cli/examples/apps/list-o-auth-2-scopes.md b/examples/1.9.x/console-cli/examples/apps/list-o-auth-2-scopes.md new file mode 100644 index 000000000..964352d9e --- /dev/null +++ b/examples/1.9.x/console-cli/examples/apps/list-o-auth-2-scopes.md @@ -0,0 +1,3 @@ +```bash +appwrite apps list-o-auth-2-scopes +``` diff --git a/examples/1.9.x/console-cli/examples/apps/list-secrets.md b/examples/1.9.x/console-cli/examples/apps/list-secrets.md new file mode 100644 index 000000000..d711f22b1 --- /dev/null +++ b/examples/1.9.x/console-cli/examples/apps/list-secrets.md @@ -0,0 +1,5 @@ +```bash +appwrite apps list-secrets \ + --app-id \ + --limit 25 +``` diff --git a/examples/1.9.x/console-cli/examples/apps/list.md b/examples/1.9.x/console-cli/examples/apps/list.md new file mode 100644 index 000000000..8ba60d833 --- /dev/null +++ b/examples/1.9.x/console-cli/examples/apps/list.md @@ -0,0 +1,4 @@ +```bash +appwrite apps list \ + --limit 25 +``` diff --git a/examples/1.9.x/console-cli/examples/apps/update-labels.md b/examples/1.9.x/console-cli/examples/apps/update-labels.md new file mode 100644 index 000000000..a8741117a --- /dev/null +++ b/examples/1.9.x/console-cli/examples/apps/update-labels.md @@ -0,0 +1,5 @@ +```bash +appwrite apps update-labels \ + --app-id \ + --labels one two three +``` diff --git a/examples/1.9.x/console-cli/examples/apps/update-team.md b/examples/1.9.x/console-cli/examples/apps/update-team.md new file mode 100644 index 000000000..3d61021f8 --- /dev/null +++ b/examples/1.9.x/console-cli/examples/apps/update-team.md @@ -0,0 +1,5 @@ +```bash +appwrite apps update-team \ + --app-id \ + --team-id +``` diff --git a/examples/1.9.x/console-cli/examples/apps/update.md b/examples/1.9.x/console-cli/examples/apps/update.md new file mode 100644 index 000000000..f04e1fb4c --- /dev/null +++ b/examples/1.9.x/console-cli/examples/apps/update.md @@ -0,0 +1,5 @@ +```bash +appwrite apps update \ + --app-id \ + --name +``` diff --git a/examples/1.9.x/console-cli/examples/console/get-email-template.md b/examples/1.9.x/console-cli/examples/console/get-email-template.md new file mode 100644 index 000000000..a9af0b406 --- /dev/null +++ b/examples/1.9.x/console-cli/examples/console/get-email-template.md @@ -0,0 +1,4 @@ +```bash +appwrite console get-email-template \ + --template-id verification +``` diff --git a/examples/1.9.x/console-cli/examples/console/get-resource.md b/examples/1.9.x/console-cli/examples/console/get-resource.md new file mode 100644 index 000000000..cfda823ce --- /dev/null +++ b/examples/1.9.x/console-cli/examples/console/get-resource.md @@ -0,0 +1,5 @@ +```bash +appwrite console get-resource \ + --value \ + --type rules +``` diff --git a/examples/1.9.x/console-cli/examples/console/list-o-auth-2-providers.md b/examples/1.9.x/console-cli/examples/console/list-o-auth-2-providers.md new file mode 100644 index 000000000..72ed54aec --- /dev/null +++ b/examples/1.9.x/console-cli/examples/console/list-o-auth-2-providers.md @@ -0,0 +1,3 @@ +```bash +appwrite console list-o-auth-2-providers +``` diff --git a/examples/1.9.x/console-cli/examples/console/list-organization-scopes.md b/examples/1.9.x/console-cli/examples/console/list-organization-scopes.md new file mode 100644 index 000000000..66d090216 --- /dev/null +++ b/examples/1.9.x/console-cli/examples/console/list-organization-scopes.md @@ -0,0 +1,3 @@ +```bash +appwrite console list-organization-scopes +``` diff --git a/examples/1.9.x/console-cli/examples/console/list-project-scopes.md b/examples/1.9.x/console-cli/examples/console/list-project-scopes.md new file mode 100644 index 000000000..e216d24fc --- /dev/null +++ b/examples/1.9.x/console-cli/examples/console/list-project-scopes.md @@ -0,0 +1,3 @@ +```bash +appwrite console list-project-scopes +``` diff --git a/examples/1.9.x/console-cli/examples/console/variables.md b/examples/1.9.x/console-cli/examples/console/variables.md new file mode 100644 index 000000000..044ea4bc7 --- /dev/null +++ b/examples/1.9.x/console-cli/examples/console/variables.md @@ -0,0 +1,3 @@ +```bash +appwrite console variables +``` diff --git a/examples/1.9.x/console-cli/examples/documentsdb/create-collection.md b/examples/1.9.x/console-cli/examples/documentsdb/create-collection.md new file mode 100644 index 000000000..3d296a7d2 --- /dev/null +++ b/examples/1.9.x/console-cli/examples/documentsdb/create-collection.md @@ -0,0 +1,6 @@ +```bash +appwrite documents-db create-collection \ + --database-id \ + --collection-id \ + --name +``` diff --git a/examples/1.9.x/console-cli/examples/documentsdb/create-document.md b/examples/1.9.x/console-cli/examples/documentsdb/create-document.md new file mode 100644 index 000000000..b03f6062f --- /dev/null +++ b/examples/1.9.x/console-cli/examples/documentsdb/create-document.md @@ -0,0 +1,7 @@ +```bash +appwrite documents-db create-document \ + --database-id \ + --collection-id \ + --document-id \ + --data '{ "key": "value" }' +``` diff --git a/examples/1.9.x/console-cli/examples/documentsdb/create-documents.md b/examples/1.9.x/console-cli/examples/documentsdb/create-documents.md new file mode 100644 index 000000000..9d4175942 --- /dev/null +++ b/examples/1.9.x/console-cli/examples/documentsdb/create-documents.md @@ -0,0 +1,6 @@ +```bash +appwrite documents-db create-documents \ + --database-id \ + --collection-id \ + --documents one two three +``` diff --git a/examples/1.9.x/console-cli/examples/documentsdb/create-index.md b/examples/1.9.x/console-cli/examples/documentsdb/create-index.md new file mode 100644 index 000000000..69415ba3c --- /dev/null +++ b/examples/1.9.x/console-cli/examples/documentsdb/create-index.md @@ -0,0 +1,8 @@ +```bash +appwrite documents-db create-index \ + --database-id \ + --collection-id \ + --key '' \ + --type key \ + --attributes one two three +``` diff --git a/examples/1.9.x/console-cli/examples/documentsdb/create-transaction.md b/examples/1.9.x/console-cli/examples/documentsdb/create-transaction.md new file mode 100644 index 000000000..885cd43e1 --- /dev/null +++ b/examples/1.9.x/console-cli/examples/documentsdb/create-transaction.md @@ -0,0 +1,3 @@ +```bash +appwrite documents-db create-transaction +``` diff --git a/examples/1.9.x/console-cli/examples/documentsdb/create.md b/examples/1.9.x/console-cli/examples/documentsdb/create.md new file mode 100644 index 000000000..056850930 --- /dev/null +++ b/examples/1.9.x/console-cli/examples/documentsdb/create.md @@ -0,0 +1,5 @@ +```bash +appwrite documents-db create \ + --database-id \ + --name +``` diff --git a/examples/1.9.x/console-cli/examples/documentsdb/decrement-document-attribute.md b/examples/1.9.x/console-cli/examples/documentsdb/decrement-document-attribute.md new file mode 100644 index 000000000..b1a5805c6 --- /dev/null +++ b/examples/1.9.x/console-cli/examples/documentsdb/decrement-document-attribute.md @@ -0,0 +1,7 @@ +```bash +appwrite documents-db decrement-document-attribute \ + --database-id \ + --collection-id \ + --document-id \ + --attribute '' +``` diff --git a/examples/1.9.x/console-cli/examples/documentsdb/delete-collection.md b/examples/1.9.x/console-cli/examples/documentsdb/delete-collection.md new file mode 100644 index 000000000..8d92b6a41 --- /dev/null +++ b/examples/1.9.x/console-cli/examples/documentsdb/delete-collection.md @@ -0,0 +1,5 @@ +```bash +appwrite documents-db delete-collection \ + --database-id \ + --collection-id +``` diff --git a/examples/1.9.x/console-cli/examples/documentsdb/delete-document.md b/examples/1.9.x/console-cli/examples/documentsdb/delete-document.md new file mode 100644 index 000000000..e99cca842 --- /dev/null +++ b/examples/1.9.x/console-cli/examples/documentsdb/delete-document.md @@ -0,0 +1,6 @@ +```bash +appwrite documents-db delete-document \ + --database-id \ + --collection-id \ + --document-id +``` diff --git a/examples/1.9.x/console-cli/examples/documentsdb/delete-documents.md b/examples/1.9.x/console-cli/examples/documentsdb/delete-documents.md new file mode 100644 index 000000000..213c8f98c --- /dev/null +++ b/examples/1.9.x/console-cli/examples/documentsdb/delete-documents.md @@ -0,0 +1,6 @@ +```bash +appwrite documents-db delete-documents \ + --database-id \ + --collection-id \ + --limit 25 +``` diff --git a/examples/1.9.x/console-cli/examples/documentsdb/delete-index.md b/examples/1.9.x/console-cli/examples/documentsdb/delete-index.md new file mode 100644 index 000000000..8915ee6d7 --- /dev/null +++ b/examples/1.9.x/console-cli/examples/documentsdb/delete-index.md @@ -0,0 +1,6 @@ +```bash +appwrite documents-db delete-index \ + --database-id \ + --collection-id \ + --key '' +``` diff --git a/examples/1.9.x/console-cli/examples/documentsdb/delete-transaction.md b/examples/1.9.x/console-cli/examples/documentsdb/delete-transaction.md new file mode 100644 index 000000000..eea99d3b5 --- /dev/null +++ b/examples/1.9.x/console-cli/examples/documentsdb/delete-transaction.md @@ -0,0 +1,4 @@ +```bash +appwrite documents-db delete-transaction \ + --transaction-id +``` diff --git a/examples/1.9.x/console-cli/examples/documentsdb/delete.md b/examples/1.9.x/console-cli/examples/documentsdb/delete.md new file mode 100644 index 000000000..7003513aa --- /dev/null +++ b/examples/1.9.x/console-cli/examples/documentsdb/delete.md @@ -0,0 +1,4 @@ +```bash +appwrite documents-db delete \ + --database-id +``` diff --git a/examples/1.9.x/console-cli/examples/documentsdb/get-collection.md b/examples/1.9.x/console-cli/examples/documentsdb/get-collection.md new file mode 100644 index 000000000..903fb450e --- /dev/null +++ b/examples/1.9.x/console-cli/examples/documentsdb/get-collection.md @@ -0,0 +1,5 @@ +```bash +appwrite documents-db get-collection \ + --database-id \ + --collection-id +``` diff --git a/examples/1.9.x/console-cli/examples/documentsdb/get-document.md b/examples/1.9.x/console-cli/examples/documentsdb/get-document.md new file mode 100644 index 000000000..8eafa297a --- /dev/null +++ b/examples/1.9.x/console-cli/examples/documentsdb/get-document.md @@ -0,0 +1,6 @@ +```bash +appwrite documents-db get-document \ + --database-id \ + --collection-id \ + --document-id +``` diff --git a/examples/1.9.x/console-cli/examples/documentsdb/get-index.md b/examples/1.9.x/console-cli/examples/documentsdb/get-index.md new file mode 100644 index 000000000..0d9d69b26 --- /dev/null +++ b/examples/1.9.x/console-cli/examples/documentsdb/get-index.md @@ -0,0 +1,6 @@ +```bash +appwrite documents-db get-index \ + --database-id \ + --collection-id \ + --key '' +``` diff --git a/examples/1.9.x/console-cli/examples/documentsdb/get-transaction.md b/examples/1.9.x/console-cli/examples/documentsdb/get-transaction.md new file mode 100644 index 000000000..7d2959209 --- /dev/null +++ b/examples/1.9.x/console-cli/examples/documentsdb/get-transaction.md @@ -0,0 +1,4 @@ +```bash +appwrite documents-db get-transaction \ + --transaction-id +``` diff --git a/examples/1.9.x/console-cli/examples/documentsdb/get.md b/examples/1.9.x/console-cli/examples/documentsdb/get.md new file mode 100644 index 000000000..c90d07d6a --- /dev/null +++ b/examples/1.9.x/console-cli/examples/documentsdb/get.md @@ -0,0 +1,4 @@ +```bash +appwrite documents-db get \ + --database-id +``` diff --git a/examples/1.9.x/console-cli/examples/documentsdb/increment-document-attribute.md b/examples/1.9.x/console-cli/examples/documentsdb/increment-document-attribute.md new file mode 100644 index 000000000..391ab3c70 --- /dev/null +++ b/examples/1.9.x/console-cli/examples/documentsdb/increment-document-attribute.md @@ -0,0 +1,7 @@ +```bash +appwrite documents-db increment-document-attribute \ + --database-id \ + --collection-id \ + --document-id \ + --attribute '' +``` diff --git a/examples/1.9.x/console-cli/examples/documentsdb/list-collections.md b/examples/1.9.x/console-cli/examples/documentsdb/list-collections.md new file mode 100644 index 000000000..79498bc0f --- /dev/null +++ b/examples/1.9.x/console-cli/examples/documentsdb/list-collections.md @@ -0,0 +1,5 @@ +```bash +appwrite documents-db list-collections \ + --database-id \ + --limit 25 +``` diff --git a/examples/1.9.x/console-cli/examples/documentsdb/list-documents.md b/examples/1.9.x/console-cli/examples/documentsdb/list-documents.md new file mode 100644 index 000000000..8ec276453 --- /dev/null +++ b/examples/1.9.x/console-cli/examples/documentsdb/list-documents.md @@ -0,0 +1,6 @@ +```bash +appwrite documents-db list-documents \ + --database-id \ + --collection-id \ + --limit 25 +``` diff --git a/examples/1.9.x/console-cli/examples/documentsdb/list-indexes.md b/examples/1.9.x/console-cli/examples/documentsdb/list-indexes.md new file mode 100644 index 000000000..3e976aa1f --- /dev/null +++ b/examples/1.9.x/console-cli/examples/documentsdb/list-indexes.md @@ -0,0 +1,6 @@ +```bash +appwrite documents-db list-indexes \ + --database-id \ + --collection-id \ + --limit 25 +``` diff --git a/examples/1.9.x/console-cli/examples/documentsdb/list-transactions.md b/examples/1.9.x/console-cli/examples/documentsdb/list-transactions.md new file mode 100644 index 000000000..bfd4806a3 --- /dev/null +++ b/examples/1.9.x/console-cli/examples/documentsdb/list-transactions.md @@ -0,0 +1,4 @@ +```bash +appwrite documents-db list-transactions \ + --limit 25 +``` diff --git a/examples/1.9.x/console-cli/examples/documentsdb/list.md b/examples/1.9.x/console-cli/examples/documentsdb/list.md new file mode 100644 index 000000000..5ffdea979 --- /dev/null +++ b/examples/1.9.x/console-cli/examples/documentsdb/list.md @@ -0,0 +1,4 @@ +```bash +appwrite documents-db list \ + --limit 25 +``` diff --git a/examples/1.9.x/console-cli/examples/documentsdb/update-collection.md b/examples/1.9.x/console-cli/examples/documentsdb/update-collection.md new file mode 100644 index 000000000..8119cc4ee --- /dev/null +++ b/examples/1.9.x/console-cli/examples/documentsdb/update-collection.md @@ -0,0 +1,6 @@ +```bash +appwrite documents-db update-collection \ + --database-id \ + --collection-id \ + --name +``` diff --git a/examples/1.9.x/console-cli/examples/documentsdb/update-document.md b/examples/1.9.x/console-cli/examples/documentsdb/update-document.md new file mode 100644 index 000000000..66392165b --- /dev/null +++ b/examples/1.9.x/console-cli/examples/documentsdb/update-document.md @@ -0,0 +1,6 @@ +```bash +appwrite documents-db update-document \ + --database-id \ + --collection-id \ + --document-id +``` diff --git a/examples/1.9.x/console-cli/examples/documentsdb/update-documents.md b/examples/1.9.x/console-cli/examples/documentsdb/update-documents.md new file mode 100644 index 000000000..2d88dec98 --- /dev/null +++ b/examples/1.9.x/console-cli/examples/documentsdb/update-documents.md @@ -0,0 +1,6 @@ +```bash +appwrite documents-db update-documents \ + --database-id \ + --collection-id \ + --limit 25 +``` diff --git a/examples/1.9.x/console-cli/examples/documentsdb/update-transaction.md b/examples/1.9.x/console-cli/examples/documentsdb/update-transaction.md new file mode 100644 index 000000000..a6be4ce1a --- /dev/null +++ b/examples/1.9.x/console-cli/examples/documentsdb/update-transaction.md @@ -0,0 +1,4 @@ +```bash +appwrite documents-db update-transaction \ + --transaction-id +``` diff --git a/examples/1.9.x/console-cli/examples/documentsdb/update.md b/examples/1.9.x/console-cli/examples/documentsdb/update.md new file mode 100644 index 000000000..e75e23c31 --- /dev/null +++ b/examples/1.9.x/console-cli/examples/documentsdb/update.md @@ -0,0 +1,5 @@ +```bash +appwrite documents-db update \ + --database-id \ + --name +``` diff --git a/examples/1.9.x/console-cli/examples/documentsdb/upsert-document.md b/examples/1.9.x/console-cli/examples/documentsdb/upsert-document.md new file mode 100644 index 000000000..0a2bbc621 --- /dev/null +++ b/examples/1.9.x/console-cli/examples/documentsdb/upsert-document.md @@ -0,0 +1,6 @@ +```bash +appwrite documents-db upsert-document \ + --database-id \ + --collection-id \ + --document-id +``` diff --git a/examples/1.9.x/console-cli/examples/documentsdb/upsert-documents.md b/examples/1.9.x/console-cli/examples/documentsdb/upsert-documents.md new file mode 100644 index 000000000..018f0e9a5 --- /dev/null +++ b/examples/1.9.x/console-cli/examples/documentsdb/upsert-documents.md @@ -0,0 +1,6 @@ +```bash +appwrite documents-db upsert-documents \ + --database-id \ + --collection-id \ + --documents one two three +``` diff --git a/examples/1.9.x/console-cli/examples/organization/create-installation.md b/examples/1.9.x/console-cli/examples/organization/create-installation.md new file mode 100644 index 000000000..136dc142b --- /dev/null +++ b/examples/1.9.x/console-cli/examples/organization/create-installation.md @@ -0,0 +1,4 @@ +```bash +appwrite organization create-installation \ + --app-id +``` diff --git a/examples/1.9.x/console-cli/examples/organization/delete-installation.md b/examples/1.9.x/console-cli/examples/organization/delete-installation.md new file mode 100644 index 000000000..38cf700de --- /dev/null +++ b/examples/1.9.x/console-cli/examples/organization/delete-installation.md @@ -0,0 +1,4 @@ +```bash +appwrite organization delete-installation \ + --installation-id +``` diff --git a/examples/1.9.x/console-cli/examples/organization/get-installation.md b/examples/1.9.x/console-cli/examples/organization/get-installation.md new file mode 100644 index 000000000..f77846ee0 --- /dev/null +++ b/examples/1.9.x/console-cli/examples/organization/get-installation.md @@ -0,0 +1,4 @@ +```bash +appwrite organization get-installation \ + --installation-id +``` diff --git a/examples/1.9.x/console-cli/examples/organization/list-installations.md b/examples/1.9.x/console-cli/examples/organization/list-installations.md new file mode 100644 index 000000000..503017022 --- /dev/null +++ b/examples/1.9.x/console-cli/examples/organization/list-installations.md @@ -0,0 +1,4 @@ +```bash +appwrite organization list-installations \ + --limit 25 +``` diff --git a/examples/1.9.x/console-cli/examples/organization/update-installation.md b/examples/1.9.x/console-cli/examples/organization/update-installation.md new file mode 100644 index 000000000..8f8c0a00b --- /dev/null +++ b/examples/1.9.x/console-cli/examples/organization/update-installation.md @@ -0,0 +1,4 @@ +```bash +appwrite organization update-installation \ + --installation-id +``` diff --git a/examples/1.9.x/console-cli/examples/teams/create-installation.md b/examples/1.9.x/console-cli/examples/teams/create-installation.md new file mode 100644 index 000000000..75ef77703 --- /dev/null +++ b/examples/1.9.x/console-cli/examples/teams/create-installation.md @@ -0,0 +1,5 @@ +```bash +appwrite teams create-installation \ + --team-id \ + --app-id +``` diff --git a/examples/1.9.x/console-cli/examples/teams/delete-installation.md b/examples/1.9.x/console-cli/examples/teams/delete-installation.md new file mode 100644 index 000000000..054447f41 --- /dev/null +++ b/examples/1.9.x/console-cli/examples/teams/delete-installation.md @@ -0,0 +1,5 @@ +```bash +appwrite teams delete-installation \ + --team-id \ + --installation-id +``` diff --git a/examples/1.9.x/console-cli/examples/teams/get-installation.md b/examples/1.9.x/console-cli/examples/teams/get-installation.md new file mode 100644 index 000000000..308bf87aa --- /dev/null +++ b/examples/1.9.x/console-cli/examples/teams/get-installation.md @@ -0,0 +1,5 @@ +```bash +appwrite teams get-installation \ + --team-id \ + --installation-id +``` diff --git a/examples/1.9.x/console-cli/examples/teams/list-installations.md b/examples/1.9.x/console-cli/examples/teams/list-installations.md new file mode 100644 index 000000000..d89f88f70 --- /dev/null +++ b/examples/1.9.x/console-cli/examples/teams/list-installations.md @@ -0,0 +1,5 @@ +```bash +appwrite teams list-installations \ + --team-id \ + --limit 25 +``` diff --git a/examples/1.9.x/console-cli/examples/teams/update-installation.md b/examples/1.9.x/console-cli/examples/teams/update-installation.md new file mode 100644 index 000000000..2cbcac835 --- /dev/null +++ b/examples/1.9.x/console-cli/examples/teams/update-installation.md @@ -0,0 +1,5 @@ +```bash +appwrite teams update-installation \ + --team-id \ + --installation-id +``` diff --git a/examples/1.9.x/console-cli/examples/vectorsdb/create-collection.md b/examples/1.9.x/console-cli/examples/vectorsdb/create-collection.md new file mode 100644 index 000000000..792f04f83 --- /dev/null +++ b/examples/1.9.x/console-cli/examples/vectorsdb/create-collection.md @@ -0,0 +1,7 @@ +```bash +appwrite vectors-db create-collection \ + --database-id \ + --collection-id \ + --name \ + --dimension 1 +``` diff --git a/examples/1.9.x/console-cli/examples/vectorsdb/create-document.md b/examples/1.9.x/console-cli/examples/vectorsdb/create-document.md new file mode 100644 index 000000000..5eaa2e788 --- /dev/null +++ b/examples/1.9.x/console-cli/examples/vectorsdb/create-document.md @@ -0,0 +1,7 @@ +```bash +appwrite vectors-db create-document \ + --database-id \ + --collection-id \ + --document-id \ + --data '{ "key": "value" }' +``` diff --git a/examples/1.9.x/console-cli/examples/vectorsdb/create-documents.md b/examples/1.9.x/console-cli/examples/vectorsdb/create-documents.md new file mode 100644 index 000000000..386f5d703 --- /dev/null +++ b/examples/1.9.x/console-cli/examples/vectorsdb/create-documents.md @@ -0,0 +1,6 @@ +```bash +appwrite vectors-db create-documents \ + --database-id \ + --collection-id \ + --documents one two three +``` diff --git a/examples/1.9.x/console-cli/examples/vectorsdb/create-index.md b/examples/1.9.x/console-cli/examples/vectorsdb/create-index.md new file mode 100644 index 000000000..7e52b3100 --- /dev/null +++ b/examples/1.9.x/console-cli/examples/vectorsdb/create-index.md @@ -0,0 +1,8 @@ +```bash +appwrite vectors-db create-index \ + --database-id \ + --collection-id \ + --key '' \ + --type hnsw_euclidean \ + --attributes one two three +``` diff --git a/examples/1.9.x/console-cli/examples/vectorsdb/create-operations.md b/examples/1.9.x/console-cli/examples/vectorsdb/create-operations.md new file mode 100644 index 000000000..39df5b2ae --- /dev/null +++ b/examples/1.9.x/console-cli/examples/vectorsdb/create-operations.md @@ -0,0 +1,4 @@ +```bash +appwrite vectors-db create-operations \ + --transaction-id +``` diff --git a/examples/1.9.x/console-cli/examples/vectorsdb/create-query.md b/examples/1.9.x/console-cli/examples/vectorsdb/create-query.md new file mode 100644 index 000000000..02a5acaa3 --- /dev/null +++ b/examples/1.9.x/console-cli/examples/vectorsdb/create-query.md @@ -0,0 +1,6 @@ +```bash +appwrite vectors-db create-query \ + --database-id \ + --collection-id \ + --limit 25 +``` diff --git a/examples/1.9.x/console-cli/examples/vectorsdb/create-text-embeddings.md b/examples/1.9.x/console-cli/examples/vectorsdb/create-text-embeddings.md new file mode 100644 index 000000000..70e8716cf --- /dev/null +++ b/examples/1.9.x/console-cli/examples/vectorsdb/create-text-embeddings.md @@ -0,0 +1,4 @@ +```bash +appwrite vectors-db create-text-embeddings \ + --texts one two three +``` diff --git a/examples/1.9.x/console-cli/examples/vectorsdb/create-transaction.md b/examples/1.9.x/console-cli/examples/vectorsdb/create-transaction.md new file mode 100644 index 000000000..99f73f750 --- /dev/null +++ b/examples/1.9.x/console-cli/examples/vectorsdb/create-transaction.md @@ -0,0 +1,3 @@ +```bash +appwrite vectors-db create-transaction +``` diff --git a/examples/1.9.x/console-cli/examples/vectorsdb/create.md b/examples/1.9.x/console-cli/examples/vectorsdb/create.md new file mode 100644 index 000000000..8e9b3d37d --- /dev/null +++ b/examples/1.9.x/console-cli/examples/vectorsdb/create.md @@ -0,0 +1,5 @@ +```bash +appwrite vectors-db create \ + --database-id \ + --name +``` diff --git a/examples/1.9.x/console-cli/examples/vectorsdb/delete-collection.md b/examples/1.9.x/console-cli/examples/vectorsdb/delete-collection.md new file mode 100644 index 000000000..377803581 --- /dev/null +++ b/examples/1.9.x/console-cli/examples/vectorsdb/delete-collection.md @@ -0,0 +1,5 @@ +```bash +appwrite vectors-db delete-collection \ + --database-id \ + --collection-id +``` diff --git a/examples/1.9.x/console-cli/examples/vectorsdb/delete-document.md b/examples/1.9.x/console-cli/examples/vectorsdb/delete-document.md new file mode 100644 index 000000000..6528410eb --- /dev/null +++ b/examples/1.9.x/console-cli/examples/vectorsdb/delete-document.md @@ -0,0 +1,6 @@ +```bash +appwrite vectors-db delete-document \ + --database-id \ + --collection-id \ + --document-id +``` diff --git a/examples/1.9.x/console-cli/examples/vectorsdb/delete-documents.md b/examples/1.9.x/console-cli/examples/vectorsdb/delete-documents.md new file mode 100644 index 000000000..f491a3502 --- /dev/null +++ b/examples/1.9.x/console-cli/examples/vectorsdb/delete-documents.md @@ -0,0 +1,6 @@ +```bash +appwrite vectors-db delete-documents \ + --database-id \ + --collection-id \ + --limit 25 +``` diff --git a/examples/1.9.x/console-cli/examples/vectorsdb/delete-index.md b/examples/1.9.x/console-cli/examples/vectorsdb/delete-index.md new file mode 100644 index 000000000..5080f342d --- /dev/null +++ b/examples/1.9.x/console-cli/examples/vectorsdb/delete-index.md @@ -0,0 +1,6 @@ +```bash +appwrite vectors-db delete-index \ + --database-id \ + --collection-id \ + --key '' +``` diff --git a/examples/1.9.x/console-cli/examples/vectorsdb/delete-transaction.md b/examples/1.9.x/console-cli/examples/vectorsdb/delete-transaction.md new file mode 100644 index 000000000..f0d37be8e --- /dev/null +++ b/examples/1.9.x/console-cli/examples/vectorsdb/delete-transaction.md @@ -0,0 +1,4 @@ +```bash +appwrite vectors-db delete-transaction \ + --transaction-id +``` diff --git a/examples/1.9.x/console-cli/examples/vectorsdb/delete.md b/examples/1.9.x/console-cli/examples/vectorsdb/delete.md new file mode 100644 index 000000000..6d4ff2ab3 --- /dev/null +++ b/examples/1.9.x/console-cli/examples/vectorsdb/delete.md @@ -0,0 +1,4 @@ +```bash +appwrite vectors-db delete \ + --database-id +``` diff --git a/examples/1.9.x/console-cli/examples/vectorsdb/get-collection.md b/examples/1.9.x/console-cli/examples/vectorsdb/get-collection.md new file mode 100644 index 000000000..02ccf4caa --- /dev/null +++ b/examples/1.9.x/console-cli/examples/vectorsdb/get-collection.md @@ -0,0 +1,5 @@ +```bash +appwrite vectors-db get-collection \ + --database-id \ + --collection-id +``` diff --git a/examples/1.9.x/console-cli/examples/vectorsdb/get-document.md b/examples/1.9.x/console-cli/examples/vectorsdb/get-document.md new file mode 100644 index 000000000..40be134b1 --- /dev/null +++ b/examples/1.9.x/console-cli/examples/vectorsdb/get-document.md @@ -0,0 +1,6 @@ +```bash +appwrite vectors-db get-document \ + --database-id \ + --collection-id \ + --document-id +``` diff --git a/examples/1.9.x/console-cli/examples/vectorsdb/get-index.md b/examples/1.9.x/console-cli/examples/vectorsdb/get-index.md new file mode 100644 index 000000000..6ca81acc8 --- /dev/null +++ b/examples/1.9.x/console-cli/examples/vectorsdb/get-index.md @@ -0,0 +1,6 @@ +```bash +appwrite vectors-db get-index \ + --database-id \ + --collection-id \ + --key '' +``` diff --git a/examples/1.9.x/console-cli/examples/vectorsdb/get-transaction.md b/examples/1.9.x/console-cli/examples/vectorsdb/get-transaction.md new file mode 100644 index 000000000..bdd0c2881 --- /dev/null +++ b/examples/1.9.x/console-cli/examples/vectorsdb/get-transaction.md @@ -0,0 +1,4 @@ +```bash +appwrite vectors-db get-transaction \ + --transaction-id +``` diff --git a/examples/1.9.x/console-cli/examples/vectorsdb/get.md b/examples/1.9.x/console-cli/examples/vectorsdb/get.md new file mode 100644 index 000000000..e6f3c31ed --- /dev/null +++ b/examples/1.9.x/console-cli/examples/vectorsdb/get.md @@ -0,0 +1,4 @@ +```bash +appwrite vectors-db get \ + --database-id +``` diff --git a/examples/1.9.x/console-cli/examples/vectorsdb/list-collections.md b/examples/1.9.x/console-cli/examples/vectorsdb/list-collections.md new file mode 100644 index 000000000..c9086a177 --- /dev/null +++ b/examples/1.9.x/console-cli/examples/vectorsdb/list-collections.md @@ -0,0 +1,5 @@ +```bash +appwrite vectors-db list-collections \ + --database-id \ + --limit 25 +``` diff --git a/examples/1.9.x/console-cli/examples/vectorsdb/list-documents.md b/examples/1.9.x/console-cli/examples/vectorsdb/list-documents.md new file mode 100644 index 000000000..05b06c17c --- /dev/null +++ b/examples/1.9.x/console-cli/examples/vectorsdb/list-documents.md @@ -0,0 +1,6 @@ +```bash +appwrite vectors-db list-documents \ + --database-id \ + --collection-id \ + --limit 25 +``` diff --git a/examples/1.9.x/console-cli/examples/vectorsdb/list-indexes.md b/examples/1.9.x/console-cli/examples/vectorsdb/list-indexes.md new file mode 100644 index 000000000..f6d810891 --- /dev/null +++ b/examples/1.9.x/console-cli/examples/vectorsdb/list-indexes.md @@ -0,0 +1,6 @@ +```bash +appwrite vectors-db list-indexes \ + --database-id \ + --collection-id \ + --limit 25 +``` diff --git a/examples/1.9.x/console-cli/examples/vectorsdb/list-transactions.md b/examples/1.9.x/console-cli/examples/vectorsdb/list-transactions.md new file mode 100644 index 000000000..f4d01542b --- /dev/null +++ b/examples/1.9.x/console-cli/examples/vectorsdb/list-transactions.md @@ -0,0 +1,4 @@ +```bash +appwrite vectors-db list-transactions \ + --limit 25 +``` diff --git a/examples/1.9.x/console-cli/examples/vectorsdb/list.md b/examples/1.9.x/console-cli/examples/vectorsdb/list.md new file mode 100644 index 000000000..bd930328e --- /dev/null +++ b/examples/1.9.x/console-cli/examples/vectorsdb/list.md @@ -0,0 +1,4 @@ +```bash +appwrite vectors-db list \ + --limit 25 +``` diff --git a/examples/1.9.x/console-cli/examples/vectorsdb/update-collection.md b/examples/1.9.x/console-cli/examples/vectorsdb/update-collection.md new file mode 100644 index 000000000..3ad418295 --- /dev/null +++ b/examples/1.9.x/console-cli/examples/vectorsdb/update-collection.md @@ -0,0 +1,6 @@ +```bash +appwrite vectors-db update-collection \ + --database-id \ + --collection-id \ + --name +``` diff --git a/examples/1.9.x/console-cli/examples/vectorsdb/update-document.md b/examples/1.9.x/console-cli/examples/vectorsdb/update-document.md new file mode 100644 index 000000000..1fb31e1e2 --- /dev/null +++ b/examples/1.9.x/console-cli/examples/vectorsdb/update-document.md @@ -0,0 +1,6 @@ +```bash +appwrite vectors-db update-document \ + --database-id \ + --collection-id \ + --document-id +``` diff --git a/examples/1.9.x/console-cli/examples/vectorsdb/update-documents.md b/examples/1.9.x/console-cli/examples/vectorsdb/update-documents.md new file mode 100644 index 000000000..122030b8b --- /dev/null +++ b/examples/1.9.x/console-cli/examples/vectorsdb/update-documents.md @@ -0,0 +1,6 @@ +```bash +appwrite vectors-db update-documents \ + --database-id \ + --collection-id \ + --limit 25 +``` diff --git a/examples/1.9.x/console-cli/examples/vectorsdb/update-transaction.md b/examples/1.9.x/console-cli/examples/vectorsdb/update-transaction.md new file mode 100644 index 000000000..92fe0e444 --- /dev/null +++ b/examples/1.9.x/console-cli/examples/vectorsdb/update-transaction.md @@ -0,0 +1,4 @@ +```bash +appwrite vectors-db update-transaction \ + --transaction-id +``` diff --git a/examples/1.9.x/console-cli/examples/vectorsdb/update.md b/examples/1.9.x/console-cli/examples/vectorsdb/update.md new file mode 100644 index 000000000..df0d1a093 --- /dev/null +++ b/examples/1.9.x/console-cli/examples/vectorsdb/update.md @@ -0,0 +1,5 @@ +```bash +appwrite vectors-db update \ + --database-id \ + --name +``` diff --git a/examples/1.9.x/console-cli/examples/vectorsdb/upsert-document.md b/examples/1.9.x/console-cli/examples/vectorsdb/upsert-document.md new file mode 100644 index 000000000..9f6136892 --- /dev/null +++ b/examples/1.9.x/console-cli/examples/vectorsdb/upsert-document.md @@ -0,0 +1,6 @@ +```bash +appwrite vectors-db upsert-document \ + --database-id \ + --collection-id \ + --document-id +``` diff --git a/examples/1.9.x/console-cli/examples/vectorsdb/upsert-documents.md b/examples/1.9.x/console-cli/examples/vectorsdb/upsert-documents.md new file mode 100644 index 000000000..115f694e0 --- /dev/null +++ b/examples/1.9.x/console-cli/examples/vectorsdb/upsert-documents.md @@ -0,0 +1,6 @@ +```bash +appwrite vectors-db upsert-documents \ + --database-id \ + --collection-id \ + --documents one two three +``` diff --git a/examples/1.9.x/console-web/examples/apps/create-key.md b/examples/1.9.x/console-web/examples/apps/create-key.md new file mode 100644 index 000000000..98b1af8e4 --- /dev/null +++ b/examples/1.9.x/console-web/examples/apps/create-key.md @@ -0,0 +1,15 @@ +```javascript +import { Client, Apps } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const apps = new Apps(client); + +const result = await apps.createKey({ + appId: '' +}); + +console.log(result); +``` diff --git a/examples/1.9.x/console-web/examples/apps/delete-key.md b/examples/1.9.x/console-web/examples/apps/delete-key.md new file mode 100644 index 000000000..2229d74c1 --- /dev/null +++ b/examples/1.9.x/console-web/examples/apps/delete-key.md @@ -0,0 +1,16 @@ +```javascript +import { Client, Apps } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const apps = new Apps(client); + +const result = await apps.deleteKey({ + appId: '', + keyId: '' +}); + +console.log(result); +``` diff --git a/examples/1.9.x/console-web/examples/apps/get-key.md b/examples/1.9.x/console-web/examples/apps/get-key.md new file mode 100644 index 000000000..9fb02e91a --- /dev/null +++ b/examples/1.9.x/console-web/examples/apps/get-key.md @@ -0,0 +1,16 @@ +```javascript +import { Client, Apps } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const apps = new Apps(client); + +const result = await apps.getKey({ + appId: '', + keyId: '' +}); + +console.log(result); +``` diff --git a/examples/1.9.x/console-web/examples/apps/list-installation-scopes.md b/examples/1.9.x/console-web/examples/apps/list-installation-scopes.md new file mode 100644 index 000000000..d9585fdb9 --- /dev/null +++ b/examples/1.9.x/console-web/examples/apps/list-installation-scopes.md @@ -0,0 +1,13 @@ +```javascript +import { Client, Apps } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const apps = new Apps(client); + +const result = await apps.listInstallationScopes(); + +console.log(result); +``` diff --git a/examples/1.9.x/console-web/examples/apps/list-keys.md b/examples/1.9.x/console-web/examples/apps/list-keys.md new file mode 100644 index 000000000..0588b3788 --- /dev/null +++ b/examples/1.9.x/console-web/examples/apps/list-keys.md @@ -0,0 +1,17 @@ +```javascript +import { Client, Apps } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const apps = new Apps(client); + +const result = await apps.listKeys({ + appId: '', + queries: [], // optional + total: false // optional +}); + +console.log(result); +``` diff --git a/examples/1.9.x/console-web/examples/apps/update.md b/examples/1.9.x/console-web/examples/apps/update.md index 4ead45645..5f792c3df 100644 --- a/examples/1.9.x/console-web/examples/apps/update.md +++ b/examples/1.9.x/console-web/examples/apps/update.md @@ -25,7 +25,9 @@ const result = await apps.update({ redirectUris: [], // optional postLogoutRedirectUris: [], // optional type: 'public', // optional - deviceFlow: false // optional + deviceFlow: false, // optional + installationScopes: [], // optional + installationRedirectUrl: 'https://example.com' // optional }); console.log(result); diff --git a/examples/1.9.x/console-web/examples/organization/create-installation.md b/examples/1.9.x/console-web/examples/organization/create-installation.md new file mode 100644 index 000000000..b47ebeb3c --- /dev/null +++ b/examples/1.9.x/console-web/examples/organization/create-installation.md @@ -0,0 +1,16 @@ +```javascript +import { Client, Organization } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const organization = new Organization(client); + +const result = await organization.createInstallation({ + appId: '', + authorizationDetails: '' // optional +}); + +console.log(result); +``` diff --git a/examples/1.9.x/console-web/examples/organization/delete-installation.md b/examples/1.9.x/console-web/examples/organization/delete-installation.md new file mode 100644 index 000000000..54a873741 --- /dev/null +++ b/examples/1.9.x/console-web/examples/organization/delete-installation.md @@ -0,0 +1,15 @@ +```javascript +import { Client, Organization } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const organization = new Organization(client); + +const result = await organization.deleteInstallation({ + installationId: '' +}); + +console.log(result); +``` diff --git a/examples/1.9.x/console-web/examples/organization/get-installation.md b/examples/1.9.x/console-web/examples/organization/get-installation.md new file mode 100644 index 000000000..051a7b7bf --- /dev/null +++ b/examples/1.9.x/console-web/examples/organization/get-installation.md @@ -0,0 +1,15 @@ +```javascript +import { Client, Organization } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const organization = new Organization(client); + +const result = await organization.getInstallation({ + installationId: '' +}); + +console.log(result); +``` diff --git a/examples/1.9.x/console-web/examples/organization/list-installations.md b/examples/1.9.x/console-web/examples/organization/list-installations.md new file mode 100644 index 000000000..bc824db31 --- /dev/null +++ b/examples/1.9.x/console-web/examples/organization/list-installations.md @@ -0,0 +1,16 @@ +```javascript +import { Client, Organization } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const organization = new Organization(client); + +const result = await organization.listInstallations({ + queries: [], // optional + total: false // optional +}); + +console.log(result); +``` diff --git a/examples/1.9.x/console-web/examples/organization/update-installation.md b/examples/1.9.x/console-web/examples/organization/update-installation.md new file mode 100644 index 000000000..a8d86d29e --- /dev/null +++ b/examples/1.9.x/console-web/examples/organization/update-installation.md @@ -0,0 +1,16 @@ +```javascript +import { Client, Organization } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const organization = new Organization(client); + +const result = await organization.updateInstallation({ + installationId: '', + authorizationDetails: '' // optional +}); + +console.log(result); +``` diff --git a/examples/1.9.x/console-web/examples/project/update-o-auth-2-server.md b/examples/1.9.x/console-web/examples/project/update-o-auth-2-server.md index 45a206921..7eae488d8 100644 --- a/examples/1.9.x/console-web/examples/project/update-o-auth-2-server.md +++ b/examples/1.9.x/console-web/examples/project/update-o-auth-2-server.md @@ -16,6 +16,7 @@ const result = await project.updateOAuth2Server({ refreshTokenDuration: 60, // optional publicAccessTokenDuration: 60, // optional publicRefreshTokenDuration: 60, // optional + installationAccessTokenDuration: 60, // optional confidentialPkce: false, // optional verificationUrl: 'https://example.com', // optional userCodeLength: 6, // optional diff --git a/examples/1.9.x/console-web/examples/teams/create-installation.md b/examples/1.9.x/console-web/examples/teams/create-installation.md new file mode 100644 index 000000000..e16701557 --- /dev/null +++ b/examples/1.9.x/console-web/examples/teams/create-installation.md @@ -0,0 +1,17 @@ +```javascript +import { Client, Teams } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const teams = new Teams(client); + +const result = await teams.createInstallation({ + teamId: '', + appId: '', + authorizationDetails: '' // optional +}); + +console.log(result); +``` diff --git a/examples/1.9.x/console-web/examples/teams/delete-installation.md b/examples/1.9.x/console-web/examples/teams/delete-installation.md new file mode 100644 index 000000000..13febb944 --- /dev/null +++ b/examples/1.9.x/console-web/examples/teams/delete-installation.md @@ -0,0 +1,16 @@ +```javascript +import { Client, Teams } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const teams = new Teams(client); + +const result = await teams.deleteInstallation({ + teamId: '', + installationId: '' +}); + +console.log(result); +``` diff --git a/examples/1.9.x/console-web/examples/teams/get-installation.md b/examples/1.9.x/console-web/examples/teams/get-installation.md new file mode 100644 index 000000000..e8200a915 --- /dev/null +++ b/examples/1.9.x/console-web/examples/teams/get-installation.md @@ -0,0 +1,16 @@ +```javascript +import { Client, Teams } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const teams = new Teams(client); + +const result = await teams.getInstallation({ + teamId: '', + installationId: '' +}); + +console.log(result); +``` diff --git a/examples/1.9.x/console-web/examples/teams/list-installations.md b/examples/1.9.x/console-web/examples/teams/list-installations.md new file mode 100644 index 000000000..4bfa62bc3 --- /dev/null +++ b/examples/1.9.x/console-web/examples/teams/list-installations.md @@ -0,0 +1,17 @@ +```javascript +import { Client, Teams } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const teams = new Teams(client); + +const result = await teams.listInstallations({ + teamId: '', + queries: [], // optional + total: false // optional +}); + +console.log(result); +``` diff --git a/examples/1.9.x/console-web/examples/teams/update-installation.md b/examples/1.9.x/console-web/examples/teams/update-installation.md new file mode 100644 index 000000000..2c3a9ca4d --- /dev/null +++ b/examples/1.9.x/console-web/examples/teams/update-installation.md @@ -0,0 +1,17 @@ +```javascript +import { Client, Teams } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const teams = new Teams(client); + +const result = await teams.updateInstallation({ + teamId: '', + installationId: '', + authorizationDetails: '' // optional +}); + +console.log(result); +``` diff --git a/examples/1.9.x/console-web/examples/vectorsdb/create-query.md b/examples/1.9.x/console-web/examples/vectorsdb/create-query.md new file mode 100644 index 000000000..5fc572096 --- /dev/null +++ b/examples/1.9.x/console-web/examples/vectorsdb/create-query.md @@ -0,0 +1,20 @@ +```javascript +import { Client, VectorsDB } from "@appwrite.io/console"; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const vectorsDB = new VectorsDB(client); + +const result = await vectorsDB.createQuery({ + databaseId: '', + collectionId: '', + queries: [], // optional + transactionId: '', // optional + total: false, // optional + ttl: 0 // optional +}); + +console.log(result); +``` diff --git a/examples/1.9.x/server-dart/examples/apps/create-installation-token.md b/examples/1.9.x/server-dart/examples/apps/create-installation-token.md new file mode 100644 index 000000000..0d41a4f8e --- /dev/null +++ b/examples/1.9.x/server-dart/examples/apps/create-installation-token.md @@ -0,0 +1,15 @@ +```dart +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('') // Your project ID + .setKey(''); // Your secret API key + +Apps apps = Apps(client); + +Oauth2Token result = await apps.createInstallationToken( + appId: '', + installationId: '', +); +``` diff --git a/examples/1.9.x/server-dart/examples/apps/create-key.md b/examples/1.9.x/server-dart/examples/apps/create-key.md new file mode 100644 index 000000000..ad3bb955b --- /dev/null +++ b/examples/1.9.x/server-dart/examples/apps/create-key.md @@ -0,0 +1,14 @@ +```dart +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('') // Your project ID + .setSession(''); // The user session to authenticate with + +Apps apps = Apps(client); + +AppKey result = await apps.createKey( + appId: '', +); +``` diff --git a/examples/1.9.x/server-dart/examples/apps/create-secret.md b/examples/1.9.x/server-dart/examples/apps/create-secret.md new file mode 100644 index 000000000..a3dae9237 --- /dev/null +++ b/examples/1.9.x/server-dart/examples/apps/create-secret.md @@ -0,0 +1,14 @@ +```dart +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('') // Your project ID + .setSession(''); // The user session to authenticate with + +Apps apps = Apps(client); + +AppSecretPlaintext result = await apps.createSecret( + appId: '', +); +``` diff --git a/examples/1.9.x/server-dart/examples/apps/create.md b/examples/1.9.x/server-dart/examples/apps/create.md new file mode 100644 index 000000000..6662a4f86 --- /dev/null +++ b/examples/1.9.x/server-dart/examples/apps/create.md @@ -0,0 +1,32 @@ +```dart +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('') // Your project ID + .setSession(''); // The user session to authenticate with + +Apps apps = Apps(client); + +App result = await apps.create( + appId: '', + name: '', + redirectUris: [], + description: '', // (optional) + clientUri: 'https://example.com', // (optional) + logoUri: 'https://example.com', // (optional) + privacyPolicyUrl: 'https://example.com', // (optional) + termsUrl: 'https://example.com', // (optional) + contacts: [], // (optional) + tagline: '', // (optional) + tags: [], // (optional) + images: [], // (optional) + supportUrl: 'https://example.com', // (optional) + dataDeletionUrl: 'https://example.com', // (optional) + postLogoutRedirectUris: [], // (optional) + enabled: false, // (optional) + type: 'public', // (optional) + deviceFlow: false, // (optional) + teamId: '', // (optional) +); +``` diff --git a/examples/1.9.x/server-dart/examples/apps/delete-key.md b/examples/1.9.x/server-dart/examples/apps/delete-key.md new file mode 100644 index 000000000..2e7d21931 --- /dev/null +++ b/examples/1.9.x/server-dart/examples/apps/delete-key.md @@ -0,0 +1,15 @@ +```dart +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('') // Your project ID + .setSession(''); // The user session to authenticate with + +Apps apps = Apps(client); + +await apps.deleteKey( + appId: '', + keyId: '', +); +``` diff --git a/examples/1.9.x/server-dart/examples/apps/delete-secret.md b/examples/1.9.x/server-dart/examples/apps/delete-secret.md new file mode 100644 index 000000000..e3813ebf8 --- /dev/null +++ b/examples/1.9.x/server-dart/examples/apps/delete-secret.md @@ -0,0 +1,15 @@ +```dart +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('') // Your project ID + .setSession(''); // The user session to authenticate with + +Apps apps = Apps(client); + +await apps.deleteSecret( + appId: '', + secretId: '', +); +``` diff --git a/examples/1.9.x/server-dart/examples/apps/delete-tokens.md b/examples/1.9.x/server-dart/examples/apps/delete-tokens.md new file mode 100644 index 000000000..179abbf9d --- /dev/null +++ b/examples/1.9.x/server-dart/examples/apps/delete-tokens.md @@ -0,0 +1,14 @@ +```dart +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('') // Your project ID + .setSession(''); // The user session to authenticate with + +Apps apps = Apps(client); + +await apps.deleteTokens( + appId: '', +); +``` diff --git a/examples/1.9.x/server-dart/examples/apps/delete.md b/examples/1.9.x/server-dart/examples/apps/delete.md new file mode 100644 index 000000000..1bf573fb1 --- /dev/null +++ b/examples/1.9.x/server-dart/examples/apps/delete.md @@ -0,0 +1,14 @@ +```dart +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('') // Your project ID + .setSession(''); // The user session to authenticate with + +Apps apps = Apps(client); + +await apps.delete( + appId: '', +); +``` diff --git a/examples/1.9.x/server-dart/examples/apps/get-installation.md b/examples/1.9.x/server-dart/examples/apps/get-installation.md new file mode 100644 index 000000000..fa31e2591 --- /dev/null +++ b/examples/1.9.x/server-dart/examples/apps/get-installation.md @@ -0,0 +1,15 @@ +```dart +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('') // Your project ID + .setKey(''); // Your secret API key + +Apps apps = Apps(client); + +AppInstallation result = await apps.getInstallation( + appId: '', + installationId: '', +); +``` diff --git a/examples/1.9.x/server-dart/examples/apps/get-key.md b/examples/1.9.x/server-dart/examples/apps/get-key.md new file mode 100644 index 000000000..a5f27858d --- /dev/null +++ b/examples/1.9.x/server-dart/examples/apps/get-key.md @@ -0,0 +1,15 @@ +```dart +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('') // Your project ID + .setSession(''); // The user session to authenticate with + +Apps apps = Apps(client); + +AppKey result = await apps.getKey( + appId: '', + keyId: '', +); +``` diff --git a/examples/1.9.x/server-dart/examples/apps/get-secret.md b/examples/1.9.x/server-dart/examples/apps/get-secret.md new file mode 100644 index 000000000..4cd85a01f --- /dev/null +++ b/examples/1.9.x/server-dart/examples/apps/get-secret.md @@ -0,0 +1,15 @@ +```dart +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('') // Your project ID + .setSession(''); // The user session to authenticate with + +Apps apps = Apps(client); + +AppSecret result = await apps.getSecret( + appId: '', + secretId: '', +); +``` diff --git a/examples/1.9.x/server-dart/examples/apps/get.md b/examples/1.9.x/server-dart/examples/apps/get.md new file mode 100644 index 000000000..f5e79b85c --- /dev/null +++ b/examples/1.9.x/server-dart/examples/apps/get.md @@ -0,0 +1,14 @@ +```dart +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('') // Your project ID + .setSession(''); // The user session to authenticate with + +Apps apps = Apps(client); + +App result = await apps.get( + appId: '', +); +``` diff --git a/examples/1.9.x/server-dart/examples/apps/list-installation-scopes.md b/examples/1.9.x/server-dart/examples/apps/list-installation-scopes.md new file mode 100644 index 000000000..c2d17afcf --- /dev/null +++ b/examples/1.9.x/server-dart/examples/apps/list-installation-scopes.md @@ -0,0 +1,12 @@ +```dart +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('') // Your project ID + .setSession(''); // The user session to authenticate with + +Apps apps = Apps(client); + +AppScopeList result = await apps.listInstallationScopes(); +``` diff --git a/examples/1.9.x/server-dart/examples/apps/list-installations.md b/examples/1.9.x/server-dart/examples/apps/list-installations.md new file mode 100644 index 000000000..b76c13d90 --- /dev/null +++ b/examples/1.9.x/server-dart/examples/apps/list-installations.md @@ -0,0 +1,16 @@ +```dart +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('') // Your project ID + .setKey(''); // Your secret API key + +Apps apps = Apps(client); + +AppInstallationList result = await apps.listInstallations( + appId: '', + queries: [], // (optional) + total: false, // (optional) +); +``` diff --git a/examples/1.9.x/server-dart/examples/apps/list-keys.md b/examples/1.9.x/server-dart/examples/apps/list-keys.md new file mode 100644 index 000000000..18fda51a5 --- /dev/null +++ b/examples/1.9.x/server-dart/examples/apps/list-keys.md @@ -0,0 +1,16 @@ +```dart +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('') // Your project ID + .setSession(''); // The user session to authenticate with + +Apps apps = Apps(client); + +AppKeyList result = await apps.listKeys( + appId: '', + queries: [], // (optional) + total: false, // (optional) +); +``` diff --git a/examples/1.9.x/server-dart/examples/apps/list-o-auth-2-scopes.md b/examples/1.9.x/server-dart/examples/apps/list-o-auth-2-scopes.md new file mode 100644 index 000000000..d50e8dccb --- /dev/null +++ b/examples/1.9.x/server-dart/examples/apps/list-o-auth-2-scopes.md @@ -0,0 +1,12 @@ +```dart +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('') // Your project ID + .setSession(''); // The user session to authenticate with + +Apps apps = Apps(client); + +AppScopeList result = await apps.listOAuth2Scopes(); +``` diff --git a/examples/1.9.x/server-dart/examples/apps/list-secrets.md b/examples/1.9.x/server-dart/examples/apps/list-secrets.md new file mode 100644 index 000000000..47c5439c6 --- /dev/null +++ b/examples/1.9.x/server-dart/examples/apps/list-secrets.md @@ -0,0 +1,16 @@ +```dart +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('') // Your project ID + .setSession(''); // The user session to authenticate with + +Apps apps = Apps(client); + +AppSecretList result = await apps.listSecrets( + appId: '', + queries: [], // (optional) + total: false, // (optional) +); +``` diff --git a/examples/1.9.x/server-dart/examples/apps/list.md b/examples/1.9.x/server-dart/examples/apps/list.md new file mode 100644 index 000000000..9915fa0c9 --- /dev/null +++ b/examples/1.9.x/server-dart/examples/apps/list.md @@ -0,0 +1,15 @@ +```dart +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('') // Your project ID + .setSession(''); // The user session to authenticate with + +Apps apps = Apps(client); + +AppsList result = await apps.list( + queries: [], // (optional) + total: false, // (optional) +); +``` diff --git a/examples/1.9.x/server-dart/examples/apps/update-labels.md b/examples/1.9.x/server-dart/examples/apps/update-labels.md new file mode 100644 index 000000000..ad7964915 --- /dev/null +++ b/examples/1.9.x/server-dart/examples/apps/update-labels.md @@ -0,0 +1,15 @@ +```dart +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('') // Your project ID + .setKey(''); // Your secret API key + +Apps apps = Apps(client); + +App result = await apps.updateLabels( + appId: '', + labels: [], +); +``` diff --git a/examples/1.9.x/server-dart/examples/apps/update-team.md b/examples/1.9.x/server-dart/examples/apps/update-team.md new file mode 100644 index 000000000..a777349a4 --- /dev/null +++ b/examples/1.9.x/server-dart/examples/apps/update-team.md @@ -0,0 +1,15 @@ +```dart +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('') // Your project ID + .setSession(''); // The user session to authenticate with + +Apps apps = Apps(client); + +App result = await apps.updateTeam( + appId: '', + teamId: '', +); +``` diff --git a/examples/1.9.x/server-dart/examples/apps/update.md b/examples/1.9.x/server-dart/examples/apps/update.md new file mode 100644 index 000000000..ac04a4dd9 --- /dev/null +++ b/examples/1.9.x/server-dart/examples/apps/update.md @@ -0,0 +1,33 @@ +```dart +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('') // Your project ID + .setSession(''); // The user session to authenticate with + +Apps apps = Apps(client); + +App result = await apps.update( + appId: '', + name: '', + description: '', // (optional) + clientUri: 'https://example.com', // (optional) + logoUri: 'https://example.com', // (optional) + privacyPolicyUrl: 'https://example.com', // (optional) + termsUrl: 'https://example.com', // (optional) + contacts: [], // (optional) + tagline: '', // (optional) + tags: [], // (optional) + images: [], // (optional) + supportUrl: 'https://example.com', // (optional) + dataDeletionUrl: 'https://example.com', // (optional) + enabled: false, // (optional) + redirectUris: [], // (optional) + postLogoutRedirectUris: [], // (optional) + type: 'public', // (optional) + deviceFlow: false, // (optional) + installationScopes: [], // (optional) + installationRedirectUrl: 'https://example.com', // (optional) +); +``` diff --git a/examples/1.9.x/server-dart/examples/documentsdb/create-collection.md b/examples/1.9.x/server-dart/examples/documentsdb/create-collection.md new file mode 100644 index 000000000..dd591620d --- /dev/null +++ b/examples/1.9.x/server-dart/examples/documentsdb/create-collection.md @@ -0,0 +1,23 @@ +```dart +import 'package:dart_appwrite/dart_appwrite.dart'; +import 'package:dart_appwrite/permission.dart'; +import 'package:dart_appwrite/role.dart'; + +Client client = Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('') // Your project ID + .setKey(''); // Your secret API key + +DocumentsDB documentsDB = DocumentsDB(client); + +Collection result = await documentsDB.createCollection( + databaseId: '', + collectionId: '', + name: '', + permissions: [Permission.read(Role.any())], // (optional) + documentSecurity: false, // (optional) + enabled: false, // (optional) + attributes: [], // (optional) + indexes: [], // (optional) +); +``` diff --git a/examples/1.9.x/server-dart/examples/documentsdb/create-document.md b/examples/1.9.x/server-dart/examples/documentsdb/create-document.md new file mode 100644 index 000000000..8cba0d69b --- /dev/null +++ b/examples/1.9.x/server-dart/examples/documentsdb/create-document.md @@ -0,0 +1,26 @@ +```dart +import 'package:dart_appwrite/dart_appwrite.dart'; +import 'package:dart_appwrite/permission.dart'; +import 'package:dart_appwrite/role.dart'; + +Client client = Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('') // Your project ID + .setSession(''); // The user session to authenticate with + +DocumentsDB documentsDB = DocumentsDB(client); + +Document result = await documentsDB.createDocument( + databaseId: '', + collectionId: '', + documentId: '', + data: { + "username": "walter.obrien", + "email": "walter.obrien@example.com", + "fullName": "Walter O'Brien", + "age": 30, + "isAdmin": false + }, + permissions: [Permission.read(Role.any())], // (optional) +); +``` diff --git a/examples/1.9.x/server-dart/examples/documentsdb/create-documents.md b/examples/1.9.x/server-dart/examples/documentsdb/create-documents.md new file mode 100644 index 000000000..a75b35ea1 --- /dev/null +++ b/examples/1.9.x/server-dart/examples/documentsdb/create-documents.md @@ -0,0 +1,16 @@ +```dart +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('') // Your project ID + .setSession(''); // The user session to authenticate with + +DocumentsDB documentsDB = DocumentsDB(client); + +DocumentList result = await documentsDB.createDocuments( + databaseId: '', + collectionId: '', + documents: [], +); +``` diff --git a/examples/1.9.x/server-dart/examples/documentsdb/create-index.md b/examples/1.9.x/server-dart/examples/documentsdb/create-index.md new file mode 100644 index 000000000..2725c8400 --- /dev/null +++ b/examples/1.9.x/server-dart/examples/documentsdb/create-index.md @@ -0,0 +1,21 @@ +```dart +import 'package:dart_appwrite/dart_appwrite.dart'; +import 'package:dart_appwrite/enums.dart' as enums; + +Client client = Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('') // Your project ID + .setKey(''); // Your secret API key + +DocumentsDB documentsDB = DocumentsDB(client); + +Index result = await documentsDB.createIndex( + databaseId: '', + collectionId: '', + key: '', + type: enums.DocumentsDBIndexType.key, + attributes: [], + orders: [enums.OrderBy.asc], // (optional) + lengths: [], // (optional) +); +``` diff --git a/examples/1.9.x/server-dart/examples/documentsdb/create-operations.md b/examples/1.9.x/server-dart/examples/documentsdb/create-operations.md new file mode 100644 index 000000000..e91cd1867 --- /dev/null +++ b/examples/1.9.x/server-dart/examples/documentsdb/create-operations.md @@ -0,0 +1,25 @@ +```dart +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('') // Your project ID + .setKey(''); // Your secret API key + +DocumentsDB documentsDB = DocumentsDB(client); + +Transaction result = await documentsDB.createOperations( + transactionId: '', + operations: [ + { + "action": "create", + "databaseId": "", + "collectionId": "", + "documentId": "", + "data": { + "name": "Walter O'Brien" + } + } + ], // (optional) +); +``` diff --git a/examples/1.9.x/server-dart/examples/documentsdb/create-transaction.md b/examples/1.9.x/server-dart/examples/documentsdb/create-transaction.md new file mode 100644 index 000000000..caf13b367 --- /dev/null +++ b/examples/1.9.x/server-dart/examples/documentsdb/create-transaction.md @@ -0,0 +1,14 @@ +```dart +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('') // Your project ID + .setKey(''); // Your secret API key + +DocumentsDB documentsDB = DocumentsDB(client); + +Transaction result = await documentsDB.createTransaction( + ttl: 60, // (optional) +); +``` diff --git a/examples/1.9.x/server-dart/examples/documentsdb/create.md b/examples/1.9.x/server-dart/examples/documentsdb/create.md new file mode 100644 index 000000000..0b495c011 --- /dev/null +++ b/examples/1.9.x/server-dart/examples/documentsdb/create.md @@ -0,0 +1,16 @@ +```dart +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('') // Your project ID + .setKey(''); // Your secret API key + +DocumentsDB documentsDB = DocumentsDB(client); + +Database result = await documentsDB.create( + databaseId: '', + name: '', + enabled: false, // (optional) +); +``` diff --git a/examples/1.9.x/server-dart/examples/documentsdb/decrement-document-attribute.md b/examples/1.9.x/server-dart/examples/documentsdb/decrement-document-attribute.md new file mode 100644 index 000000000..814887840 --- /dev/null +++ b/examples/1.9.x/server-dart/examples/documentsdb/decrement-document-attribute.md @@ -0,0 +1,20 @@ +```dart +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('') // Your project ID + .setSession(''); // The user session to authenticate with + +DocumentsDB documentsDB = DocumentsDB(client); + +Document result = await documentsDB.decrementDocumentAttribute( + databaseId: '', + collectionId: '', + documentId: '', + attribute: '', + value: 0, // (optional) + min: 0, // (optional) + transactionId: '', // (optional) +); +``` diff --git a/examples/1.9.x/server-dart/examples/documentsdb/delete-collection.md b/examples/1.9.x/server-dart/examples/documentsdb/delete-collection.md new file mode 100644 index 000000000..ebf766acc --- /dev/null +++ b/examples/1.9.x/server-dart/examples/documentsdb/delete-collection.md @@ -0,0 +1,15 @@ +```dart +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('') // Your project ID + .setKey(''); // Your secret API key + +DocumentsDB documentsDB = DocumentsDB(client); + +await documentsDB.deleteCollection( + databaseId: '', + collectionId: '', +); +``` diff --git a/examples/1.9.x/server-dart/examples/documentsdb/delete-document.md b/examples/1.9.x/server-dart/examples/documentsdb/delete-document.md new file mode 100644 index 000000000..f9fa3a37f --- /dev/null +++ b/examples/1.9.x/server-dart/examples/documentsdb/delete-document.md @@ -0,0 +1,17 @@ +```dart +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('') // Your project ID + .setSession(''); // The user session to authenticate with + +DocumentsDB documentsDB = DocumentsDB(client); + +await documentsDB.deleteDocument( + databaseId: '', + collectionId: '', + documentId: '', + transactionId: '', // (optional) +); +``` diff --git a/examples/1.9.x/server-dart/examples/documentsdb/delete-documents.md b/examples/1.9.x/server-dart/examples/documentsdb/delete-documents.md new file mode 100644 index 000000000..9218ccd6b --- /dev/null +++ b/examples/1.9.x/server-dart/examples/documentsdb/delete-documents.md @@ -0,0 +1,17 @@ +```dart +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('') // Your project ID + .setKey(''); // Your secret API key + +DocumentsDB documentsDB = DocumentsDB(client); + +await documentsDB.deleteDocuments( + databaseId: '', + collectionId: '', + queries: [], // (optional) + transactionId: '', // (optional) +); +``` diff --git a/examples/1.9.x/server-dart/examples/documentsdb/delete-index.md b/examples/1.9.x/server-dart/examples/documentsdb/delete-index.md new file mode 100644 index 000000000..ec9a5a658 --- /dev/null +++ b/examples/1.9.x/server-dart/examples/documentsdb/delete-index.md @@ -0,0 +1,16 @@ +```dart +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('') // Your project ID + .setKey(''); // Your secret API key + +DocumentsDB documentsDB = DocumentsDB(client); + +await documentsDB.deleteIndex( + databaseId: '', + collectionId: '', + key: '', +); +``` diff --git a/examples/1.9.x/server-dart/examples/documentsdb/delete-transaction.md b/examples/1.9.x/server-dart/examples/documentsdb/delete-transaction.md new file mode 100644 index 000000000..6639fb887 --- /dev/null +++ b/examples/1.9.x/server-dart/examples/documentsdb/delete-transaction.md @@ -0,0 +1,14 @@ +```dart +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('') // Your project ID + .setKey(''); // Your secret API key + +DocumentsDB documentsDB = DocumentsDB(client); + +await documentsDB.deleteTransaction( + transactionId: '', +); +``` diff --git a/examples/1.9.x/server-dart/examples/documentsdb/delete.md b/examples/1.9.x/server-dart/examples/documentsdb/delete.md new file mode 100644 index 000000000..308c2a83d --- /dev/null +++ b/examples/1.9.x/server-dart/examples/documentsdb/delete.md @@ -0,0 +1,14 @@ +```dart +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('') // Your project ID + .setKey(''); // Your secret API key + +DocumentsDB documentsDB = DocumentsDB(client); + +await documentsDB.delete( + databaseId: '', +); +``` diff --git a/examples/1.9.x/server-dart/examples/documentsdb/get-collection.md b/examples/1.9.x/server-dart/examples/documentsdb/get-collection.md new file mode 100644 index 000000000..5b23bdb7e --- /dev/null +++ b/examples/1.9.x/server-dart/examples/documentsdb/get-collection.md @@ -0,0 +1,15 @@ +```dart +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('') // Your project ID + .setKey(''); // Your secret API key + +DocumentsDB documentsDB = DocumentsDB(client); + +Collection result = await documentsDB.getCollection( + databaseId: '', + collectionId: '', +); +``` diff --git a/examples/1.9.x/server-dart/examples/documentsdb/get-document.md b/examples/1.9.x/server-dart/examples/documentsdb/get-document.md new file mode 100644 index 000000000..02b6a7a43 --- /dev/null +++ b/examples/1.9.x/server-dart/examples/documentsdb/get-document.md @@ -0,0 +1,18 @@ +```dart +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('') // Your project ID + .setSession(''); // The user session to authenticate with + +DocumentsDB documentsDB = DocumentsDB(client); + +Document result = await documentsDB.getDocument( + databaseId: '', + collectionId: '', + documentId: '', + queries: [], // (optional) + transactionId: '', // (optional) +); +``` diff --git a/examples/1.9.x/server-dart/examples/documentsdb/get-index.md b/examples/1.9.x/server-dart/examples/documentsdb/get-index.md new file mode 100644 index 000000000..ef1e411ee --- /dev/null +++ b/examples/1.9.x/server-dart/examples/documentsdb/get-index.md @@ -0,0 +1,16 @@ +```dart +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('') // Your project ID + .setKey(''); // Your secret API key + +DocumentsDB documentsDB = DocumentsDB(client); + +Index result = await documentsDB.getIndex( + databaseId: '', + collectionId: '', + key: '', +); +``` diff --git a/examples/1.9.x/server-dart/examples/documentsdb/get-transaction.md b/examples/1.9.x/server-dart/examples/documentsdb/get-transaction.md new file mode 100644 index 000000000..688128f20 --- /dev/null +++ b/examples/1.9.x/server-dart/examples/documentsdb/get-transaction.md @@ -0,0 +1,14 @@ +```dart +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('') // Your project ID + .setKey(''); // Your secret API key + +DocumentsDB documentsDB = DocumentsDB(client); + +Transaction result = await documentsDB.getTransaction( + transactionId: '', +); +``` diff --git a/examples/1.9.x/server-dart/examples/documentsdb/get.md b/examples/1.9.x/server-dart/examples/documentsdb/get.md new file mode 100644 index 000000000..09bcb91f8 --- /dev/null +++ b/examples/1.9.x/server-dart/examples/documentsdb/get.md @@ -0,0 +1,14 @@ +```dart +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('') // Your project ID + .setKey(''); // Your secret API key + +DocumentsDB documentsDB = DocumentsDB(client); + +Database result = await documentsDB.get( + databaseId: '', +); +``` diff --git a/examples/1.9.x/server-dart/examples/documentsdb/increment-document-attribute.md b/examples/1.9.x/server-dart/examples/documentsdb/increment-document-attribute.md new file mode 100644 index 000000000..44a11c652 --- /dev/null +++ b/examples/1.9.x/server-dart/examples/documentsdb/increment-document-attribute.md @@ -0,0 +1,20 @@ +```dart +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('') // Your project ID + .setSession(''); // The user session to authenticate with + +DocumentsDB documentsDB = DocumentsDB(client); + +Document result = await documentsDB.incrementDocumentAttribute( + databaseId: '', + collectionId: '', + documentId: '', + attribute: '', + value: 0, // (optional) + max: 0, // (optional) + transactionId: '', // (optional) +); +``` diff --git a/examples/1.9.x/server-dart/examples/documentsdb/list-collections.md b/examples/1.9.x/server-dart/examples/documentsdb/list-collections.md new file mode 100644 index 000000000..45cef6362 --- /dev/null +++ b/examples/1.9.x/server-dart/examples/documentsdb/list-collections.md @@ -0,0 +1,17 @@ +```dart +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('') // Your project ID + .setKey(''); // Your secret API key + +DocumentsDB documentsDB = DocumentsDB(client); + +CollectionList result = await documentsDB.listCollections( + databaseId: '', + queries: [], // (optional) + search: '', // (optional) + total: false, // (optional) +); +``` diff --git a/examples/1.9.x/server-dart/examples/documentsdb/list-documents.md b/examples/1.9.x/server-dart/examples/documentsdb/list-documents.md new file mode 100644 index 000000000..5619c5cfd --- /dev/null +++ b/examples/1.9.x/server-dart/examples/documentsdb/list-documents.md @@ -0,0 +1,19 @@ +```dart +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('') // Your project ID + .setSession(''); // The user session to authenticate with + +DocumentsDB documentsDB = DocumentsDB(client); + +DocumentList result = await documentsDB.listDocuments( + databaseId: '', + collectionId: '', + queries: [], // (optional) + transactionId: '', // (optional) + total: false, // (optional) + ttl: 0, // (optional) +); +``` diff --git a/examples/1.9.x/server-dart/examples/documentsdb/list-indexes.md b/examples/1.9.x/server-dart/examples/documentsdb/list-indexes.md new file mode 100644 index 000000000..b7285af15 --- /dev/null +++ b/examples/1.9.x/server-dart/examples/documentsdb/list-indexes.md @@ -0,0 +1,17 @@ +```dart +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('') // Your project ID + .setKey(''); // Your secret API key + +DocumentsDB documentsDB = DocumentsDB(client); + +IndexList result = await documentsDB.listIndexes( + databaseId: '', + collectionId: '', + queries: [], // (optional) + total: false, // (optional) +); +``` diff --git a/examples/1.9.x/server-dart/examples/documentsdb/list-transactions.md b/examples/1.9.x/server-dart/examples/documentsdb/list-transactions.md new file mode 100644 index 000000000..066ebfe5b --- /dev/null +++ b/examples/1.9.x/server-dart/examples/documentsdb/list-transactions.md @@ -0,0 +1,14 @@ +```dart +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('') // Your project ID + .setKey(''); // Your secret API key + +DocumentsDB documentsDB = DocumentsDB(client); + +TransactionList result = await documentsDB.listTransactions( + queries: [], // (optional) +); +``` diff --git a/examples/1.9.x/server-dart/examples/documentsdb/list.md b/examples/1.9.x/server-dart/examples/documentsdb/list.md new file mode 100644 index 000000000..1b2b8dd49 --- /dev/null +++ b/examples/1.9.x/server-dart/examples/documentsdb/list.md @@ -0,0 +1,16 @@ +```dart +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('') // Your project ID + .setKey(''); // Your secret API key + +DocumentsDB documentsDB = DocumentsDB(client); + +DatabaseList result = await documentsDB.list( + queries: [], // (optional) + search: '', // (optional) + total: false, // (optional) +); +``` diff --git a/examples/1.9.x/server-dart/examples/documentsdb/update-collection.md b/examples/1.9.x/server-dart/examples/documentsdb/update-collection.md new file mode 100644 index 000000000..c90d2c4b9 --- /dev/null +++ b/examples/1.9.x/server-dart/examples/documentsdb/update-collection.md @@ -0,0 +1,22 @@ +```dart +import 'package:dart_appwrite/dart_appwrite.dart'; +import 'package:dart_appwrite/permission.dart'; +import 'package:dart_appwrite/role.dart'; + +Client client = Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('') // Your project ID + .setKey(''); // Your secret API key + +DocumentsDB documentsDB = DocumentsDB(client); + +Collection result = await documentsDB.updateCollection( + databaseId: '', + collectionId: '', + name: '', + permissions: [Permission.read(Role.any())], // (optional) + documentSecurity: false, // (optional) + enabled: false, // (optional) + purge: false, // (optional) +); +``` diff --git a/examples/1.9.x/server-dart/examples/documentsdb/update-document.md b/examples/1.9.x/server-dart/examples/documentsdb/update-document.md new file mode 100644 index 000000000..99746d741 --- /dev/null +++ b/examples/1.9.x/server-dart/examples/documentsdb/update-document.md @@ -0,0 +1,21 @@ +```dart +import 'package:dart_appwrite/dart_appwrite.dart'; +import 'package:dart_appwrite/permission.dart'; +import 'package:dart_appwrite/role.dart'; + +Client client = Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('') // Your project ID + .setSession(''); // The user session to authenticate with + +DocumentsDB documentsDB = DocumentsDB(client); + +Document result = await documentsDB.updateDocument( + databaseId: '', + collectionId: '', + documentId: '', + data: {}, // (optional) + permissions: [Permission.read(Role.any())], // (optional) + transactionId: '', // (optional) +); +``` diff --git a/examples/1.9.x/server-dart/examples/documentsdb/update-documents.md b/examples/1.9.x/server-dart/examples/documentsdb/update-documents.md new file mode 100644 index 000000000..5554e087b --- /dev/null +++ b/examples/1.9.x/server-dart/examples/documentsdb/update-documents.md @@ -0,0 +1,18 @@ +```dart +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('') // Your project ID + .setKey(''); // Your secret API key + +DocumentsDB documentsDB = DocumentsDB(client); + +DocumentList result = await documentsDB.updateDocuments( + databaseId: '', + collectionId: '', + data: {}, // (optional) + queries: [], // (optional) + transactionId: '', // (optional) +); +``` diff --git a/examples/1.9.x/server-dart/examples/documentsdb/update-transaction.md b/examples/1.9.x/server-dart/examples/documentsdb/update-transaction.md new file mode 100644 index 000000000..d5dcaeb58 --- /dev/null +++ b/examples/1.9.x/server-dart/examples/documentsdb/update-transaction.md @@ -0,0 +1,16 @@ +```dart +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('') // Your project ID + .setKey(''); // Your secret API key + +DocumentsDB documentsDB = DocumentsDB(client); + +Transaction result = await documentsDB.updateTransaction( + transactionId: '', + commit: false, // (optional) + rollback: false, // (optional) +); +``` diff --git a/examples/1.9.x/server-dart/examples/documentsdb/update.md b/examples/1.9.x/server-dart/examples/documentsdb/update.md new file mode 100644 index 000000000..f24ec2cca --- /dev/null +++ b/examples/1.9.x/server-dart/examples/documentsdb/update.md @@ -0,0 +1,16 @@ +```dart +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('') // Your project ID + .setKey(''); // Your secret API key + +DocumentsDB documentsDB = DocumentsDB(client); + +Database result = await documentsDB.update( + databaseId: '', + name: '', + enabled: false, // (optional) +); +``` diff --git a/examples/1.9.x/server-dart/examples/documentsdb/upsert-document.md b/examples/1.9.x/server-dart/examples/documentsdb/upsert-document.md new file mode 100644 index 000000000..71c5db06d --- /dev/null +++ b/examples/1.9.x/server-dart/examples/documentsdb/upsert-document.md @@ -0,0 +1,21 @@ +```dart +import 'package:dart_appwrite/dart_appwrite.dart'; +import 'package:dart_appwrite/permission.dart'; +import 'package:dart_appwrite/role.dart'; + +Client client = Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('') // Your project ID + .setSession(''); // The user session to authenticate with + +DocumentsDB documentsDB = DocumentsDB(client); + +Document result = await documentsDB.upsertDocument( + databaseId: '', + collectionId: '', + documentId: '', + data: {}, // (optional) + permissions: [Permission.read(Role.any())], // (optional) + transactionId: '', // (optional) +); +``` diff --git a/examples/1.9.x/server-dart/examples/documentsdb/upsert-documents.md b/examples/1.9.x/server-dart/examples/documentsdb/upsert-documents.md new file mode 100644 index 000000000..bbf864900 --- /dev/null +++ b/examples/1.9.x/server-dart/examples/documentsdb/upsert-documents.md @@ -0,0 +1,17 @@ +```dart +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('') // Your project ID + .setKey(''); // Your secret API key + +DocumentsDB documentsDB = DocumentsDB(client); + +DocumentList result = await documentsDB.upsertDocuments( + databaseId: '', + collectionId: '', + documents: [], + transactionId: '', // (optional) +); +``` diff --git a/examples/1.9.x/server-dart/examples/oauth2/approve.md b/examples/1.9.x/server-dart/examples/oauth2/approve.md new file mode 100644 index 000000000..61a65b528 --- /dev/null +++ b/examples/1.9.x/server-dart/examples/oauth2/approve.md @@ -0,0 +1,16 @@ +```dart +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setSession('') // The user session to authenticate with + .setProject(''); // Your project ID + +Oauth2 oauth2 = Oauth2(client); + +Oauth2Approve result = await oauth2.approve( + grantId: '', + authorizationDetails: '', // (optional) + scope: '', // (optional) +); +``` diff --git a/examples/1.9.x/server-dart/examples/oauth2/authorize-post.md b/examples/1.9.x/server-dart/examples/oauth2/authorize-post.md new file mode 100644 index 000000000..aa1f26052 --- /dev/null +++ b/examples/1.9.x/server-dart/examples/oauth2/authorize-post.md @@ -0,0 +1,27 @@ +```dart +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setSession('') // The user session to authenticate with + .setProject(''); // Your project ID + +Oauth2 oauth2 = Oauth2(client); + +Oauth2Authorize result = await oauth2.authorizePost( + clientId: '', // (optional) + redirectUri: 'https://example.com', // (optional) + responseType: '', // (optional) + scope: '', // (optional) + state: '', // (optional) + nonce: '', // (optional) + codeChallenge: '', // (optional) + codeChallengeMethod: 's256', // (optional) + prompt: '', // (optional) + maxAge: 0, // (optional) + authorizationDetails: '', // (optional) + resource: '', // (optional) + audience: '', // (optional) + requestUri: '', // (optional) +); +``` diff --git a/examples/1.9.x/server-dart/examples/oauth2/authorize.md b/examples/1.9.x/server-dart/examples/oauth2/authorize.md new file mode 100644 index 000000000..d49beab30 --- /dev/null +++ b/examples/1.9.x/server-dart/examples/oauth2/authorize.md @@ -0,0 +1,27 @@ +```dart +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setSession('') // The user session to authenticate with + .setProject(''); // Your project ID + +Oauth2 oauth2 = Oauth2(client); + +Oauth2Authorize result = await oauth2.authorize( + clientId: '', // (optional) + redirectUri: 'https://example.com', // (optional) + responseType: '', // (optional) + scope: '', // (optional) + state: '', // (optional) + nonce: '', // (optional) + codeChallenge: '', // (optional) + codeChallengeMethod: 's256', // (optional) + prompt: '', // (optional) + maxAge: 0, // (optional) + authorizationDetails: '', // (optional) + resource: '', // (optional) + audience: '', // (optional) + requestUri: '', // (optional) +); +``` diff --git a/examples/1.9.x/server-dart/examples/oauth2/create-device-authorization.md b/examples/1.9.x/server-dart/examples/oauth2/create-device-authorization.md new file mode 100644 index 000000000..ea4e22db1 --- /dev/null +++ b/examples/1.9.x/server-dart/examples/oauth2/create-device-authorization.md @@ -0,0 +1,18 @@ +```dart +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setSession('') // The user session to authenticate with + .setProject(''); // Your project ID + +Oauth2 oauth2 = Oauth2(client); + +Oauth2DeviceAuthorization result = await oauth2.createDeviceAuthorization( + clientId: '', // (optional) + scope: '', // (optional) + authorizationDetails: '', // (optional) + resource: '', // (optional) + audience: '', // (optional) +); +``` diff --git a/examples/1.9.x/server-dart/examples/oauth2/create-grant.md b/examples/1.9.x/server-dart/examples/oauth2/create-grant.md new file mode 100644 index 000000000..b3e2aa430 --- /dev/null +++ b/examples/1.9.x/server-dart/examples/oauth2/create-grant.md @@ -0,0 +1,14 @@ +```dart +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setSession('') // The user session to authenticate with + .setProject(''); // Your project ID + +Oauth2 oauth2 = Oauth2(client); + +Oauth2Grant result = await oauth2.createGrant( + userCode: '', +); +``` diff --git a/examples/1.9.x/server-dart/examples/oauth2/create-par.md b/examples/1.9.x/server-dart/examples/oauth2/create-par.md new file mode 100644 index 000000000..975383133 --- /dev/null +++ b/examples/1.9.x/server-dart/examples/oauth2/create-par.md @@ -0,0 +1,26 @@ +```dart +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setSession('') // The user session to authenticate with + .setProject(''); // Your project ID + +Oauth2 oauth2 = Oauth2(client); + +Oauth2PAR result = await oauth2.createPAR( + clientId: '', + redirectUri: 'https://example.com', + responseType: 'code', + scope: '', // (optional) + state: '', // (optional) + nonce: '', // (optional) + codeChallenge: '', // (optional) + codeChallengeMethod: 's256', // (optional) + prompt: '', // (optional) + maxAge: 0, // (optional) + authorizationDetails: '', // (optional) + resource: '', // (optional) + audience: '', // (optional) +); +``` diff --git a/examples/1.9.x/server-dart/examples/oauth2/create-token.md b/examples/1.9.x/server-dart/examples/oauth2/create-token.md new file mode 100644 index 000000000..f1cbd3c8a --- /dev/null +++ b/examples/1.9.x/server-dart/examples/oauth2/create-token.md @@ -0,0 +1,23 @@ +```dart +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setSession('') // The user session to authenticate with + .setProject(''); // Your project ID + +Oauth2 oauth2 = Oauth2(client); + +Oauth2Token result = await oauth2.createToken( + grantType: '', + code: '', // (optional) + refreshToken: '', // (optional) + deviceCode: '', // (optional) + clientId: '', // (optional) + clientSecret: '', // (optional) + codeVerifier: '', // (optional) + redirectUri: 'https://example.com', // (optional) + resource: '', // (optional) + audience: '', // (optional) +); +``` diff --git a/examples/1.9.x/server-dart/examples/oauth2/get-grant.md b/examples/1.9.x/server-dart/examples/oauth2/get-grant.md new file mode 100644 index 000000000..7ed9e8983 --- /dev/null +++ b/examples/1.9.x/server-dart/examples/oauth2/get-grant.md @@ -0,0 +1,14 @@ +```dart +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setSession('') // The user session to authenticate with + .setProject(''); // Your project ID + +Oauth2 oauth2 = Oauth2(client); + +Oauth2Grant result = await oauth2.getGrant( + grantId: '', +); +``` diff --git a/examples/1.9.x/server-dart/examples/oauth2/list-organizations.md b/examples/1.9.x/server-dart/examples/oauth2/list-organizations.md new file mode 100644 index 000000000..fe345b207 --- /dev/null +++ b/examples/1.9.x/server-dart/examples/oauth2/list-organizations.md @@ -0,0 +1,16 @@ +```dart +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setSession('') // The user session to authenticate with + .setProject(''); // Your project ID + +Oauth2 oauth2 = Oauth2(client); + +Oauth2OrganizationList result = await oauth2.listOrganizations( + limit: 1, // (optional) + offset: 0, // (optional) + search: '', // (optional) +); +``` diff --git a/examples/1.9.x/server-dart/examples/oauth2/list-projects.md b/examples/1.9.x/server-dart/examples/oauth2/list-projects.md new file mode 100644 index 000000000..de4c0c7a3 --- /dev/null +++ b/examples/1.9.x/server-dart/examples/oauth2/list-projects.md @@ -0,0 +1,16 @@ +```dart +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setSession('') // The user session to authenticate with + .setProject(''); // Your project ID + +Oauth2 oauth2 = Oauth2(client); + +Oauth2ProjectList result = await oauth2.listProjects( + limit: 1, // (optional) + offset: 0, // (optional) + search: '', // (optional) +); +``` diff --git a/examples/1.9.x/server-dart/examples/oauth2/reject.md b/examples/1.9.x/server-dart/examples/oauth2/reject.md new file mode 100644 index 000000000..843c46311 --- /dev/null +++ b/examples/1.9.x/server-dart/examples/oauth2/reject.md @@ -0,0 +1,14 @@ +```dart +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setSession('') // The user session to authenticate with + .setProject(''); // Your project ID + +Oauth2 oauth2 = Oauth2(client); + +Oauth2Reject result = await oauth2.reject( + grantId: '', +); +``` diff --git a/examples/1.9.x/server-dart/examples/oauth2/revoke.md b/examples/1.9.x/server-dart/examples/oauth2/revoke.md new file mode 100644 index 000000000..0f4f7820e --- /dev/null +++ b/examples/1.9.x/server-dart/examples/oauth2/revoke.md @@ -0,0 +1,17 @@ +```dart +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setSession('') // The user session to authenticate with + .setProject(''); // Your project ID + +Oauth2 oauth2 = Oauth2(client); + + result = await oauth2.revoke( + token: '', + tokenTypeHint: 'access_token', // (optional) + clientId: '', // (optional) + clientSecret: '', // (optional) +); +``` diff --git a/examples/1.9.x/server-dart/examples/organization/create-installation.md b/examples/1.9.x/server-dart/examples/organization/create-installation.md new file mode 100644 index 000000000..deee33644 --- /dev/null +++ b/examples/1.9.x/server-dart/examples/organization/create-installation.md @@ -0,0 +1,15 @@ +```dart +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('') // Your project ID + .setSession(''); // The user session to authenticate with + +Organization organization = Organization(client); + +AppInstallation result = await organization.createInstallation( + appId: '', + authorizationDetails: '', // (optional) +); +``` diff --git a/examples/1.9.x/server-dart/examples/organization/delete-installation.md b/examples/1.9.x/server-dart/examples/organization/delete-installation.md new file mode 100644 index 000000000..3937b1abb --- /dev/null +++ b/examples/1.9.x/server-dart/examples/organization/delete-installation.md @@ -0,0 +1,14 @@ +```dart +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('') // Your project ID + .setSession(''); // The user session to authenticate with + +Organization organization = Organization(client); + +await organization.deleteInstallation( + installationId: '', +); +``` diff --git a/examples/1.9.x/server-dart/examples/organization/get-installation.md b/examples/1.9.x/server-dart/examples/organization/get-installation.md new file mode 100644 index 000000000..187e534af --- /dev/null +++ b/examples/1.9.x/server-dart/examples/organization/get-installation.md @@ -0,0 +1,14 @@ +```dart +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('') // Your project ID + .setSession(''); // The user session to authenticate with + +Organization organization = Organization(client); + +AppInstallation result = await organization.getInstallation( + installationId: '', +); +``` diff --git a/examples/1.9.x/server-dart/examples/organization/list-installations.md b/examples/1.9.x/server-dart/examples/organization/list-installations.md new file mode 100644 index 000000000..2730102d3 --- /dev/null +++ b/examples/1.9.x/server-dart/examples/organization/list-installations.md @@ -0,0 +1,15 @@ +```dart +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('') // Your project ID + .setSession(''); // The user session to authenticate with + +Organization organization = Organization(client); + +AppInstallationList result = await organization.listInstallations( + queries: [], // (optional) + total: false, // (optional) +); +``` diff --git a/examples/1.9.x/server-dart/examples/organization/update-installation.md b/examples/1.9.x/server-dart/examples/organization/update-installation.md new file mode 100644 index 000000000..63b7ce9a4 --- /dev/null +++ b/examples/1.9.x/server-dart/examples/organization/update-installation.md @@ -0,0 +1,15 @@ +```dart +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('') // Your project ID + .setSession(''); // The user session to authenticate with + +Organization organization = Organization(client); + +AppInstallation result = await organization.updateInstallation( + installationId: '', + authorizationDetails: '', // (optional) +); +``` diff --git a/examples/1.9.x/server-dart/examples/project/update-o-auth-2-server.md b/examples/1.9.x/server-dart/examples/project/update-o-auth-2-server.md index 522517ffc..b3ca65511 100644 --- a/examples/1.9.x/server-dart/examples/project/update-o-auth-2-server.md +++ b/examples/1.9.x/server-dart/examples/project/update-o-auth-2-server.md @@ -17,6 +17,7 @@ Project result = await project.updateOAuth2Server( refreshTokenDuration: 60, // (optional) publicAccessTokenDuration: 60, // (optional) publicRefreshTokenDuration: 60, // (optional) + installationAccessTokenDuration: 60, // (optional) confidentialPkce: false, // (optional) verificationUrl: 'https://example.com', // (optional) userCodeLength: 6, // (optional) diff --git a/examples/1.9.x/server-dart/examples/teams/create-installation.md b/examples/1.9.x/server-dart/examples/teams/create-installation.md new file mode 100644 index 000000000..e41c00f1c --- /dev/null +++ b/examples/1.9.x/server-dart/examples/teams/create-installation.md @@ -0,0 +1,16 @@ +```dart +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('') // Your project ID + .setSession(''); // The user session to authenticate with + +Teams teams = Teams(client); + +AppInstallation result = await teams.createInstallation( + teamId: '', + appId: '', + authorizationDetails: '', // (optional) +); +``` diff --git a/examples/1.9.x/server-dart/examples/teams/delete-installation.md b/examples/1.9.x/server-dart/examples/teams/delete-installation.md new file mode 100644 index 000000000..88595482f --- /dev/null +++ b/examples/1.9.x/server-dart/examples/teams/delete-installation.md @@ -0,0 +1,15 @@ +```dart +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('') // Your project ID + .setSession(''); // The user session to authenticate with + +Teams teams = Teams(client); + +await teams.deleteInstallation( + teamId: '', + installationId: '', +); +``` diff --git a/examples/1.9.x/server-dart/examples/teams/get-installation.md b/examples/1.9.x/server-dart/examples/teams/get-installation.md new file mode 100644 index 000000000..81c030f86 --- /dev/null +++ b/examples/1.9.x/server-dart/examples/teams/get-installation.md @@ -0,0 +1,15 @@ +```dart +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('') // Your project ID + .setSession(''); // The user session to authenticate with + +Teams teams = Teams(client); + +AppInstallation result = await teams.getInstallation( + teamId: '', + installationId: '', +); +``` diff --git a/examples/1.9.x/server-dart/examples/teams/list-installations.md b/examples/1.9.x/server-dart/examples/teams/list-installations.md new file mode 100644 index 000000000..18f973e48 --- /dev/null +++ b/examples/1.9.x/server-dart/examples/teams/list-installations.md @@ -0,0 +1,16 @@ +```dart +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('') // Your project ID + .setSession(''); // The user session to authenticate with + +Teams teams = Teams(client); + +AppInstallationList result = await teams.listInstallations( + teamId: '', + queries: [], // (optional) + total: false, // (optional) +); +``` diff --git a/examples/1.9.x/server-dart/examples/teams/update-installation.md b/examples/1.9.x/server-dart/examples/teams/update-installation.md new file mode 100644 index 000000000..a9a02cb0b --- /dev/null +++ b/examples/1.9.x/server-dart/examples/teams/update-installation.md @@ -0,0 +1,16 @@ +```dart +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('') // Your project ID + .setSession(''); // The user session to authenticate with + +Teams teams = Teams(client); + +AppInstallation result = await teams.updateInstallation( + teamId: '', + installationId: '', + authorizationDetails: '', // (optional) +); +``` diff --git a/examples/1.9.x/server-dart/examples/vectorsdb/create-collection.md b/examples/1.9.x/server-dart/examples/vectorsdb/create-collection.md new file mode 100644 index 000000000..373e42edd --- /dev/null +++ b/examples/1.9.x/server-dart/examples/vectorsdb/create-collection.md @@ -0,0 +1,22 @@ +```dart +import 'package:dart_appwrite/dart_appwrite.dart'; +import 'package:dart_appwrite/permission.dart'; +import 'package:dart_appwrite/role.dart'; + +Client client = Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('') // Your project ID + .setKey(''); // Your secret API key + +VectorsDB vectorsDB = VectorsDB(client); + +VectorsdbCollection result = await vectorsDB.createCollection( + databaseId: '', + collectionId: '', + name: '', + dimension: 1, + permissions: [Permission.read(Role.any())], // (optional) + documentSecurity: false, // (optional) + enabled: false, // (optional) +); +``` diff --git a/examples/1.9.x/server-dart/examples/vectorsdb/create-document.md b/examples/1.9.x/server-dart/examples/vectorsdb/create-document.md new file mode 100644 index 000000000..9f6d92d61 --- /dev/null +++ b/examples/1.9.x/server-dart/examples/vectorsdb/create-document.md @@ -0,0 +1,30 @@ +```dart +import 'package:dart_appwrite/dart_appwrite.dart'; +import 'package:dart_appwrite/permission.dart'; +import 'package:dart_appwrite/role.dart'; + +Client client = Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('') // Your project ID + .setSession(''); // The user session to authenticate with + +VectorsDB vectorsDB = VectorsDB(client); + +Document result = await vectorsDB.createDocument( + databaseId: '', + collectionId: '', + documentId: '', + data: { + "embeddings": [ + 0.12, + -0.55, + 0.88, + 1.02 + ], + "metadata": { + "key": "value" + } + }, + permissions: [Permission.read(Role.any())], // (optional) +); +``` diff --git a/examples/1.9.x/server-dart/examples/vectorsdb/create-documents.md b/examples/1.9.x/server-dart/examples/vectorsdb/create-documents.md new file mode 100644 index 000000000..05f883cc5 --- /dev/null +++ b/examples/1.9.x/server-dart/examples/vectorsdb/create-documents.md @@ -0,0 +1,16 @@ +```dart +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('') // Your project ID + .setKey(''); // Your secret API key + +VectorsDB vectorsDB = VectorsDB(client); + +DocumentList result = await vectorsDB.createDocuments( + databaseId: '', + collectionId: '', + documents: [], +); +``` diff --git a/examples/1.9.x/server-dart/examples/vectorsdb/create-index.md b/examples/1.9.x/server-dart/examples/vectorsdb/create-index.md new file mode 100644 index 000000000..66e990609 --- /dev/null +++ b/examples/1.9.x/server-dart/examples/vectorsdb/create-index.md @@ -0,0 +1,21 @@ +```dart +import 'package:dart_appwrite/dart_appwrite.dart'; +import 'package:dart_appwrite/enums.dart' as enums; + +Client client = Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('') // Your project ID + .setKey(''); // Your secret API key + +VectorsDB vectorsDB = VectorsDB(client); + +Index result = await vectorsDB.createIndex( + databaseId: '', + collectionId: '', + key: '', + type: enums.VectorsDBIndexType.hnswEuclidean, + attributes: [], + orders: [enums.OrderBy.asc], // (optional) + lengths: [], // (optional) +); +``` diff --git a/examples/1.9.x/server-dart/examples/vectorsdb/create-operations.md b/examples/1.9.x/server-dart/examples/vectorsdb/create-operations.md new file mode 100644 index 000000000..2736f79e3 --- /dev/null +++ b/examples/1.9.x/server-dart/examples/vectorsdb/create-operations.md @@ -0,0 +1,25 @@ +```dart +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('') // Your project ID + .setKey(''); // Your secret API key + +VectorsDB vectorsDB = VectorsDB(client); + +Transaction result = await vectorsDB.createOperations( + transactionId: '', + operations: [ + { + "action": "create", + "databaseId": "", + "collectionId": "", + "documentId": "", + "data": { + "name": "Walter O'Brien" + } + } + ], // (optional) +); +``` diff --git a/examples/1.9.x/server-dart/examples/vectorsdb/create-query.md b/examples/1.9.x/server-dart/examples/vectorsdb/create-query.md new file mode 100644 index 000000000..f94dd3236 --- /dev/null +++ b/examples/1.9.x/server-dart/examples/vectorsdb/create-query.md @@ -0,0 +1,19 @@ +```dart +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('') // Your project ID + .setSession(''); // The user session to authenticate with + +VectorsDB vectorsDB = VectorsDB(client); + +DocumentList result = await vectorsDB.createQuery( + databaseId: '', + collectionId: '', + queries: [], // (optional) + transactionId: '', // (optional) + total: false, // (optional) + ttl: 0, // (optional) +); +``` diff --git a/examples/1.9.x/server-dart/examples/vectorsdb/create-text-embeddings.md b/examples/1.9.x/server-dart/examples/vectorsdb/create-text-embeddings.md new file mode 100644 index 000000000..abc69919b --- /dev/null +++ b/examples/1.9.x/server-dart/examples/vectorsdb/create-text-embeddings.md @@ -0,0 +1,16 @@ +```dart +import 'package:dart_appwrite/dart_appwrite.dart'; +import 'package:dart_appwrite/enums.dart' as enums; + +Client client = Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('') // Your project ID + .setKey(''); // Your secret API key + +VectorsDB vectorsDB = VectorsDB(client); + +EmbeddingList result = await vectorsDB.createTextEmbeddings( + texts: [], + model: enums.EmbeddingModel.nomicEmbedText, // (optional) +); +``` diff --git a/examples/1.9.x/server-dart/examples/vectorsdb/create-transaction.md b/examples/1.9.x/server-dart/examples/vectorsdb/create-transaction.md new file mode 100644 index 000000000..a049d5e72 --- /dev/null +++ b/examples/1.9.x/server-dart/examples/vectorsdb/create-transaction.md @@ -0,0 +1,14 @@ +```dart +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('') // Your project ID + .setKey(''); // Your secret API key + +VectorsDB vectorsDB = VectorsDB(client); + +Transaction result = await vectorsDB.createTransaction( + ttl: 60, // (optional) +); +``` diff --git a/examples/1.9.x/server-dart/examples/vectorsdb/create.md b/examples/1.9.x/server-dart/examples/vectorsdb/create.md new file mode 100644 index 000000000..2db7faa4e --- /dev/null +++ b/examples/1.9.x/server-dart/examples/vectorsdb/create.md @@ -0,0 +1,16 @@ +```dart +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('') // Your project ID + .setKey(''); // Your secret API key + +VectorsDB vectorsDB = VectorsDB(client); + +Database result = await vectorsDB.create( + databaseId: '', + name: '', + enabled: false, // (optional) +); +``` diff --git a/examples/1.9.x/server-dart/examples/vectorsdb/delete-collection.md b/examples/1.9.x/server-dart/examples/vectorsdb/delete-collection.md new file mode 100644 index 000000000..ff7b73c44 --- /dev/null +++ b/examples/1.9.x/server-dart/examples/vectorsdb/delete-collection.md @@ -0,0 +1,15 @@ +```dart +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('') // Your project ID + .setKey(''); // Your secret API key + +VectorsDB vectorsDB = VectorsDB(client); + +await vectorsDB.deleteCollection( + databaseId: '', + collectionId: '', +); +``` diff --git a/examples/1.9.x/server-dart/examples/vectorsdb/delete-document.md b/examples/1.9.x/server-dart/examples/vectorsdb/delete-document.md new file mode 100644 index 000000000..b0ecb3758 --- /dev/null +++ b/examples/1.9.x/server-dart/examples/vectorsdb/delete-document.md @@ -0,0 +1,17 @@ +```dart +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('') // Your project ID + .setSession(''); // The user session to authenticate with + +VectorsDB vectorsDB = VectorsDB(client); + +await vectorsDB.deleteDocument( + databaseId: '', + collectionId: '', + documentId: '', + transactionId: '', // (optional) +); +``` diff --git a/examples/1.9.x/server-dart/examples/vectorsdb/delete-documents.md b/examples/1.9.x/server-dart/examples/vectorsdb/delete-documents.md new file mode 100644 index 000000000..a2d7b1f9d --- /dev/null +++ b/examples/1.9.x/server-dart/examples/vectorsdb/delete-documents.md @@ -0,0 +1,17 @@ +```dart +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('') // Your project ID + .setKey(''); // Your secret API key + +VectorsDB vectorsDB = VectorsDB(client); + +await vectorsDB.deleteDocuments( + databaseId: '', + collectionId: '', + queries: [], // (optional) + transactionId: '', // (optional) +); +``` diff --git a/examples/1.9.x/server-dart/examples/vectorsdb/delete-index.md b/examples/1.9.x/server-dart/examples/vectorsdb/delete-index.md new file mode 100644 index 000000000..70f36332a --- /dev/null +++ b/examples/1.9.x/server-dart/examples/vectorsdb/delete-index.md @@ -0,0 +1,16 @@ +```dart +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('') // Your project ID + .setKey(''); // Your secret API key + +VectorsDB vectorsDB = VectorsDB(client); + +await vectorsDB.deleteIndex( + databaseId: '', + collectionId: '', + key: '', +); +``` diff --git a/examples/1.9.x/server-dart/examples/vectorsdb/delete-transaction.md b/examples/1.9.x/server-dart/examples/vectorsdb/delete-transaction.md new file mode 100644 index 000000000..c8d2d9734 --- /dev/null +++ b/examples/1.9.x/server-dart/examples/vectorsdb/delete-transaction.md @@ -0,0 +1,14 @@ +```dart +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('') // Your project ID + .setKey(''); // Your secret API key + +VectorsDB vectorsDB = VectorsDB(client); + +await vectorsDB.deleteTransaction( + transactionId: '', +); +``` diff --git a/examples/1.9.x/server-dart/examples/vectorsdb/delete.md b/examples/1.9.x/server-dart/examples/vectorsdb/delete.md new file mode 100644 index 000000000..889f599ac --- /dev/null +++ b/examples/1.9.x/server-dart/examples/vectorsdb/delete.md @@ -0,0 +1,14 @@ +```dart +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('') // Your project ID + .setKey(''); // Your secret API key + +VectorsDB vectorsDB = VectorsDB(client); + +await vectorsDB.delete( + databaseId: '', +); +``` diff --git a/examples/1.9.x/server-dart/examples/vectorsdb/get-collection.md b/examples/1.9.x/server-dart/examples/vectorsdb/get-collection.md new file mode 100644 index 000000000..8fe629229 --- /dev/null +++ b/examples/1.9.x/server-dart/examples/vectorsdb/get-collection.md @@ -0,0 +1,15 @@ +```dart +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('') // Your project ID + .setKey(''); // Your secret API key + +VectorsDB vectorsDB = VectorsDB(client); + +VectorsdbCollection result = await vectorsDB.getCollection( + databaseId: '', + collectionId: '', +); +``` diff --git a/examples/1.9.x/server-dart/examples/vectorsdb/get-document.md b/examples/1.9.x/server-dart/examples/vectorsdb/get-document.md new file mode 100644 index 000000000..f6e88e0be --- /dev/null +++ b/examples/1.9.x/server-dart/examples/vectorsdb/get-document.md @@ -0,0 +1,18 @@ +```dart +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('') // Your project ID + .setSession(''); // The user session to authenticate with + +VectorsDB vectorsDB = VectorsDB(client); + +Document result = await vectorsDB.getDocument( + databaseId: '', + collectionId: '', + documentId: '', + queries: [], // (optional) + transactionId: '', // (optional) +); +``` diff --git a/examples/1.9.x/server-dart/examples/vectorsdb/get-index.md b/examples/1.9.x/server-dart/examples/vectorsdb/get-index.md new file mode 100644 index 000000000..6eef0e867 --- /dev/null +++ b/examples/1.9.x/server-dart/examples/vectorsdb/get-index.md @@ -0,0 +1,16 @@ +```dart +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('') // Your project ID + .setKey(''); // Your secret API key + +VectorsDB vectorsDB = VectorsDB(client); + +Index result = await vectorsDB.getIndex( + databaseId: '', + collectionId: '', + key: '', +); +``` diff --git a/examples/1.9.x/server-dart/examples/vectorsdb/get-transaction.md b/examples/1.9.x/server-dart/examples/vectorsdb/get-transaction.md new file mode 100644 index 000000000..513d4997e --- /dev/null +++ b/examples/1.9.x/server-dart/examples/vectorsdb/get-transaction.md @@ -0,0 +1,14 @@ +```dart +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('') // Your project ID + .setKey(''); // Your secret API key + +VectorsDB vectorsDB = VectorsDB(client); + +Transaction result = await vectorsDB.getTransaction( + transactionId: '', +); +``` diff --git a/examples/1.9.x/server-dart/examples/vectorsdb/get.md b/examples/1.9.x/server-dart/examples/vectorsdb/get.md new file mode 100644 index 000000000..6498956a7 --- /dev/null +++ b/examples/1.9.x/server-dart/examples/vectorsdb/get.md @@ -0,0 +1,14 @@ +```dart +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('') // Your project ID + .setKey(''); // Your secret API key + +VectorsDB vectorsDB = VectorsDB(client); + +Database result = await vectorsDB.get( + databaseId: '', +); +``` diff --git a/examples/1.9.x/server-dart/examples/vectorsdb/list-collections.md b/examples/1.9.x/server-dart/examples/vectorsdb/list-collections.md new file mode 100644 index 000000000..ae03da41e --- /dev/null +++ b/examples/1.9.x/server-dart/examples/vectorsdb/list-collections.md @@ -0,0 +1,17 @@ +```dart +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('') // Your project ID + .setKey(''); // Your secret API key + +VectorsDB vectorsDB = VectorsDB(client); + +VectorsdbCollectionList result = await vectorsDB.listCollections( + databaseId: '', + queries: [], // (optional) + search: '', // (optional) + total: false, // (optional) +); +``` diff --git a/examples/1.9.x/server-dart/examples/vectorsdb/list-documents.md b/examples/1.9.x/server-dart/examples/vectorsdb/list-documents.md new file mode 100644 index 000000000..596a4c0c4 --- /dev/null +++ b/examples/1.9.x/server-dart/examples/vectorsdb/list-documents.md @@ -0,0 +1,19 @@ +```dart +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('') // Your project ID + .setSession(''); // The user session to authenticate with + +VectorsDB vectorsDB = VectorsDB(client); + +DocumentList result = await vectorsDB.listDocuments( + databaseId: '', + collectionId: '', + queries: [], // (optional) + transactionId: '', // (optional) + total: false, // (optional) + ttl: 0, // (optional) +); +``` diff --git a/examples/1.9.x/server-dart/examples/vectorsdb/list-indexes.md b/examples/1.9.x/server-dart/examples/vectorsdb/list-indexes.md new file mode 100644 index 000000000..756abd4a9 --- /dev/null +++ b/examples/1.9.x/server-dart/examples/vectorsdb/list-indexes.md @@ -0,0 +1,17 @@ +```dart +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('') // Your project ID + .setKey(''); // Your secret API key + +VectorsDB vectorsDB = VectorsDB(client); + +IndexList result = await vectorsDB.listIndexes( + databaseId: '', + collectionId: '', + queries: [], // (optional) + total: false, // (optional) +); +``` diff --git a/examples/1.9.x/server-dart/examples/vectorsdb/list-transactions.md b/examples/1.9.x/server-dart/examples/vectorsdb/list-transactions.md new file mode 100644 index 000000000..eb5058755 --- /dev/null +++ b/examples/1.9.x/server-dart/examples/vectorsdb/list-transactions.md @@ -0,0 +1,14 @@ +```dart +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('') // Your project ID + .setKey(''); // Your secret API key + +VectorsDB vectorsDB = VectorsDB(client); + +TransactionList result = await vectorsDB.listTransactions( + queries: [], // (optional) +); +``` diff --git a/examples/1.9.x/server-dart/examples/vectorsdb/list.md b/examples/1.9.x/server-dart/examples/vectorsdb/list.md new file mode 100644 index 000000000..b257c3843 --- /dev/null +++ b/examples/1.9.x/server-dart/examples/vectorsdb/list.md @@ -0,0 +1,16 @@ +```dart +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('') // Your project ID + .setKey(''); // Your secret API key + +VectorsDB vectorsDB = VectorsDB(client); + +DatabaseList result = await vectorsDB.list( + queries: [], // (optional) + search: '', // (optional) + total: false, // (optional) +); +``` diff --git a/examples/1.9.x/server-dart/examples/vectorsdb/update-collection.md b/examples/1.9.x/server-dart/examples/vectorsdb/update-collection.md new file mode 100644 index 000000000..e7e90abe7 --- /dev/null +++ b/examples/1.9.x/server-dart/examples/vectorsdb/update-collection.md @@ -0,0 +1,22 @@ +```dart +import 'package:dart_appwrite/dart_appwrite.dart'; +import 'package:dart_appwrite/permission.dart'; +import 'package:dart_appwrite/role.dart'; + +Client client = Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('') // Your project ID + .setKey(''); // Your secret API key + +VectorsDB vectorsDB = VectorsDB(client); + +VectorsdbCollection result = await vectorsDB.updateCollection( + databaseId: '', + collectionId: '', + name: '', + dimension: 1, // (optional) + permissions: [Permission.read(Role.any())], // (optional) + documentSecurity: false, // (optional) + enabled: false, // (optional) +); +``` diff --git a/examples/1.9.x/server-dart/examples/vectorsdb/update-document.md b/examples/1.9.x/server-dart/examples/vectorsdb/update-document.md new file mode 100644 index 000000000..eac35a967 --- /dev/null +++ b/examples/1.9.x/server-dart/examples/vectorsdb/update-document.md @@ -0,0 +1,21 @@ +```dart +import 'package:dart_appwrite/dart_appwrite.dart'; +import 'package:dart_appwrite/permission.dart'; +import 'package:dart_appwrite/role.dart'; + +Client client = Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('') // Your project ID + .setSession(''); // The user session to authenticate with + +VectorsDB vectorsDB = VectorsDB(client); + +Document result = await vectorsDB.updateDocument( + databaseId: '', + collectionId: '', + documentId: '', + data: {}, // (optional) + permissions: [Permission.read(Role.any())], // (optional) + transactionId: '', // (optional) +); +``` diff --git a/examples/1.9.x/server-dart/examples/vectorsdb/update-documents.md b/examples/1.9.x/server-dart/examples/vectorsdb/update-documents.md new file mode 100644 index 000000000..221a5bc91 --- /dev/null +++ b/examples/1.9.x/server-dart/examples/vectorsdb/update-documents.md @@ -0,0 +1,18 @@ +```dart +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('') // Your project ID + .setKey(''); // Your secret API key + +VectorsDB vectorsDB = VectorsDB(client); + +DocumentList result = await vectorsDB.updateDocuments( + databaseId: '', + collectionId: '', + data: {}, // (optional) + queries: [], // (optional) + transactionId: '', // (optional) +); +``` diff --git a/examples/1.9.x/server-dart/examples/vectorsdb/update-transaction.md b/examples/1.9.x/server-dart/examples/vectorsdb/update-transaction.md new file mode 100644 index 000000000..dd08d5cdb --- /dev/null +++ b/examples/1.9.x/server-dart/examples/vectorsdb/update-transaction.md @@ -0,0 +1,16 @@ +```dart +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('') // Your project ID + .setKey(''); // Your secret API key + +VectorsDB vectorsDB = VectorsDB(client); + +Transaction result = await vectorsDB.updateTransaction( + transactionId: '', + commit: false, // (optional) + rollback: false, // (optional) +); +``` diff --git a/examples/1.9.x/server-dart/examples/vectorsdb/update.md b/examples/1.9.x/server-dart/examples/vectorsdb/update.md new file mode 100644 index 000000000..113ed7bc0 --- /dev/null +++ b/examples/1.9.x/server-dart/examples/vectorsdb/update.md @@ -0,0 +1,16 @@ +```dart +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('') // Your project ID + .setKey(''); // Your secret API key + +VectorsDB vectorsDB = VectorsDB(client); + +Database result = await vectorsDB.update( + databaseId: '', + name: '', + enabled: false, // (optional) +); +``` diff --git a/examples/1.9.x/server-dart/examples/vectorsdb/upsert-document.md b/examples/1.9.x/server-dart/examples/vectorsdb/upsert-document.md new file mode 100644 index 000000000..65f7f2bd8 --- /dev/null +++ b/examples/1.9.x/server-dart/examples/vectorsdb/upsert-document.md @@ -0,0 +1,21 @@ +```dart +import 'package:dart_appwrite/dart_appwrite.dart'; +import 'package:dart_appwrite/permission.dart'; +import 'package:dart_appwrite/role.dart'; + +Client client = Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('') // Your project ID + .setSession(''); // The user session to authenticate with + +VectorsDB vectorsDB = VectorsDB(client); + +Document result = await vectorsDB.upsertDocument( + databaseId: '', + collectionId: '', + documentId: '', + data: {}, // (optional) + permissions: [Permission.read(Role.any())], // (optional) + transactionId: '', // (optional) +); +``` diff --git a/examples/1.9.x/server-dart/examples/vectorsdb/upsert-documents.md b/examples/1.9.x/server-dart/examples/vectorsdb/upsert-documents.md new file mode 100644 index 000000000..d6bd3309a --- /dev/null +++ b/examples/1.9.x/server-dart/examples/vectorsdb/upsert-documents.md @@ -0,0 +1,17 @@ +```dart +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('') // Your project ID + .setKey(''); // Your secret API key + +VectorsDB vectorsDB = VectorsDB(client); + +DocumentList result = await vectorsDB.upsertDocuments( + databaseId: '', + collectionId: '', + documents: [], + transactionId: '', // (optional) +); +``` diff --git a/examples/1.9.x/server-dotnet/examples/apps/create-installation-token.md b/examples/1.9.x/server-dotnet/examples/apps/create-installation-token.md new file mode 100644 index 000000000..9205d2890 --- /dev/null +++ b/examples/1.9.x/server-dotnet/examples/apps/create-installation-token.md @@ -0,0 +1,16 @@ +```csharp +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("") // Your project ID + .SetKey(""); // Your secret API key + +Apps apps = new Apps(client); + +Oauth2Token result = await apps.CreateInstallationToken( + appId: "", + installationId: "" +);``` diff --git a/examples/1.9.x/server-dotnet/examples/apps/create-key.md b/examples/1.9.x/server-dotnet/examples/apps/create-key.md new file mode 100644 index 000000000..e80895913 --- /dev/null +++ b/examples/1.9.x/server-dotnet/examples/apps/create-key.md @@ -0,0 +1,15 @@ +```csharp +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("") // Your project ID + .SetSession(""); // The user session to authenticate with + +Apps apps = new Apps(client); + +AppKey result = await apps.CreateKey( + appId: "" +);``` diff --git a/examples/1.9.x/server-dotnet/examples/apps/create-secret.md b/examples/1.9.x/server-dotnet/examples/apps/create-secret.md new file mode 100644 index 000000000..d52042903 --- /dev/null +++ b/examples/1.9.x/server-dotnet/examples/apps/create-secret.md @@ -0,0 +1,15 @@ +```csharp +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("") // Your project ID + .SetSession(""); // The user session to authenticate with + +Apps apps = new Apps(client); + +AppSecretPlaintext result = await apps.CreateSecret( + appId: "" +);``` diff --git a/examples/1.9.x/server-dotnet/examples/apps/create.md b/examples/1.9.x/server-dotnet/examples/apps/create.md new file mode 100644 index 000000000..596b31cc0 --- /dev/null +++ b/examples/1.9.x/server-dotnet/examples/apps/create.md @@ -0,0 +1,33 @@ +```csharp +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("") // Your project ID + .SetSession(""); // The user session to authenticate with + +Apps apps = new Apps(client); + +App result = await apps.Create( + appId: "", + name: "", + redirectUris: new List(), + description: "", // optional + clientUri: "https://example.com", // optional + logoUri: "https://example.com", // optional + privacyPolicyUrl: "https://example.com", // optional + termsUrl: "https://example.com", // optional + contacts: new List(), // optional + tagline: "", // optional + tags: new List(), // optional + images: new List(), // optional + supportUrl: "https://example.com", // optional + dataDeletionUrl: "https://example.com", // optional + postLogoutRedirectUris: new List(), // optional + enabled: false, // optional + type: "public", // optional + deviceFlow: false, // optional + teamId: "" // optional +);``` diff --git a/examples/1.9.x/server-dotnet/examples/apps/delete-key.md b/examples/1.9.x/server-dotnet/examples/apps/delete-key.md new file mode 100644 index 000000000..352e036f8 --- /dev/null +++ b/examples/1.9.x/server-dotnet/examples/apps/delete-key.md @@ -0,0 +1,16 @@ +```csharp +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("") // Your project ID + .SetSession(""); // The user session to authenticate with + +Apps apps = new Apps(client); + +await apps.DeleteKey( + appId: "", + keyId: "" +);``` diff --git a/examples/1.9.x/server-dotnet/examples/apps/delete-secret.md b/examples/1.9.x/server-dotnet/examples/apps/delete-secret.md new file mode 100644 index 000000000..c97148a7d --- /dev/null +++ b/examples/1.9.x/server-dotnet/examples/apps/delete-secret.md @@ -0,0 +1,16 @@ +```csharp +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("") // Your project ID + .SetSession(""); // The user session to authenticate with + +Apps apps = new Apps(client); + +await apps.DeleteSecret( + appId: "", + secretId: "" +);``` diff --git a/examples/1.9.x/server-dotnet/examples/apps/delete-tokens.md b/examples/1.9.x/server-dotnet/examples/apps/delete-tokens.md new file mode 100644 index 000000000..ebe444be7 --- /dev/null +++ b/examples/1.9.x/server-dotnet/examples/apps/delete-tokens.md @@ -0,0 +1,15 @@ +```csharp +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("") // Your project ID + .SetSession(""); // The user session to authenticate with + +Apps apps = new Apps(client); + +await apps.DeleteTokens( + appId: "" +);``` diff --git a/examples/1.9.x/server-dotnet/examples/apps/delete.md b/examples/1.9.x/server-dotnet/examples/apps/delete.md new file mode 100644 index 000000000..0942bb2f3 --- /dev/null +++ b/examples/1.9.x/server-dotnet/examples/apps/delete.md @@ -0,0 +1,15 @@ +```csharp +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("") // Your project ID + .SetSession(""); // The user session to authenticate with + +Apps apps = new Apps(client); + +await apps.Delete( + appId: "" +);``` diff --git a/examples/1.9.x/server-dotnet/examples/apps/get-installation.md b/examples/1.9.x/server-dotnet/examples/apps/get-installation.md new file mode 100644 index 000000000..1a353ec11 --- /dev/null +++ b/examples/1.9.x/server-dotnet/examples/apps/get-installation.md @@ -0,0 +1,16 @@ +```csharp +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("") // Your project ID + .SetKey(""); // Your secret API key + +Apps apps = new Apps(client); + +AppInstallation result = await apps.GetInstallation( + appId: "", + installationId: "" +);``` diff --git a/examples/1.9.x/server-dotnet/examples/apps/get-key.md b/examples/1.9.x/server-dotnet/examples/apps/get-key.md new file mode 100644 index 000000000..17adf20f3 --- /dev/null +++ b/examples/1.9.x/server-dotnet/examples/apps/get-key.md @@ -0,0 +1,16 @@ +```csharp +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("") // Your project ID + .SetSession(""); // The user session to authenticate with + +Apps apps = new Apps(client); + +AppKey result = await apps.GetKey( + appId: "", + keyId: "" +);``` diff --git a/examples/1.9.x/server-dotnet/examples/apps/get-secret.md b/examples/1.9.x/server-dotnet/examples/apps/get-secret.md new file mode 100644 index 000000000..3e8b99253 --- /dev/null +++ b/examples/1.9.x/server-dotnet/examples/apps/get-secret.md @@ -0,0 +1,16 @@ +```csharp +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("") // Your project ID + .SetSession(""); // The user session to authenticate with + +Apps apps = new Apps(client); + +AppSecret result = await apps.GetSecret( + appId: "", + secretId: "" +);``` diff --git a/examples/1.9.x/server-dotnet/examples/apps/get.md b/examples/1.9.x/server-dotnet/examples/apps/get.md new file mode 100644 index 000000000..a9ee6a0f3 --- /dev/null +++ b/examples/1.9.x/server-dotnet/examples/apps/get.md @@ -0,0 +1,15 @@ +```csharp +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("") // Your project ID + .SetSession(""); // The user session to authenticate with + +Apps apps = new Apps(client); + +App result = await apps.Get( + appId: "" +);``` diff --git a/examples/1.9.x/server-dotnet/examples/apps/list-installation-scopes.md b/examples/1.9.x/server-dotnet/examples/apps/list-installation-scopes.md new file mode 100644 index 000000000..72aaa4fa8 --- /dev/null +++ b/examples/1.9.x/server-dotnet/examples/apps/list-installation-scopes.md @@ -0,0 +1,14 @@ +```csharp +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("") // Your project ID + .SetSession(""); // The user session to authenticate with + +Apps apps = new Apps(client); + +AppScopeList result = await apps.ListInstallationScopes(); +``` diff --git a/examples/1.9.x/server-dotnet/examples/apps/list-installations.md b/examples/1.9.x/server-dotnet/examples/apps/list-installations.md new file mode 100644 index 000000000..fbb59ab0a --- /dev/null +++ b/examples/1.9.x/server-dotnet/examples/apps/list-installations.md @@ -0,0 +1,17 @@ +```csharp +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("") // Your project ID + .SetKey(""); // Your secret API key + +Apps apps = new Apps(client); + +AppInstallationList result = await apps.ListInstallations( + appId: "", + queries: new List(), // optional + total: false // optional +);``` diff --git a/examples/1.9.x/server-dotnet/examples/apps/list-keys.md b/examples/1.9.x/server-dotnet/examples/apps/list-keys.md new file mode 100644 index 000000000..6d164d32b --- /dev/null +++ b/examples/1.9.x/server-dotnet/examples/apps/list-keys.md @@ -0,0 +1,17 @@ +```csharp +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("") // Your project ID + .SetSession(""); // The user session to authenticate with + +Apps apps = new Apps(client); + +AppKeyList result = await apps.ListKeys( + appId: "", + queries: new List(), // optional + total: false // optional +);``` diff --git a/examples/1.9.x/server-dotnet/examples/apps/list-o-auth-2-scopes.md b/examples/1.9.x/server-dotnet/examples/apps/list-o-auth-2-scopes.md new file mode 100644 index 000000000..f93821342 --- /dev/null +++ b/examples/1.9.x/server-dotnet/examples/apps/list-o-auth-2-scopes.md @@ -0,0 +1,14 @@ +```csharp +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("") // Your project ID + .SetSession(""); // The user session to authenticate with + +Apps apps = new Apps(client); + +AppScopeList result = await apps.ListOAuth2Scopes(); +``` diff --git a/examples/1.9.x/server-dotnet/examples/apps/list-secrets.md b/examples/1.9.x/server-dotnet/examples/apps/list-secrets.md new file mode 100644 index 000000000..fe3940264 --- /dev/null +++ b/examples/1.9.x/server-dotnet/examples/apps/list-secrets.md @@ -0,0 +1,17 @@ +```csharp +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("") // Your project ID + .SetSession(""); // The user session to authenticate with + +Apps apps = new Apps(client); + +AppSecretList result = await apps.ListSecrets( + appId: "", + queries: new List(), // optional + total: false // optional +);``` diff --git a/examples/1.9.x/server-dotnet/examples/apps/list.md b/examples/1.9.x/server-dotnet/examples/apps/list.md new file mode 100644 index 000000000..1dffb6a08 --- /dev/null +++ b/examples/1.9.x/server-dotnet/examples/apps/list.md @@ -0,0 +1,16 @@ +```csharp +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("") // Your project ID + .SetSession(""); // The user session to authenticate with + +Apps apps = new Apps(client); + +AppsList result = await apps.List( + queries: new List(), // optional + total: false // optional +);``` diff --git a/examples/1.9.x/server-dotnet/examples/apps/update-labels.md b/examples/1.9.x/server-dotnet/examples/apps/update-labels.md new file mode 100644 index 000000000..ac99b7b83 --- /dev/null +++ b/examples/1.9.x/server-dotnet/examples/apps/update-labels.md @@ -0,0 +1,16 @@ +```csharp +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("") // Your project ID + .SetKey(""); // Your secret API key + +Apps apps = new Apps(client); + +App result = await apps.UpdateLabels( + appId: "", + labels: new List() +);``` diff --git a/examples/1.9.x/server-dotnet/examples/apps/update-team.md b/examples/1.9.x/server-dotnet/examples/apps/update-team.md new file mode 100644 index 000000000..180843387 --- /dev/null +++ b/examples/1.9.x/server-dotnet/examples/apps/update-team.md @@ -0,0 +1,16 @@ +```csharp +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("") // Your project ID + .SetSession(""); // The user session to authenticate with + +Apps apps = new Apps(client); + +App result = await apps.UpdateTeam( + appId: "", + teamId: "" +);``` diff --git a/examples/1.9.x/server-dotnet/examples/apps/update.md b/examples/1.9.x/server-dotnet/examples/apps/update.md new file mode 100644 index 000000000..d6af16a98 --- /dev/null +++ b/examples/1.9.x/server-dotnet/examples/apps/update.md @@ -0,0 +1,34 @@ +```csharp +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("") // Your project ID + .SetSession(""); // The user session to authenticate with + +Apps apps = new Apps(client); + +App result = await apps.Update( + appId: "", + name: "", + description: "", // optional + clientUri: "https://example.com", // optional + logoUri: "https://example.com", // optional + privacyPolicyUrl: "https://example.com", // optional + termsUrl: "https://example.com", // optional + contacts: new List(), // optional + tagline: "", // optional + tags: new List(), // optional + images: new List(), // optional + supportUrl: "https://example.com", // optional + dataDeletionUrl: "https://example.com", // optional + enabled: false, // optional + redirectUris: new List(), // optional + postLogoutRedirectUris: new List(), // optional + type: "public", // optional + deviceFlow: false, // optional + installationScopes: new List(), // optional + installationRedirectUrl: "https://example.com" // optional +);``` diff --git a/examples/1.9.x/server-dotnet/examples/documentsdb/create-collection.md b/examples/1.9.x/server-dotnet/examples/documentsdb/create-collection.md new file mode 100644 index 000000000..1335a533f --- /dev/null +++ b/examples/1.9.x/server-dotnet/examples/documentsdb/create-collection.md @@ -0,0 +1,22 @@ +```csharp +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("") // Your project ID + .SetKey(""); // Your secret API key + +DocumentsDB documentsDB = new DocumentsDB(client); + +Collection result = await documentsDB.CreateCollection( + databaseId: "", + collectionId: "", + name: "", + permissions: new List { Permission.Read(Role.Any()) }, // optional + documentSecurity: false, // optional + enabled: false, // optional + attributes: new List(), // optional + indexes: new List() // optional +);``` diff --git a/examples/1.9.x/server-dotnet/examples/documentsdb/create-document.md b/examples/1.9.x/server-dotnet/examples/documentsdb/create-document.md new file mode 100644 index 000000000..609192579 --- /dev/null +++ b/examples/1.9.x/server-dotnet/examples/documentsdb/create-document.md @@ -0,0 +1,25 @@ +```csharp +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("") // Your project ID + .SetSession(""); // The user session to authenticate with + +DocumentsDB documentsDB = new DocumentsDB(client); + +Document result = await documentsDB.CreateDocument( + databaseId: "", + collectionId: "", + documentId: "", + data: new { + username = "walter.obrien", + email = "walter.obrien@example.com", + fullName = "Walter O'Brien", + age = 30, + isAdmin = false + }, + permissions: new List { Permission.Read(Role.Any()) } // optional +);``` diff --git a/examples/1.9.x/server-dotnet/examples/documentsdb/create-documents.md b/examples/1.9.x/server-dotnet/examples/documentsdb/create-documents.md new file mode 100644 index 000000000..ee9a23955 --- /dev/null +++ b/examples/1.9.x/server-dotnet/examples/documentsdb/create-documents.md @@ -0,0 +1,17 @@ +```csharp +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("") // Your project ID + .SetSession(""); // The user session to authenticate with + +DocumentsDB documentsDB = new DocumentsDB(client); + +DocumentList result = await documentsDB.CreateDocuments( + databaseId: "", + collectionId: "", + documents: new List() +);``` diff --git a/examples/1.9.x/server-dotnet/examples/documentsdb/create-index.md b/examples/1.9.x/server-dotnet/examples/documentsdb/create-index.md new file mode 100644 index 000000000..6abfd50db --- /dev/null +++ b/examples/1.9.x/server-dotnet/examples/documentsdb/create-index.md @@ -0,0 +1,22 @@ +```csharp +using Appwrite; +using Appwrite.Enums; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("") // Your project ID + .SetKey(""); // Your secret API key + +DocumentsDB documentsDB = new DocumentsDB(client); + +Index result = await documentsDB.CreateIndex( + databaseId: "", + collectionId: "", + key: "", + type: DocumentsDBIndexType.Key, + attributes: new List(), + orders: new List<OrderBy> { OrderBy.Asc }, // optional + lengths: new List() // optional +);``` diff --git a/examples/1.9.x/server-dotnet/examples/documentsdb/create-operations.md b/examples/1.9.x/server-dotnet/examples/documentsdb/create-operations.md new file mode 100644 index 000000000..cd2158fe4 --- /dev/null +++ b/examples/1.9.x/server-dotnet/examples/documentsdb/create-operations.md @@ -0,0 +1,26 @@ +```csharp +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("") // Your project ID + .SetKey(""); // Your secret API key + +DocumentsDB documentsDB = new DocumentsDB(client); + +Transaction result = await documentsDB.CreateOperations( + transactionId: "", + operations: [ + { + "action": "create", + "databaseId": "", + "collectionId": "", + "documentId": "", + "data": { + "name": "Walter O'Brien" + } + } + ] // optional +);``` diff --git a/examples/1.9.x/server-dotnet/examples/documentsdb/create-transaction.md b/examples/1.9.x/server-dotnet/examples/documentsdb/create-transaction.md new file mode 100644 index 000000000..4a2efa43e --- /dev/null +++ b/examples/1.9.x/server-dotnet/examples/documentsdb/create-transaction.md @@ -0,0 +1,15 @@ +```csharp +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("") // Your project ID + .SetKey(""); // Your secret API key + +DocumentsDB documentsDB = new DocumentsDB(client); + +Transaction result = await documentsDB.CreateTransaction( + ttl: 60 // optional +);``` diff --git a/examples/1.9.x/server-dotnet/examples/documentsdb/create.md b/examples/1.9.x/server-dotnet/examples/documentsdb/create.md new file mode 100644 index 000000000..f9f756893 --- /dev/null +++ b/examples/1.9.x/server-dotnet/examples/documentsdb/create.md @@ -0,0 +1,17 @@ +```csharp +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("") // Your project ID + .SetKey(""); // Your secret API key + +DocumentsDB documentsDB = new DocumentsDB(client); + +Database result = await documentsDB.Create( + databaseId: "", + name: "", + enabled: false // optional +);``` diff --git a/examples/1.9.x/server-dotnet/examples/documentsdb/decrement-document-attribute.md b/examples/1.9.x/server-dotnet/examples/documentsdb/decrement-document-attribute.md new file mode 100644 index 000000000..2b6f4d305 --- /dev/null +++ b/examples/1.9.x/server-dotnet/examples/documentsdb/decrement-document-attribute.md @@ -0,0 +1,21 @@ +```csharp +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("") // Your project ID + .SetSession(""); // The user session to authenticate with + +DocumentsDB documentsDB = new DocumentsDB(client); + +Document result = await documentsDB.DecrementDocumentAttribute( + databaseId: "", + collectionId: "", + documentId: "", + attribute: "", + value: 0, // optional + min: 0, // optional + transactionId: "" // optional +);``` diff --git a/examples/1.9.x/server-dotnet/examples/documentsdb/delete-collection.md b/examples/1.9.x/server-dotnet/examples/documentsdb/delete-collection.md new file mode 100644 index 000000000..e18d995dd --- /dev/null +++ b/examples/1.9.x/server-dotnet/examples/documentsdb/delete-collection.md @@ -0,0 +1,16 @@ +```csharp +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("") // Your project ID + .SetKey(""); // Your secret API key + +DocumentsDB documentsDB = new DocumentsDB(client); + +await documentsDB.DeleteCollection( + databaseId: "", + collectionId: "" +);``` diff --git a/examples/1.9.x/server-dotnet/examples/documentsdb/delete-document.md b/examples/1.9.x/server-dotnet/examples/documentsdb/delete-document.md new file mode 100644 index 000000000..535615b9c --- /dev/null +++ b/examples/1.9.x/server-dotnet/examples/documentsdb/delete-document.md @@ -0,0 +1,18 @@ +```csharp +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("") // Your project ID + .SetSession(""); // The user session to authenticate with + +DocumentsDB documentsDB = new DocumentsDB(client); + +await documentsDB.DeleteDocument( + databaseId: "", + collectionId: "", + documentId: "", + transactionId: "" // optional +);``` diff --git a/examples/1.9.x/server-dotnet/examples/documentsdb/delete-documents.md b/examples/1.9.x/server-dotnet/examples/documentsdb/delete-documents.md new file mode 100644 index 000000000..63516aae4 --- /dev/null +++ b/examples/1.9.x/server-dotnet/examples/documentsdb/delete-documents.md @@ -0,0 +1,18 @@ +```csharp +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("") // Your project ID + .SetKey(""); // Your secret API key + +DocumentsDB documentsDB = new DocumentsDB(client); + +await documentsDB.DeleteDocuments( + databaseId: "", + collectionId: "", + queries: new List(), // optional + transactionId: "" // optional +);``` diff --git a/examples/1.9.x/server-dotnet/examples/documentsdb/delete-index.md b/examples/1.9.x/server-dotnet/examples/documentsdb/delete-index.md new file mode 100644 index 000000000..713f50fdc --- /dev/null +++ b/examples/1.9.x/server-dotnet/examples/documentsdb/delete-index.md @@ -0,0 +1,17 @@ +```csharp +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("") // Your project ID + .SetKey(""); // Your secret API key + +DocumentsDB documentsDB = new DocumentsDB(client); + +await documentsDB.DeleteIndex( + databaseId: "", + collectionId: "", + key: "" +);``` diff --git a/examples/1.9.x/server-dotnet/examples/documentsdb/delete-transaction.md b/examples/1.9.x/server-dotnet/examples/documentsdb/delete-transaction.md new file mode 100644 index 000000000..cd48372b6 --- /dev/null +++ b/examples/1.9.x/server-dotnet/examples/documentsdb/delete-transaction.md @@ -0,0 +1,15 @@ +```csharp +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("") // Your project ID + .SetKey(""); // Your secret API key + +DocumentsDB documentsDB = new DocumentsDB(client); + +await documentsDB.DeleteTransaction( + transactionId: "" +);``` diff --git a/examples/1.9.x/server-dotnet/examples/documentsdb/delete.md b/examples/1.9.x/server-dotnet/examples/documentsdb/delete.md new file mode 100644 index 000000000..65eeaf835 --- /dev/null +++ b/examples/1.9.x/server-dotnet/examples/documentsdb/delete.md @@ -0,0 +1,15 @@ +```csharp +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("") // Your project ID + .SetKey(""); // Your secret API key + +DocumentsDB documentsDB = new DocumentsDB(client); + +await documentsDB.Delete( + databaseId: "" +);``` diff --git a/examples/1.9.x/server-dotnet/examples/documentsdb/get-collection.md b/examples/1.9.x/server-dotnet/examples/documentsdb/get-collection.md new file mode 100644 index 000000000..bf41939e3 --- /dev/null +++ b/examples/1.9.x/server-dotnet/examples/documentsdb/get-collection.md @@ -0,0 +1,16 @@ +```csharp +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("") // Your project ID + .SetKey(""); // Your secret API key + +DocumentsDB documentsDB = new DocumentsDB(client); + +Collection result = await documentsDB.GetCollection( + databaseId: "", + collectionId: "" +);``` diff --git a/examples/1.9.x/server-dotnet/examples/documentsdb/get-document.md b/examples/1.9.x/server-dotnet/examples/documentsdb/get-document.md new file mode 100644 index 000000000..d5bbe0f09 --- /dev/null +++ b/examples/1.9.x/server-dotnet/examples/documentsdb/get-document.md @@ -0,0 +1,19 @@ +```csharp +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("") // Your project ID + .SetSession(""); // The user session to authenticate with + +DocumentsDB documentsDB = new DocumentsDB(client); + +Document result = await documentsDB.GetDocument( + databaseId: "", + collectionId: "", + documentId: "", + queries: new List(), // optional + transactionId: "" // optional +);``` diff --git a/examples/1.9.x/server-dotnet/examples/documentsdb/get-index.md b/examples/1.9.x/server-dotnet/examples/documentsdb/get-index.md new file mode 100644 index 000000000..0b006b282 --- /dev/null +++ b/examples/1.9.x/server-dotnet/examples/documentsdb/get-index.md @@ -0,0 +1,17 @@ +```csharp +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("") // Your project ID + .SetKey(""); // Your secret API key + +DocumentsDB documentsDB = new DocumentsDB(client); + +Index result = await documentsDB.GetIndex( + databaseId: "", + collectionId: "", + key: "" +);``` diff --git a/examples/1.9.x/server-dotnet/examples/documentsdb/get-transaction.md b/examples/1.9.x/server-dotnet/examples/documentsdb/get-transaction.md new file mode 100644 index 000000000..d24bee71e --- /dev/null +++ b/examples/1.9.x/server-dotnet/examples/documentsdb/get-transaction.md @@ -0,0 +1,15 @@ +```csharp +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("") // Your project ID + .SetKey(""); // Your secret API key + +DocumentsDB documentsDB = new DocumentsDB(client); + +Transaction result = await documentsDB.GetTransaction( + transactionId: "" +);``` diff --git a/examples/1.9.x/server-dotnet/examples/documentsdb/get.md b/examples/1.9.x/server-dotnet/examples/documentsdb/get.md new file mode 100644 index 000000000..37d884a7c --- /dev/null +++ b/examples/1.9.x/server-dotnet/examples/documentsdb/get.md @@ -0,0 +1,15 @@ +```csharp +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("") // Your project ID + .SetKey(""); // Your secret API key + +DocumentsDB documentsDB = new DocumentsDB(client); + +Database result = await documentsDB.Get( + databaseId: "" +);``` diff --git a/examples/1.9.x/server-dotnet/examples/documentsdb/increment-document-attribute.md b/examples/1.9.x/server-dotnet/examples/documentsdb/increment-document-attribute.md new file mode 100644 index 000000000..c07238c6e --- /dev/null +++ b/examples/1.9.x/server-dotnet/examples/documentsdb/increment-document-attribute.md @@ -0,0 +1,21 @@ +```csharp +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("") // Your project ID + .SetSession(""); // The user session to authenticate with + +DocumentsDB documentsDB = new DocumentsDB(client); + +Document result = await documentsDB.IncrementDocumentAttribute( + databaseId: "", + collectionId: "", + documentId: "", + attribute: "", + value: 0, // optional + max: 0, // optional + transactionId: "" // optional +);``` diff --git a/examples/1.9.x/server-dotnet/examples/documentsdb/list-collections.md b/examples/1.9.x/server-dotnet/examples/documentsdb/list-collections.md new file mode 100644 index 000000000..958308ba9 --- /dev/null +++ b/examples/1.9.x/server-dotnet/examples/documentsdb/list-collections.md @@ -0,0 +1,18 @@ +```csharp +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("") // Your project ID + .SetKey(""); // Your secret API key + +DocumentsDB documentsDB = new DocumentsDB(client); + +CollectionList result = await documentsDB.ListCollections( + databaseId: "", + queries: new List(), // optional + search: "", // optional + total: false // optional +);``` diff --git a/examples/1.9.x/server-dotnet/examples/documentsdb/list-documents.md b/examples/1.9.x/server-dotnet/examples/documentsdb/list-documents.md new file mode 100644 index 000000000..44dadea06 --- /dev/null +++ b/examples/1.9.x/server-dotnet/examples/documentsdb/list-documents.md @@ -0,0 +1,20 @@ +```csharp +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("") // Your project ID + .SetSession(""); // The user session to authenticate with + +DocumentsDB documentsDB = new DocumentsDB(client); + +DocumentList result = await documentsDB.ListDocuments( + databaseId: "", + collectionId: "", + queries: new List(), // optional + transactionId: "", // optional + total: false, // optional + ttl: 0 // optional +);``` diff --git a/examples/1.9.x/server-dotnet/examples/documentsdb/list-indexes.md b/examples/1.9.x/server-dotnet/examples/documentsdb/list-indexes.md new file mode 100644 index 000000000..fdfc79606 --- /dev/null +++ b/examples/1.9.x/server-dotnet/examples/documentsdb/list-indexes.md @@ -0,0 +1,18 @@ +```csharp +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("") // Your project ID + .SetKey(""); // Your secret API key + +DocumentsDB documentsDB = new DocumentsDB(client); + +IndexList result = await documentsDB.ListIndexes( + databaseId: "", + collectionId: "", + queries: new List(), // optional + total: false // optional +);``` diff --git a/examples/1.9.x/server-dotnet/examples/documentsdb/list-transactions.md b/examples/1.9.x/server-dotnet/examples/documentsdb/list-transactions.md new file mode 100644 index 000000000..7db4c6822 --- /dev/null +++ b/examples/1.9.x/server-dotnet/examples/documentsdb/list-transactions.md @@ -0,0 +1,15 @@ +```csharp +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("") // Your project ID + .SetKey(""); // Your secret API key + +DocumentsDB documentsDB = new DocumentsDB(client); + +TransactionList result = await documentsDB.ListTransactions( + queries: new List() // optional +);``` diff --git a/examples/1.9.x/server-dotnet/examples/documentsdb/list.md b/examples/1.9.x/server-dotnet/examples/documentsdb/list.md new file mode 100644 index 000000000..73ab2edd9 --- /dev/null +++ b/examples/1.9.x/server-dotnet/examples/documentsdb/list.md @@ -0,0 +1,17 @@ +```csharp +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("") // Your project ID + .SetKey(""); // Your secret API key + +DocumentsDB documentsDB = new DocumentsDB(client); + +DatabaseList result = await documentsDB.List( + queries: new List(), // optional + search: "", // optional + total: false // optional +);``` diff --git a/examples/1.9.x/server-dotnet/examples/documentsdb/update-collection.md b/examples/1.9.x/server-dotnet/examples/documentsdb/update-collection.md new file mode 100644 index 000000000..50554c2a7 --- /dev/null +++ b/examples/1.9.x/server-dotnet/examples/documentsdb/update-collection.md @@ -0,0 +1,21 @@ +```csharp +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("") // Your project ID + .SetKey(""); // Your secret API key + +DocumentsDB documentsDB = new DocumentsDB(client); + +Collection result = await documentsDB.UpdateCollection( + databaseId: "", + collectionId: "", + name: "", + permissions: new List { Permission.Read(Role.Any()) }, // optional + documentSecurity: false, // optional + enabled: false, // optional + purge: false // optional +);``` diff --git a/examples/1.9.x/server-dotnet/examples/documentsdb/update-document.md b/examples/1.9.x/server-dotnet/examples/documentsdb/update-document.md new file mode 100644 index 000000000..3aa6be84c --- /dev/null +++ b/examples/1.9.x/server-dotnet/examples/documentsdb/update-document.md @@ -0,0 +1,20 @@ +```csharp +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("") // Your project ID + .SetSession(""); // The user session to authenticate with + +DocumentsDB documentsDB = new DocumentsDB(client); + +Document result = await documentsDB.UpdateDocument( + databaseId: "", + collectionId: "", + documentId: "", + data: [object], // optional + permissions: new List { Permission.Read(Role.Any()) }, // optional + transactionId: "" // optional +);``` diff --git a/examples/1.9.x/server-dotnet/examples/documentsdb/update-documents.md b/examples/1.9.x/server-dotnet/examples/documentsdb/update-documents.md new file mode 100644 index 000000000..85fda47f9 --- /dev/null +++ b/examples/1.9.x/server-dotnet/examples/documentsdb/update-documents.md @@ -0,0 +1,19 @@ +```csharp +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("") // Your project ID + .SetKey(""); // Your secret API key + +DocumentsDB documentsDB = new DocumentsDB(client); + +DocumentList result = await documentsDB.UpdateDocuments( + databaseId: "", + collectionId: "", + data: [object], // optional + queries: new List(), // optional + transactionId: "" // optional +);``` diff --git a/examples/1.9.x/server-dotnet/examples/documentsdb/update-transaction.md b/examples/1.9.x/server-dotnet/examples/documentsdb/update-transaction.md new file mode 100644 index 000000000..2988ea7b5 --- /dev/null +++ b/examples/1.9.x/server-dotnet/examples/documentsdb/update-transaction.md @@ -0,0 +1,17 @@ +```csharp +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("") // Your project ID + .SetKey(""); // Your secret API key + +DocumentsDB documentsDB = new DocumentsDB(client); + +Transaction result = await documentsDB.UpdateTransaction( + transactionId: "", + commit: false, // optional + rollback: false // optional +);``` diff --git a/examples/1.9.x/server-dotnet/examples/documentsdb/update.md b/examples/1.9.x/server-dotnet/examples/documentsdb/update.md new file mode 100644 index 000000000..7ffb9be85 --- /dev/null +++ b/examples/1.9.x/server-dotnet/examples/documentsdb/update.md @@ -0,0 +1,17 @@ +```csharp +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("") // Your project ID + .SetKey(""); // Your secret API key + +DocumentsDB documentsDB = new DocumentsDB(client); + +Database result = await documentsDB.Update( + databaseId: "", + name: "", + enabled: false // optional +);``` diff --git a/examples/1.9.x/server-dotnet/examples/documentsdb/upsert-document.md b/examples/1.9.x/server-dotnet/examples/documentsdb/upsert-document.md new file mode 100644 index 000000000..4b716f21a --- /dev/null +++ b/examples/1.9.x/server-dotnet/examples/documentsdb/upsert-document.md @@ -0,0 +1,20 @@ +```csharp +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("") // Your project ID + .SetSession(""); // The user session to authenticate with + +DocumentsDB documentsDB = new DocumentsDB(client); + +Document result = await documentsDB.UpsertDocument( + databaseId: "", + collectionId: "", + documentId: "", + data: [object], // optional + permissions: new List { Permission.Read(Role.Any()) }, // optional + transactionId: "" // optional +);``` diff --git a/examples/1.9.x/server-dotnet/examples/documentsdb/upsert-documents.md b/examples/1.9.x/server-dotnet/examples/documentsdb/upsert-documents.md new file mode 100644 index 000000000..c91cbcb65 --- /dev/null +++ b/examples/1.9.x/server-dotnet/examples/documentsdb/upsert-documents.md @@ -0,0 +1,18 @@ +```csharp +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("") // Your project ID + .SetKey(""); // Your secret API key + +DocumentsDB documentsDB = new DocumentsDB(client); + +DocumentList result = await documentsDB.UpsertDocuments( + databaseId: "", + collectionId: "", + documents: new List(), + transactionId: "" // optional +);``` diff --git a/examples/1.9.x/server-dotnet/examples/oauth2/approve.md b/examples/1.9.x/server-dotnet/examples/oauth2/approve.md new file mode 100644 index 000000000..887fab550 --- /dev/null +++ b/examples/1.9.x/server-dotnet/examples/oauth2/approve.md @@ -0,0 +1,17 @@ +```csharp +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .SetSession("") // The user session to authenticate with + .SetProject(""); // Your project ID + +Oauth2 oauth2 = new Oauth2(client); + +Oauth2Approve result = await oauth2.Approve( + grant_id: "", + authorization_details: "", // optional + scope: "" // optional +);``` diff --git a/examples/1.9.x/server-dotnet/examples/oauth2/authorize-post.md b/examples/1.9.x/server-dotnet/examples/oauth2/authorize-post.md new file mode 100644 index 000000000..72f43d1a2 --- /dev/null +++ b/examples/1.9.x/server-dotnet/examples/oauth2/authorize-post.md @@ -0,0 +1,28 @@ +```csharp +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .SetSession("") // The user session to authenticate with + .SetProject(""); // Your project ID + +Oauth2 oauth2 = new Oauth2(client); + +Oauth2Authorize result = await oauth2.AuthorizePost( + client_id: "", // optional + redirect_uri: "https://example.com", // optional + response_type: "", // optional + scope: "", // optional + state: "", // optional + nonce: "", // optional + code_challenge: "", // optional + code_challenge_method: "s256", // optional + prompt: "", // optional + max_age: 0, // optional + authorization_details: "", // optional + resource: "", // optional + audience: "", // optional + request_uri: "" // optional +);``` diff --git a/examples/1.9.x/server-dotnet/examples/oauth2/authorize.md b/examples/1.9.x/server-dotnet/examples/oauth2/authorize.md new file mode 100644 index 000000000..10d68bd1f --- /dev/null +++ b/examples/1.9.x/server-dotnet/examples/oauth2/authorize.md @@ -0,0 +1,28 @@ +```csharp +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .SetSession("") // The user session to authenticate with + .SetProject(""); // Your project ID + +Oauth2 oauth2 = new Oauth2(client); + +Oauth2Authorize result = await oauth2.Authorize( + client_id: "", // optional + redirect_uri: "https://example.com", // optional + response_type: "", // optional + scope: "", // optional + state: "", // optional + nonce: "", // optional + code_challenge: "", // optional + code_challenge_method: "s256", // optional + prompt: "", // optional + max_age: 0, // optional + authorization_details: "", // optional + resource: "", // optional + audience: "", // optional + request_uri: "" // optional +);``` diff --git a/examples/1.9.x/server-dotnet/examples/oauth2/create-device-authorization.md b/examples/1.9.x/server-dotnet/examples/oauth2/create-device-authorization.md new file mode 100644 index 000000000..248fbf898 --- /dev/null +++ b/examples/1.9.x/server-dotnet/examples/oauth2/create-device-authorization.md @@ -0,0 +1,19 @@ +```csharp +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .SetSession("") // The user session to authenticate with + .SetProject(""); // Your project ID + +Oauth2 oauth2 = new Oauth2(client); + +Oauth2DeviceAuthorization result = await oauth2.CreateDeviceAuthorization( + client_id: "", // optional + scope: "", // optional + authorization_details: "", // optional + resource: "", // optional + audience: "" // optional +);``` diff --git a/examples/1.9.x/server-dotnet/examples/oauth2/create-grant.md b/examples/1.9.x/server-dotnet/examples/oauth2/create-grant.md new file mode 100644 index 000000000..627e290d1 --- /dev/null +++ b/examples/1.9.x/server-dotnet/examples/oauth2/create-grant.md @@ -0,0 +1,15 @@ +```csharp +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .SetSession("") // The user session to authenticate with + .SetProject(""); // Your project ID + +Oauth2 oauth2 = new Oauth2(client); + +Oauth2Grant result = await oauth2.CreateGrant( + user_code: "" +);``` diff --git a/examples/1.9.x/server-dotnet/examples/oauth2/create-par.md b/examples/1.9.x/server-dotnet/examples/oauth2/create-par.md new file mode 100644 index 000000000..306c995c6 --- /dev/null +++ b/examples/1.9.x/server-dotnet/examples/oauth2/create-par.md @@ -0,0 +1,27 @@ +```csharp +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .SetSession("") // The user session to authenticate with + .SetProject(""); // Your project ID + +Oauth2 oauth2 = new Oauth2(client); + +Oauth2PAR result = await oauth2.CreatePAR( + client_id: "", + redirect_uri: "https://example.com", + response_type: "code", + scope: "", // optional + state: "", // optional + nonce: "", // optional + code_challenge: "", // optional + code_challenge_method: "s256", // optional + prompt: "", // optional + max_age: 0, // optional + authorization_details: "", // optional + resource: "", // optional + audience: "" // optional +);``` diff --git a/examples/1.9.x/server-dotnet/examples/oauth2/create-token.md b/examples/1.9.x/server-dotnet/examples/oauth2/create-token.md new file mode 100644 index 000000000..6afac7ed9 --- /dev/null +++ b/examples/1.9.x/server-dotnet/examples/oauth2/create-token.md @@ -0,0 +1,24 @@ +```csharp +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .SetSession("") // The user session to authenticate with + .SetProject(""); // Your project ID + +Oauth2 oauth2 = new Oauth2(client); + +Oauth2Token result = await oauth2.CreateToken( + grant_type: "", + code: "", // optional + refresh_token: "", // optional + device_code: "", // optional + client_id: "", // optional + client_secret: "", // optional + code_verifier: "", // optional + redirect_uri: "https://example.com", // optional + resource: "", // optional + audience: "" // optional +);``` diff --git a/examples/1.9.x/server-dotnet/examples/oauth2/get-grant.md b/examples/1.9.x/server-dotnet/examples/oauth2/get-grant.md new file mode 100644 index 000000000..a7cf5f9a2 --- /dev/null +++ b/examples/1.9.x/server-dotnet/examples/oauth2/get-grant.md @@ -0,0 +1,15 @@ +```csharp +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .SetSession("") // The user session to authenticate with + .SetProject(""); // Your project ID + +Oauth2 oauth2 = new Oauth2(client); + +Oauth2Grant result = await oauth2.GetGrant( + grant_id: "" +);``` diff --git a/examples/1.9.x/server-dotnet/examples/oauth2/list-organizations.md b/examples/1.9.x/server-dotnet/examples/oauth2/list-organizations.md new file mode 100644 index 000000000..59a30b97e --- /dev/null +++ b/examples/1.9.x/server-dotnet/examples/oauth2/list-organizations.md @@ -0,0 +1,17 @@ +```csharp +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .SetSession("") // The user session to authenticate with + .SetProject(""); // Your project ID + +Oauth2 oauth2 = new Oauth2(client); + +Oauth2OrganizationList result = await oauth2.ListOrganizations( + limit: 1, // optional + offset: 0, // optional + search: "" // optional +);``` diff --git a/examples/1.9.x/server-dotnet/examples/oauth2/list-projects.md b/examples/1.9.x/server-dotnet/examples/oauth2/list-projects.md new file mode 100644 index 000000000..cfe7b8cae --- /dev/null +++ b/examples/1.9.x/server-dotnet/examples/oauth2/list-projects.md @@ -0,0 +1,17 @@ +```csharp +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .SetSession("") // The user session to authenticate with + .SetProject(""); // Your project ID + +Oauth2 oauth2 = new Oauth2(client); + +Oauth2ProjectList result = await oauth2.ListProjects( + limit: 1, // optional + offset: 0, // optional + search: "" // optional +);``` diff --git a/examples/1.9.x/server-dotnet/examples/oauth2/reject.md b/examples/1.9.x/server-dotnet/examples/oauth2/reject.md new file mode 100644 index 000000000..bf32913e3 --- /dev/null +++ b/examples/1.9.x/server-dotnet/examples/oauth2/reject.md @@ -0,0 +1,15 @@ +```csharp +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .SetSession("") // The user session to authenticate with + .SetProject(""); // Your project ID + +Oauth2 oauth2 = new Oauth2(client); + +Oauth2Reject result = await oauth2.Reject( + grant_id: "" +);``` diff --git a/examples/1.9.x/server-dotnet/examples/oauth2/revoke.md b/examples/1.9.x/server-dotnet/examples/oauth2/revoke.md new file mode 100644 index 000000000..322ba30a0 --- /dev/null +++ b/examples/1.9.x/server-dotnet/examples/oauth2/revoke.md @@ -0,0 +1,18 @@ +```csharp +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .SetSession("") // The user session to authenticate with + .SetProject(""); // Your project ID + +Oauth2 oauth2 = new Oauth2(client); + + result = await oauth2.Revoke( + token: "", + token_type_hint: "access_token", // optional + client_id: "", // optional + client_secret: "" // optional +);``` diff --git a/examples/1.9.x/server-dotnet/examples/organization/create-installation.md b/examples/1.9.x/server-dotnet/examples/organization/create-installation.md new file mode 100644 index 000000000..1545dc737 --- /dev/null +++ b/examples/1.9.x/server-dotnet/examples/organization/create-installation.md @@ -0,0 +1,16 @@ +```csharp +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("") // Your project ID + .SetSession(""); // The user session to authenticate with + +Organization organization = new Organization(client); + +AppInstallation result = await organization.CreateInstallation( + appId: "", + authorizationDetails: "" // optional +);``` diff --git a/examples/1.9.x/server-dotnet/examples/organization/delete-installation.md b/examples/1.9.x/server-dotnet/examples/organization/delete-installation.md new file mode 100644 index 000000000..d295bbd51 --- /dev/null +++ b/examples/1.9.x/server-dotnet/examples/organization/delete-installation.md @@ -0,0 +1,15 @@ +```csharp +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("") // Your project ID + .SetSession(""); // The user session to authenticate with + +Organization organization = new Organization(client); + +await organization.DeleteInstallation( + installationId: "" +);``` diff --git a/examples/1.9.x/server-dotnet/examples/organization/get-installation.md b/examples/1.9.x/server-dotnet/examples/organization/get-installation.md new file mode 100644 index 000000000..13de62388 --- /dev/null +++ b/examples/1.9.x/server-dotnet/examples/organization/get-installation.md @@ -0,0 +1,15 @@ +```csharp +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("") // Your project ID + .SetSession(""); // The user session to authenticate with + +Organization organization = new Organization(client); + +AppInstallation result = await organization.GetInstallation( + installationId: "" +);``` diff --git a/examples/1.9.x/server-dotnet/examples/organization/list-installations.md b/examples/1.9.x/server-dotnet/examples/organization/list-installations.md new file mode 100644 index 000000000..843302a72 --- /dev/null +++ b/examples/1.9.x/server-dotnet/examples/organization/list-installations.md @@ -0,0 +1,16 @@ +```csharp +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("") // Your project ID + .SetSession(""); // The user session to authenticate with + +Organization organization = new Organization(client); + +AppInstallationList result = await organization.ListInstallations( + queries: new List(), // optional + total: false // optional +);``` diff --git a/examples/1.9.x/server-dotnet/examples/organization/update-installation.md b/examples/1.9.x/server-dotnet/examples/organization/update-installation.md new file mode 100644 index 000000000..9799ebfaa --- /dev/null +++ b/examples/1.9.x/server-dotnet/examples/organization/update-installation.md @@ -0,0 +1,16 @@ +```csharp +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("") // Your project ID + .SetSession(""); // The user session to authenticate with + +Organization organization = new Organization(client); + +AppInstallation result = await organization.UpdateInstallation( + installationId: "", + authorizationDetails: "" // optional +);``` diff --git a/examples/1.9.x/server-dotnet/examples/project/update-o-auth-2-server.md b/examples/1.9.x/server-dotnet/examples/project/update-o-auth-2-server.md index a43abfd30..5c66be762 100644 --- a/examples/1.9.x/server-dotnet/examples/project/update-o-auth-2-server.md +++ b/examples/1.9.x/server-dotnet/examples/project/update-o-auth-2-server.md @@ -19,6 +19,7 @@ Project result = await project.UpdateOAuth2Server( refreshTokenDuration: 60, // optional publicAccessTokenDuration: 60, // optional publicRefreshTokenDuration: 60, // optional + installationAccessTokenDuration: 60, // optional confidentialPkce: false, // optional verificationUrl: "https://example.com", // optional userCodeLength: 6, // optional diff --git a/examples/1.9.x/server-dotnet/examples/teams/create-installation.md b/examples/1.9.x/server-dotnet/examples/teams/create-installation.md new file mode 100644 index 000000000..8cc34ef6e --- /dev/null +++ b/examples/1.9.x/server-dotnet/examples/teams/create-installation.md @@ -0,0 +1,17 @@ +```csharp +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("") // Your project ID + .SetSession(""); // The user session to authenticate with + +Teams teams = new Teams(client); + +AppInstallation result = await teams.CreateInstallation( + teamId: "", + appId: "", + authorizationDetails: "" // optional +);``` diff --git a/examples/1.9.x/server-dotnet/examples/teams/delete-installation.md b/examples/1.9.x/server-dotnet/examples/teams/delete-installation.md new file mode 100644 index 000000000..b2a632911 --- /dev/null +++ b/examples/1.9.x/server-dotnet/examples/teams/delete-installation.md @@ -0,0 +1,16 @@ +```csharp +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("") // Your project ID + .SetSession(""); // The user session to authenticate with + +Teams teams = new Teams(client); + +await teams.DeleteInstallation( + teamId: "", + installationId: "" +);``` diff --git a/examples/1.9.x/server-dotnet/examples/teams/get-installation.md b/examples/1.9.x/server-dotnet/examples/teams/get-installation.md new file mode 100644 index 000000000..48546fe89 --- /dev/null +++ b/examples/1.9.x/server-dotnet/examples/teams/get-installation.md @@ -0,0 +1,16 @@ +```csharp +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("") // Your project ID + .SetSession(""); // The user session to authenticate with + +Teams teams = new Teams(client); + +AppInstallation result = await teams.GetInstallation( + teamId: "", + installationId: "" +);``` diff --git a/examples/1.9.x/server-dotnet/examples/teams/list-installations.md b/examples/1.9.x/server-dotnet/examples/teams/list-installations.md new file mode 100644 index 000000000..7f29bdca4 --- /dev/null +++ b/examples/1.9.x/server-dotnet/examples/teams/list-installations.md @@ -0,0 +1,17 @@ +```csharp +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("") // Your project ID + .SetSession(""); // The user session to authenticate with + +Teams teams = new Teams(client); + +AppInstallationList result = await teams.ListInstallations( + teamId: "", + queries: new List(), // optional + total: false // optional +);``` diff --git a/examples/1.9.x/server-dotnet/examples/teams/update-installation.md b/examples/1.9.x/server-dotnet/examples/teams/update-installation.md new file mode 100644 index 000000000..d64faf09f --- /dev/null +++ b/examples/1.9.x/server-dotnet/examples/teams/update-installation.md @@ -0,0 +1,17 @@ +```csharp +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("") // Your project ID + .SetSession(""); // The user session to authenticate with + +Teams teams = new Teams(client); + +AppInstallation result = await teams.UpdateInstallation( + teamId: "", + installationId: "", + authorizationDetails: "" // optional +);``` diff --git a/examples/1.9.x/server-dotnet/examples/vectorsdb/create-collection.md b/examples/1.9.x/server-dotnet/examples/vectorsdb/create-collection.md new file mode 100644 index 000000000..d9d42682d --- /dev/null +++ b/examples/1.9.x/server-dotnet/examples/vectorsdb/create-collection.md @@ -0,0 +1,21 @@ +```csharp +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("") // Your project ID + .SetKey(""); // Your secret API key + +VectorsDB vectorsDB = new VectorsDB(client); + +VectorsdbCollection result = await vectorsDB.CreateCollection( + databaseId: "", + collectionId: "", + name: "", + dimension: 1, + permissions: new List { Permission.Read(Role.Any()) }, // optional + documentSecurity: false, // optional + enabled: false // optional +);``` diff --git a/examples/1.9.x/server-dotnet/examples/vectorsdb/create-document.md b/examples/1.9.x/server-dotnet/examples/vectorsdb/create-document.md new file mode 100644 index 000000000..a2df215b8 --- /dev/null +++ b/examples/1.9.x/server-dotnet/examples/vectorsdb/create-document.md @@ -0,0 +1,22 @@ +```csharp +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("") // Your project ID + .SetSession(""); // The user session to authenticate with + +VectorsDB vectorsDB = new VectorsDB(client); + +Document result = await vectorsDB.CreateDocument( + databaseId: "", + collectionId: "", + documentId: "", + data: new { + embeddings = new[] { 0.12, -0.55, 0.88, 1.02 }, + metadata = { key = "value" } + }, + permissions: new List { Permission.Read(Role.Any()) } // optional +);``` diff --git a/examples/1.9.x/server-dotnet/examples/vectorsdb/create-documents.md b/examples/1.9.x/server-dotnet/examples/vectorsdb/create-documents.md new file mode 100644 index 000000000..ee725394f --- /dev/null +++ b/examples/1.9.x/server-dotnet/examples/vectorsdb/create-documents.md @@ -0,0 +1,17 @@ +```csharp +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("") // Your project ID + .SetKey(""); // Your secret API key + +VectorsDB vectorsDB = new VectorsDB(client); + +DocumentList result = await vectorsDB.CreateDocuments( + databaseId: "", + collectionId: "", + documents: new List() +);``` diff --git a/examples/1.9.x/server-dotnet/examples/vectorsdb/create-index.md b/examples/1.9.x/server-dotnet/examples/vectorsdb/create-index.md new file mode 100644 index 000000000..73501d529 --- /dev/null +++ b/examples/1.9.x/server-dotnet/examples/vectorsdb/create-index.md @@ -0,0 +1,22 @@ +```csharp +using Appwrite; +using Appwrite.Enums; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("") // Your project ID + .SetKey(""); // Your secret API key + +VectorsDB vectorsDB = new VectorsDB(client); + +Index result = await vectorsDB.CreateIndex( + databaseId: "", + collectionId: "", + key: "", + type: VectorsDBIndexType.HnswEuclidean, + attributes: new List(), + orders: new List<OrderBy> { OrderBy.Asc }, // optional + lengths: new List() // optional +);``` diff --git a/examples/1.9.x/server-dotnet/examples/vectorsdb/create-operations.md b/examples/1.9.x/server-dotnet/examples/vectorsdb/create-operations.md new file mode 100644 index 000000000..df055e972 --- /dev/null +++ b/examples/1.9.x/server-dotnet/examples/vectorsdb/create-operations.md @@ -0,0 +1,26 @@ +```csharp +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("") // Your project ID + .SetKey(""); // Your secret API key + +VectorsDB vectorsDB = new VectorsDB(client); + +Transaction result = await vectorsDB.CreateOperations( + transactionId: "", + operations: [ + { + "action": "create", + "databaseId": "", + "collectionId": "", + "documentId": "", + "data": { + "name": "Walter O'Brien" + } + } + ] // optional +);``` diff --git a/examples/1.9.x/server-dotnet/examples/vectorsdb/create-query.md b/examples/1.9.x/server-dotnet/examples/vectorsdb/create-query.md new file mode 100644 index 000000000..88e5d8a4f --- /dev/null +++ b/examples/1.9.x/server-dotnet/examples/vectorsdb/create-query.md @@ -0,0 +1,20 @@ +```csharp +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("") // Your project ID + .SetSession(""); // The user session to authenticate with + +VectorsDB vectorsDB = new VectorsDB(client); + +DocumentList result = await vectorsDB.CreateQuery( + databaseId: "", + collectionId: "", + queries: new List(), // optional + transactionId: "", // optional + total: false, // optional + ttl: 0 // optional +);``` diff --git a/examples/1.9.x/server-dotnet/examples/vectorsdb/create-text-embeddings.md b/examples/1.9.x/server-dotnet/examples/vectorsdb/create-text-embeddings.md new file mode 100644 index 000000000..dd8cce2fb --- /dev/null +++ b/examples/1.9.x/server-dotnet/examples/vectorsdb/create-text-embeddings.md @@ -0,0 +1,17 @@ +```csharp +using Appwrite; +using Appwrite.Enums; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("") // Your project ID + .SetKey(""); // Your secret API key + +VectorsDB vectorsDB = new VectorsDB(client); + +EmbeddingList result = await vectorsDB.CreateTextEmbeddings( + texts: new List(), + model: EmbeddingModel.NomicEmbedText // optional +);``` diff --git a/examples/1.9.x/server-dotnet/examples/vectorsdb/create-transaction.md b/examples/1.9.x/server-dotnet/examples/vectorsdb/create-transaction.md new file mode 100644 index 000000000..1fa4fa736 --- /dev/null +++ b/examples/1.9.x/server-dotnet/examples/vectorsdb/create-transaction.md @@ -0,0 +1,15 @@ +```csharp +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("") // Your project ID + .SetKey(""); // Your secret API key + +VectorsDB vectorsDB = new VectorsDB(client); + +Transaction result = await vectorsDB.CreateTransaction( + ttl: 60 // optional +);``` diff --git a/examples/1.9.x/server-dotnet/examples/vectorsdb/create.md b/examples/1.9.x/server-dotnet/examples/vectorsdb/create.md new file mode 100644 index 000000000..8b25057c5 --- /dev/null +++ b/examples/1.9.x/server-dotnet/examples/vectorsdb/create.md @@ -0,0 +1,17 @@ +```csharp +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("") // Your project ID + .SetKey(""); // Your secret API key + +VectorsDB vectorsDB = new VectorsDB(client); + +Database result = await vectorsDB.Create( + databaseId: "", + name: "", + enabled: false // optional +);``` diff --git a/examples/1.9.x/server-dotnet/examples/vectorsdb/delete-collection.md b/examples/1.9.x/server-dotnet/examples/vectorsdb/delete-collection.md new file mode 100644 index 000000000..b57b11019 --- /dev/null +++ b/examples/1.9.x/server-dotnet/examples/vectorsdb/delete-collection.md @@ -0,0 +1,16 @@ +```csharp +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("") // Your project ID + .SetKey(""); // Your secret API key + +VectorsDB vectorsDB = new VectorsDB(client); + +await vectorsDB.DeleteCollection( + databaseId: "", + collectionId: "" +);``` diff --git a/examples/1.9.x/server-dotnet/examples/vectorsdb/delete-document.md b/examples/1.9.x/server-dotnet/examples/vectorsdb/delete-document.md new file mode 100644 index 000000000..29984fa93 --- /dev/null +++ b/examples/1.9.x/server-dotnet/examples/vectorsdb/delete-document.md @@ -0,0 +1,18 @@ +```csharp +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("") // Your project ID + .SetSession(""); // The user session to authenticate with + +VectorsDB vectorsDB = new VectorsDB(client); + +await vectorsDB.DeleteDocument( + databaseId: "", + collectionId: "", + documentId: "", + transactionId: "" // optional +);``` diff --git a/examples/1.9.x/server-dotnet/examples/vectorsdb/delete-documents.md b/examples/1.9.x/server-dotnet/examples/vectorsdb/delete-documents.md new file mode 100644 index 000000000..89e7aba58 --- /dev/null +++ b/examples/1.9.x/server-dotnet/examples/vectorsdb/delete-documents.md @@ -0,0 +1,18 @@ +```csharp +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("") // Your project ID + .SetKey(""); // Your secret API key + +VectorsDB vectorsDB = new VectorsDB(client); + +await vectorsDB.DeleteDocuments( + databaseId: "", + collectionId: "", + queries: new List(), // optional + transactionId: "" // optional +);``` diff --git a/examples/1.9.x/server-dotnet/examples/vectorsdb/delete-index.md b/examples/1.9.x/server-dotnet/examples/vectorsdb/delete-index.md new file mode 100644 index 000000000..aca6faf3d --- /dev/null +++ b/examples/1.9.x/server-dotnet/examples/vectorsdb/delete-index.md @@ -0,0 +1,17 @@ +```csharp +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("") // Your project ID + .SetKey(""); // Your secret API key + +VectorsDB vectorsDB = new VectorsDB(client); + +await vectorsDB.DeleteIndex( + databaseId: "", + collectionId: "", + key: "" +);``` diff --git a/examples/1.9.x/server-dotnet/examples/vectorsdb/delete-transaction.md b/examples/1.9.x/server-dotnet/examples/vectorsdb/delete-transaction.md new file mode 100644 index 000000000..8c49e7e2f --- /dev/null +++ b/examples/1.9.x/server-dotnet/examples/vectorsdb/delete-transaction.md @@ -0,0 +1,15 @@ +```csharp +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("") // Your project ID + .SetKey(""); // Your secret API key + +VectorsDB vectorsDB = new VectorsDB(client); + +await vectorsDB.DeleteTransaction( + transactionId: "" +);``` diff --git a/examples/1.9.x/server-dotnet/examples/vectorsdb/delete.md b/examples/1.9.x/server-dotnet/examples/vectorsdb/delete.md new file mode 100644 index 000000000..8d7fd3177 --- /dev/null +++ b/examples/1.9.x/server-dotnet/examples/vectorsdb/delete.md @@ -0,0 +1,15 @@ +```csharp +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("") // Your project ID + .SetKey(""); // Your secret API key + +VectorsDB vectorsDB = new VectorsDB(client); + +await vectorsDB.Delete( + databaseId: "" +);``` diff --git a/examples/1.9.x/server-dotnet/examples/vectorsdb/get-collection.md b/examples/1.9.x/server-dotnet/examples/vectorsdb/get-collection.md new file mode 100644 index 000000000..0f949214b --- /dev/null +++ b/examples/1.9.x/server-dotnet/examples/vectorsdb/get-collection.md @@ -0,0 +1,16 @@ +```csharp +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("") // Your project ID + .SetKey(""); // Your secret API key + +VectorsDB vectorsDB = new VectorsDB(client); + +VectorsdbCollection result = await vectorsDB.GetCollection( + databaseId: "", + collectionId: "" +);``` diff --git a/examples/1.9.x/server-dotnet/examples/vectorsdb/get-document.md b/examples/1.9.x/server-dotnet/examples/vectorsdb/get-document.md new file mode 100644 index 000000000..74843f40a --- /dev/null +++ b/examples/1.9.x/server-dotnet/examples/vectorsdb/get-document.md @@ -0,0 +1,19 @@ +```csharp +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("") // Your project ID + .SetSession(""); // The user session to authenticate with + +VectorsDB vectorsDB = new VectorsDB(client); + +Document result = await vectorsDB.GetDocument( + databaseId: "", + collectionId: "", + documentId: "", + queries: new List(), // optional + transactionId: "" // optional +);``` diff --git a/examples/1.9.x/server-dotnet/examples/vectorsdb/get-index.md b/examples/1.9.x/server-dotnet/examples/vectorsdb/get-index.md new file mode 100644 index 000000000..b3d8b5d14 --- /dev/null +++ b/examples/1.9.x/server-dotnet/examples/vectorsdb/get-index.md @@ -0,0 +1,17 @@ +```csharp +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("") // Your project ID + .SetKey(""); // Your secret API key + +VectorsDB vectorsDB = new VectorsDB(client); + +Index result = await vectorsDB.GetIndex( + databaseId: "", + collectionId: "", + key: "" +);``` diff --git a/examples/1.9.x/server-dotnet/examples/vectorsdb/get-transaction.md b/examples/1.9.x/server-dotnet/examples/vectorsdb/get-transaction.md new file mode 100644 index 000000000..6e0bdb0f9 --- /dev/null +++ b/examples/1.9.x/server-dotnet/examples/vectorsdb/get-transaction.md @@ -0,0 +1,15 @@ +```csharp +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("") // Your project ID + .SetKey(""); // Your secret API key + +VectorsDB vectorsDB = new VectorsDB(client); + +Transaction result = await vectorsDB.GetTransaction( + transactionId: "" +);``` diff --git a/examples/1.9.x/server-dotnet/examples/vectorsdb/get.md b/examples/1.9.x/server-dotnet/examples/vectorsdb/get.md new file mode 100644 index 000000000..89d041c5f --- /dev/null +++ b/examples/1.9.x/server-dotnet/examples/vectorsdb/get.md @@ -0,0 +1,15 @@ +```csharp +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("") // Your project ID + .SetKey(""); // Your secret API key + +VectorsDB vectorsDB = new VectorsDB(client); + +Database result = await vectorsDB.Get( + databaseId: "" +);``` diff --git a/examples/1.9.x/server-dotnet/examples/vectorsdb/list-collections.md b/examples/1.9.x/server-dotnet/examples/vectorsdb/list-collections.md new file mode 100644 index 000000000..6e6e81670 --- /dev/null +++ b/examples/1.9.x/server-dotnet/examples/vectorsdb/list-collections.md @@ -0,0 +1,18 @@ +```csharp +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("") // Your project ID + .SetKey(""); // Your secret API key + +VectorsDB vectorsDB = new VectorsDB(client); + +VectorsdbCollectionList result = await vectorsDB.ListCollections( + databaseId: "", + queries: new List(), // optional + search: "", // optional + total: false // optional +);``` diff --git a/examples/1.9.x/server-dotnet/examples/vectorsdb/list-documents.md b/examples/1.9.x/server-dotnet/examples/vectorsdb/list-documents.md new file mode 100644 index 000000000..4b800ce4a --- /dev/null +++ b/examples/1.9.x/server-dotnet/examples/vectorsdb/list-documents.md @@ -0,0 +1,20 @@ +```csharp +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("") // Your project ID + .SetSession(""); // The user session to authenticate with + +VectorsDB vectorsDB = new VectorsDB(client); + +DocumentList result = await vectorsDB.ListDocuments( + databaseId: "", + collectionId: "", + queries: new List(), // optional + transactionId: "", // optional + total: false, // optional + ttl: 0 // optional +);``` diff --git a/examples/1.9.x/server-dotnet/examples/vectorsdb/list-indexes.md b/examples/1.9.x/server-dotnet/examples/vectorsdb/list-indexes.md new file mode 100644 index 000000000..187f67548 --- /dev/null +++ b/examples/1.9.x/server-dotnet/examples/vectorsdb/list-indexes.md @@ -0,0 +1,18 @@ +```csharp +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("") // Your project ID + .SetKey(""); // Your secret API key + +VectorsDB vectorsDB = new VectorsDB(client); + +IndexList result = await vectorsDB.ListIndexes( + databaseId: "", + collectionId: "", + queries: new List(), // optional + total: false // optional +);``` diff --git a/examples/1.9.x/server-dotnet/examples/vectorsdb/list-transactions.md b/examples/1.9.x/server-dotnet/examples/vectorsdb/list-transactions.md new file mode 100644 index 000000000..35d275471 --- /dev/null +++ b/examples/1.9.x/server-dotnet/examples/vectorsdb/list-transactions.md @@ -0,0 +1,15 @@ +```csharp +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("") // Your project ID + .SetKey(""); // Your secret API key + +VectorsDB vectorsDB = new VectorsDB(client); + +TransactionList result = await vectorsDB.ListTransactions( + queries: new List() // optional +);``` diff --git a/examples/1.9.x/server-dotnet/examples/vectorsdb/list.md b/examples/1.9.x/server-dotnet/examples/vectorsdb/list.md new file mode 100644 index 000000000..20e582d55 --- /dev/null +++ b/examples/1.9.x/server-dotnet/examples/vectorsdb/list.md @@ -0,0 +1,17 @@ +```csharp +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("") // Your project ID + .SetKey(""); // Your secret API key + +VectorsDB vectorsDB = new VectorsDB(client); + +DatabaseList result = await vectorsDB.List( + queries: new List(), // optional + search: "", // optional + total: false // optional +);``` diff --git a/examples/1.9.x/server-dotnet/examples/vectorsdb/update-collection.md b/examples/1.9.x/server-dotnet/examples/vectorsdb/update-collection.md new file mode 100644 index 000000000..2ce560cd1 --- /dev/null +++ b/examples/1.9.x/server-dotnet/examples/vectorsdb/update-collection.md @@ -0,0 +1,21 @@ +```csharp +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("") // Your project ID + .SetKey(""); // Your secret API key + +VectorsDB vectorsDB = new VectorsDB(client); + +VectorsdbCollection result = await vectorsDB.UpdateCollection( + databaseId: "", + collectionId: "", + name: "", + dimension: 1, // optional + permissions: new List { Permission.Read(Role.Any()) }, // optional + documentSecurity: false, // optional + enabled: false // optional +);``` diff --git a/examples/1.9.x/server-dotnet/examples/vectorsdb/update-document.md b/examples/1.9.x/server-dotnet/examples/vectorsdb/update-document.md new file mode 100644 index 000000000..ec5963de1 --- /dev/null +++ b/examples/1.9.x/server-dotnet/examples/vectorsdb/update-document.md @@ -0,0 +1,20 @@ +```csharp +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("") // Your project ID + .SetSession(""); // The user session to authenticate with + +VectorsDB vectorsDB = new VectorsDB(client); + +Document result = await vectorsDB.UpdateDocument( + databaseId: "", + collectionId: "", + documentId: "", + data: [object], // optional + permissions: new List { Permission.Read(Role.Any()) }, // optional + transactionId: "" // optional +);``` diff --git a/examples/1.9.x/server-dotnet/examples/vectorsdb/update-documents.md b/examples/1.9.x/server-dotnet/examples/vectorsdb/update-documents.md new file mode 100644 index 000000000..ba4c5e9d8 --- /dev/null +++ b/examples/1.9.x/server-dotnet/examples/vectorsdb/update-documents.md @@ -0,0 +1,19 @@ +```csharp +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("") // Your project ID + .SetKey(""); // Your secret API key + +VectorsDB vectorsDB = new VectorsDB(client); + +DocumentList result = await vectorsDB.UpdateDocuments( + databaseId: "", + collectionId: "", + data: [object], // optional + queries: new List(), // optional + transactionId: "" // optional +);``` diff --git a/examples/1.9.x/server-dotnet/examples/vectorsdb/update-transaction.md b/examples/1.9.x/server-dotnet/examples/vectorsdb/update-transaction.md new file mode 100644 index 000000000..aa6adb41e --- /dev/null +++ b/examples/1.9.x/server-dotnet/examples/vectorsdb/update-transaction.md @@ -0,0 +1,17 @@ +```csharp +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("") // Your project ID + .SetKey(""); // Your secret API key + +VectorsDB vectorsDB = new VectorsDB(client); + +Transaction result = await vectorsDB.UpdateTransaction( + transactionId: "", + commit: false, // optional + rollback: false // optional +);``` diff --git a/examples/1.9.x/server-dotnet/examples/vectorsdb/update.md b/examples/1.9.x/server-dotnet/examples/vectorsdb/update.md new file mode 100644 index 000000000..8d962808b --- /dev/null +++ b/examples/1.9.x/server-dotnet/examples/vectorsdb/update.md @@ -0,0 +1,17 @@ +```csharp +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("") // Your project ID + .SetKey(""); // Your secret API key + +VectorsDB vectorsDB = new VectorsDB(client); + +Database result = await vectorsDB.Update( + databaseId: "", + name: "", + enabled: false // optional +);``` diff --git a/examples/1.9.x/server-dotnet/examples/vectorsdb/upsert-document.md b/examples/1.9.x/server-dotnet/examples/vectorsdb/upsert-document.md new file mode 100644 index 000000000..7b2235910 --- /dev/null +++ b/examples/1.9.x/server-dotnet/examples/vectorsdb/upsert-document.md @@ -0,0 +1,20 @@ +```csharp +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("") // Your project ID + .SetSession(""); // The user session to authenticate with + +VectorsDB vectorsDB = new VectorsDB(client); + +Document result = await vectorsDB.UpsertDocument( + databaseId: "", + collectionId: "", + documentId: "", + data: [object], // optional + permissions: new List { Permission.Read(Role.Any()) }, // optional + transactionId: "" // optional +);``` diff --git a/examples/1.9.x/server-dotnet/examples/vectorsdb/upsert-documents.md b/examples/1.9.x/server-dotnet/examples/vectorsdb/upsert-documents.md new file mode 100644 index 000000000..5217a978a --- /dev/null +++ b/examples/1.9.x/server-dotnet/examples/vectorsdb/upsert-documents.md @@ -0,0 +1,18 @@ +```csharp +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("") // Your project ID + .SetKey(""); // Your secret API key + +VectorsDB vectorsDB = new VectorsDB(client); + +DocumentList result = await vectorsDB.UpsertDocuments( + databaseId: "", + collectionId: "", + documents: new List(), + transactionId: "" // optional +);``` diff --git a/examples/1.9.x/server-go/examples/apps/create-installation-token.md b/examples/1.9.x/server-go/examples/apps/create-installation-token.md new file mode 100644 index 000000000..7e109f38d --- /dev/null +++ b/examples/1.9.x/server-go/examples/apps/create-installation-token.md @@ -0,0 +1,22 @@ +```go +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/v6/client" + "github.com/appwrite/sdk-for-go/v6/apps" +) + +client := client.New( + client.WithEndpoint("https://.cloud.appwrite.io/v1") + client.WithProject("") + client.WithKey("") +) + +service := apps.New(client) + +response, error := service.CreateInstallationToken( + "", + "", +) +``` diff --git a/examples/1.9.x/server-go/examples/apps/create-key.md b/examples/1.9.x/server-go/examples/apps/create-key.md new file mode 100644 index 000000000..9305a49a4 --- /dev/null +++ b/examples/1.9.x/server-go/examples/apps/create-key.md @@ -0,0 +1,21 @@ +```go +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/v6/client" + "github.com/appwrite/sdk-for-go/v6/apps" +) + +client := client.New( + client.WithEndpoint("https://.cloud.appwrite.io/v1") + client.WithProject("") + client.WithSession("") +) + +service := apps.New(client) + +response, error := service.CreateKey( + "", +) +``` diff --git a/examples/1.9.x/server-go/examples/apps/create-secret.md b/examples/1.9.x/server-go/examples/apps/create-secret.md new file mode 100644 index 000000000..0188e720e --- /dev/null +++ b/examples/1.9.x/server-go/examples/apps/create-secret.md @@ -0,0 +1,21 @@ +```go +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/v6/client" + "github.com/appwrite/sdk-for-go/v6/apps" +) + +client := client.New( + client.WithEndpoint("https://.cloud.appwrite.io/v1") + client.WithProject("") + client.WithSession("") +) + +service := apps.New(client) + +response, error := service.CreateSecret( + "", +) +``` diff --git a/examples/1.9.x/server-go/examples/apps/create.md b/examples/1.9.x/server-go/examples/apps/create.md new file mode 100644 index 000000000..69efa04a1 --- /dev/null +++ b/examples/1.9.x/server-go/examples/apps/create.md @@ -0,0 +1,39 @@ +```go +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/v6/client" + "github.com/appwrite/sdk-for-go/v6/apps" +) + +client := client.New( + client.WithEndpoint("https://.cloud.appwrite.io/v1") + client.WithProject("") + client.WithSession("") +) + +service := apps.New(client) + +response, error := service.Create( + "", + "", + []string{}, + apps.WithCreateDescription(""), + apps.WithCreateClientUri("https://example.com"), + apps.WithCreateLogoUri("https://example.com"), + apps.WithCreatePrivacyPolicyUrl("https://example.com"), + apps.WithCreateTermsUrl("https://example.com"), + apps.WithCreateContacts([]string{}), + apps.WithCreateTagline(""), + apps.WithCreateTags([]string{}), + apps.WithCreateImages([]string{}), + apps.WithCreateSupportUrl("https://example.com"), + apps.WithCreateDataDeletionUrl("https://example.com"), + apps.WithCreatePostLogoutRedirectUris([]string{}), + apps.WithCreateEnabled(false), + apps.WithCreateType("public"), + apps.WithCreateDeviceFlow(false), + apps.WithCreateTeamId(""), +) +``` diff --git a/examples/1.9.x/server-go/examples/apps/delete-key.md b/examples/1.9.x/server-go/examples/apps/delete-key.md new file mode 100644 index 000000000..cc46cf661 --- /dev/null +++ b/examples/1.9.x/server-go/examples/apps/delete-key.md @@ -0,0 +1,22 @@ +```go +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/v6/client" + "github.com/appwrite/sdk-for-go/v6/apps" +) + +client := client.New( + client.WithEndpoint("https://.cloud.appwrite.io/v1") + client.WithProject("") + client.WithSession("") +) + +service := apps.New(client) + +response, error := service.DeleteKey( + "", + "", +) +``` diff --git a/examples/1.9.x/server-go/examples/apps/delete-secret.md b/examples/1.9.x/server-go/examples/apps/delete-secret.md new file mode 100644 index 000000000..2ed3d1e71 --- /dev/null +++ b/examples/1.9.x/server-go/examples/apps/delete-secret.md @@ -0,0 +1,22 @@ +```go +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/v6/client" + "github.com/appwrite/sdk-for-go/v6/apps" +) + +client := client.New( + client.WithEndpoint("https://.cloud.appwrite.io/v1") + client.WithProject("") + client.WithSession("") +) + +service := apps.New(client) + +response, error := service.DeleteSecret( + "", + "", +) +``` diff --git a/examples/1.9.x/server-go/examples/apps/delete-tokens.md b/examples/1.9.x/server-go/examples/apps/delete-tokens.md new file mode 100644 index 000000000..8f30e1627 --- /dev/null +++ b/examples/1.9.x/server-go/examples/apps/delete-tokens.md @@ -0,0 +1,21 @@ +```go +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/v6/client" + "github.com/appwrite/sdk-for-go/v6/apps" +) + +client := client.New( + client.WithEndpoint("https://.cloud.appwrite.io/v1") + client.WithProject("") + client.WithSession("") +) + +service := apps.New(client) + +response, error := service.DeleteTokens( + "", +) +``` diff --git a/examples/1.9.x/server-go/examples/apps/delete.md b/examples/1.9.x/server-go/examples/apps/delete.md new file mode 100644 index 000000000..04f8620ea --- /dev/null +++ b/examples/1.9.x/server-go/examples/apps/delete.md @@ -0,0 +1,21 @@ +```go +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/v6/client" + "github.com/appwrite/sdk-for-go/v6/apps" +) + +client := client.New( + client.WithEndpoint("https://.cloud.appwrite.io/v1") + client.WithProject("") + client.WithSession("") +) + +service := apps.New(client) + +response, error := service.Delete( + "", +) +``` diff --git a/examples/1.9.x/server-go/examples/apps/get-installation.md b/examples/1.9.x/server-go/examples/apps/get-installation.md new file mode 100644 index 000000000..42ec153d6 --- /dev/null +++ b/examples/1.9.x/server-go/examples/apps/get-installation.md @@ -0,0 +1,22 @@ +```go +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/v6/client" + "github.com/appwrite/sdk-for-go/v6/apps" +) + +client := client.New( + client.WithEndpoint("https://.cloud.appwrite.io/v1") + client.WithProject("") + client.WithKey("") +) + +service := apps.New(client) + +response, error := service.GetInstallation( + "", + "", +) +``` diff --git a/examples/1.9.x/server-go/examples/apps/get-key.md b/examples/1.9.x/server-go/examples/apps/get-key.md new file mode 100644 index 000000000..6b74bb237 --- /dev/null +++ b/examples/1.9.x/server-go/examples/apps/get-key.md @@ -0,0 +1,22 @@ +```go +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/v6/client" + "github.com/appwrite/sdk-for-go/v6/apps" +) + +client := client.New( + client.WithEndpoint("https://.cloud.appwrite.io/v1") + client.WithProject("") + client.WithSession("") +) + +service := apps.New(client) + +response, error := service.GetKey( + "", + "", +) +``` diff --git a/examples/1.9.x/server-go/examples/apps/get-secret.md b/examples/1.9.x/server-go/examples/apps/get-secret.md new file mode 100644 index 000000000..8bbaa8b57 --- /dev/null +++ b/examples/1.9.x/server-go/examples/apps/get-secret.md @@ -0,0 +1,22 @@ +```go +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/v6/client" + "github.com/appwrite/sdk-for-go/v6/apps" +) + +client := client.New( + client.WithEndpoint("https://.cloud.appwrite.io/v1") + client.WithProject("") + client.WithSession("") +) + +service := apps.New(client) + +response, error := service.GetSecret( + "", + "", +) +``` diff --git a/examples/1.9.x/server-go/examples/apps/get.md b/examples/1.9.x/server-go/examples/apps/get.md new file mode 100644 index 000000000..29f3dfb59 --- /dev/null +++ b/examples/1.9.x/server-go/examples/apps/get.md @@ -0,0 +1,21 @@ +```go +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/v6/client" + "github.com/appwrite/sdk-for-go/v6/apps" +) + +client := client.New( + client.WithEndpoint("https://.cloud.appwrite.io/v1") + client.WithProject("") + client.WithSession("") +) + +service := apps.New(client) + +response, error := service.Get( + "", +) +``` diff --git a/examples/1.9.x/server-go/examples/apps/list-installation-scopes.md b/examples/1.9.x/server-go/examples/apps/list-installation-scopes.md new file mode 100644 index 000000000..bff7cddd0 --- /dev/null +++ b/examples/1.9.x/server-go/examples/apps/list-installation-scopes.md @@ -0,0 +1,19 @@ +```go +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/v6/client" + "github.com/appwrite/sdk-for-go/v6/apps" +) + +client := client.New( + client.WithEndpoint("https://.cloud.appwrite.io/v1") + client.WithProject("") + client.WithSession("") +) + +service := apps.New(client) + +response, error := service.ListInstallationScopes()) +``` diff --git a/examples/1.9.x/server-go/examples/apps/list-installations.md b/examples/1.9.x/server-go/examples/apps/list-installations.md new file mode 100644 index 000000000..f74d585fd --- /dev/null +++ b/examples/1.9.x/server-go/examples/apps/list-installations.md @@ -0,0 +1,23 @@ +```go +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/v6/client" + "github.com/appwrite/sdk-for-go/v6/apps" +) + +client := client.New( + client.WithEndpoint("https://.cloud.appwrite.io/v1") + client.WithProject("") + client.WithKey("") +) + +service := apps.New(client) + +response, error := service.ListInstallations( + "", + apps.WithListInstallationsQueries([]string{}), + apps.WithListInstallationsTotal(false), +) +``` diff --git a/examples/1.9.x/server-go/examples/apps/list-keys.md b/examples/1.9.x/server-go/examples/apps/list-keys.md new file mode 100644 index 000000000..7f7a3abf8 --- /dev/null +++ b/examples/1.9.x/server-go/examples/apps/list-keys.md @@ -0,0 +1,23 @@ +```go +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/v6/client" + "github.com/appwrite/sdk-for-go/v6/apps" +) + +client := client.New( + client.WithEndpoint("https://.cloud.appwrite.io/v1") + client.WithProject("") + client.WithSession("") +) + +service := apps.New(client) + +response, error := service.ListKeys( + "", + apps.WithListKeysQueries([]string{}), + apps.WithListKeysTotal(false), +) +``` diff --git a/examples/1.9.x/server-go/examples/apps/list-o-auth-2-scopes.md b/examples/1.9.x/server-go/examples/apps/list-o-auth-2-scopes.md new file mode 100644 index 000000000..61a120acd --- /dev/null +++ b/examples/1.9.x/server-go/examples/apps/list-o-auth-2-scopes.md @@ -0,0 +1,19 @@ +```go +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/v6/client" + "github.com/appwrite/sdk-for-go/v6/apps" +) + +client := client.New( + client.WithEndpoint("https://.cloud.appwrite.io/v1") + client.WithProject("") + client.WithSession("") +) + +service := apps.New(client) + +response, error := service.ListOAuth2Scopes()) +``` diff --git a/examples/1.9.x/server-go/examples/apps/list-secrets.md b/examples/1.9.x/server-go/examples/apps/list-secrets.md new file mode 100644 index 000000000..e4e4b61f1 --- /dev/null +++ b/examples/1.9.x/server-go/examples/apps/list-secrets.md @@ -0,0 +1,23 @@ +```go +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/v6/client" + "github.com/appwrite/sdk-for-go/v6/apps" +) + +client := client.New( + client.WithEndpoint("https://.cloud.appwrite.io/v1") + client.WithProject("") + client.WithSession("") +) + +service := apps.New(client) + +response, error := service.ListSecrets( + "", + apps.WithListSecretsQueries([]string{}), + apps.WithListSecretsTotal(false), +) +``` diff --git a/examples/1.9.x/server-go/examples/apps/list.md b/examples/1.9.x/server-go/examples/apps/list.md new file mode 100644 index 000000000..95b05dec0 --- /dev/null +++ b/examples/1.9.x/server-go/examples/apps/list.md @@ -0,0 +1,22 @@ +```go +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/v6/client" + "github.com/appwrite/sdk-for-go/v6/apps" +) + +client := client.New( + client.WithEndpoint("https://.cloud.appwrite.io/v1") + client.WithProject("") + client.WithSession("") +) + +service := apps.New(client) + +response, error := service.List( + apps.WithListQueries([]string{}), + apps.WithListTotal(false), +) +``` diff --git a/examples/1.9.x/server-go/examples/apps/update-labels.md b/examples/1.9.x/server-go/examples/apps/update-labels.md new file mode 100644 index 000000000..5528207fa --- /dev/null +++ b/examples/1.9.x/server-go/examples/apps/update-labels.md @@ -0,0 +1,22 @@ +```go +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/v6/client" + "github.com/appwrite/sdk-for-go/v6/apps" +) + +client := client.New( + client.WithEndpoint("https://.cloud.appwrite.io/v1") + client.WithProject("") + client.WithKey("") +) + +service := apps.New(client) + +response, error := service.UpdateLabels( + "", + []string{}, +) +``` diff --git a/examples/1.9.x/server-go/examples/apps/update-team.md b/examples/1.9.x/server-go/examples/apps/update-team.md new file mode 100644 index 000000000..c38b42f52 --- /dev/null +++ b/examples/1.9.x/server-go/examples/apps/update-team.md @@ -0,0 +1,22 @@ +```go +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/v6/client" + "github.com/appwrite/sdk-for-go/v6/apps" +) + +client := client.New( + client.WithEndpoint("https://.cloud.appwrite.io/v1") + client.WithProject("") + client.WithSession("") +) + +service := apps.New(client) + +response, error := service.UpdateTeam( + "", + "", +) +``` diff --git a/examples/1.9.x/server-go/examples/apps/update.md b/examples/1.9.x/server-go/examples/apps/update.md new file mode 100644 index 000000000..139c163d4 --- /dev/null +++ b/examples/1.9.x/server-go/examples/apps/update.md @@ -0,0 +1,40 @@ +```go +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/v6/client" + "github.com/appwrite/sdk-for-go/v6/apps" +) + +client := client.New( + client.WithEndpoint("https://.cloud.appwrite.io/v1") + client.WithProject("") + client.WithSession("") +) + +service := apps.New(client) + +response, error := service.Update( + "", + "", + apps.WithUpdateDescription(""), + apps.WithUpdateClientUri("https://example.com"), + apps.WithUpdateLogoUri("https://example.com"), + apps.WithUpdatePrivacyPolicyUrl("https://example.com"), + apps.WithUpdateTermsUrl("https://example.com"), + apps.WithUpdateContacts([]string{}), + apps.WithUpdateTagline(""), + apps.WithUpdateTags([]string{}), + apps.WithUpdateImages([]string{}), + apps.WithUpdateSupportUrl("https://example.com"), + apps.WithUpdateDataDeletionUrl("https://example.com"), + apps.WithUpdateEnabled(false), + apps.WithUpdateRedirectUris([]string{}), + apps.WithUpdatePostLogoutRedirectUris([]string{}), + apps.WithUpdateType("public"), + apps.WithUpdateDeviceFlow(false), + apps.WithUpdateInstallationScopes([]string{}), + apps.WithUpdateInstallationRedirectUrl("https://example.com"), +) +``` diff --git a/examples/1.9.x/server-go/examples/documentsdb/create-collection.md b/examples/1.9.x/server-go/examples/documentsdb/create-collection.md new file mode 100644 index 000000000..ab482ed67 --- /dev/null +++ b/examples/1.9.x/server-go/examples/documentsdb/create-collection.md @@ -0,0 +1,28 @@ +```go +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/documentsdb" +) + +client := client.New( + client.WithEndpoint("https://.cloud.appwrite.io/v1") + client.WithProject("") + client.WithKey("") +) + +service := documentsdb.New(client) + +response, error := service.CreateCollection( + "", + "", + "", + documentsdb.WithCreateCollectionPermissions([]string{"read("any")"}), + documentsdb.WithCreateCollectionDocumentSecurity(false), + documentsdb.WithCreateCollectionEnabled(false), + documentsdb.WithCreateCollectionAttributes([]interface{}{}), + documentsdb.WithCreateCollectionIndexes([]interface{}{}), +) +``` diff --git a/examples/1.9.x/server-go/examples/documentsdb/create-document.md b/examples/1.9.x/server-go/examples/documentsdb/create-document.md new file mode 100644 index 000000000..e10508ded --- /dev/null +++ b/examples/1.9.x/server-go/examples/documentsdb/create-document.md @@ -0,0 +1,31 @@ +```go +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/documentsdb" +) + +client := client.New( + client.WithEndpoint("https://.cloud.appwrite.io/v1") + client.WithProject("") + client.WithSession("") +) + +service := documentsdb.New(client) + +response, error := service.CreateDocument( + "", + "", + "", + map[string]interface{}{ + "username": "walter.obrien", + "email": "walter.obrien@example.com", + "fullName": "Walter O'Brien", + "age": 30, + "isAdmin": false + }, + documentsdb.WithCreateDocumentPermissions([]string{"read("any")"}), +) +``` diff --git a/examples/1.9.x/server-go/examples/documentsdb/create-documents.md b/examples/1.9.x/server-go/examples/documentsdb/create-documents.md new file mode 100644 index 000000000..aaa7ae803 --- /dev/null +++ b/examples/1.9.x/server-go/examples/documentsdb/create-documents.md @@ -0,0 +1,23 @@ +```go +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/documentsdb" +) + +client := client.New( + client.WithEndpoint("https://.cloud.appwrite.io/v1") + client.WithProject("") + client.WithSession("") +) + +service := documentsdb.New(client) + +response, error := service.CreateDocuments( + "", + "", + []interface{}{}, +) +``` diff --git a/examples/1.9.x/server-go/examples/documentsdb/create-index.md b/examples/1.9.x/server-go/examples/documentsdb/create-index.md new file mode 100644 index 000000000..1c5f90549 --- /dev/null +++ b/examples/1.9.x/server-go/examples/documentsdb/create-index.md @@ -0,0 +1,27 @@ +```go +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/documentsdb" +) + +client := client.New( + client.WithEndpoint("https://.cloud.appwrite.io/v1") + client.WithProject("") + client.WithKey("") +) + +service := documentsdb.New(client) + +response, error := service.CreateIndex( + "", + "", + "", + "key", + []string{}, + documentsdb.WithCreateIndexOrders([]string{}), + documentsdb.WithCreateIndexLengths([]int{}), +) +``` diff --git a/examples/1.9.x/server-go/examples/documentsdb/create-operations.md b/examples/1.9.x/server-go/examples/documentsdb/create-operations.md new file mode 100644 index 000000000..68a09e4a7 --- /dev/null +++ b/examples/1.9.x/server-go/examples/documentsdb/create-operations.md @@ -0,0 +1,32 @@ +```go +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/documentsdb" +) + +client := client.New( + client.WithEndpoint("https://.cloud.appwrite.io/v1") + client.WithProject("") + client.WithKey("") +) + +service := documentsdb.New(client) + +response, error := service.CreateOperations( + "", + documentsdb.WithCreateOperationsOperations([]interface{}{ + { + "action": "create", + "databaseId": "", + "collectionId": "", + "documentId": "", + "data": { + "name": "Walter O'Brien" + } + } + }), +) +``` diff --git a/examples/1.9.x/server-go/examples/documentsdb/create-transaction.md b/examples/1.9.x/server-go/examples/documentsdb/create-transaction.md new file mode 100644 index 000000000..5521a0d59 --- /dev/null +++ b/examples/1.9.x/server-go/examples/documentsdb/create-transaction.md @@ -0,0 +1,21 @@ +```go +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/documentsdb" +) + +client := client.New( + client.WithEndpoint("https://.cloud.appwrite.io/v1") + client.WithProject("") + client.WithKey("") +) + +service := documentsdb.New(client) + +response, error := service.CreateTransaction( + documentsdb.WithCreateTransactionTtl(60), +) +``` diff --git a/examples/1.9.x/server-go/examples/documentsdb/create.md b/examples/1.9.x/server-go/examples/documentsdb/create.md new file mode 100644 index 000000000..d4bd107c6 --- /dev/null +++ b/examples/1.9.x/server-go/examples/documentsdb/create.md @@ -0,0 +1,23 @@ +```go +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/documentsdb" +) + +client := client.New( + client.WithEndpoint("https://.cloud.appwrite.io/v1") + client.WithProject("") + client.WithKey("") +) + +service := documentsdb.New(client) + +response, error := service.Create( + "", + "", + documentsdb.WithCreateEnabled(false), +) +``` diff --git a/examples/1.9.x/server-go/examples/documentsdb/decrement-document-attribute.md b/examples/1.9.x/server-go/examples/documentsdb/decrement-document-attribute.md new file mode 100644 index 000000000..a4d2306ff --- /dev/null +++ b/examples/1.9.x/server-go/examples/documentsdb/decrement-document-attribute.md @@ -0,0 +1,27 @@ +```go +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/documentsdb" +) + +client := client.New( + client.WithEndpoint("https://.cloud.appwrite.io/v1") + client.WithProject("") + client.WithSession("") +) + +service := documentsdb.New(client) + +response, error := service.DecrementDocumentAttribute( + "", + "", + "", + "", + documentsdb.WithDecrementDocumentAttributeValue(0), + documentsdb.WithDecrementDocumentAttributeMin(0), + documentsdb.WithDecrementDocumentAttributeTransactionId(""), +) +``` diff --git a/examples/1.9.x/server-go/examples/documentsdb/delete-collection.md b/examples/1.9.x/server-go/examples/documentsdb/delete-collection.md new file mode 100644 index 000000000..80e5b0db9 --- /dev/null +++ b/examples/1.9.x/server-go/examples/documentsdb/delete-collection.md @@ -0,0 +1,22 @@ +```go +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/documentsdb" +) + +client := client.New( + client.WithEndpoint("https://.cloud.appwrite.io/v1") + client.WithProject("") + client.WithKey("") +) + +service := documentsdb.New(client) + +response, error := service.DeleteCollection( + "", + "", +) +``` diff --git a/examples/1.9.x/server-go/examples/documentsdb/delete-document.md b/examples/1.9.x/server-go/examples/documentsdb/delete-document.md new file mode 100644 index 000000000..866134a6c --- /dev/null +++ b/examples/1.9.x/server-go/examples/documentsdb/delete-document.md @@ -0,0 +1,24 @@ +```go +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/documentsdb" +) + +client := client.New( + client.WithEndpoint("https://.cloud.appwrite.io/v1") + client.WithProject("") + client.WithSession("") +) + +service := documentsdb.New(client) + +response, error := service.DeleteDocument( + "", + "", + "", + documentsdb.WithDeleteDocumentTransactionId(""), +) +``` diff --git a/examples/1.9.x/server-go/examples/documentsdb/delete-documents.md b/examples/1.9.x/server-go/examples/documentsdb/delete-documents.md new file mode 100644 index 000000000..2a5aecf17 --- /dev/null +++ b/examples/1.9.x/server-go/examples/documentsdb/delete-documents.md @@ -0,0 +1,24 @@ +```go +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/documentsdb" +) + +client := client.New( + client.WithEndpoint("https://.cloud.appwrite.io/v1") + client.WithProject("") + client.WithKey("") +) + +service := documentsdb.New(client) + +response, error := service.DeleteDocuments( + "", + "", + documentsdb.WithDeleteDocumentsQueries([]string{}), + documentsdb.WithDeleteDocumentsTransactionId(""), +) +``` diff --git a/examples/1.9.x/server-go/examples/documentsdb/delete-index.md b/examples/1.9.x/server-go/examples/documentsdb/delete-index.md new file mode 100644 index 000000000..a7d845886 --- /dev/null +++ b/examples/1.9.x/server-go/examples/documentsdb/delete-index.md @@ -0,0 +1,23 @@ +```go +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/documentsdb" +) + +client := client.New( + client.WithEndpoint("https://.cloud.appwrite.io/v1") + client.WithProject("") + client.WithKey("") +) + +service := documentsdb.New(client) + +response, error := service.DeleteIndex( + "", + "", + "", +) +``` diff --git a/examples/1.9.x/server-go/examples/documentsdb/delete-transaction.md b/examples/1.9.x/server-go/examples/documentsdb/delete-transaction.md new file mode 100644 index 000000000..f809346cd --- /dev/null +++ b/examples/1.9.x/server-go/examples/documentsdb/delete-transaction.md @@ -0,0 +1,21 @@ +```go +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/documentsdb" +) + +client := client.New( + client.WithEndpoint("https://.cloud.appwrite.io/v1") + client.WithProject("") + client.WithKey("") +) + +service := documentsdb.New(client) + +response, error := service.DeleteTransaction( + "", +) +``` diff --git a/examples/1.9.x/server-go/examples/documentsdb/delete.md b/examples/1.9.x/server-go/examples/documentsdb/delete.md new file mode 100644 index 000000000..aeeb848f7 --- /dev/null +++ b/examples/1.9.x/server-go/examples/documentsdb/delete.md @@ -0,0 +1,21 @@ +```go +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/documentsdb" +) + +client := client.New( + client.WithEndpoint("https://.cloud.appwrite.io/v1") + client.WithProject("") + client.WithKey("") +) + +service := documentsdb.New(client) + +response, error := service.Delete( + "", +) +``` diff --git a/examples/1.9.x/server-go/examples/documentsdb/get-collection.md b/examples/1.9.x/server-go/examples/documentsdb/get-collection.md new file mode 100644 index 000000000..a8d8ee672 --- /dev/null +++ b/examples/1.9.x/server-go/examples/documentsdb/get-collection.md @@ -0,0 +1,22 @@ +```go +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/documentsdb" +) + +client := client.New( + client.WithEndpoint("https://.cloud.appwrite.io/v1") + client.WithProject("") + client.WithKey("") +) + +service := documentsdb.New(client) + +response, error := service.GetCollection( + "", + "", +) +``` diff --git a/examples/1.9.x/server-go/examples/documentsdb/get-document.md b/examples/1.9.x/server-go/examples/documentsdb/get-document.md new file mode 100644 index 000000000..7fc5ccc4c --- /dev/null +++ b/examples/1.9.x/server-go/examples/documentsdb/get-document.md @@ -0,0 +1,25 @@ +```go +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/documentsdb" +) + +client := client.New( + client.WithEndpoint("https://.cloud.appwrite.io/v1") + client.WithProject("") + client.WithSession("") +) + +service := documentsdb.New(client) + +response, error := service.GetDocument( + "", + "", + "", + documentsdb.WithGetDocumentQueries([]string{}), + documentsdb.WithGetDocumentTransactionId(""), +) +``` diff --git a/examples/1.9.x/server-go/examples/documentsdb/get-index.md b/examples/1.9.x/server-go/examples/documentsdb/get-index.md new file mode 100644 index 000000000..6def9a716 --- /dev/null +++ b/examples/1.9.x/server-go/examples/documentsdb/get-index.md @@ -0,0 +1,23 @@ +```go +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/documentsdb" +) + +client := client.New( + client.WithEndpoint("https://.cloud.appwrite.io/v1") + client.WithProject("") + client.WithKey("") +) + +service := documentsdb.New(client) + +response, error := service.GetIndex( + "", + "", + "", +) +``` diff --git a/examples/1.9.x/server-go/examples/documentsdb/get-transaction.md b/examples/1.9.x/server-go/examples/documentsdb/get-transaction.md new file mode 100644 index 000000000..bc2b00d2e --- /dev/null +++ b/examples/1.9.x/server-go/examples/documentsdb/get-transaction.md @@ -0,0 +1,21 @@ +```go +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/documentsdb" +) + +client := client.New( + client.WithEndpoint("https://.cloud.appwrite.io/v1") + client.WithProject("") + client.WithKey("") +) + +service := documentsdb.New(client) + +response, error := service.GetTransaction( + "", +) +``` diff --git a/examples/1.9.x/server-go/examples/documentsdb/get.md b/examples/1.9.x/server-go/examples/documentsdb/get.md new file mode 100644 index 000000000..45a173577 --- /dev/null +++ b/examples/1.9.x/server-go/examples/documentsdb/get.md @@ -0,0 +1,21 @@ +```go +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/documentsdb" +) + +client := client.New( + client.WithEndpoint("https://.cloud.appwrite.io/v1") + client.WithProject("") + client.WithKey("") +) + +service := documentsdb.New(client) + +response, error := service.Get( + "", +) +``` diff --git a/examples/1.9.x/server-go/examples/documentsdb/increment-document-attribute.md b/examples/1.9.x/server-go/examples/documentsdb/increment-document-attribute.md new file mode 100644 index 000000000..8c16ee5b8 --- /dev/null +++ b/examples/1.9.x/server-go/examples/documentsdb/increment-document-attribute.md @@ -0,0 +1,27 @@ +```go +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/documentsdb" +) + +client := client.New( + client.WithEndpoint("https://.cloud.appwrite.io/v1") + client.WithProject("") + client.WithSession("") +) + +service := documentsdb.New(client) + +response, error := service.IncrementDocumentAttribute( + "", + "", + "", + "", + documentsdb.WithIncrementDocumentAttributeValue(0), + documentsdb.WithIncrementDocumentAttributeMax(0), + documentsdb.WithIncrementDocumentAttributeTransactionId(""), +) +``` diff --git a/examples/1.9.x/server-go/examples/documentsdb/list-collections.md b/examples/1.9.x/server-go/examples/documentsdb/list-collections.md new file mode 100644 index 000000000..7b2695c75 --- /dev/null +++ b/examples/1.9.x/server-go/examples/documentsdb/list-collections.md @@ -0,0 +1,24 @@ +```go +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/documentsdb" +) + +client := client.New( + client.WithEndpoint("https://.cloud.appwrite.io/v1") + client.WithProject("") + client.WithKey("") +) + +service := documentsdb.New(client) + +response, error := service.ListCollections( + "", + documentsdb.WithListCollectionsQueries([]string{}), + documentsdb.WithListCollectionsSearch(""), + documentsdb.WithListCollectionsTotal(false), +) +``` diff --git a/examples/1.9.x/server-go/examples/documentsdb/list-documents.md b/examples/1.9.x/server-go/examples/documentsdb/list-documents.md new file mode 100644 index 000000000..8e6926058 --- /dev/null +++ b/examples/1.9.x/server-go/examples/documentsdb/list-documents.md @@ -0,0 +1,26 @@ +```go +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/documentsdb" +) + +client := client.New( + client.WithEndpoint("https://.cloud.appwrite.io/v1") + client.WithProject("") + client.WithSession("") +) + +service := documentsdb.New(client) + +response, error := service.ListDocuments( + "", + "", + documentsdb.WithListDocumentsQueries([]string{}), + documentsdb.WithListDocumentsTransactionId(""), + documentsdb.WithListDocumentsTotal(false), + documentsdb.WithListDocumentsTtl(0), +) +``` diff --git a/examples/1.9.x/server-go/examples/documentsdb/list-indexes.md b/examples/1.9.x/server-go/examples/documentsdb/list-indexes.md new file mode 100644 index 000000000..79f8db77a --- /dev/null +++ b/examples/1.9.x/server-go/examples/documentsdb/list-indexes.md @@ -0,0 +1,24 @@ +```go +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/documentsdb" +) + +client := client.New( + client.WithEndpoint("https://.cloud.appwrite.io/v1") + client.WithProject("") + client.WithKey("") +) + +service := documentsdb.New(client) + +response, error := service.ListIndexes( + "", + "", + documentsdb.WithListIndexesQueries([]string{}), + documentsdb.WithListIndexesTotal(false), +) +``` diff --git a/examples/1.9.x/server-go/examples/documentsdb/list-transactions.md b/examples/1.9.x/server-go/examples/documentsdb/list-transactions.md new file mode 100644 index 000000000..8d2dd7865 --- /dev/null +++ b/examples/1.9.x/server-go/examples/documentsdb/list-transactions.md @@ -0,0 +1,21 @@ +```go +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/documentsdb" +) + +client := client.New( + client.WithEndpoint("https://.cloud.appwrite.io/v1") + client.WithProject("") + client.WithKey("") +) + +service := documentsdb.New(client) + +response, error := service.ListTransactions( + documentsdb.WithListTransactionsQueries([]string{}), +) +``` diff --git a/examples/1.9.x/server-go/examples/documentsdb/list.md b/examples/1.9.x/server-go/examples/documentsdb/list.md new file mode 100644 index 000000000..cdea370a0 --- /dev/null +++ b/examples/1.9.x/server-go/examples/documentsdb/list.md @@ -0,0 +1,23 @@ +```go +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/documentsdb" +) + +client := client.New( + client.WithEndpoint("https://.cloud.appwrite.io/v1") + client.WithProject("") + client.WithKey("") +) + +service := documentsdb.New(client) + +response, error := service.List( + documentsdb.WithListQueries([]string{}), + documentsdb.WithListSearch(""), + documentsdb.WithListTotal(false), +) +``` diff --git a/examples/1.9.x/server-go/examples/documentsdb/update-collection.md b/examples/1.9.x/server-go/examples/documentsdb/update-collection.md new file mode 100644 index 000000000..ddb40ce25 --- /dev/null +++ b/examples/1.9.x/server-go/examples/documentsdb/update-collection.md @@ -0,0 +1,27 @@ +```go +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/documentsdb" +) + +client := client.New( + client.WithEndpoint("https://.cloud.appwrite.io/v1") + client.WithProject("") + client.WithKey("") +) + +service := documentsdb.New(client) + +response, error := service.UpdateCollection( + "", + "", + "", + documentsdb.WithUpdateCollectionPermissions([]string{"read("any")"}), + documentsdb.WithUpdateCollectionDocumentSecurity(false), + documentsdb.WithUpdateCollectionEnabled(false), + documentsdb.WithUpdateCollectionPurge(false), +) +``` diff --git a/examples/1.9.x/server-go/examples/documentsdb/update-document.md b/examples/1.9.x/server-go/examples/documentsdb/update-document.md new file mode 100644 index 000000000..3c13df719 --- /dev/null +++ b/examples/1.9.x/server-go/examples/documentsdb/update-document.md @@ -0,0 +1,26 @@ +```go +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/documentsdb" +) + +client := client.New( + client.WithEndpoint("https://.cloud.appwrite.io/v1") + client.WithProject("") + client.WithSession("") +) + +service := documentsdb.New(client) + +response, error := service.UpdateDocument( + "", + "", + "", + documentsdb.WithUpdateDocumentData(map[string]interface{}{}), + documentsdb.WithUpdateDocumentPermissions([]string{"read("any")"}), + documentsdb.WithUpdateDocumentTransactionId(""), +) +``` diff --git a/examples/1.9.x/server-go/examples/documentsdb/update-documents.md b/examples/1.9.x/server-go/examples/documentsdb/update-documents.md new file mode 100644 index 000000000..f5cef80bb --- /dev/null +++ b/examples/1.9.x/server-go/examples/documentsdb/update-documents.md @@ -0,0 +1,25 @@ +```go +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/documentsdb" +) + +client := client.New( + client.WithEndpoint("https://.cloud.appwrite.io/v1") + client.WithProject("") + client.WithKey("") +) + +service := documentsdb.New(client) + +response, error := service.UpdateDocuments( + "", + "", + documentsdb.WithUpdateDocumentsData(map[string]interface{}{}), + documentsdb.WithUpdateDocumentsQueries([]string{}), + documentsdb.WithUpdateDocumentsTransactionId(""), +) +``` diff --git a/examples/1.9.x/server-go/examples/documentsdb/update-transaction.md b/examples/1.9.x/server-go/examples/documentsdb/update-transaction.md new file mode 100644 index 000000000..1e4865441 --- /dev/null +++ b/examples/1.9.x/server-go/examples/documentsdb/update-transaction.md @@ -0,0 +1,23 @@ +```go +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/documentsdb" +) + +client := client.New( + client.WithEndpoint("https://.cloud.appwrite.io/v1") + client.WithProject("") + client.WithKey("") +) + +service := documentsdb.New(client) + +response, error := service.UpdateTransaction( + "", + documentsdb.WithUpdateTransactionCommit(false), + documentsdb.WithUpdateTransactionRollback(false), +) +``` diff --git a/examples/1.9.x/server-go/examples/documentsdb/update.md b/examples/1.9.x/server-go/examples/documentsdb/update.md new file mode 100644 index 000000000..5adf72655 --- /dev/null +++ b/examples/1.9.x/server-go/examples/documentsdb/update.md @@ -0,0 +1,23 @@ +```go +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/documentsdb" +) + +client := client.New( + client.WithEndpoint("https://.cloud.appwrite.io/v1") + client.WithProject("") + client.WithKey("") +) + +service := documentsdb.New(client) + +response, error := service.Update( + "", + "", + documentsdb.WithUpdateEnabled(false), +) +``` diff --git a/examples/1.9.x/server-go/examples/documentsdb/upsert-document.md b/examples/1.9.x/server-go/examples/documentsdb/upsert-document.md new file mode 100644 index 000000000..4330d381a --- /dev/null +++ b/examples/1.9.x/server-go/examples/documentsdb/upsert-document.md @@ -0,0 +1,26 @@ +```go +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/documentsdb" +) + +client := client.New( + client.WithEndpoint("https://.cloud.appwrite.io/v1") + client.WithProject("") + client.WithSession("") +) + +service := documentsdb.New(client) + +response, error := service.UpsertDocument( + "", + "", + "", + documentsdb.WithUpsertDocumentData(map[string]interface{}{}), + documentsdb.WithUpsertDocumentPermissions([]string{"read("any")"}), + documentsdb.WithUpsertDocumentTransactionId(""), +) +``` diff --git a/examples/1.9.x/server-go/examples/documentsdb/upsert-documents.md b/examples/1.9.x/server-go/examples/documentsdb/upsert-documents.md new file mode 100644 index 000000000..03ec1ff1a --- /dev/null +++ b/examples/1.9.x/server-go/examples/documentsdb/upsert-documents.md @@ -0,0 +1,24 @@ +```go +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/documentsdb" +) + +client := client.New( + client.WithEndpoint("https://.cloud.appwrite.io/v1") + client.WithProject("") + client.WithKey("") +) + +service := documentsdb.New(client) + +response, error := service.UpsertDocuments( + "", + "", + []interface{}{}, + documentsdb.WithUpsertDocumentsTransactionId(""), +) +``` diff --git a/examples/1.9.x/server-go/examples/oauth2/approve.md b/examples/1.9.x/server-go/examples/oauth2/approve.md new file mode 100644 index 000000000..5de049825 --- /dev/null +++ b/examples/1.9.x/server-go/examples/oauth2/approve.md @@ -0,0 +1,23 @@ +```go +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/v6/client" + "github.com/appwrite/sdk-for-go/v6/oauth2" +) + +client := client.New( + client.WithEndpoint("https://.cloud.appwrite.io/v1") + client.WithSession("") + client.WithProject("") +) + +service := oauth2.New(client) + +response, error := service.Approve( + "", + oauth2.WithApproveAuthorizationDetails(""), + oauth2.WithApproveScope(""), +) +``` diff --git a/examples/1.9.x/server-go/examples/oauth2/authorize-post.md b/examples/1.9.x/server-go/examples/oauth2/authorize-post.md new file mode 100644 index 000000000..aa030b1be --- /dev/null +++ b/examples/1.9.x/server-go/examples/oauth2/authorize-post.md @@ -0,0 +1,34 @@ +```go +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/v6/client" + "github.com/appwrite/sdk-for-go/v6/oauth2" +) + +client := client.New( + client.WithEndpoint("https://.cloud.appwrite.io/v1") + client.WithSession("") + client.WithProject("") +) + +service := oauth2.New(client) + +response, error := service.AuthorizePost( + oauth2.WithAuthorizePostClientId(""), + oauth2.WithAuthorizePostRedirectUri("https://example.com"), + oauth2.WithAuthorizePostResponseType(""), + oauth2.WithAuthorizePostScope(""), + oauth2.WithAuthorizePostState(""), + oauth2.WithAuthorizePostNonce(""), + oauth2.WithAuthorizePostCodeChallenge(""), + oauth2.WithAuthorizePostCodeChallengeMethod("s256"), + oauth2.WithAuthorizePostPrompt(""), + oauth2.WithAuthorizePostMaxAge(0), + oauth2.WithAuthorizePostAuthorizationDetails(""), + oauth2.WithAuthorizePostResource(""), + oauth2.WithAuthorizePostAudience(""), + oauth2.WithAuthorizePostRequestUri(""), +) +``` diff --git a/examples/1.9.x/server-go/examples/oauth2/authorize.md b/examples/1.9.x/server-go/examples/oauth2/authorize.md new file mode 100644 index 000000000..c7f03ec41 --- /dev/null +++ b/examples/1.9.x/server-go/examples/oauth2/authorize.md @@ -0,0 +1,34 @@ +```go +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/v6/client" + "github.com/appwrite/sdk-for-go/v6/oauth2" +) + +client := client.New( + client.WithEndpoint("https://.cloud.appwrite.io/v1") + client.WithSession("") + client.WithProject("") +) + +service := oauth2.New(client) + +response, error := service.Authorize( + oauth2.WithAuthorizeClientId(""), + oauth2.WithAuthorizeRedirectUri("https://example.com"), + oauth2.WithAuthorizeResponseType(""), + oauth2.WithAuthorizeScope(""), + oauth2.WithAuthorizeState(""), + oauth2.WithAuthorizeNonce(""), + oauth2.WithAuthorizeCodeChallenge(""), + oauth2.WithAuthorizeCodeChallengeMethod("s256"), + oauth2.WithAuthorizePrompt(""), + oauth2.WithAuthorizeMaxAge(0), + oauth2.WithAuthorizeAuthorizationDetails(""), + oauth2.WithAuthorizeResource(""), + oauth2.WithAuthorizeAudience(""), + oauth2.WithAuthorizeRequestUri(""), +) +``` diff --git a/examples/1.9.x/server-go/examples/oauth2/create-device-authorization.md b/examples/1.9.x/server-go/examples/oauth2/create-device-authorization.md new file mode 100644 index 000000000..7eb198e1f --- /dev/null +++ b/examples/1.9.x/server-go/examples/oauth2/create-device-authorization.md @@ -0,0 +1,25 @@ +```go +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/v6/client" + "github.com/appwrite/sdk-for-go/v6/oauth2" +) + +client := client.New( + client.WithEndpoint("https://.cloud.appwrite.io/v1") + client.WithSession("") + client.WithProject("") +) + +service := oauth2.New(client) + +response, error := service.CreateDeviceAuthorization( + oauth2.WithCreateDeviceAuthorizationClientId(""), + oauth2.WithCreateDeviceAuthorizationScope(""), + oauth2.WithCreateDeviceAuthorizationAuthorizationDetails(""), + oauth2.WithCreateDeviceAuthorizationResource(""), + oauth2.WithCreateDeviceAuthorizationAudience(""), +) +``` diff --git a/examples/1.9.x/server-go/examples/oauth2/create-grant.md b/examples/1.9.x/server-go/examples/oauth2/create-grant.md new file mode 100644 index 000000000..ba1a639e4 --- /dev/null +++ b/examples/1.9.x/server-go/examples/oauth2/create-grant.md @@ -0,0 +1,21 @@ +```go +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/v6/client" + "github.com/appwrite/sdk-for-go/v6/oauth2" +) + +client := client.New( + client.WithEndpoint("https://.cloud.appwrite.io/v1") + client.WithSession("") + client.WithProject("") +) + +service := oauth2.New(client) + +response, error := service.CreateGrant( + "", +) +``` diff --git a/examples/1.9.x/server-go/examples/oauth2/create-par.md b/examples/1.9.x/server-go/examples/oauth2/create-par.md new file mode 100644 index 000000000..4922ca9ae --- /dev/null +++ b/examples/1.9.x/server-go/examples/oauth2/create-par.md @@ -0,0 +1,33 @@ +```go +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/v6/client" + "github.com/appwrite/sdk-for-go/v6/oauth2" +) + +client := client.New( + client.WithEndpoint("https://.cloud.appwrite.io/v1") + client.WithSession("") + client.WithProject("") +) + +service := oauth2.New(client) + +response, error := service.CreatePAR( + "", + "https://example.com", + "code", + oauth2.WithCreatePARScope(""), + oauth2.WithCreatePARState(""), + oauth2.WithCreatePARNonce(""), + oauth2.WithCreatePARCodeChallenge(""), + oauth2.WithCreatePARCodeChallengeMethod("s256"), + oauth2.WithCreatePARPrompt(""), + oauth2.WithCreatePARMaxAge(0), + oauth2.WithCreatePARAuthorizationDetails(""), + oauth2.WithCreatePARResource(""), + oauth2.WithCreatePARAudience(""), +) +``` diff --git a/examples/1.9.x/server-go/examples/oauth2/create-token.md b/examples/1.9.x/server-go/examples/oauth2/create-token.md new file mode 100644 index 000000000..3515db392 --- /dev/null +++ b/examples/1.9.x/server-go/examples/oauth2/create-token.md @@ -0,0 +1,30 @@ +```go +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/v6/client" + "github.com/appwrite/sdk-for-go/v6/oauth2" +) + +client := client.New( + client.WithEndpoint("https://.cloud.appwrite.io/v1") + client.WithSession("") + client.WithProject("") +) + +service := oauth2.New(client) + +response, error := service.CreateToken( + "", + oauth2.WithCreateTokenCode(""), + oauth2.WithCreateTokenRefreshToken(""), + oauth2.WithCreateTokenDeviceCode(""), + oauth2.WithCreateTokenClientId(""), + oauth2.WithCreateTokenClientSecret(""), + oauth2.WithCreateTokenCodeVerifier(""), + oauth2.WithCreateTokenRedirectUri("https://example.com"), + oauth2.WithCreateTokenResource(""), + oauth2.WithCreateTokenAudience(""), +) +``` diff --git a/examples/1.9.x/server-go/examples/oauth2/get-grant.md b/examples/1.9.x/server-go/examples/oauth2/get-grant.md new file mode 100644 index 000000000..8ebb96b54 --- /dev/null +++ b/examples/1.9.x/server-go/examples/oauth2/get-grant.md @@ -0,0 +1,21 @@ +```go +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/v6/client" + "github.com/appwrite/sdk-for-go/v6/oauth2" +) + +client := client.New( + client.WithEndpoint("https://.cloud.appwrite.io/v1") + client.WithSession("") + client.WithProject("") +) + +service := oauth2.New(client) + +response, error := service.GetGrant( + "", +) +``` diff --git a/examples/1.9.x/server-go/examples/oauth2/list-organizations.md b/examples/1.9.x/server-go/examples/oauth2/list-organizations.md new file mode 100644 index 000000000..afb5dcf56 --- /dev/null +++ b/examples/1.9.x/server-go/examples/oauth2/list-organizations.md @@ -0,0 +1,23 @@ +```go +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/v6/client" + "github.com/appwrite/sdk-for-go/v6/oauth2" +) + +client := client.New( + client.WithEndpoint("https://.cloud.appwrite.io/v1") + client.WithSession("") + client.WithProject("") +) + +service := oauth2.New(client) + +response, error := service.ListOrganizations( + oauth2.WithListOrganizationsLimit(1), + oauth2.WithListOrganizationsOffset(0), + oauth2.WithListOrganizationsSearch(""), +) +``` diff --git a/examples/1.9.x/server-go/examples/oauth2/list-projects.md b/examples/1.9.x/server-go/examples/oauth2/list-projects.md new file mode 100644 index 000000000..3c3df7690 --- /dev/null +++ b/examples/1.9.x/server-go/examples/oauth2/list-projects.md @@ -0,0 +1,23 @@ +```go +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/v6/client" + "github.com/appwrite/sdk-for-go/v6/oauth2" +) + +client := client.New( + client.WithEndpoint("https://.cloud.appwrite.io/v1") + client.WithSession("") + client.WithProject("") +) + +service := oauth2.New(client) + +response, error := service.ListProjects( + oauth2.WithListProjectsLimit(1), + oauth2.WithListProjectsOffset(0), + oauth2.WithListProjectsSearch(""), +) +``` diff --git a/examples/1.9.x/server-go/examples/oauth2/reject.md b/examples/1.9.x/server-go/examples/oauth2/reject.md new file mode 100644 index 000000000..4e9da8fa8 --- /dev/null +++ b/examples/1.9.x/server-go/examples/oauth2/reject.md @@ -0,0 +1,21 @@ +```go +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/v6/client" + "github.com/appwrite/sdk-for-go/v6/oauth2" +) + +client := client.New( + client.WithEndpoint("https://.cloud.appwrite.io/v1") + client.WithSession("") + client.WithProject("") +) + +service := oauth2.New(client) + +response, error := service.Reject( + "", +) +``` diff --git a/examples/1.9.x/server-go/examples/oauth2/revoke.md b/examples/1.9.x/server-go/examples/oauth2/revoke.md new file mode 100644 index 000000000..275ac345b --- /dev/null +++ b/examples/1.9.x/server-go/examples/oauth2/revoke.md @@ -0,0 +1,24 @@ +```go +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/v6/client" + "github.com/appwrite/sdk-for-go/v6/oauth2" +) + +client := client.New( + client.WithEndpoint("https://.cloud.appwrite.io/v1") + client.WithSession("") + client.WithProject("") +) + +service := oauth2.New(client) + +response, error := service.Revoke( + "", + oauth2.WithRevokeTokenTypeHint("access_token"), + oauth2.WithRevokeClientId(""), + oauth2.WithRevokeClientSecret(""), +) +``` diff --git a/examples/1.9.x/server-go/examples/organization/create-installation.md b/examples/1.9.x/server-go/examples/organization/create-installation.md new file mode 100644 index 000000000..d92b31717 --- /dev/null +++ b/examples/1.9.x/server-go/examples/organization/create-installation.md @@ -0,0 +1,22 @@ +```go +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/v6/client" + "github.com/appwrite/sdk-for-go/v6/organization" +) + +client := client.New( + client.WithEndpoint("https://.cloud.appwrite.io/v1") + client.WithProject("") + client.WithSession("") +) + +service := organization.New(client) + +response, error := service.CreateInstallation( + "", + organization.WithCreateInstallationAuthorizationDetails(""), +) +``` diff --git a/examples/1.9.x/server-go/examples/organization/delete-installation.md b/examples/1.9.x/server-go/examples/organization/delete-installation.md new file mode 100644 index 000000000..5cde89e41 --- /dev/null +++ b/examples/1.9.x/server-go/examples/organization/delete-installation.md @@ -0,0 +1,21 @@ +```go +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/v6/client" + "github.com/appwrite/sdk-for-go/v6/organization" +) + +client := client.New( + client.WithEndpoint("https://.cloud.appwrite.io/v1") + client.WithProject("") + client.WithSession("") +) + +service := organization.New(client) + +response, error := service.DeleteInstallation( + "", +) +``` diff --git a/examples/1.9.x/server-go/examples/organization/get-installation.md b/examples/1.9.x/server-go/examples/organization/get-installation.md new file mode 100644 index 000000000..8e3614fa3 --- /dev/null +++ b/examples/1.9.x/server-go/examples/organization/get-installation.md @@ -0,0 +1,21 @@ +```go +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/v6/client" + "github.com/appwrite/sdk-for-go/v6/organization" +) + +client := client.New( + client.WithEndpoint("https://.cloud.appwrite.io/v1") + client.WithProject("") + client.WithSession("") +) + +service := organization.New(client) + +response, error := service.GetInstallation( + "", +) +``` diff --git a/examples/1.9.x/server-go/examples/organization/list-installations.md b/examples/1.9.x/server-go/examples/organization/list-installations.md new file mode 100644 index 000000000..cfcc19985 --- /dev/null +++ b/examples/1.9.x/server-go/examples/organization/list-installations.md @@ -0,0 +1,22 @@ +```go +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/v6/client" + "github.com/appwrite/sdk-for-go/v6/organization" +) + +client := client.New( + client.WithEndpoint("https://.cloud.appwrite.io/v1") + client.WithProject("") + client.WithSession("") +) + +service := organization.New(client) + +response, error := service.ListInstallations( + organization.WithListInstallationsQueries([]string{}), + organization.WithListInstallationsTotal(false), +) +``` diff --git a/examples/1.9.x/server-go/examples/organization/update-installation.md b/examples/1.9.x/server-go/examples/organization/update-installation.md new file mode 100644 index 000000000..193e0886c --- /dev/null +++ b/examples/1.9.x/server-go/examples/organization/update-installation.md @@ -0,0 +1,22 @@ +```go +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/v6/client" + "github.com/appwrite/sdk-for-go/v6/organization" +) + +client := client.New( + client.WithEndpoint("https://.cloud.appwrite.io/v1") + client.WithProject("") + client.WithSession("") +) + +service := organization.New(client) + +response, error := service.UpdateInstallation( + "", + organization.WithUpdateInstallationAuthorizationDetails(""), +) +``` diff --git a/examples/1.9.x/server-go/examples/project/update-o-auth-2-server.md b/examples/1.9.x/server-go/examples/project/update-o-auth-2-server.md index 9239ea0f8..18bfcfccb 100644 --- a/examples/1.9.x/server-go/examples/project/update-o-auth-2-server.md +++ b/examples/1.9.x/server-go/examples/project/update-o-auth-2-server.md @@ -24,6 +24,7 @@ response, error := service.UpdateOAuth2Server( project.WithUpdateOAuth2ServerRefreshTokenDuration(60), project.WithUpdateOAuth2ServerPublicAccessTokenDuration(60), project.WithUpdateOAuth2ServerPublicRefreshTokenDuration(60), + project.WithUpdateOAuth2ServerInstallationAccessTokenDuration(60), project.WithUpdateOAuth2ServerConfidentialPkce(false), project.WithUpdateOAuth2ServerVerificationUrl("https://example.com"), project.WithUpdateOAuth2ServerUserCodeLength(6), diff --git a/examples/1.9.x/server-go/examples/teams/create-installation.md b/examples/1.9.x/server-go/examples/teams/create-installation.md new file mode 100644 index 000000000..a12ccfc0f --- /dev/null +++ b/examples/1.9.x/server-go/examples/teams/create-installation.md @@ -0,0 +1,23 @@ +```go +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/v6/client" + "github.com/appwrite/sdk-for-go/v6/teams" +) + +client := client.New( + client.WithEndpoint("https://.cloud.appwrite.io/v1") + client.WithProject("") + client.WithSession("") +) + +service := teams.New(client) + +response, error := service.CreateInstallation( + "", + "", + teams.WithCreateInstallationAuthorizationDetails(""), +) +``` diff --git a/examples/1.9.x/server-go/examples/teams/delete-installation.md b/examples/1.9.x/server-go/examples/teams/delete-installation.md new file mode 100644 index 000000000..f980026e6 --- /dev/null +++ b/examples/1.9.x/server-go/examples/teams/delete-installation.md @@ -0,0 +1,22 @@ +```go +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/v6/client" + "github.com/appwrite/sdk-for-go/v6/teams" +) + +client := client.New( + client.WithEndpoint("https://.cloud.appwrite.io/v1") + client.WithProject("") + client.WithSession("") +) + +service := teams.New(client) + +response, error := service.DeleteInstallation( + "", + "", +) +``` diff --git a/examples/1.9.x/server-go/examples/teams/get-installation.md b/examples/1.9.x/server-go/examples/teams/get-installation.md new file mode 100644 index 000000000..79d5a0874 --- /dev/null +++ b/examples/1.9.x/server-go/examples/teams/get-installation.md @@ -0,0 +1,22 @@ +```go +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/v6/client" + "github.com/appwrite/sdk-for-go/v6/teams" +) + +client := client.New( + client.WithEndpoint("https://.cloud.appwrite.io/v1") + client.WithProject("") + client.WithSession("") +) + +service := teams.New(client) + +response, error := service.GetInstallation( + "", + "", +) +``` diff --git a/examples/1.9.x/server-go/examples/teams/list-installations.md b/examples/1.9.x/server-go/examples/teams/list-installations.md new file mode 100644 index 000000000..172395d2c --- /dev/null +++ b/examples/1.9.x/server-go/examples/teams/list-installations.md @@ -0,0 +1,23 @@ +```go +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/v6/client" + "github.com/appwrite/sdk-for-go/v6/teams" +) + +client := client.New( + client.WithEndpoint("https://.cloud.appwrite.io/v1") + client.WithProject("") + client.WithSession("") +) + +service := teams.New(client) + +response, error := service.ListInstallations( + "", + teams.WithListInstallationsQueries([]string{}), + teams.WithListInstallationsTotal(false), +) +``` diff --git a/examples/1.9.x/server-go/examples/teams/update-installation.md b/examples/1.9.x/server-go/examples/teams/update-installation.md new file mode 100644 index 000000000..67005684d --- /dev/null +++ b/examples/1.9.x/server-go/examples/teams/update-installation.md @@ -0,0 +1,23 @@ +```go +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/v6/client" + "github.com/appwrite/sdk-for-go/v6/teams" +) + +client := client.New( + client.WithEndpoint("https://.cloud.appwrite.io/v1") + client.WithProject("") + client.WithSession("") +) + +service := teams.New(client) + +response, error := service.UpdateInstallation( + "", + "", + teams.WithUpdateInstallationAuthorizationDetails(""), +) +``` diff --git a/examples/1.9.x/server-go/examples/vectorsdb/create-collection.md b/examples/1.9.x/server-go/examples/vectorsdb/create-collection.md new file mode 100644 index 000000000..ab1ba2563 --- /dev/null +++ b/examples/1.9.x/server-go/examples/vectorsdb/create-collection.md @@ -0,0 +1,27 @@ +```go +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/vectorsdb" +) + +client := client.New( + client.WithEndpoint("https://.cloud.appwrite.io/v1") + client.WithProject("") + client.WithKey("") +) + +service := vectorsdb.New(client) + +response, error := service.CreateCollection( + "", + "", + "", + 1, + vectorsdb.WithCreateCollectionPermissions([]string{"read("any")"}), + vectorsdb.WithCreateCollectionDocumentSecurity(false), + vectorsdb.WithCreateCollectionEnabled(false), +) +``` diff --git a/examples/1.9.x/server-go/examples/vectorsdb/create-document.md b/examples/1.9.x/server-go/examples/vectorsdb/create-document.md new file mode 100644 index 000000000..c86eb1a5c --- /dev/null +++ b/examples/1.9.x/server-go/examples/vectorsdb/create-document.md @@ -0,0 +1,35 @@ +```go +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/vectorsdb" +) + +client := client.New( + client.WithEndpoint("https://.cloud.appwrite.io/v1") + client.WithProject("") + client.WithSession("") +) + +service := vectorsdb.New(client) + +response, error := service.CreateDocument( + "", + "", + "", + map[string]interface{}{ + "embeddings": [ + 0.12, + -0.55, + 0.88, + 1.02 + ], + "metadata": { + "key": "value" + } + }, + vectorsdb.WithCreateDocumentPermissions([]string{"read("any")"}), +) +``` diff --git a/examples/1.9.x/server-go/examples/vectorsdb/create-documents.md b/examples/1.9.x/server-go/examples/vectorsdb/create-documents.md new file mode 100644 index 000000000..861974eca --- /dev/null +++ b/examples/1.9.x/server-go/examples/vectorsdb/create-documents.md @@ -0,0 +1,23 @@ +```go +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/vectorsdb" +) + +client := client.New( + client.WithEndpoint("https://.cloud.appwrite.io/v1") + client.WithProject("") + client.WithKey("") +) + +service := vectorsdb.New(client) + +response, error := service.CreateDocuments( + "", + "", + []interface{}{}, +) +``` diff --git a/examples/1.9.x/server-go/examples/vectorsdb/create-index.md b/examples/1.9.x/server-go/examples/vectorsdb/create-index.md new file mode 100644 index 000000000..77e35b121 --- /dev/null +++ b/examples/1.9.x/server-go/examples/vectorsdb/create-index.md @@ -0,0 +1,27 @@ +```go +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/vectorsdb" +) + +client := client.New( + client.WithEndpoint("https://.cloud.appwrite.io/v1") + client.WithProject("") + client.WithKey("") +) + +service := vectorsdb.New(client) + +response, error := service.CreateIndex( + "", + "", + "", + "hnsw_euclidean", + []string{}, + vectorsdb.WithCreateIndexOrders([]string{}), + vectorsdb.WithCreateIndexLengths([]int{}), +) +``` diff --git a/examples/1.9.x/server-go/examples/vectorsdb/create-operations.md b/examples/1.9.x/server-go/examples/vectorsdb/create-operations.md new file mode 100644 index 000000000..d1722730d --- /dev/null +++ b/examples/1.9.x/server-go/examples/vectorsdb/create-operations.md @@ -0,0 +1,32 @@ +```go +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/vectorsdb" +) + +client := client.New( + client.WithEndpoint("https://.cloud.appwrite.io/v1") + client.WithProject("") + client.WithKey("") +) + +service := vectorsdb.New(client) + +response, error := service.CreateOperations( + "", + vectorsdb.WithCreateOperationsOperations([]interface{}{ + { + "action": "create", + "databaseId": "", + "collectionId": "", + "documentId": "", + "data": { + "name": "Walter O'Brien" + } + } + }), +) +``` diff --git a/examples/1.9.x/server-go/examples/vectorsdb/create-query.md b/examples/1.9.x/server-go/examples/vectorsdb/create-query.md new file mode 100644 index 000000000..93715ebf5 --- /dev/null +++ b/examples/1.9.x/server-go/examples/vectorsdb/create-query.md @@ -0,0 +1,26 @@ +```go +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/vectorsdb" +) + +client := client.New( + client.WithEndpoint("https://.cloud.appwrite.io/v1") + client.WithProject("") + client.WithSession("") +) + +service := vectorsdb.New(client) + +response, error := service.CreateQuery( + "", + "", + vectorsdb.WithCreateQueryQueries([]string{}), + vectorsdb.WithCreateQueryTransactionId(""), + vectorsdb.WithCreateQueryTotal(false), + vectorsdb.WithCreateQueryTtl(0), +) +``` diff --git a/examples/1.9.x/server-go/examples/vectorsdb/create-text-embeddings.md b/examples/1.9.x/server-go/examples/vectorsdb/create-text-embeddings.md new file mode 100644 index 000000000..51cab8075 --- /dev/null +++ b/examples/1.9.x/server-go/examples/vectorsdb/create-text-embeddings.md @@ -0,0 +1,22 @@ +```go +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/vectorsdb" +) + +client := client.New( + client.WithEndpoint("https://.cloud.appwrite.io/v1") + client.WithProject("") + client.WithKey("") +) + +service := vectorsdb.New(client) + +response, error := service.CreateTextEmbeddings( + []string{}, + vectorsdb.WithCreateTextEmbeddingsModel("nomic-embed-text"), +) +``` diff --git a/examples/1.9.x/server-go/examples/vectorsdb/create-transaction.md b/examples/1.9.x/server-go/examples/vectorsdb/create-transaction.md new file mode 100644 index 000000000..28e1bc7ac --- /dev/null +++ b/examples/1.9.x/server-go/examples/vectorsdb/create-transaction.md @@ -0,0 +1,21 @@ +```go +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/vectorsdb" +) + +client := client.New( + client.WithEndpoint("https://.cloud.appwrite.io/v1") + client.WithProject("") + client.WithKey("") +) + +service := vectorsdb.New(client) + +response, error := service.CreateTransaction( + vectorsdb.WithCreateTransactionTtl(60), +) +``` diff --git a/examples/1.9.x/server-go/examples/vectorsdb/create.md b/examples/1.9.x/server-go/examples/vectorsdb/create.md new file mode 100644 index 000000000..fbc2ebdd2 --- /dev/null +++ b/examples/1.9.x/server-go/examples/vectorsdb/create.md @@ -0,0 +1,23 @@ +```go +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/vectorsdb" +) + +client := client.New( + client.WithEndpoint("https://.cloud.appwrite.io/v1") + client.WithProject("") + client.WithKey("") +) + +service := vectorsdb.New(client) + +response, error := service.Create( + "", + "", + vectorsdb.WithCreateEnabled(false), +) +``` diff --git a/examples/1.9.x/server-go/examples/vectorsdb/delete-collection.md b/examples/1.9.x/server-go/examples/vectorsdb/delete-collection.md new file mode 100644 index 000000000..edc10b226 --- /dev/null +++ b/examples/1.9.x/server-go/examples/vectorsdb/delete-collection.md @@ -0,0 +1,22 @@ +```go +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/vectorsdb" +) + +client := client.New( + client.WithEndpoint("https://.cloud.appwrite.io/v1") + client.WithProject("") + client.WithKey("") +) + +service := vectorsdb.New(client) + +response, error := service.DeleteCollection( + "", + "", +) +``` diff --git a/examples/1.9.x/server-go/examples/vectorsdb/delete-document.md b/examples/1.9.x/server-go/examples/vectorsdb/delete-document.md new file mode 100644 index 000000000..c6eba01aa --- /dev/null +++ b/examples/1.9.x/server-go/examples/vectorsdb/delete-document.md @@ -0,0 +1,24 @@ +```go +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/vectorsdb" +) + +client := client.New( + client.WithEndpoint("https://.cloud.appwrite.io/v1") + client.WithProject("") + client.WithSession("") +) + +service := vectorsdb.New(client) + +response, error := service.DeleteDocument( + "", + "", + "", + vectorsdb.WithDeleteDocumentTransactionId(""), +) +``` diff --git a/examples/1.9.x/server-go/examples/vectorsdb/delete-documents.md b/examples/1.9.x/server-go/examples/vectorsdb/delete-documents.md new file mode 100644 index 000000000..af3fd584b --- /dev/null +++ b/examples/1.9.x/server-go/examples/vectorsdb/delete-documents.md @@ -0,0 +1,24 @@ +```go +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/vectorsdb" +) + +client := client.New( + client.WithEndpoint("https://.cloud.appwrite.io/v1") + client.WithProject("") + client.WithKey("") +) + +service := vectorsdb.New(client) + +response, error := service.DeleteDocuments( + "", + "", + vectorsdb.WithDeleteDocumentsQueries([]string{}), + vectorsdb.WithDeleteDocumentsTransactionId(""), +) +``` diff --git a/examples/1.9.x/server-go/examples/vectorsdb/delete-index.md b/examples/1.9.x/server-go/examples/vectorsdb/delete-index.md new file mode 100644 index 000000000..677676948 --- /dev/null +++ b/examples/1.9.x/server-go/examples/vectorsdb/delete-index.md @@ -0,0 +1,23 @@ +```go +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/vectorsdb" +) + +client := client.New( + client.WithEndpoint("https://.cloud.appwrite.io/v1") + client.WithProject("") + client.WithKey("") +) + +service := vectorsdb.New(client) + +response, error := service.DeleteIndex( + "", + "", + "", +) +``` diff --git a/examples/1.9.x/server-go/examples/vectorsdb/delete-transaction.md b/examples/1.9.x/server-go/examples/vectorsdb/delete-transaction.md new file mode 100644 index 000000000..e0f69c587 --- /dev/null +++ b/examples/1.9.x/server-go/examples/vectorsdb/delete-transaction.md @@ -0,0 +1,21 @@ +```go +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/vectorsdb" +) + +client := client.New( + client.WithEndpoint("https://.cloud.appwrite.io/v1") + client.WithProject("") + client.WithKey("") +) + +service := vectorsdb.New(client) + +response, error := service.DeleteTransaction( + "", +) +``` diff --git a/examples/1.9.x/server-go/examples/vectorsdb/delete.md b/examples/1.9.x/server-go/examples/vectorsdb/delete.md new file mode 100644 index 000000000..432b05b59 --- /dev/null +++ b/examples/1.9.x/server-go/examples/vectorsdb/delete.md @@ -0,0 +1,21 @@ +```go +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/vectorsdb" +) + +client := client.New( + client.WithEndpoint("https://.cloud.appwrite.io/v1") + client.WithProject("") + client.WithKey("") +) + +service := vectorsdb.New(client) + +response, error := service.Delete( + "", +) +``` diff --git a/examples/1.9.x/server-go/examples/vectorsdb/get-collection.md b/examples/1.9.x/server-go/examples/vectorsdb/get-collection.md new file mode 100644 index 000000000..80b7546d0 --- /dev/null +++ b/examples/1.9.x/server-go/examples/vectorsdb/get-collection.md @@ -0,0 +1,22 @@ +```go +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/vectorsdb" +) + +client := client.New( + client.WithEndpoint("https://.cloud.appwrite.io/v1") + client.WithProject("") + client.WithKey("") +) + +service := vectorsdb.New(client) + +response, error := service.GetCollection( + "", + "", +) +``` diff --git a/examples/1.9.x/server-go/examples/vectorsdb/get-document.md b/examples/1.9.x/server-go/examples/vectorsdb/get-document.md new file mode 100644 index 000000000..1ae3ad9c0 --- /dev/null +++ b/examples/1.9.x/server-go/examples/vectorsdb/get-document.md @@ -0,0 +1,25 @@ +```go +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/vectorsdb" +) + +client := client.New( + client.WithEndpoint("https://.cloud.appwrite.io/v1") + client.WithProject("") + client.WithSession("") +) + +service := vectorsdb.New(client) + +response, error := service.GetDocument( + "", + "", + "", + vectorsdb.WithGetDocumentQueries([]string{}), + vectorsdb.WithGetDocumentTransactionId(""), +) +``` diff --git a/examples/1.9.x/server-go/examples/vectorsdb/get-index.md b/examples/1.9.x/server-go/examples/vectorsdb/get-index.md new file mode 100644 index 000000000..229ac8124 --- /dev/null +++ b/examples/1.9.x/server-go/examples/vectorsdb/get-index.md @@ -0,0 +1,23 @@ +```go +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/vectorsdb" +) + +client := client.New( + client.WithEndpoint("https://.cloud.appwrite.io/v1") + client.WithProject("") + client.WithKey("") +) + +service := vectorsdb.New(client) + +response, error := service.GetIndex( + "", + "", + "", +) +``` diff --git a/examples/1.9.x/server-go/examples/vectorsdb/get-transaction.md b/examples/1.9.x/server-go/examples/vectorsdb/get-transaction.md new file mode 100644 index 000000000..4eff8fd46 --- /dev/null +++ b/examples/1.9.x/server-go/examples/vectorsdb/get-transaction.md @@ -0,0 +1,21 @@ +```go +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/vectorsdb" +) + +client := client.New( + client.WithEndpoint("https://.cloud.appwrite.io/v1") + client.WithProject("") + client.WithKey("") +) + +service := vectorsdb.New(client) + +response, error := service.GetTransaction( + "", +) +``` diff --git a/examples/1.9.x/server-go/examples/vectorsdb/get.md b/examples/1.9.x/server-go/examples/vectorsdb/get.md new file mode 100644 index 000000000..4ebc82088 --- /dev/null +++ b/examples/1.9.x/server-go/examples/vectorsdb/get.md @@ -0,0 +1,21 @@ +```go +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/vectorsdb" +) + +client := client.New( + client.WithEndpoint("https://.cloud.appwrite.io/v1") + client.WithProject("") + client.WithKey("") +) + +service := vectorsdb.New(client) + +response, error := service.Get( + "", +) +``` diff --git a/examples/1.9.x/server-go/examples/vectorsdb/list-collections.md b/examples/1.9.x/server-go/examples/vectorsdb/list-collections.md new file mode 100644 index 000000000..3faf3a4a4 --- /dev/null +++ b/examples/1.9.x/server-go/examples/vectorsdb/list-collections.md @@ -0,0 +1,24 @@ +```go +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/vectorsdb" +) + +client := client.New( + client.WithEndpoint("https://.cloud.appwrite.io/v1") + client.WithProject("") + client.WithKey("") +) + +service := vectorsdb.New(client) + +response, error := service.ListCollections( + "", + vectorsdb.WithListCollectionsQueries([]string{}), + vectorsdb.WithListCollectionsSearch(""), + vectorsdb.WithListCollectionsTotal(false), +) +``` diff --git a/examples/1.9.x/server-go/examples/vectorsdb/list-documents.md b/examples/1.9.x/server-go/examples/vectorsdb/list-documents.md new file mode 100644 index 000000000..26b86ff68 --- /dev/null +++ b/examples/1.9.x/server-go/examples/vectorsdb/list-documents.md @@ -0,0 +1,26 @@ +```go +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/vectorsdb" +) + +client := client.New( + client.WithEndpoint("https://.cloud.appwrite.io/v1") + client.WithProject("") + client.WithSession("") +) + +service := vectorsdb.New(client) + +response, error := service.ListDocuments( + "", + "", + vectorsdb.WithListDocumentsQueries([]string{}), + vectorsdb.WithListDocumentsTransactionId(""), + vectorsdb.WithListDocumentsTotal(false), + vectorsdb.WithListDocumentsTtl(0), +) +``` diff --git a/examples/1.9.x/server-go/examples/vectorsdb/list-indexes.md b/examples/1.9.x/server-go/examples/vectorsdb/list-indexes.md new file mode 100644 index 000000000..b3bd17281 --- /dev/null +++ b/examples/1.9.x/server-go/examples/vectorsdb/list-indexes.md @@ -0,0 +1,24 @@ +```go +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/vectorsdb" +) + +client := client.New( + client.WithEndpoint("https://.cloud.appwrite.io/v1") + client.WithProject("") + client.WithKey("") +) + +service := vectorsdb.New(client) + +response, error := service.ListIndexes( + "", + "", + vectorsdb.WithListIndexesQueries([]string{}), + vectorsdb.WithListIndexesTotal(false), +) +``` diff --git a/examples/1.9.x/server-go/examples/vectorsdb/list-transactions.md b/examples/1.9.x/server-go/examples/vectorsdb/list-transactions.md new file mode 100644 index 000000000..c80a3e244 --- /dev/null +++ b/examples/1.9.x/server-go/examples/vectorsdb/list-transactions.md @@ -0,0 +1,21 @@ +```go +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/vectorsdb" +) + +client := client.New( + client.WithEndpoint("https://.cloud.appwrite.io/v1") + client.WithProject("") + client.WithKey("") +) + +service := vectorsdb.New(client) + +response, error := service.ListTransactions( + vectorsdb.WithListTransactionsQueries([]string{}), +) +``` diff --git a/examples/1.9.x/server-go/examples/vectorsdb/list.md b/examples/1.9.x/server-go/examples/vectorsdb/list.md new file mode 100644 index 000000000..763b12a4c --- /dev/null +++ b/examples/1.9.x/server-go/examples/vectorsdb/list.md @@ -0,0 +1,23 @@ +```go +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/vectorsdb" +) + +client := client.New( + client.WithEndpoint("https://.cloud.appwrite.io/v1") + client.WithProject("") + client.WithKey("") +) + +service := vectorsdb.New(client) + +response, error := service.List( + vectorsdb.WithListQueries([]string{}), + vectorsdb.WithListSearch(""), + vectorsdb.WithListTotal(false), +) +``` diff --git a/examples/1.9.x/server-go/examples/vectorsdb/update-collection.md b/examples/1.9.x/server-go/examples/vectorsdb/update-collection.md new file mode 100644 index 000000000..0c2b5f493 --- /dev/null +++ b/examples/1.9.x/server-go/examples/vectorsdb/update-collection.md @@ -0,0 +1,27 @@ +```go +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/vectorsdb" +) + +client := client.New( + client.WithEndpoint("https://.cloud.appwrite.io/v1") + client.WithProject("") + client.WithKey("") +) + +service := vectorsdb.New(client) + +response, error := service.UpdateCollection( + "", + "", + "", + vectorsdb.WithUpdateCollectionDimension(1), + vectorsdb.WithUpdateCollectionPermissions([]string{"read("any")"}), + vectorsdb.WithUpdateCollectionDocumentSecurity(false), + vectorsdb.WithUpdateCollectionEnabled(false), +) +``` diff --git a/examples/1.9.x/server-go/examples/vectorsdb/update-document.md b/examples/1.9.x/server-go/examples/vectorsdb/update-document.md new file mode 100644 index 000000000..c8a7972ea --- /dev/null +++ b/examples/1.9.x/server-go/examples/vectorsdb/update-document.md @@ -0,0 +1,26 @@ +```go +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/vectorsdb" +) + +client := client.New( + client.WithEndpoint("https://.cloud.appwrite.io/v1") + client.WithProject("") + client.WithSession("") +) + +service := vectorsdb.New(client) + +response, error := service.UpdateDocument( + "", + "", + "", + vectorsdb.WithUpdateDocumentData(map[string]interface{}{}), + vectorsdb.WithUpdateDocumentPermissions([]string{"read("any")"}), + vectorsdb.WithUpdateDocumentTransactionId(""), +) +``` diff --git a/examples/1.9.x/server-go/examples/vectorsdb/update-documents.md b/examples/1.9.x/server-go/examples/vectorsdb/update-documents.md new file mode 100644 index 000000000..98cf51ce0 --- /dev/null +++ b/examples/1.9.x/server-go/examples/vectorsdb/update-documents.md @@ -0,0 +1,25 @@ +```go +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/vectorsdb" +) + +client := client.New( + client.WithEndpoint("https://.cloud.appwrite.io/v1") + client.WithProject("") + client.WithKey("") +) + +service := vectorsdb.New(client) + +response, error := service.UpdateDocuments( + "", + "", + vectorsdb.WithUpdateDocumentsData(map[string]interface{}{}), + vectorsdb.WithUpdateDocumentsQueries([]string{}), + vectorsdb.WithUpdateDocumentsTransactionId(""), +) +``` diff --git a/examples/1.9.x/server-go/examples/vectorsdb/update-transaction.md b/examples/1.9.x/server-go/examples/vectorsdb/update-transaction.md new file mode 100644 index 000000000..349913b8d --- /dev/null +++ b/examples/1.9.x/server-go/examples/vectorsdb/update-transaction.md @@ -0,0 +1,23 @@ +```go +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/vectorsdb" +) + +client := client.New( + client.WithEndpoint("https://.cloud.appwrite.io/v1") + client.WithProject("") + client.WithKey("") +) + +service := vectorsdb.New(client) + +response, error := service.UpdateTransaction( + "", + vectorsdb.WithUpdateTransactionCommit(false), + vectorsdb.WithUpdateTransactionRollback(false), +) +``` diff --git a/examples/1.9.x/server-go/examples/vectorsdb/update.md b/examples/1.9.x/server-go/examples/vectorsdb/update.md new file mode 100644 index 000000000..c4591fd41 --- /dev/null +++ b/examples/1.9.x/server-go/examples/vectorsdb/update.md @@ -0,0 +1,23 @@ +```go +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/vectorsdb" +) + +client := client.New( + client.WithEndpoint("https://.cloud.appwrite.io/v1") + client.WithProject("") + client.WithKey("") +) + +service := vectorsdb.New(client) + +response, error := service.Update( + "", + "", + vectorsdb.WithUpdateEnabled(false), +) +``` diff --git a/examples/1.9.x/server-go/examples/vectorsdb/upsert-document.md b/examples/1.9.x/server-go/examples/vectorsdb/upsert-document.md new file mode 100644 index 000000000..43d232035 --- /dev/null +++ b/examples/1.9.x/server-go/examples/vectorsdb/upsert-document.md @@ -0,0 +1,26 @@ +```go +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/vectorsdb" +) + +client := client.New( + client.WithEndpoint("https://.cloud.appwrite.io/v1") + client.WithProject("") + client.WithSession("") +) + +service := vectorsdb.New(client) + +response, error := service.UpsertDocument( + "", + "", + "", + vectorsdb.WithUpsertDocumentData(map[string]interface{}{}), + vectorsdb.WithUpsertDocumentPermissions([]string{"read("any")"}), + vectorsdb.WithUpsertDocumentTransactionId(""), +) +``` diff --git a/examples/1.9.x/server-go/examples/vectorsdb/upsert-documents.md b/examples/1.9.x/server-go/examples/vectorsdb/upsert-documents.md new file mode 100644 index 000000000..b53f316b7 --- /dev/null +++ b/examples/1.9.x/server-go/examples/vectorsdb/upsert-documents.md @@ -0,0 +1,24 @@ +```go +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/vectorsdb" +) + +client := client.New( + client.WithEndpoint("https://.cloud.appwrite.io/v1") + client.WithProject("") + client.WithKey("") +) + +service := vectorsdb.New(client) + +response, error := service.UpsertDocuments( + "", + "", + []interface{}{}, + vectorsdb.WithUpsertDocumentsTransactionId(""), +) +``` diff --git a/examples/1.9.x/server-graphql/examples/apps/create-installation-token.md b/examples/1.9.x/server-graphql/examples/apps/create-installation-token.md new file mode 100644 index 000000000..46c9fb92d --- /dev/null +++ b/examples/1.9.x/server-graphql/examples/apps/create-installation-token.md @@ -0,0 +1,30 @@ +```graphql +mutation { + appsCreateInstallationToken( + appId: "", + installationId: "" + ) { + access_token + token_type + expires_in + refresh_token + scope + authorization_details + id_token + } +} +mutation { + appsCreateInstallationToken( + appId: "", + installationId: "" + ) { + access_token + token_type + expires_in + refresh_token + scope + authorization_details + id_token + } +} +``` diff --git a/examples/1.9.x/server-graphql/examples/apps/create-key.md b/examples/1.9.x/server-graphql/examples/apps/create-key.md new file mode 100644 index 000000000..64fcbf5f1 --- /dev/null +++ b/examples/1.9.x/server-graphql/examples/apps/create-key.md @@ -0,0 +1,32 @@ +```graphql +mutation { + appsCreateKey( + appId: "" + ) { + _id + _createdAt + _updatedAt + appId + secret + hint + createdById + createdByName + lastAccessedAt + } +} +mutation { + appsCreateKey( + appId: "" + ) { + _id + _createdAt + _updatedAt + appId + secret + hint + createdById + createdByName + lastAccessedAt + } +} +``` diff --git a/examples/1.9.x/server-graphql/examples/apps/create-secret.md b/examples/1.9.x/server-graphql/examples/apps/create-secret.md new file mode 100644 index 000000000..ab0cbdff8 --- /dev/null +++ b/examples/1.9.x/server-graphql/examples/apps/create-secret.md @@ -0,0 +1,32 @@ +```graphql +mutation { + appsCreateSecret( + appId: "" + ) { + _id + _createdAt + _updatedAt + appId + secret + hint + createdById + createdByName + lastAccessedAt + } +} +mutation { + appsCreateSecret( + appId: "" + ) { + _id + _createdAt + _updatedAt + appId + secret + hint + createdById + createdByName + lastAccessedAt + } +} +``` diff --git a/examples/1.9.x/server-graphql/examples/apps/create.md b/examples/1.9.x/server-graphql/examples/apps/create.md new file mode 100644 index 000000000..bc82059c9 --- /dev/null +++ b/examples/1.9.x/server-graphql/examples/apps/create.md @@ -0,0 +1,122 @@ +```graphql +mutation { + appsCreate( + appId: "", + name: "", + redirectUris: [], + description: "", + clientUri: "https://example.com", + logoUri: "https://example.com", + privacyPolicyUrl: "https://example.com", + termsUrl: "https://example.com", + contacts: [], + tagline: "", + tags: [], + images: [], + supportUrl: "https://example.com", + dataDeletionUrl: "https://example.com", + postLogoutRedirectUris: [], + enabled: false, + type: "public", + deviceFlow: false, + teamId: "" + ) { + _id + _createdAt + _updatedAt + name + description + clientUri + logoUri + privacyPolicyUrl + termsUrl + contacts + tagline + tags + labels + images + supportUrl + dataDeletionUrl + redirectUris + postLogoutRedirectUris + enabled + type + deviceFlow + teamId + userId + installationScopes + installationRedirectUrl + secrets { + _id + _createdAt + _updatedAt + appId + secret + hint + createdById + createdByName + lastAccessedAt + } + } +} +mutation { + appsCreate( + appId: "", + name: "", + redirectUris: [], + description: "", + clientUri: "https://example.com", + logoUri: "https://example.com", + privacyPolicyUrl: "https://example.com", + termsUrl: "https://example.com", + contacts: [], + tagline: "", + tags: [], + images: [], + supportUrl: "https://example.com", + dataDeletionUrl: "https://example.com", + postLogoutRedirectUris: [], + enabled: false, + type: "public", + deviceFlow: false, + teamId: "" + ) { + _id + _createdAt + _updatedAt + name + description + clientUri + logoUri + privacyPolicyUrl + termsUrl + contacts + tagline + tags + labels + images + supportUrl + dataDeletionUrl + redirectUris + postLogoutRedirectUris + enabled + type + deviceFlow + teamId + userId + installationScopes + installationRedirectUrl + secrets { + _id + _createdAt + _updatedAt + appId + secret + hint + createdById + createdByName + lastAccessedAt + } + } +} +``` diff --git a/examples/1.9.x/server-graphql/examples/apps/delete-key.md b/examples/1.9.x/server-graphql/examples/apps/delete-key.md new file mode 100644 index 000000000..164678556 --- /dev/null +++ b/examples/1.9.x/server-graphql/examples/apps/delete-key.md @@ -0,0 +1,18 @@ +```graphql +mutation { + appsDeleteKey( + appId: "", + keyId: "" + ) { + status + } +} +mutation { + appsDeleteKey( + appId: "", + keyId: "" + ) { + status + } +} +``` diff --git a/examples/1.9.x/server-graphql/examples/apps/delete-secret.md b/examples/1.9.x/server-graphql/examples/apps/delete-secret.md new file mode 100644 index 000000000..b245e9b1b --- /dev/null +++ b/examples/1.9.x/server-graphql/examples/apps/delete-secret.md @@ -0,0 +1,18 @@ +```graphql +mutation { + appsDeleteSecret( + appId: "", + secretId: "" + ) { + status + } +} +mutation { + appsDeleteSecret( + appId: "", + secretId: "" + ) { + status + } +} +``` diff --git a/examples/1.9.x/server-graphql/examples/apps/delete-tokens.md b/examples/1.9.x/server-graphql/examples/apps/delete-tokens.md new file mode 100644 index 000000000..de3f11bef --- /dev/null +++ b/examples/1.9.x/server-graphql/examples/apps/delete-tokens.md @@ -0,0 +1,16 @@ +```graphql +mutation { + appsDeleteTokens( + appId: "" + ) { + status + } +} +mutation { + appsDeleteTokens( + appId: "" + ) { + status + } +} +``` diff --git a/examples/1.9.x/server-graphql/examples/apps/delete.md b/examples/1.9.x/server-graphql/examples/apps/delete.md new file mode 100644 index 000000000..97a94b661 --- /dev/null +++ b/examples/1.9.x/server-graphql/examples/apps/delete.md @@ -0,0 +1,16 @@ +```graphql +mutation { + appsDelete( + appId: "" + ) { + status + } +} +mutation { + appsDelete( + appId: "" + ) { + status + } +} +``` diff --git a/examples/1.9.x/server-graphql/examples/apps/get-installation.md b/examples/1.9.x/server-graphql/examples/apps/get-installation.md new file mode 100644 index 000000000..1ef5ca9b5 --- /dev/null +++ b/examples/1.9.x/server-graphql/examples/apps/get-installation.md @@ -0,0 +1,19 @@ +```graphql +query { + appsGetInstallation( + appId: "", + installationId: "" + ) { + _id + _createdAt + _updatedAt + appId + teamId + scopes + authorizationDetails + createdById + createdByName + lastAccessedAt + } +} +``` diff --git a/examples/1.9.x/server-graphql/examples/apps/get-key.md b/examples/1.9.x/server-graphql/examples/apps/get-key.md new file mode 100644 index 000000000..36435f09c --- /dev/null +++ b/examples/1.9.x/server-graphql/examples/apps/get-key.md @@ -0,0 +1,18 @@ +```graphql +query { + appsGetKey( + appId: "", + keyId: "" + ) { + _id + _createdAt + _updatedAt + appId + secret + hint + createdById + createdByName + lastAccessedAt + } +} +``` diff --git a/examples/1.9.x/server-graphql/examples/apps/get-secret.md b/examples/1.9.x/server-graphql/examples/apps/get-secret.md new file mode 100644 index 000000000..c389a15cc --- /dev/null +++ b/examples/1.9.x/server-graphql/examples/apps/get-secret.md @@ -0,0 +1,18 @@ +```graphql +query { + appsGetSecret( + appId: "", + secretId: "" + ) { + _id + _createdAt + _updatedAt + appId + secret + hint + createdById + createdByName + lastAccessedAt + } +} +``` diff --git a/examples/1.9.x/server-graphql/examples/apps/get.md b/examples/1.9.x/server-graphql/examples/apps/get.md new file mode 100644 index 000000000..21d2bc950 --- /dev/null +++ b/examples/1.9.x/server-graphql/examples/apps/get.md @@ -0,0 +1,44 @@ +```graphql +query { + appsGet( + appId: "" + ) { + _id + _createdAt + _updatedAt + name + description + clientUri + logoUri + privacyPolicyUrl + termsUrl + contacts + tagline + tags + labels + images + supportUrl + dataDeletionUrl + redirectUris + postLogoutRedirectUris + enabled + type + deviceFlow + teamId + userId + installationScopes + installationRedirectUrl + secrets { + _id + _createdAt + _updatedAt + appId + secret + hint + createdById + createdByName + lastAccessedAt + } + } +} +``` diff --git a/examples/1.9.x/server-graphql/examples/apps/list-installation-scopes.md b/examples/1.9.x/server-graphql/examples/apps/list-installation-scopes.md new file mode 100644 index 000000000..453eff637 --- /dev/null +++ b/examples/1.9.x/server-graphql/examples/apps/list-installation-scopes.md @@ -0,0 +1,14 @@ +```graphql +query { + appsListInstallationScopes { + total + scopes { + value + description + type + category + deprecated + } + } +} +``` diff --git a/examples/1.9.x/server-graphql/examples/apps/list-installations.md b/examples/1.9.x/server-graphql/examples/apps/list-installations.md new file mode 100644 index 000000000..cf47dd81f --- /dev/null +++ b/examples/1.9.x/server-graphql/examples/apps/list-installations.md @@ -0,0 +1,23 @@ +```graphql +query { + appsListInstallations( + appId: "", + queries: [], + total: false + ) { + total + installations { + _id + _createdAt + _updatedAt + appId + teamId + scopes + authorizationDetails + createdById + createdByName + lastAccessedAt + } + } +} +``` diff --git a/examples/1.9.x/server-graphql/examples/apps/list-keys.md b/examples/1.9.x/server-graphql/examples/apps/list-keys.md new file mode 100644 index 000000000..0aa5dd759 --- /dev/null +++ b/examples/1.9.x/server-graphql/examples/apps/list-keys.md @@ -0,0 +1,22 @@ +```graphql +query { + appsListKeys( + appId: "", + queries: [], + total: false + ) { + total + keys { + _id + _createdAt + _updatedAt + appId + secret + hint + createdById + createdByName + lastAccessedAt + } + } +} +``` diff --git a/examples/1.9.x/server-graphql/examples/apps/list-o-auth-2-scopes.md b/examples/1.9.x/server-graphql/examples/apps/list-o-auth-2-scopes.md new file mode 100644 index 000000000..bce864f54 --- /dev/null +++ b/examples/1.9.x/server-graphql/examples/apps/list-o-auth-2-scopes.md @@ -0,0 +1,14 @@ +```graphql +query { + appsListOAuth2Scopes { + total + scopes { + value + description + type + category + deprecated + } + } +} +``` diff --git a/examples/1.9.x/server-graphql/examples/apps/list-secrets.md b/examples/1.9.x/server-graphql/examples/apps/list-secrets.md new file mode 100644 index 000000000..c14c63a89 --- /dev/null +++ b/examples/1.9.x/server-graphql/examples/apps/list-secrets.md @@ -0,0 +1,22 @@ +```graphql +query { + appsListSecrets( + appId: "", + queries: [], + total: false + ) { + total + secrets { + _id + _createdAt + _updatedAt + appId + secret + hint + createdById + createdByName + lastAccessedAt + } + } +} +``` diff --git a/examples/1.9.x/server-graphql/examples/apps/list.md b/examples/1.9.x/server-graphql/examples/apps/list.md new file mode 100644 index 000000000..2b6087049 --- /dev/null +++ b/examples/1.9.x/server-graphql/examples/apps/list.md @@ -0,0 +1,48 @@ +```graphql +query { + appsList( + queries: [], + total: false + ) { + total + apps { + _id + _createdAt + _updatedAt + name + description + clientUri + logoUri + privacyPolicyUrl + termsUrl + contacts + tagline + tags + labels + images + supportUrl + dataDeletionUrl + redirectUris + postLogoutRedirectUris + enabled + type + deviceFlow + teamId + userId + installationScopes + installationRedirectUrl + secrets { + _id + _createdAt + _updatedAt + appId + secret + hint + createdById + createdByName + lastAccessedAt + } + } + } +} +``` diff --git a/examples/1.9.x/server-graphql/examples/apps/update-labels.md b/examples/1.9.x/server-graphql/examples/apps/update-labels.md new file mode 100644 index 000000000..2b6548b89 --- /dev/null +++ b/examples/1.9.x/server-graphql/examples/apps/update-labels.md @@ -0,0 +1,88 @@ +```graphql +mutation { + appsUpdateLabels( + appId: "", + labels: [] + ) { + _id + _createdAt + _updatedAt + name + description + clientUri + logoUri + privacyPolicyUrl + termsUrl + contacts + tagline + tags + labels + images + supportUrl + dataDeletionUrl + redirectUris + postLogoutRedirectUris + enabled + type + deviceFlow + teamId + userId + installationScopes + installationRedirectUrl + secrets { + _id + _createdAt + _updatedAt + appId + secret + hint + createdById + createdByName + lastAccessedAt + } + } +} +mutation { + appsUpdateLabels( + appId: "", + labels: [] + ) { + _id + _createdAt + _updatedAt + name + description + clientUri + logoUri + privacyPolicyUrl + termsUrl + contacts + tagline + tags + labels + images + supportUrl + dataDeletionUrl + redirectUris + postLogoutRedirectUris + enabled + type + deviceFlow + teamId + userId + installationScopes + installationRedirectUrl + secrets { + _id + _createdAt + _updatedAt + appId + secret + hint + createdById + createdByName + lastAccessedAt + } + } +} +``` diff --git a/examples/1.9.x/server-graphql/examples/apps/update-team.md b/examples/1.9.x/server-graphql/examples/apps/update-team.md new file mode 100644 index 000000000..c0cfb8a2d --- /dev/null +++ b/examples/1.9.x/server-graphql/examples/apps/update-team.md @@ -0,0 +1,88 @@ +```graphql +mutation { + appsUpdateTeam( + appId: "", + teamId: "" + ) { + _id + _createdAt + _updatedAt + name + description + clientUri + logoUri + privacyPolicyUrl + termsUrl + contacts + tagline + tags + labels + images + supportUrl + dataDeletionUrl + redirectUris + postLogoutRedirectUris + enabled + type + deviceFlow + teamId + userId + installationScopes + installationRedirectUrl + secrets { + _id + _createdAt + _updatedAt + appId + secret + hint + createdById + createdByName + lastAccessedAt + } + } +} +mutation { + appsUpdateTeam( + appId: "", + teamId: "" + ) { + _id + _createdAt + _updatedAt + name + description + clientUri + logoUri + privacyPolicyUrl + termsUrl + contacts + tagline + tags + labels + images + supportUrl + dataDeletionUrl + redirectUris + postLogoutRedirectUris + enabled + type + deviceFlow + teamId + userId + installationScopes + installationRedirectUrl + secrets { + _id + _createdAt + _updatedAt + appId + secret + hint + createdById + createdByName + lastAccessedAt + } + } +} +``` diff --git a/examples/1.9.x/server-graphql/examples/apps/update.md b/examples/1.9.x/server-graphql/examples/apps/update.md new file mode 100644 index 000000000..56d37848e --- /dev/null +++ b/examples/1.9.x/server-graphql/examples/apps/update.md @@ -0,0 +1,124 @@ +```graphql +mutation { + appsUpdate( + appId: "", + name: "", + description: "", + clientUri: "https://example.com", + logoUri: "https://example.com", + privacyPolicyUrl: "https://example.com", + termsUrl: "https://example.com", + contacts: [], + tagline: "", + tags: [], + images: [], + supportUrl: "https://example.com", + dataDeletionUrl: "https://example.com", + enabled: false, + redirectUris: [], + postLogoutRedirectUris: [], + type: "public", + deviceFlow: false, + installationScopes: [], + installationRedirectUrl: "https://example.com" + ) { + _id + _createdAt + _updatedAt + name + description + clientUri + logoUri + privacyPolicyUrl + termsUrl + contacts + tagline + tags + labels + images + supportUrl + dataDeletionUrl + redirectUris + postLogoutRedirectUris + enabled + type + deviceFlow + teamId + userId + installationScopes + installationRedirectUrl + secrets { + _id + _createdAt + _updatedAt + appId + secret + hint + createdById + createdByName + lastAccessedAt + } + } +} +mutation { + appsUpdate( + appId: "", + name: "", + description: "", + clientUri: "https://example.com", + logoUri: "https://example.com", + privacyPolicyUrl: "https://example.com", + termsUrl: "https://example.com", + contacts: [], + tagline: "", + tags: [], + images: [], + supportUrl: "https://example.com", + dataDeletionUrl: "https://example.com", + enabled: false, + redirectUris: [], + postLogoutRedirectUris: [], + type: "public", + deviceFlow: false, + installationScopes: [], + installationRedirectUrl: "https://example.com" + ) { + _id + _createdAt + _updatedAt + name + description + clientUri + logoUri + privacyPolicyUrl + termsUrl + contacts + tagline + tags + labels + images + supportUrl + dataDeletionUrl + redirectUris + postLogoutRedirectUris + enabled + type + deviceFlow + teamId + userId + installationScopes + installationRedirectUrl + secrets { + _id + _createdAt + _updatedAt + appId + secret + hint + createdById + createdByName + lastAccessedAt + } + } +} +``` diff --git a/examples/1.9.x/server-graphql/examples/documentsdb/create-collection.md b/examples/1.9.x/server-graphql/examples/documentsdb/create-collection.md new file mode 100644 index 000000000..80ae8649b --- /dev/null +++ b/examples/1.9.x/server-graphql/examples/documentsdb/create-collection.md @@ -0,0 +1,74 @@ +```graphql +mutation { + documentsDBCreateCollection( + databaseId: "", + collectionId: "", + name: "", + permissions: ["read("any")"], + documentSecurity: false, + enabled: false, + attributes: [], + indexes: [] + ) { + _id + _createdAt + _updatedAt + _permissions + databaseId + name + enabled + documentSecurity + attributes + indexes { + _id + _createdAt + _updatedAt + key + type + status + error + attributes + lengths + orders + } + bytesMax + bytesUsed + } +} +mutation { + documentsDBCreateCollection( + databaseId: "", + collectionId: "", + name: "", + permissions: ["read("any")"], + documentSecurity: false, + enabled: false, + attributes: [], + indexes: [] + ) { + _id + _createdAt + _updatedAt + _permissions + databaseId + name + enabled + documentSecurity + attributes + indexes { + _id + _createdAt + _updatedAt + key + type + status + error + attributes + lengths + orders + } + bytesMax + bytesUsed + } +} +``` diff --git a/examples/1.9.x/server-graphql/examples/documentsdb/create-document.md b/examples/1.9.x/server-graphql/examples/documentsdb/create-document.md new file mode 100644 index 000000000..289851fcb --- /dev/null +++ b/examples/1.9.x/server-graphql/examples/documentsdb/create-document.md @@ -0,0 +1,38 @@ +```graphql +mutation { + documentsDBCreateDocument( + databaseId: "", + collectionId: "", + documentId: "", + data: "{\"username\":\"walter.obrien\",\"email\":\"walter.obrien@example.com\",\"fullName\":\"Walter O'Brien\",\"age\":30,\"isAdmin\":false}", + permissions: ["read("any")"] + ) { + _id + _sequence + _collectionId + _databaseId + _createdAt + _updatedAt + _permissions + data + } +} +mutation { + documentsDBCreateDocument( + databaseId: "", + collectionId: "", + documentId: "", + data: "{\"username\":\"walter.obrien\",\"email\":\"walter.obrien@example.com\",\"fullName\":\"Walter O'Brien\",\"age\":30,\"isAdmin\":false}", + permissions: ["read("any")"] + ) { + _id + _sequence + _collectionId + _databaseId + _createdAt + _updatedAt + _permissions + data + } +} +``` diff --git a/examples/1.9.x/server-graphql/examples/documentsdb/create-documents.md b/examples/1.9.x/server-graphql/examples/documentsdb/create-documents.md new file mode 100644 index 000000000..f26479234 --- /dev/null +++ b/examples/1.9.x/server-graphql/examples/documentsdb/create-documents.md @@ -0,0 +1,40 @@ +```graphql +mutation { + documentsDBCreateDocuments( + databaseId: "", + collectionId: "", + documents: [] + ) { + total + documents { + _id + _sequence + _collectionId + _databaseId + _createdAt + _updatedAt + _permissions + data + } + } +} +mutation { + documentsDBCreateDocuments( + databaseId: "", + collectionId: "", + documents: [] + ) { + total + documents { + _id + _sequence + _collectionId + _databaseId + _createdAt + _updatedAt + _permissions + data + } + } +} +``` diff --git a/examples/1.9.x/server-graphql/examples/documentsdb/create-index.md b/examples/1.9.x/server-graphql/examples/documentsdb/create-index.md new file mode 100644 index 000000000..235c2a991 --- /dev/null +++ b/examples/1.9.x/server-graphql/examples/documentsdb/create-index.md @@ -0,0 +1,46 @@ +```graphql +mutation { + documentsDBCreateIndex( + databaseId: "", + collectionId: "", + key: "", + type: "key", + attributes: [], + orders: [], + lengths: [] + ) { + _id + _createdAt + _updatedAt + key + type + status + error + attributes + lengths + orders + } +} +mutation { + documentsDBCreateIndex( + databaseId: "", + collectionId: "", + key: "", + type: "key", + attributes: [], + orders: [], + lengths: [] + ) { + _id + _createdAt + _updatedAt + key + type + status + error + attributes + lengths + orders + } +} +``` diff --git a/examples/1.9.x/server-graphql/examples/documentsdb/create-operations.md b/examples/1.9.x/server-graphql/examples/documentsdb/create-operations.md new file mode 100644 index 000000000..f4c1679e8 --- /dev/null +++ b/examples/1.9.x/server-graphql/examples/documentsdb/create-operations.md @@ -0,0 +1,48 @@ +```graphql +mutation { + documentsDBCreateOperations( + transactionId: "", + operations: [ + { + "action": "create", + "databaseId": "", + "collectionId": "", + "documentId": "", + "data": { + "name": "Walter O'Brien" + } + } + ] + ) { + _id + _createdAt + _updatedAt + status + operations + expiresAt + } +} +mutation { + documentsDBCreateOperations( + transactionId: "", + operations: [ + { + "action": "create", + "databaseId": "", + "collectionId": "", + "documentId": "", + "data": { + "name": "Walter O'Brien" + } + } + ] + ) { + _id + _createdAt + _updatedAt + status + operations + expiresAt + } +} +``` diff --git a/examples/1.9.x/server-graphql/examples/documentsdb/create-transaction.md b/examples/1.9.x/server-graphql/examples/documentsdb/create-transaction.md new file mode 100644 index 000000000..fb4213ec7 --- /dev/null +++ b/examples/1.9.x/server-graphql/examples/documentsdb/create-transaction.md @@ -0,0 +1,26 @@ +```graphql +mutation { + documentsDBCreateTransaction( + ttl: 60 + ) { + _id + _createdAt + _updatedAt + status + operations + expiresAt + } +} +mutation { + documentsDBCreateTransaction( + ttl: 60 + ) { + _id + _createdAt + _updatedAt + status + operations + expiresAt + } +} +``` diff --git a/examples/1.9.x/server-graphql/examples/documentsdb/create.md b/examples/1.9.x/server-graphql/examples/documentsdb/create.md new file mode 100644 index 000000000..c46c0b7d7 --- /dev/null +++ b/examples/1.9.x/server-graphql/examples/documentsdb/create.md @@ -0,0 +1,32 @@ +```graphql +mutation { + documentsDBCreate( + databaseId: "", + name: "", + enabled: false + ) { + _id + name + _createdAt + _updatedAt + enabled + type + status + } +} +mutation { + documentsDBCreate( + databaseId: "", + name: "", + enabled: false + ) { + _id + name + _createdAt + _updatedAt + enabled + type + status + } +} +``` diff --git a/examples/1.9.x/server-graphql/examples/documentsdb/decrement-document-attribute.md b/examples/1.9.x/server-graphql/examples/documentsdb/decrement-document-attribute.md new file mode 100644 index 000000000..366ec9297 --- /dev/null +++ b/examples/1.9.x/server-graphql/examples/documentsdb/decrement-document-attribute.md @@ -0,0 +1,42 @@ +```graphql +mutation { + documentsDBDecrementDocumentAttribute( + databaseId: "", + collectionId: "", + documentId: "", + attribute: "", + value: 0, + min: 0, + transactionId: "" + ) { + _id + _sequence + _collectionId + _databaseId + _createdAt + _updatedAt + _permissions + data + } +} +mutation { + documentsDBDecrementDocumentAttribute( + databaseId: "", + collectionId: "", + documentId: "", + attribute: "", + value: 0, + min: 0, + transactionId: "" + ) { + _id + _sequence + _collectionId + _databaseId + _createdAt + _updatedAt + _permissions + data + } +} +``` diff --git a/examples/1.9.x/server-graphql/examples/documentsdb/delete-collection.md b/examples/1.9.x/server-graphql/examples/documentsdb/delete-collection.md new file mode 100644 index 000000000..75bc5fd38 --- /dev/null +++ b/examples/1.9.x/server-graphql/examples/documentsdb/delete-collection.md @@ -0,0 +1,10 @@ +```graphql +mutation { + documentsDBDeleteCollection( + databaseId: "", + collectionId: "" + ) { + status + } +} +``` diff --git a/examples/1.9.x/server-graphql/examples/documentsdb/delete-document.md b/examples/1.9.x/server-graphql/examples/documentsdb/delete-document.md new file mode 100644 index 000000000..64f03c698 --- /dev/null +++ b/examples/1.9.x/server-graphql/examples/documentsdb/delete-document.md @@ -0,0 +1,12 @@ +```graphql +mutation { + documentsDBDeleteDocument( + databaseId: "", + collectionId: "", + documentId: "", + transactionId: "" + ) { + status + } +} +``` diff --git a/examples/1.9.x/server-graphql/examples/documentsdb/delete-documents.md b/examples/1.9.x/server-graphql/examples/documentsdb/delete-documents.md new file mode 100644 index 000000000..db86b8458 --- /dev/null +++ b/examples/1.9.x/server-graphql/examples/documentsdb/delete-documents.md @@ -0,0 +1,42 @@ +```graphql +mutation { + documentsDBDeleteDocuments( + databaseId: "", + collectionId: "", + queries: [], + transactionId: "" + ) { + total + documents { + _id + _sequence + _collectionId + _databaseId + _createdAt + _updatedAt + _permissions + data + } + } +} +mutation { + documentsDBDeleteDocuments( + databaseId: "", + collectionId: "", + queries: [], + transactionId: "" + ) { + total + documents { + _id + _sequence + _collectionId + _databaseId + _createdAt + _updatedAt + _permissions + data + } + } +} +``` diff --git a/examples/1.9.x/server-graphql/examples/documentsdb/delete-index.md b/examples/1.9.x/server-graphql/examples/documentsdb/delete-index.md new file mode 100644 index 000000000..4d2734039 --- /dev/null +++ b/examples/1.9.x/server-graphql/examples/documentsdb/delete-index.md @@ -0,0 +1,11 @@ +```graphql +mutation { + documentsDBDeleteIndex( + databaseId: "", + collectionId: "", + key: "" + ) { + status + } +} +``` diff --git a/examples/1.9.x/server-graphql/examples/documentsdb/delete-transaction.md b/examples/1.9.x/server-graphql/examples/documentsdb/delete-transaction.md new file mode 100644 index 000000000..d6cea68f2 --- /dev/null +++ b/examples/1.9.x/server-graphql/examples/documentsdb/delete-transaction.md @@ -0,0 +1,9 @@ +```graphql +mutation { + documentsDBDeleteTransaction( + transactionId: "" + ) { + status + } +} +``` diff --git a/examples/1.9.x/server-graphql/examples/documentsdb/delete.md b/examples/1.9.x/server-graphql/examples/documentsdb/delete.md new file mode 100644 index 000000000..9e40f04a5 --- /dev/null +++ b/examples/1.9.x/server-graphql/examples/documentsdb/delete.md @@ -0,0 +1,9 @@ +```graphql +mutation { + documentsDBDelete( + databaseId: "" + ) { + status + } +} +``` diff --git a/examples/1.9.x/server-graphql/examples/documentsdb/get-collection.md b/examples/1.9.x/server-graphql/examples/documentsdb/get-collection.md new file mode 100644 index 000000000..aad2761e6 --- /dev/null +++ b/examples/1.9.x/server-graphql/examples/documentsdb/get-collection.md @@ -0,0 +1,32 @@ +```graphql +query { + documentsDBGetCollection( + databaseId: "", + collectionId: "" + ) { + _id + _createdAt + _updatedAt + _permissions + databaseId + name + enabled + documentSecurity + attributes + indexes { + _id + _createdAt + _updatedAt + key + type + status + error + attributes + lengths + orders + } + bytesMax + bytesUsed + } +} +``` diff --git a/examples/1.9.x/server-graphql/examples/documentsdb/get-document.md b/examples/1.9.x/server-graphql/examples/documentsdb/get-document.md new file mode 100644 index 000000000..970f56656 --- /dev/null +++ b/examples/1.9.x/server-graphql/examples/documentsdb/get-document.md @@ -0,0 +1,20 @@ +```graphql +query { + documentsDBGetDocument( + databaseId: "", + collectionId: "", + documentId: "", + queries: [], + transactionId: "" + ) { + _id + _sequence + _collectionId + _databaseId + _createdAt + _updatedAt + _permissions + data + } +} +``` diff --git a/examples/1.9.x/server-graphql/examples/documentsdb/get-index.md b/examples/1.9.x/server-graphql/examples/documentsdb/get-index.md new file mode 100644 index 000000000..6e261d3bc --- /dev/null +++ b/examples/1.9.x/server-graphql/examples/documentsdb/get-index.md @@ -0,0 +1,20 @@ +```graphql +query { + documentsDBGetIndex( + databaseId: "", + collectionId: "", + key: "" + ) { + _id + _createdAt + _updatedAt + key + type + status + error + attributes + lengths + orders + } +} +``` diff --git a/examples/1.9.x/server-graphql/examples/documentsdb/get-transaction.md b/examples/1.9.x/server-graphql/examples/documentsdb/get-transaction.md new file mode 100644 index 000000000..76e3dd728 --- /dev/null +++ b/examples/1.9.x/server-graphql/examples/documentsdb/get-transaction.md @@ -0,0 +1,14 @@ +```graphql +query { + documentsDBGetTransaction( + transactionId: "" + ) { + _id + _createdAt + _updatedAt + status + operations + expiresAt + } +} +``` diff --git a/examples/1.9.x/server-graphql/examples/documentsdb/get.md b/examples/1.9.x/server-graphql/examples/documentsdb/get.md new file mode 100644 index 000000000..34946723a --- /dev/null +++ b/examples/1.9.x/server-graphql/examples/documentsdb/get.md @@ -0,0 +1,15 @@ +```graphql +query { + documentsDBGet( + databaseId: "" + ) { + _id + name + _createdAt + _updatedAt + enabled + type + status + } +} +``` diff --git a/examples/1.9.x/server-graphql/examples/documentsdb/increment-document-attribute.md b/examples/1.9.x/server-graphql/examples/documentsdb/increment-document-attribute.md new file mode 100644 index 000000000..2ee2e5b70 --- /dev/null +++ b/examples/1.9.x/server-graphql/examples/documentsdb/increment-document-attribute.md @@ -0,0 +1,42 @@ +```graphql +mutation { + documentsDBIncrementDocumentAttribute( + databaseId: "", + collectionId: "", + documentId: "", + attribute: "", + value: 0, + max: 0, + transactionId: "" + ) { + _id + _sequence + _collectionId + _databaseId + _createdAt + _updatedAt + _permissions + data + } +} +mutation { + documentsDBIncrementDocumentAttribute( + databaseId: "", + collectionId: "", + documentId: "", + attribute: "", + value: 0, + max: 0, + transactionId: "" + ) { + _id + _sequence + _collectionId + _databaseId + _createdAt + _updatedAt + _permissions + data + } +} +``` diff --git a/examples/1.9.x/server-graphql/examples/documentsdb/list-collections.md b/examples/1.9.x/server-graphql/examples/documentsdb/list-collections.md new file mode 100644 index 000000000..1ea7ed863 --- /dev/null +++ b/examples/1.9.x/server-graphql/examples/documentsdb/list-collections.md @@ -0,0 +1,37 @@ +```graphql +query { + documentsDBListCollections( + databaseId: "", + queries: [], + search: "", + total: false + ) { + total + collections { + _id + _createdAt + _updatedAt + _permissions + databaseId + name + enabled + documentSecurity + attributes + indexes { + _id + _createdAt + _updatedAt + key + type + status + error + attributes + lengths + orders + } + bytesMax + bytesUsed + } + } +} +``` diff --git a/examples/1.9.x/server-graphql/examples/documentsdb/list-documents.md b/examples/1.9.x/server-graphql/examples/documentsdb/list-documents.md new file mode 100644 index 000000000..89a23cf05 --- /dev/null +++ b/examples/1.9.x/server-graphql/examples/documentsdb/list-documents.md @@ -0,0 +1,24 @@ +```graphql +query { + documentsDBListDocuments( + databaseId: "", + collectionId: "", + queries: [], + transactionId: "", + total: false, + ttl: 0 + ) { + total + documents { + _id + _sequence + _collectionId + _databaseId + _createdAt + _updatedAt + _permissions + data + } + } +} +``` diff --git a/examples/1.9.x/server-graphql/examples/documentsdb/list-indexes.md b/examples/1.9.x/server-graphql/examples/documentsdb/list-indexes.md new file mode 100644 index 000000000..39e333334 --- /dev/null +++ b/examples/1.9.x/server-graphql/examples/documentsdb/list-indexes.md @@ -0,0 +1,24 @@ +```graphql +query { + documentsDBListIndexes( + databaseId: "", + collectionId: "", + queries: [], + total: false + ) { + total + indexes { + _id + _createdAt + _updatedAt + key + type + status + error + attributes + lengths + orders + } + } +} +``` diff --git a/examples/1.9.x/server-graphql/examples/documentsdb/list-transactions.md b/examples/1.9.x/server-graphql/examples/documentsdb/list-transactions.md new file mode 100644 index 000000000..2569dde05 --- /dev/null +++ b/examples/1.9.x/server-graphql/examples/documentsdb/list-transactions.md @@ -0,0 +1,17 @@ +```graphql +query { + documentsDBListTransactions( + queries: [] + ) { + total + transactions { + _id + _createdAt + _updatedAt + status + operations + expiresAt + } + } +} +``` diff --git a/examples/1.9.x/server-graphql/examples/documentsdb/list.md b/examples/1.9.x/server-graphql/examples/documentsdb/list.md new file mode 100644 index 000000000..8acb6e7ae --- /dev/null +++ b/examples/1.9.x/server-graphql/examples/documentsdb/list.md @@ -0,0 +1,20 @@ +```graphql +query { + documentsDBList( + queries: [], + search: "", + total: false + ) { + total + databases { + _id + name + _createdAt + _updatedAt + enabled + type + status + } + } +} +``` diff --git a/examples/1.9.x/server-graphql/examples/documentsdb/update-collection.md b/examples/1.9.x/server-graphql/examples/documentsdb/update-collection.md new file mode 100644 index 000000000..da1ec1cea --- /dev/null +++ b/examples/1.9.x/server-graphql/examples/documentsdb/update-collection.md @@ -0,0 +1,72 @@ +```graphql +mutation { + documentsDBUpdateCollection( + databaseId: "", + collectionId: "", + name: "", + permissions: ["read("any")"], + documentSecurity: false, + enabled: false, + purge: false + ) { + _id + _createdAt + _updatedAt + _permissions + databaseId + name + enabled + documentSecurity + attributes + indexes { + _id + _createdAt + _updatedAt + key + type + status + error + attributes + lengths + orders + } + bytesMax + bytesUsed + } +} +mutation { + documentsDBUpdateCollection( + databaseId: "", + collectionId: "", + name: "", + permissions: ["read("any")"], + documentSecurity: false, + enabled: false, + purge: false + ) { + _id + _createdAt + _updatedAt + _permissions + databaseId + name + enabled + documentSecurity + attributes + indexes { + _id + _createdAt + _updatedAt + key + type + status + error + attributes + lengths + orders + } + bytesMax + bytesUsed + } +} +``` diff --git a/examples/1.9.x/server-graphql/examples/documentsdb/update-document.md b/examples/1.9.x/server-graphql/examples/documentsdb/update-document.md new file mode 100644 index 000000000..c180282ac --- /dev/null +++ b/examples/1.9.x/server-graphql/examples/documentsdb/update-document.md @@ -0,0 +1,40 @@ +```graphql +mutation { + documentsDBUpdateDocument( + databaseId: "", + collectionId: "", + documentId: "", + data: "{}", + permissions: ["read("any")"], + transactionId: "" + ) { + _id + _sequence + _collectionId + _databaseId + _createdAt + _updatedAt + _permissions + data + } +} +mutation { + documentsDBUpdateDocument( + databaseId: "", + collectionId: "", + documentId: "", + data: "{}", + permissions: ["read("any")"], + transactionId: "" + ) { + _id + _sequence + _collectionId + _databaseId + _createdAt + _updatedAt + _permissions + data + } +} +``` diff --git a/examples/1.9.x/server-graphql/examples/documentsdb/update-documents.md b/examples/1.9.x/server-graphql/examples/documentsdb/update-documents.md new file mode 100644 index 000000000..ddb4d7fc9 --- /dev/null +++ b/examples/1.9.x/server-graphql/examples/documentsdb/update-documents.md @@ -0,0 +1,44 @@ +```graphql +mutation { + documentsDBUpdateDocuments( + databaseId: "", + collectionId: "", + data: "{}", + queries: [], + transactionId: "" + ) { + total + documents { + _id + _sequence + _collectionId + _databaseId + _createdAt + _updatedAt + _permissions + data + } + } +} +mutation { + documentsDBUpdateDocuments( + databaseId: "", + collectionId: "", + data: "{}", + queries: [], + transactionId: "" + ) { + total + documents { + _id + _sequence + _collectionId + _databaseId + _createdAt + _updatedAt + _permissions + data + } + } +} +``` diff --git a/examples/1.9.x/server-graphql/examples/documentsdb/update-transaction.md b/examples/1.9.x/server-graphql/examples/documentsdb/update-transaction.md new file mode 100644 index 000000000..22226bbcf --- /dev/null +++ b/examples/1.9.x/server-graphql/examples/documentsdb/update-transaction.md @@ -0,0 +1,30 @@ +```graphql +mutation { + documentsDBUpdateTransaction( + transactionId: "", + commit: false, + rollback: false + ) { + _id + _createdAt + _updatedAt + status + operations + expiresAt + } +} +mutation { + documentsDBUpdateTransaction( + transactionId: "", + commit: false, + rollback: false + ) { + _id + _createdAt + _updatedAt + status + operations + expiresAt + } +} +``` diff --git a/examples/1.9.x/server-graphql/examples/documentsdb/update.md b/examples/1.9.x/server-graphql/examples/documentsdb/update.md new file mode 100644 index 000000000..5bf53fc96 --- /dev/null +++ b/examples/1.9.x/server-graphql/examples/documentsdb/update.md @@ -0,0 +1,32 @@ +```graphql +mutation { + documentsDBUpdate( + databaseId: "", + name: "", + enabled: false + ) { + _id + name + _createdAt + _updatedAt + enabled + type + status + } +} +mutation { + documentsDBUpdate( + databaseId: "", + name: "", + enabled: false + ) { + _id + name + _createdAt + _updatedAt + enabled + type + status + } +} +``` diff --git a/examples/1.9.x/server-graphql/examples/documentsdb/upsert-document.md b/examples/1.9.x/server-graphql/examples/documentsdb/upsert-document.md new file mode 100644 index 000000000..98818df73 --- /dev/null +++ b/examples/1.9.x/server-graphql/examples/documentsdb/upsert-document.md @@ -0,0 +1,40 @@ +```graphql +mutation { + documentsDBUpsertDocument( + databaseId: "", + collectionId: "", + documentId: "", + data: "{}", + permissions: ["read("any")"], + transactionId: "" + ) { + _id + _sequence + _collectionId + _databaseId + _createdAt + _updatedAt + _permissions + data + } +} +mutation { + documentsDBUpsertDocument( + databaseId: "", + collectionId: "", + documentId: "", + data: "{}", + permissions: ["read("any")"], + transactionId: "" + ) { + _id + _sequence + _collectionId + _databaseId + _createdAt + _updatedAt + _permissions + data + } +} +``` diff --git a/examples/1.9.x/server-graphql/examples/documentsdb/upsert-documents.md b/examples/1.9.x/server-graphql/examples/documentsdb/upsert-documents.md new file mode 100644 index 000000000..56bb62999 --- /dev/null +++ b/examples/1.9.x/server-graphql/examples/documentsdb/upsert-documents.md @@ -0,0 +1,42 @@ +```graphql +mutation { + documentsDBUpsertDocuments( + databaseId: "", + collectionId: "", + documents: [], + transactionId: "" + ) { + total + documents { + _id + _sequence + _collectionId + _databaseId + _createdAt + _updatedAt + _permissions + data + } + } +} +mutation { + documentsDBUpsertDocuments( + databaseId: "", + collectionId: "", + documents: [], + transactionId: "" + ) { + total + documents { + _id + _sequence + _collectionId + _databaseId + _createdAt + _updatedAt + _permissions + data + } + } +} +``` diff --git a/examples/1.9.x/server-graphql/examples/oauth2/approve.md b/examples/1.9.x/server-graphql/examples/oauth2/approve.md new file mode 100644 index 000000000..d70e2ebf5 --- /dev/null +++ b/examples/1.9.x/server-graphql/examples/oauth2/approve.md @@ -0,0 +1,20 @@ +```graphql +mutation { + oauth2Approve( + grantId: "", + authorizationDetails: "", + scope: "" + ) { + redirectUrl + } +} +mutation { + oauth2Approve( + grantId: "", + authorizationDetails: "", + scope: "" + ) { + redirectUrl + } +} +``` diff --git a/examples/1.9.x/server-graphql/examples/oauth2/authorize-post.md b/examples/1.9.x/server-graphql/examples/oauth2/authorize-post.md new file mode 100644 index 000000000..de3db7929 --- /dev/null +++ b/examples/1.9.x/server-graphql/examples/oauth2/authorize-post.md @@ -0,0 +1,44 @@ +```graphql +mutation { + oauth2AuthorizePost( + clientId: "", + redirectUri: "https://example.com", + responseType: "", + scope: "", + state: "", + nonce: "", + codeChallenge: "", + codeChallengeMethod: "s256", + prompt: "", + maxAge: 0, + authorizationDetails: "", + resource: "", + audience: "", + requestUri: "" + ) { + grantId + redirectUrl + } +} +mutation { + oauth2AuthorizePost( + clientId: "", + redirectUri: "https://example.com", + responseType: "", + scope: "", + state: "", + nonce: "", + codeChallenge: "", + codeChallengeMethod: "s256", + prompt: "", + maxAge: 0, + authorizationDetails: "", + resource: "", + audience: "", + requestUri: "" + ) { + grantId + redirectUrl + } +} +``` diff --git a/examples/1.9.x/server-graphql/examples/oauth2/authorize.md b/examples/1.9.x/server-graphql/examples/oauth2/authorize.md new file mode 100644 index 000000000..f6e74d435 --- /dev/null +++ b/examples/1.9.x/server-graphql/examples/oauth2/authorize.md @@ -0,0 +1,23 @@ +```graphql +query { + oauth2Authorize( + clientId: "", + redirectUri: "https://example.com", + responseType: "", + scope: "", + state: "", + nonce: "", + codeChallenge: "", + codeChallengeMethod: "s256", + prompt: "", + maxAge: 0, + authorizationDetails: "", + resource: "", + audience: "", + requestUri: "" + ) { + grantId + redirectUrl + } +} +``` diff --git a/examples/1.9.x/server-graphql/examples/oauth2/create-device-authorization.md b/examples/1.9.x/server-graphql/examples/oauth2/create-device-authorization.md new file mode 100644 index 000000000..9a30bde77 --- /dev/null +++ b/examples/1.9.x/server-graphql/examples/oauth2/create-device-authorization.md @@ -0,0 +1,34 @@ +```graphql +mutation { + oauth2CreateDeviceAuthorization( + clientId: "", + scope: "", + authorizationDetails: "", + resource: "", + audience: "" + ) { + device_code + user_code + verification_uri + verification_uri_complete + expires_in + interval + } +} +mutation { + oauth2CreateDeviceAuthorization( + clientId: "", + scope: "", + authorizationDetails: "", + resource: "", + audience: "" + ) { + device_code + user_code + verification_uri + verification_uri_complete + expires_in + interval + } +} +``` diff --git a/examples/1.9.x/server-graphql/examples/oauth2/create-grant.md b/examples/1.9.x/server-graphql/examples/oauth2/create-grant.md new file mode 100644 index 000000000..15979568e --- /dev/null +++ b/examples/1.9.x/server-graphql/examples/oauth2/create-grant.md @@ -0,0 +1,38 @@ +```graphql +mutation { + oauth2CreateGrant( + userCode: "" + ) { + _id + _createdAt + _updatedAt + userId + appId + scopes + resources + authorizationDetails + prompt + redirectUri + authTime + expire + } +} +mutation { + oauth2CreateGrant( + userCode: "" + ) { + _id + _createdAt + _updatedAt + userId + appId + scopes + resources + authorizationDetails + prompt + redirectUri + authTime + expire + } +} +``` diff --git a/examples/1.9.x/server-graphql/examples/oauth2/create-par.md b/examples/1.9.x/server-graphql/examples/oauth2/create-par.md new file mode 100644 index 000000000..428a0ae1c --- /dev/null +++ b/examples/1.9.x/server-graphql/examples/oauth2/create-par.md @@ -0,0 +1,42 @@ +```graphql +mutation { + oauth2CreatePAR( + clientId: "", + redirectUri: "https://example.com", + responseType: "code", + scope: "", + state: "", + nonce: "", + codeChallenge: "", + codeChallengeMethod: "s256", + prompt: "", + maxAge: 0, + authorizationDetails: "", + resource: "", + audience: "" + ) { + request_uri + expires_in + } +} +mutation { + oauth2CreatePAR( + clientId: "", + redirectUri: "https://example.com", + responseType: "code", + scope: "", + state: "", + nonce: "", + codeChallenge: "", + codeChallengeMethod: "s256", + prompt: "", + maxAge: 0, + authorizationDetails: "", + resource: "", + audience: "" + ) { + request_uri + expires_in + } +} +``` diff --git a/examples/1.9.x/server-graphql/examples/oauth2/create-token.md b/examples/1.9.x/server-graphql/examples/oauth2/create-token.md new file mode 100644 index 000000000..0f7eb30af --- /dev/null +++ b/examples/1.9.x/server-graphql/examples/oauth2/create-token.md @@ -0,0 +1,46 @@ +```graphql +mutation { + oauth2CreateToken( + grantType: "", + code: "", + refreshToken: "", + deviceCode: "", + clientId: "", + clientSecret: "", + codeVerifier: "", + redirectUri: "https://example.com", + resource: "", + audience: "" + ) { + access_token + token_type + expires_in + refresh_token + scope + authorization_details + id_token + } +} +mutation { + oauth2CreateToken( + grantType: "", + code: "", + refreshToken: "", + deviceCode: "", + clientId: "", + clientSecret: "", + codeVerifier: "", + redirectUri: "https://example.com", + resource: "", + audience: "" + ) { + access_token + token_type + expires_in + refresh_token + scope + authorization_details + id_token + } +} +``` diff --git a/examples/1.9.x/server-graphql/examples/oauth2/get-grant.md b/examples/1.9.x/server-graphql/examples/oauth2/get-grant.md new file mode 100644 index 000000000..e21ef4338 --- /dev/null +++ b/examples/1.9.x/server-graphql/examples/oauth2/get-grant.md @@ -0,0 +1,20 @@ +```graphql +query { + oauth2GetGrant( + grantId: "" + ) { + _id + _createdAt + _updatedAt + userId + appId + scopes + resources + authorizationDetails + prompt + redirectUri + authTime + expire + } +} +``` diff --git a/examples/1.9.x/server-graphql/examples/oauth2/list-organizations.md b/examples/1.9.x/server-graphql/examples/oauth2/list-organizations.md new file mode 100644 index 000000000..c36f1d741 --- /dev/null +++ b/examples/1.9.x/server-graphql/examples/oauth2/list-organizations.md @@ -0,0 +1,14 @@ +```graphql +query { + oauth2ListOrganizations( + limit: 1, + offset: 0, + search: "" + ) { + total + organizations { + _id + } + } +} +``` diff --git a/examples/1.9.x/server-graphql/examples/oauth2/list-projects.md b/examples/1.9.x/server-graphql/examples/oauth2/list-projects.md new file mode 100644 index 000000000..a5073fc1a --- /dev/null +++ b/examples/1.9.x/server-graphql/examples/oauth2/list-projects.md @@ -0,0 +1,16 @@ +```graphql +query { + oauth2ListProjects( + limit: 1, + offset: 0, + search: "" + ) { + total + projects { + _id + region + endpoint + } + } +} +``` diff --git a/examples/1.9.x/server-graphql/examples/oauth2/reject.md b/examples/1.9.x/server-graphql/examples/oauth2/reject.md new file mode 100644 index 000000000..bbc7ac0ef --- /dev/null +++ b/examples/1.9.x/server-graphql/examples/oauth2/reject.md @@ -0,0 +1,16 @@ +```graphql +mutation { + oauth2Reject( + grantId: "" + ) { + redirectUrl + } +} +mutation { + oauth2Reject( + grantId: "" + ) { + redirectUrl + } +} +``` diff --git a/examples/1.9.x/server-graphql/examples/oauth2/revoke.md b/examples/1.9.x/server-graphql/examples/oauth2/revoke.md new file mode 100644 index 000000000..bd02b9b97 --- /dev/null +++ b/examples/1.9.x/server-graphql/examples/oauth2/revoke.md @@ -0,0 +1,22 @@ +```graphql +mutation { + oauth2Revoke( + token: "", + tokenTypeHint: "access_token", + clientId: "", + clientSecret: "" + ) { + status + } +} +mutation { + oauth2Revoke( + token: "", + tokenTypeHint: "access_token", + clientId: "", + clientSecret: "" + ) { + status + } +} +``` diff --git a/examples/1.9.x/server-graphql/examples/organization/create-installation.md b/examples/1.9.x/server-graphql/examples/organization/create-installation.md new file mode 100644 index 000000000..7ca3673a7 --- /dev/null +++ b/examples/1.9.x/server-graphql/examples/organization/create-installation.md @@ -0,0 +1,36 @@ +```graphql +mutation { + organizationCreateInstallation( + appId: "", + authorizationDetails: "" + ) { + _id + _createdAt + _updatedAt + appId + teamId + scopes + authorizationDetails + createdById + createdByName + lastAccessedAt + } +} +mutation { + organizationCreateInstallation( + appId: "", + authorizationDetails: "" + ) { + _id + _createdAt + _updatedAt + appId + teamId + scopes + authorizationDetails + createdById + createdByName + lastAccessedAt + } +} +``` diff --git a/examples/1.9.x/server-graphql/examples/organization/create-project.md b/examples/1.9.x/server-graphql/examples/organization/create-project.md index dca3bea1b..ca752ed91 100644 --- a/examples/1.9.x/server-graphql/examples/organization/create-project.md +++ b/examples/1.9.x/server-graphql/examples/organization/create-project.md @@ -82,6 +82,7 @@ mutation { oAuth2ServerRefreshTokenDuration oAuth2ServerPublicAccessTokenDuration oAuth2ServerPublicRefreshTokenDuration + oAuth2ServerInstallationAccessTokenDuration oAuth2ServerConfidentialPkce oAuth2ServerVerificationUrl oAuth2ServerUserCodeLength @@ -173,6 +174,7 @@ mutation { oAuth2ServerRefreshTokenDuration oAuth2ServerPublicAccessTokenDuration oAuth2ServerPublicRefreshTokenDuration + oAuth2ServerInstallationAccessTokenDuration oAuth2ServerConfidentialPkce oAuth2ServerVerificationUrl oAuth2ServerUserCodeLength diff --git a/examples/1.9.x/server-graphql/examples/organization/delete-installation.md b/examples/1.9.x/server-graphql/examples/organization/delete-installation.md new file mode 100644 index 000000000..3684fd01c --- /dev/null +++ b/examples/1.9.x/server-graphql/examples/organization/delete-installation.md @@ -0,0 +1,16 @@ +```graphql +mutation { + organizationDeleteInstallation( + installationId: "" + ) { + status + } +} +mutation { + organizationDeleteInstallation( + installationId: "" + ) { + status + } +} +``` diff --git a/examples/1.9.x/server-graphql/examples/organization/get-installation.md b/examples/1.9.x/server-graphql/examples/organization/get-installation.md new file mode 100644 index 000000000..d5748da24 --- /dev/null +++ b/examples/1.9.x/server-graphql/examples/organization/get-installation.md @@ -0,0 +1,18 @@ +```graphql +query { + organizationGetInstallation( + installationId: "" + ) { + _id + _createdAt + _updatedAt + appId + teamId + scopes + authorizationDetails + createdById + createdByName + lastAccessedAt + } +} +``` diff --git a/examples/1.9.x/server-graphql/examples/organization/list-installations.md b/examples/1.9.x/server-graphql/examples/organization/list-installations.md new file mode 100644 index 000000000..900a0a2d9 --- /dev/null +++ b/examples/1.9.x/server-graphql/examples/organization/list-installations.md @@ -0,0 +1,22 @@ +```graphql +query { + organizationListInstallations( + queries: [], + total: false + ) { + total + installations { + _id + _createdAt + _updatedAt + appId + teamId + scopes + authorizationDetails + createdById + createdByName + lastAccessedAt + } + } +} +``` diff --git a/examples/1.9.x/server-graphql/examples/organization/list-projects.md b/examples/1.9.x/server-graphql/examples/organization/list-projects.md index f83794f5a..06fe0083f 100644 --- a/examples/1.9.x/server-graphql/examples/organization/list-projects.md +++ b/examples/1.9.x/server-graphql/examples/organization/list-projects.md @@ -84,6 +84,7 @@ query { oAuth2ServerRefreshTokenDuration oAuth2ServerPublicAccessTokenDuration oAuth2ServerPublicRefreshTokenDuration + oAuth2ServerInstallationAccessTokenDuration oAuth2ServerConfidentialPkce oAuth2ServerVerificationUrl oAuth2ServerUserCodeLength diff --git a/examples/1.9.x/server-graphql/examples/organization/update-installation.md b/examples/1.9.x/server-graphql/examples/organization/update-installation.md new file mode 100644 index 000000000..6f6fdc481 --- /dev/null +++ b/examples/1.9.x/server-graphql/examples/organization/update-installation.md @@ -0,0 +1,36 @@ +```graphql +mutation { + organizationUpdateInstallation( + installationId: "", + authorizationDetails: "" + ) { + _id + _createdAt + _updatedAt + appId + teamId + scopes + authorizationDetails + createdById + createdByName + lastAccessedAt + } +} +mutation { + organizationUpdateInstallation( + installationId: "", + authorizationDetails: "" + ) { + _id + _createdAt + _updatedAt + appId + teamId + scopes + authorizationDetails + createdById + createdByName + lastAccessedAt + } +} +``` diff --git a/examples/1.9.x/server-graphql/examples/organization/update-project.md b/examples/1.9.x/server-graphql/examples/organization/update-project.md index 5de189346..c8373b987 100644 --- a/examples/1.9.x/server-graphql/examples/organization/update-project.md +++ b/examples/1.9.x/server-graphql/examples/organization/update-project.md @@ -81,6 +81,7 @@ mutation { oAuth2ServerRefreshTokenDuration oAuth2ServerPublicAccessTokenDuration oAuth2ServerPublicRefreshTokenDuration + oAuth2ServerInstallationAccessTokenDuration oAuth2ServerConfidentialPkce oAuth2ServerVerificationUrl oAuth2ServerUserCodeLength @@ -171,6 +172,7 @@ mutation { oAuth2ServerRefreshTokenDuration oAuth2ServerPublicAccessTokenDuration oAuth2ServerPublicRefreshTokenDuration + oAuth2ServerInstallationAccessTokenDuration oAuth2ServerConfidentialPkce oAuth2ServerVerificationUrl oAuth2ServerUserCodeLength diff --git a/examples/1.9.x/server-graphql/examples/project/update-auth-method.md b/examples/1.9.x/server-graphql/examples/project/update-auth-method.md index 2b5330efe..536c8ad70 100644 --- a/examples/1.9.x/server-graphql/examples/project/update-auth-method.md +++ b/examples/1.9.x/server-graphql/examples/project/update-auth-method.md @@ -81,6 +81,7 @@ mutation { oAuth2ServerRefreshTokenDuration oAuth2ServerPublicAccessTokenDuration oAuth2ServerPublicRefreshTokenDuration + oAuth2ServerInstallationAccessTokenDuration oAuth2ServerConfidentialPkce oAuth2ServerVerificationUrl oAuth2ServerUserCodeLength @@ -171,6 +172,7 @@ mutation { oAuth2ServerRefreshTokenDuration oAuth2ServerPublicAccessTokenDuration oAuth2ServerPublicRefreshTokenDuration + oAuth2ServerInstallationAccessTokenDuration oAuth2ServerConfidentialPkce oAuth2ServerVerificationUrl oAuth2ServerUserCodeLength diff --git a/examples/1.9.x/server-graphql/examples/project/update-deny-aliased-email-policy.md b/examples/1.9.x/server-graphql/examples/project/update-deny-aliased-email-policy.md index 95e30eea1..df21eb053 100644 --- a/examples/1.9.x/server-graphql/examples/project/update-deny-aliased-email-policy.md +++ b/examples/1.9.x/server-graphql/examples/project/update-deny-aliased-email-policy.md @@ -80,6 +80,7 @@ mutation { oAuth2ServerRefreshTokenDuration oAuth2ServerPublicAccessTokenDuration oAuth2ServerPublicRefreshTokenDuration + oAuth2ServerInstallationAccessTokenDuration oAuth2ServerConfidentialPkce oAuth2ServerVerificationUrl oAuth2ServerUserCodeLength @@ -169,6 +170,7 @@ mutation { oAuth2ServerRefreshTokenDuration oAuth2ServerPublicAccessTokenDuration oAuth2ServerPublicRefreshTokenDuration + oAuth2ServerInstallationAccessTokenDuration oAuth2ServerConfidentialPkce oAuth2ServerVerificationUrl oAuth2ServerUserCodeLength diff --git a/examples/1.9.x/server-graphql/examples/project/update-deny-corporate-email-policy.md b/examples/1.9.x/server-graphql/examples/project/update-deny-corporate-email-policy.md index 4d5c05012..6cef41347 100644 --- a/examples/1.9.x/server-graphql/examples/project/update-deny-corporate-email-policy.md +++ b/examples/1.9.x/server-graphql/examples/project/update-deny-corporate-email-policy.md @@ -80,6 +80,7 @@ mutation { oAuth2ServerRefreshTokenDuration oAuth2ServerPublicAccessTokenDuration oAuth2ServerPublicRefreshTokenDuration + oAuth2ServerInstallationAccessTokenDuration oAuth2ServerConfidentialPkce oAuth2ServerVerificationUrl oAuth2ServerUserCodeLength @@ -169,6 +170,7 @@ mutation { oAuth2ServerRefreshTokenDuration oAuth2ServerPublicAccessTokenDuration oAuth2ServerPublicRefreshTokenDuration + oAuth2ServerInstallationAccessTokenDuration oAuth2ServerConfidentialPkce oAuth2ServerVerificationUrl oAuth2ServerUserCodeLength diff --git a/examples/1.9.x/server-graphql/examples/project/update-deny-disposable-email-policy.md b/examples/1.9.x/server-graphql/examples/project/update-deny-disposable-email-policy.md index e168cc189..e9e90d64c 100644 --- a/examples/1.9.x/server-graphql/examples/project/update-deny-disposable-email-policy.md +++ b/examples/1.9.x/server-graphql/examples/project/update-deny-disposable-email-policy.md @@ -80,6 +80,7 @@ mutation { oAuth2ServerRefreshTokenDuration oAuth2ServerPublicAccessTokenDuration oAuth2ServerPublicRefreshTokenDuration + oAuth2ServerInstallationAccessTokenDuration oAuth2ServerConfidentialPkce oAuth2ServerVerificationUrl oAuth2ServerUserCodeLength @@ -169,6 +170,7 @@ mutation { oAuth2ServerRefreshTokenDuration oAuth2ServerPublicAccessTokenDuration oAuth2ServerPublicRefreshTokenDuration + oAuth2ServerInstallationAccessTokenDuration oAuth2ServerConfidentialPkce oAuth2ServerVerificationUrl oAuth2ServerUserCodeLength diff --git a/examples/1.9.x/server-graphql/examples/project/update-deny-free-email-policy.md b/examples/1.9.x/server-graphql/examples/project/update-deny-free-email-policy.md index ec20868eb..9a1ac7b73 100644 --- a/examples/1.9.x/server-graphql/examples/project/update-deny-free-email-policy.md +++ b/examples/1.9.x/server-graphql/examples/project/update-deny-free-email-policy.md @@ -80,6 +80,7 @@ mutation { oAuth2ServerRefreshTokenDuration oAuth2ServerPublicAccessTokenDuration oAuth2ServerPublicRefreshTokenDuration + oAuth2ServerInstallationAccessTokenDuration oAuth2ServerConfidentialPkce oAuth2ServerVerificationUrl oAuth2ServerUserCodeLength @@ -169,6 +170,7 @@ mutation { oAuth2ServerRefreshTokenDuration oAuth2ServerPublicAccessTokenDuration oAuth2ServerPublicRefreshTokenDuration + oAuth2ServerInstallationAccessTokenDuration oAuth2ServerConfidentialPkce oAuth2ServerVerificationUrl oAuth2ServerUserCodeLength diff --git a/examples/1.9.x/server-graphql/examples/project/update-labels.md b/examples/1.9.x/server-graphql/examples/project/update-labels.md index c6af9d655..5307c2b47 100644 --- a/examples/1.9.x/server-graphql/examples/project/update-labels.md +++ b/examples/1.9.x/server-graphql/examples/project/update-labels.md @@ -80,6 +80,7 @@ mutation { oAuth2ServerRefreshTokenDuration oAuth2ServerPublicAccessTokenDuration oAuth2ServerPublicRefreshTokenDuration + oAuth2ServerInstallationAccessTokenDuration oAuth2ServerConfidentialPkce oAuth2ServerVerificationUrl oAuth2ServerUserCodeLength @@ -169,6 +170,7 @@ mutation { oAuth2ServerRefreshTokenDuration oAuth2ServerPublicAccessTokenDuration oAuth2ServerPublicRefreshTokenDuration + oAuth2ServerInstallationAccessTokenDuration oAuth2ServerConfidentialPkce oAuth2ServerVerificationUrl oAuth2ServerUserCodeLength diff --git a/examples/1.9.x/server-graphql/examples/project/update-membership-privacy-policy.md b/examples/1.9.x/server-graphql/examples/project/update-membership-privacy-policy.md index d8ae4e6a7..42815ce58 100644 --- a/examples/1.9.x/server-graphql/examples/project/update-membership-privacy-policy.md +++ b/examples/1.9.x/server-graphql/examples/project/update-membership-privacy-policy.md @@ -85,6 +85,7 @@ mutation { oAuth2ServerRefreshTokenDuration oAuth2ServerPublicAccessTokenDuration oAuth2ServerPublicRefreshTokenDuration + oAuth2ServerInstallationAccessTokenDuration oAuth2ServerConfidentialPkce oAuth2ServerVerificationUrl oAuth2ServerUserCodeLength @@ -179,6 +180,7 @@ mutation { oAuth2ServerRefreshTokenDuration oAuth2ServerPublicAccessTokenDuration oAuth2ServerPublicRefreshTokenDuration + oAuth2ServerInstallationAccessTokenDuration oAuth2ServerConfidentialPkce oAuth2ServerVerificationUrl oAuth2ServerUserCodeLength diff --git a/examples/1.9.x/server-graphql/examples/project/update-o-auth-2-server.md b/examples/1.9.x/server-graphql/examples/project/update-o-auth-2-server.md index 8c4c32eee..242646031 100644 --- a/examples/1.9.x/server-graphql/examples/project/update-o-auth-2-server.md +++ b/examples/1.9.x/server-graphql/examples/project/update-o-auth-2-server.md @@ -9,6 +9,7 @@ mutation { refreshTokenDuration: 60, publicAccessTokenDuration: 60, publicRefreshTokenDuration: 60, + installationAccessTokenDuration: 60, confidentialPkce: false, verificationUrl: "https://example.com", userCodeLength: 6, @@ -93,6 +94,7 @@ mutation { oAuth2ServerRefreshTokenDuration oAuth2ServerPublicAccessTokenDuration oAuth2ServerPublicRefreshTokenDuration + oAuth2ServerInstallationAccessTokenDuration oAuth2ServerConfidentialPkce oAuth2ServerVerificationUrl oAuth2ServerUserCodeLength @@ -111,6 +113,7 @@ mutation { refreshTokenDuration: 60, publicAccessTokenDuration: 60, publicRefreshTokenDuration: 60, + installationAccessTokenDuration: 60, confidentialPkce: false, verificationUrl: "https://example.com", userCodeLength: 6, @@ -195,6 +198,7 @@ mutation { oAuth2ServerRefreshTokenDuration oAuth2ServerPublicAccessTokenDuration oAuth2ServerPublicRefreshTokenDuration + oAuth2ServerInstallationAccessTokenDuration oAuth2ServerConfidentialPkce oAuth2ServerVerificationUrl oAuth2ServerUserCodeLength diff --git a/examples/1.9.x/server-graphql/examples/project/update-password-dictionary-policy.md b/examples/1.9.x/server-graphql/examples/project/update-password-dictionary-policy.md index f8e51c4a3..81036d798 100644 --- a/examples/1.9.x/server-graphql/examples/project/update-password-dictionary-policy.md +++ b/examples/1.9.x/server-graphql/examples/project/update-password-dictionary-policy.md @@ -80,6 +80,7 @@ mutation { oAuth2ServerRefreshTokenDuration oAuth2ServerPublicAccessTokenDuration oAuth2ServerPublicRefreshTokenDuration + oAuth2ServerInstallationAccessTokenDuration oAuth2ServerConfidentialPkce oAuth2ServerVerificationUrl oAuth2ServerUserCodeLength @@ -169,6 +170,7 @@ mutation { oAuth2ServerRefreshTokenDuration oAuth2ServerPublicAccessTokenDuration oAuth2ServerPublicRefreshTokenDuration + oAuth2ServerInstallationAccessTokenDuration oAuth2ServerConfidentialPkce oAuth2ServerVerificationUrl oAuth2ServerUserCodeLength diff --git a/examples/1.9.x/server-graphql/examples/project/update-password-history-policy.md b/examples/1.9.x/server-graphql/examples/project/update-password-history-policy.md index 1a27b4e80..9776235dc 100644 --- a/examples/1.9.x/server-graphql/examples/project/update-password-history-policy.md +++ b/examples/1.9.x/server-graphql/examples/project/update-password-history-policy.md @@ -80,6 +80,7 @@ mutation { oAuth2ServerRefreshTokenDuration oAuth2ServerPublicAccessTokenDuration oAuth2ServerPublicRefreshTokenDuration + oAuth2ServerInstallationAccessTokenDuration oAuth2ServerConfidentialPkce oAuth2ServerVerificationUrl oAuth2ServerUserCodeLength @@ -169,6 +170,7 @@ mutation { oAuth2ServerRefreshTokenDuration oAuth2ServerPublicAccessTokenDuration oAuth2ServerPublicRefreshTokenDuration + oAuth2ServerInstallationAccessTokenDuration oAuth2ServerConfidentialPkce oAuth2ServerVerificationUrl oAuth2ServerUserCodeLength diff --git a/examples/1.9.x/server-graphql/examples/project/update-password-personal-data-policy.md b/examples/1.9.x/server-graphql/examples/project/update-password-personal-data-policy.md index fc7fce378..74006a4fd 100644 --- a/examples/1.9.x/server-graphql/examples/project/update-password-personal-data-policy.md +++ b/examples/1.9.x/server-graphql/examples/project/update-password-personal-data-policy.md @@ -80,6 +80,7 @@ mutation { oAuth2ServerRefreshTokenDuration oAuth2ServerPublicAccessTokenDuration oAuth2ServerPublicRefreshTokenDuration + oAuth2ServerInstallationAccessTokenDuration oAuth2ServerConfidentialPkce oAuth2ServerVerificationUrl oAuth2ServerUserCodeLength @@ -169,6 +170,7 @@ mutation { oAuth2ServerRefreshTokenDuration oAuth2ServerPublicAccessTokenDuration oAuth2ServerPublicRefreshTokenDuration + oAuth2ServerInstallationAccessTokenDuration oAuth2ServerConfidentialPkce oAuth2ServerVerificationUrl oAuth2ServerUserCodeLength diff --git a/examples/1.9.x/server-graphql/examples/project/update-protocol.md b/examples/1.9.x/server-graphql/examples/project/update-protocol.md index 4bb7a0d53..fee9f3b1c 100644 --- a/examples/1.9.x/server-graphql/examples/project/update-protocol.md +++ b/examples/1.9.x/server-graphql/examples/project/update-protocol.md @@ -81,6 +81,7 @@ mutation { oAuth2ServerRefreshTokenDuration oAuth2ServerPublicAccessTokenDuration oAuth2ServerPublicRefreshTokenDuration + oAuth2ServerInstallationAccessTokenDuration oAuth2ServerConfidentialPkce oAuth2ServerVerificationUrl oAuth2ServerUserCodeLength @@ -171,6 +172,7 @@ mutation { oAuth2ServerRefreshTokenDuration oAuth2ServerPublicAccessTokenDuration oAuth2ServerPublicRefreshTokenDuration + oAuth2ServerInstallationAccessTokenDuration oAuth2ServerConfidentialPkce oAuth2ServerVerificationUrl oAuth2ServerUserCodeLength diff --git a/examples/1.9.x/server-graphql/examples/project/update-service.md b/examples/1.9.x/server-graphql/examples/project/update-service.md index e6eea998e..714cc8304 100644 --- a/examples/1.9.x/server-graphql/examples/project/update-service.md +++ b/examples/1.9.x/server-graphql/examples/project/update-service.md @@ -81,6 +81,7 @@ mutation { oAuth2ServerRefreshTokenDuration oAuth2ServerPublicAccessTokenDuration oAuth2ServerPublicRefreshTokenDuration + oAuth2ServerInstallationAccessTokenDuration oAuth2ServerConfidentialPkce oAuth2ServerVerificationUrl oAuth2ServerUserCodeLength @@ -171,6 +172,7 @@ mutation { oAuth2ServerRefreshTokenDuration oAuth2ServerPublicAccessTokenDuration oAuth2ServerPublicRefreshTokenDuration + oAuth2ServerInstallationAccessTokenDuration oAuth2ServerConfidentialPkce oAuth2ServerVerificationUrl oAuth2ServerUserCodeLength diff --git a/examples/1.9.x/server-graphql/examples/project/update-session-alert-policy.md b/examples/1.9.x/server-graphql/examples/project/update-session-alert-policy.md index 6effeff53..5af2c0407 100644 --- a/examples/1.9.x/server-graphql/examples/project/update-session-alert-policy.md +++ b/examples/1.9.x/server-graphql/examples/project/update-session-alert-policy.md @@ -80,6 +80,7 @@ mutation { oAuth2ServerRefreshTokenDuration oAuth2ServerPublicAccessTokenDuration oAuth2ServerPublicRefreshTokenDuration + oAuth2ServerInstallationAccessTokenDuration oAuth2ServerConfidentialPkce oAuth2ServerVerificationUrl oAuth2ServerUserCodeLength @@ -169,6 +170,7 @@ mutation { oAuth2ServerRefreshTokenDuration oAuth2ServerPublicAccessTokenDuration oAuth2ServerPublicRefreshTokenDuration + oAuth2ServerInstallationAccessTokenDuration oAuth2ServerConfidentialPkce oAuth2ServerVerificationUrl oAuth2ServerUserCodeLength diff --git a/examples/1.9.x/server-graphql/examples/project/update-session-duration-policy.md b/examples/1.9.x/server-graphql/examples/project/update-session-duration-policy.md index ecc66a1af..21ff4a3f4 100644 --- a/examples/1.9.x/server-graphql/examples/project/update-session-duration-policy.md +++ b/examples/1.9.x/server-graphql/examples/project/update-session-duration-policy.md @@ -80,6 +80,7 @@ mutation { oAuth2ServerRefreshTokenDuration oAuth2ServerPublicAccessTokenDuration oAuth2ServerPublicRefreshTokenDuration + oAuth2ServerInstallationAccessTokenDuration oAuth2ServerConfidentialPkce oAuth2ServerVerificationUrl oAuth2ServerUserCodeLength @@ -169,6 +170,7 @@ mutation { oAuth2ServerRefreshTokenDuration oAuth2ServerPublicAccessTokenDuration oAuth2ServerPublicRefreshTokenDuration + oAuth2ServerInstallationAccessTokenDuration oAuth2ServerConfidentialPkce oAuth2ServerVerificationUrl oAuth2ServerUserCodeLength diff --git a/examples/1.9.x/server-graphql/examples/project/update-session-invalidation-policy.md b/examples/1.9.x/server-graphql/examples/project/update-session-invalidation-policy.md index 8a568cbd7..3ec2ab618 100644 --- a/examples/1.9.x/server-graphql/examples/project/update-session-invalidation-policy.md +++ b/examples/1.9.x/server-graphql/examples/project/update-session-invalidation-policy.md @@ -80,6 +80,7 @@ mutation { oAuth2ServerRefreshTokenDuration oAuth2ServerPublicAccessTokenDuration oAuth2ServerPublicRefreshTokenDuration + oAuth2ServerInstallationAccessTokenDuration oAuth2ServerConfidentialPkce oAuth2ServerVerificationUrl oAuth2ServerUserCodeLength @@ -169,6 +170,7 @@ mutation { oAuth2ServerRefreshTokenDuration oAuth2ServerPublicAccessTokenDuration oAuth2ServerPublicRefreshTokenDuration + oAuth2ServerInstallationAccessTokenDuration oAuth2ServerConfidentialPkce oAuth2ServerVerificationUrl oAuth2ServerUserCodeLength diff --git a/examples/1.9.x/server-graphql/examples/project/update-session-limit-policy.md b/examples/1.9.x/server-graphql/examples/project/update-session-limit-policy.md index bd61f97f8..efc139921 100644 --- a/examples/1.9.x/server-graphql/examples/project/update-session-limit-policy.md +++ b/examples/1.9.x/server-graphql/examples/project/update-session-limit-policy.md @@ -80,6 +80,7 @@ mutation { oAuth2ServerRefreshTokenDuration oAuth2ServerPublicAccessTokenDuration oAuth2ServerPublicRefreshTokenDuration + oAuth2ServerInstallationAccessTokenDuration oAuth2ServerConfidentialPkce oAuth2ServerVerificationUrl oAuth2ServerUserCodeLength @@ -169,6 +170,7 @@ mutation { oAuth2ServerRefreshTokenDuration oAuth2ServerPublicAccessTokenDuration oAuth2ServerPublicRefreshTokenDuration + oAuth2ServerInstallationAccessTokenDuration oAuth2ServerConfidentialPkce oAuth2ServerVerificationUrl oAuth2ServerUserCodeLength diff --git a/examples/1.9.x/server-graphql/examples/project/update-smtp.md b/examples/1.9.x/server-graphql/examples/project/update-smtp.md index 3c9494f4a..366345099 100644 --- a/examples/1.9.x/server-graphql/examples/project/update-smtp.md +++ b/examples/1.9.x/server-graphql/examples/project/update-smtp.md @@ -89,6 +89,7 @@ mutation { oAuth2ServerRefreshTokenDuration oAuth2ServerPublicAccessTokenDuration oAuth2ServerPublicRefreshTokenDuration + oAuth2ServerInstallationAccessTokenDuration oAuth2ServerConfidentialPkce oAuth2ServerVerificationUrl oAuth2ServerUserCodeLength @@ -187,6 +188,7 @@ mutation { oAuth2ServerRefreshTokenDuration oAuth2ServerPublicAccessTokenDuration oAuth2ServerPublicRefreshTokenDuration + oAuth2ServerInstallationAccessTokenDuration oAuth2ServerConfidentialPkce oAuth2ServerVerificationUrl oAuth2ServerUserCodeLength diff --git a/examples/1.9.x/server-graphql/examples/project/update-user-limit-policy.md b/examples/1.9.x/server-graphql/examples/project/update-user-limit-policy.md index 916ace842..b60737d30 100644 --- a/examples/1.9.x/server-graphql/examples/project/update-user-limit-policy.md +++ b/examples/1.9.x/server-graphql/examples/project/update-user-limit-policy.md @@ -80,6 +80,7 @@ mutation { oAuth2ServerRefreshTokenDuration oAuth2ServerPublicAccessTokenDuration oAuth2ServerPublicRefreshTokenDuration + oAuth2ServerInstallationAccessTokenDuration oAuth2ServerConfidentialPkce oAuth2ServerVerificationUrl oAuth2ServerUserCodeLength @@ -169,6 +170,7 @@ mutation { oAuth2ServerRefreshTokenDuration oAuth2ServerPublicAccessTokenDuration oAuth2ServerPublicRefreshTokenDuration + oAuth2ServerInstallationAccessTokenDuration oAuth2ServerConfidentialPkce oAuth2ServerVerificationUrl oAuth2ServerUserCodeLength diff --git a/examples/1.9.x/server-graphql/examples/teams/create-installation.md b/examples/1.9.x/server-graphql/examples/teams/create-installation.md new file mode 100644 index 000000000..4a51462b0 --- /dev/null +++ b/examples/1.9.x/server-graphql/examples/teams/create-installation.md @@ -0,0 +1,38 @@ +```graphql +mutation { + teamsCreateInstallation( + teamId: "", + appId: "", + authorizationDetails: "" + ) { + _id + _createdAt + _updatedAt + appId + teamId + scopes + authorizationDetails + createdById + createdByName + lastAccessedAt + } +} +mutation { + teamsCreateInstallation( + teamId: "", + appId: "", + authorizationDetails: "" + ) { + _id + _createdAt + _updatedAt + appId + teamId + scopes + authorizationDetails + createdById + createdByName + lastAccessedAt + } +} +``` diff --git a/examples/1.9.x/server-graphql/examples/teams/delete-installation.md b/examples/1.9.x/server-graphql/examples/teams/delete-installation.md new file mode 100644 index 000000000..bb5d7ad25 --- /dev/null +++ b/examples/1.9.x/server-graphql/examples/teams/delete-installation.md @@ -0,0 +1,18 @@ +```graphql +mutation { + teamsDeleteInstallation( + teamId: "", + installationId: "" + ) { + status + } +} +mutation { + teamsDeleteInstallation( + teamId: "", + installationId: "" + ) { + status + } +} +``` diff --git a/examples/1.9.x/server-graphql/examples/teams/get-installation.md b/examples/1.9.x/server-graphql/examples/teams/get-installation.md new file mode 100644 index 000000000..051aa484a --- /dev/null +++ b/examples/1.9.x/server-graphql/examples/teams/get-installation.md @@ -0,0 +1,19 @@ +```graphql +query { + teamsGetInstallation( + teamId: "", + installationId: "" + ) { + _id + _createdAt + _updatedAt + appId + teamId + scopes + authorizationDetails + createdById + createdByName + lastAccessedAt + } +} +``` diff --git a/examples/1.9.x/server-graphql/examples/teams/list-installations.md b/examples/1.9.x/server-graphql/examples/teams/list-installations.md new file mode 100644 index 000000000..e67a0d520 --- /dev/null +++ b/examples/1.9.x/server-graphql/examples/teams/list-installations.md @@ -0,0 +1,23 @@ +```graphql +query { + teamsListInstallations( + teamId: "", + queries: [], + total: false + ) { + total + installations { + _id + _createdAt + _updatedAt + appId + teamId + scopes + authorizationDetails + createdById + createdByName + lastAccessedAt + } + } +} +``` diff --git a/examples/1.9.x/server-graphql/examples/teams/update-installation.md b/examples/1.9.x/server-graphql/examples/teams/update-installation.md new file mode 100644 index 000000000..c3c502dac --- /dev/null +++ b/examples/1.9.x/server-graphql/examples/teams/update-installation.md @@ -0,0 +1,38 @@ +```graphql +mutation { + teamsUpdateInstallation( + teamId: "", + installationId: "", + authorizationDetails: "" + ) { + _id + _createdAt + _updatedAt + appId + teamId + scopes + authorizationDetails + createdById + createdByName + lastAccessedAt + } +} +mutation { + teamsUpdateInstallation( + teamId: "", + installationId: "", + authorizationDetails: "" + ) { + _id + _createdAt + _updatedAt + appId + teamId + scopes + authorizationDetails + createdById + createdByName + lastAccessedAt + } +} +``` diff --git a/examples/1.9.x/server-graphql/examples/vectorsdb/create-collection.md b/examples/1.9.x/server-graphql/examples/vectorsdb/create-collection.md new file mode 100644 index 000000000..a04019ce3 --- /dev/null +++ b/examples/1.9.x/server-graphql/examples/vectorsdb/create-collection.md @@ -0,0 +1,74 @@ +```graphql +mutation { + vectorsDBCreateCollection( + databaseId: "", + collectionId: "", + name: "", + dimension: 1, + permissions: ["read("any")"], + documentSecurity: false, + enabled: false + ) { + _id + _createdAt + _updatedAt + _permissions + databaseId + name + enabled + documentSecurity + attributes + indexes { + _id + _createdAt + _updatedAt + key + type + status + error + attributes + lengths + orders + } + bytesMax + bytesUsed + dimension + } +} +mutation { + vectorsDBCreateCollection( + databaseId: "", + collectionId: "", + name: "", + dimension: 1, + permissions: ["read("any")"], + documentSecurity: false, + enabled: false + ) { + _id + _createdAt + _updatedAt + _permissions + databaseId + name + enabled + documentSecurity + attributes + indexes { + _id + _createdAt + _updatedAt + key + type + status + error + attributes + lengths + orders + } + bytesMax + bytesUsed + dimension + } +} +``` diff --git a/examples/1.9.x/server-graphql/examples/vectorsdb/create-document.md b/examples/1.9.x/server-graphql/examples/vectorsdb/create-document.md new file mode 100644 index 000000000..8d7ce85d6 --- /dev/null +++ b/examples/1.9.x/server-graphql/examples/vectorsdb/create-document.md @@ -0,0 +1,38 @@ +```graphql +mutation { + vectorsDBCreateDocument( + databaseId: "", + collectionId: "", + documentId: "", + data: "{\"embeddings\":[0.12,-0.55,0.88,1.02],\"metadata\":{\"key\":\"value\"}}", + permissions: ["read("any")"] + ) { + _id + _sequence + _collectionId + _databaseId + _createdAt + _updatedAt + _permissions + data + } +} +mutation { + vectorsDBCreateDocument( + databaseId: "", + collectionId: "", + documentId: "", + data: "{\"embeddings\":[0.12,-0.55,0.88,1.02],\"metadata\":{\"key\":\"value\"}}", + permissions: ["read("any")"] + ) { + _id + _sequence + _collectionId + _databaseId + _createdAt + _updatedAt + _permissions + data + } +} +``` diff --git a/examples/1.9.x/server-graphql/examples/vectorsdb/create-documents.md b/examples/1.9.x/server-graphql/examples/vectorsdb/create-documents.md new file mode 100644 index 000000000..521a40361 --- /dev/null +++ b/examples/1.9.x/server-graphql/examples/vectorsdb/create-documents.md @@ -0,0 +1,40 @@ +```graphql +mutation { + vectorsDBCreateDocuments( + databaseId: "", + collectionId: "", + documents: [] + ) { + total + documents { + _id + _sequence + _collectionId + _databaseId + _createdAt + _updatedAt + _permissions + data + } + } +} +mutation { + vectorsDBCreateDocuments( + databaseId: "", + collectionId: "", + documents: [] + ) { + total + documents { + _id + _sequence + _collectionId + _databaseId + _createdAt + _updatedAt + _permissions + data + } + } +} +``` diff --git a/examples/1.9.x/server-graphql/examples/vectorsdb/create-index.md b/examples/1.9.x/server-graphql/examples/vectorsdb/create-index.md new file mode 100644 index 000000000..82ac94575 --- /dev/null +++ b/examples/1.9.x/server-graphql/examples/vectorsdb/create-index.md @@ -0,0 +1,46 @@ +```graphql +mutation { + vectorsDBCreateIndex( + databaseId: "", + collectionId: "", + key: "", + type: "hnsw_euclidean", + attributes: [], + orders: [], + lengths: [] + ) { + _id + _createdAt + _updatedAt + key + type + status + error + attributes + lengths + orders + } +} +mutation { + vectorsDBCreateIndex( + databaseId: "", + collectionId: "", + key: "", + type: "hnsw_euclidean", + attributes: [], + orders: [], + lengths: [] + ) { + _id + _createdAt + _updatedAt + key + type + status + error + attributes + lengths + orders + } +} +``` diff --git a/examples/1.9.x/server-graphql/examples/vectorsdb/create-operations.md b/examples/1.9.x/server-graphql/examples/vectorsdb/create-operations.md new file mode 100644 index 000000000..7aef410eb --- /dev/null +++ b/examples/1.9.x/server-graphql/examples/vectorsdb/create-operations.md @@ -0,0 +1,48 @@ +```graphql +mutation { + vectorsDBCreateOperations( + transactionId: "", + operations: [ + { + "action": "create", + "databaseId": "", + "collectionId": "", + "documentId": "", + "data": { + "name": "Walter O'Brien" + } + } + ] + ) { + _id + _createdAt + _updatedAt + status + operations + expiresAt + } +} +mutation { + vectorsDBCreateOperations( + transactionId: "", + operations: [ + { + "action": "create", + "databaseId": "", + "collectionId": "", + "documentId": "", + "data": { + "name": "Walter O'Brien" + } + } + ] + ) { + _id + _createdAt + _updatedAt + status + operations + expiresAt + } +} +``` diff --git a/examples/1.9.x/server-graphql/examples/vectorsdb/create-query.md b/examples/1.9.x/server-graphql/examples/vectorsdb/create-query.md new file mode 100644 index 000000000..c2e31f40e --- /dev/null +++ b/examples/1.9.x/server-graphql/examples/vectorsdb/create-query.md @@ -0,0 +1,46 @@ +```graphql +mutation { + vectorsDBCreateQuery( + databaseId: "", + collectionId: "", + queries: [], + transactionId: "", + total: false, + ttl: 0 + ) { + total + documents { + _id + _sequence + _collectionId + _databaseId + _createdAt + _updatedAt + _permissions + data + } + } +} +mutation { + vectorsDBCreateQuery( + databaseId: "", + collectionId: "", + queries: [], + transactionId: "", + total: false, + ttl: 0 + ) { + total + documents { + _id + _sequence + _collectionId + _databaseId + _createdAt + _updatedAt + _permissions + data + } + } +} +``` diff --git a/examples/1.9.x/server-graphql/examples/vectorsdb/create-text-embeddings.md b/examples/1.9.x/server-graphql/examples/vectorsdb/create-text-embeddings.md new file mode 100644 index 000000000..5179cbb4f --- /dev/null +++ b/examples/1.9.x/server-graphql/examples/vectorsdb/create-text-embeddings.md @@ -0,0 +1,30 @@ +```graphql +mutation { + vectorsDBCreateTextEmbeddings( + texts: [], + model: "nomic-embed-text" + ) { + total + embeddings { + model + dimension + embedding + error + } + } +} +mutation { + vectorsDBCreateTextEmbeddings( + texts: [], + model: "nomic-embed-text" + ) { + total + embeddings { + model + dimension + embedding + error + } + } +} +``` diff --git a/examples/1.9.x/server-graphql/examples/vectorsdb/create-transaction.md b/examples/1.9.x/server-graphql/examples/vectorsdb/create-transaction.md new file mode 100644 index 000000000..56cca72bc --- /dev/null +++ b/examples/1.9.x/server-graphql/examples/vectorsdb/create-transaction.md @@ -0,0 +1,26 @@ +```graphql +mutation { + vectorsDBCreateTransaction( + ttl: 60 + ) { + _id + _createdAt + _updatedAt + status + operations + expiresAt + } +} +mutation { + vectorsDBCreateTransaction( + ttl: 60 + ) { + _id + _createdAt + _updatedAt + status + operations + expiresAt + } +} +``` diff --git a/examples/1.9.x/server-graphql/examples/vectorsdb/create.md b/examples/1.9.x/server-graphql/examples/vectorsdb/create.md new file mode 100644 index 000000000..5fbd91e45 --- /dev/null +++ b/examples/1.9.x/server-graphql/examples/vectorsdb/create.md @@ -0,0 +1,32 @@ +```graphql +mutation { + vectorsDBCreate( + databaseId: "", + name: "", + enabled: false + ) { + _id + name + _createdAt + _updatedAt + enabled + type + status + } +} +mutation { + vectorsDBCreate( + databaseId: "", + name: "", + enabled: false + ) { + _id + name + _createdAt + _updatedAt + enabled + type + status + } +} +``` diff --git a/examples/1.9.x/server-graphql/examples/vectorsdb/delete-collection.md b/examples/1.9.x/server-graphql/examples/vectorsdb/delete-collection.md new file mode 100644 index 000000000..3f00fc664 --- /dev/null +++ b/examples/1.9.x/server-graphql/examples/vectorsdb/delete-collection.md @@ -0,0 +1,10 @@ +```graphql +mutation { + vectorsDBDeleteCollection( + databaseId: "", + collectionId: "" + ) { + status + } +} +``` diff --git a/examples/1.9.x/server-graphql/examples/vectorsdb/delete-document.md b/examples/1.9.x/server-graphql/examples/vectorsdb/delete-document.md new file mode 100644 index 000000000..2da5f257d --- /dev/null +++ b/examples/1.9.x/server-graphql/examples/vectorsdb/delete-document.md @@ -0,0 +1,12 @@ +```graphql +mutation { + vectorsDBDeleteDocument( + databaseId: "", + collectionId: "", + documentId: "", + transactionId: "" + ) { + status + } +} +``` diff --git a/examples/1.9.x/server-graphql/examples/vectorsdb/delete-documents.md b/examples/1.9.x/server-graphql/examples/vectorsdb/delete-documents.md new file mode 100644 index 000000000..7091e2290 --- /dev/null +++ b/examples/1.9.x/server-graphql/examples/vectorsdb/delete-documents.md @@ -0,0 +1,42 @@ +```graphql +mutation { + vectorsDBDeleteDocuments( + databaseId: "", + collectionId: "", + queries: [], + transactionId: "" + ) { + total + documents { + _id + _sequence + _collectionId + _databaseId + _createdAt + _updatedAt + _permissions + data + } + } +} +mutation { + vectorsDBDeleteDocuments( + databaseId: "", + collectionId: "", + queries: [], + transactionId: "" + ) { + total + documents { + _id + _sequence + _collectionId + _databaseId + _createdAt + _updatedAt + _permissions + data + } + } +} +``` diff --git a/examples/1.9.x/server-graphql/examples/vectorsdb/delete-index.md b/examples/1.9.x/server-graphql/examples/vectorsdb/delete-index.md new file mode 100644 index 000000000..6d315358d --- /dev/null +++ b/examples/1.9.x/server-graphql/examples/vectorsdb/delete-index.md @@ -0,0 +1,11 @@ +```graphql +mutation { + vectorsDBDeleteIndex( + databaseId: "", + collectionId: "", + key: "" + ) { + status + } +} +``` diff --git a/examples/1.9.x/server-graphql/examples/vectorsdb/delete-transaction.md b/examples/1.9.x/server-graphql/examples/vectorsdb/delete-transaction.md new file mode 100644 index 000000000..ba12d0e13 --- /dev/null +++ b/examples/1.9.x/server-graphql/examples/vectorsdb/delete-transaction.md @@ -0,0 +1,9 @@ +```graphql +mutation { + vectorsDBDeleteTransaction( + transactionId: "" + ) { + status + } +} +``` diff --git a/examples/1.9.x/server-graphql/examples/vectorsdb/delete.md b/examples/1.9.x/server-graphql/examples/vectorsdb/delete.md new file mode 100644 index 000000000..c55cc5a50 --- /dev/null +++ b/examples/1.9.x/server-graphql/examples/vectorsdb/delete.md @@ -0,0 +1,9 @@ +```graphql +mutation { + vectorsDBDelete( + databaseId: "" + ) { + status + } +} +``` diff --git a/examples/1.9.x/server-graphql/examples/vectorsdb/get-collection.md b/examples/1.9.x/server-graphql/examples/vectorsdb/get-collection.md new file mode 100644 index 000000000..05a489740 --- /dev/null +++ b/examples/1.9.x/server-graphql/examples/vectorsdb/get-collection.md @@ -0,0 +1,33 @@ +```graphql +query { + vectorsDBGetCollection( + databaseId: "", + collectionId: "" + ) { + _id + _createdAt + _updatedAt + _permissions + databaseId + name + enabled + documentSecurity + attributes + indexes { + _id + _createdAt + _updatedAt + key + type + status + error + attributes + lengths + orders + } + bytesMax + bytesUsed + dimension + } +} +``` diff --git a/examples/1.9.x/server-graphql/examples/vectorsdb/get-document.md b/examples/1.9.x/server-graphql/examples/vectorsdb/get-document.md new file mode 100644 index 000000000..4a2ca99c9 --- /dev/null +++ b/examples/1.9.x/server-graphql/examples/vectorsdb/get-document.md @@ -0,0 +1,20 @@ +```graphql +query { + vectorsDBGetDocument( + databaseId: "", + collectionId: "", + documentId: "", + queries: [], + transactionId: "" + ) { + _id + _sequence + _collectionId + _databaseId + _createdAt + _updatedAt + _permissions + data + } +} +``` diff --git a/examples/1.9.x/server-graphql/examples/vectorsdb/get-index.md b/examples/1.9.x/server-graphql/examples/vectorsdb/get-index.md new file mode 100644 index 000000000..96fbf22f7 --- /dev/null +++ b/examples/1.9.x/server-graphql/examples/vectorsdb/get-index.md @@ -0,0 +1,20 @@ +```graphql +query { + vectorsDBGetIndex( + databaseId: "", + collectionId: "", + key: "" + ) { + _id + _createdAt + _updatedAt + key + type + status + error + attributes + lengths + orders + } +} +``` diff --git a/examples/1.9.x/server-graphql/examples/vectorsdb/get-transaction.md b/examples/1.9.x/server-graphql/examples/vectorsdb/get-transaction.md new file mode 100644 index 000000000..df2dbc325 --- /dev/null +++ b/examples/1.9.x/server-graphql/examples/vectorsdb/get-transaction.md @@ -0,0 +1,14 @@ +```graphql +query { + vectorsDBGetTransaction( + transactionId: "" + ) { + _id + _createdAt + _updatedAt + status + operations + expiresAt + } +} +``` diff --git a/examples/1.9.x/server-graphql/examples/vectorsdb/get.md b/examples/1.9.x/server-graphql/examples/vectorsdb/get.md new file mode 100644 index 000000000..47d75f91a --- /dev/null +++ b/examples/1.9.x/server-graphql/examples/vectorsdb/get.md @@ -0,0 +1,15 @@ +```graphql +query { + vectorsDBGet( + databaseId: "" + ) { + _id + name + _createdAt + _updatedAt + enabled + type + status + } +} +``` diff --git a/examples/1.9.x/server-graphql/examples/vectorsdb/list-collections.md b/examples/1.9.x/server-graphql/examples/vectorsdb/list-collections.md new file mode 100644 index 000000000..afdcd73c5 --- /dev/null +++ b/examples/1.9.x/server-graphql/examples/vectorsdb/list-collections.md @@ -0,0 +1,38 @@ +```graphql +query { + vectorsDBListCollections( + databaseId: "", + queries: [], + search: "", + total: false + ) { + total + collections { + _id + _createdAt + _updatedAt + _permissions + databaseId + name + enabled + documentSecurity + attributes + indexes { + _id + _createdAt + _updatedAt + key + type + status + error + attributes + lengths + orders + } + bytesMax + bytesUsed + dimension + } + } +} +``` diff --git a/examples/1.9.x/server-graphql/examples/vectorsdb/list-documents.md b/examples/1.9.x/server-graphql/examples/vectorsdb/list-documents.md new file mode 100644 index 000000000..68f1ff5c7 --- /dev/null +++ b/examples/1.9.x/server-graphql/examples/vectorsdb/list-documents.md @@ -0,0 +1,24 @@ +```graphql +query { + vectorsDBListDocuments( + databaseId: "", + collectionId: "", + queries: [], + transactionId: "", + total: false, + ttl: 0 + ) { + total + documents { + _id + _sequence + _collectionId + _databaseId + _createdAt + _updatedAt + _permissions + data + } + } +} +``` diff --git a/examples/1.9.x/server-graphql/examples/vectorsdb/list-indexes.md b/examples/1.9.x/server-graphql/examples/vectorsdb/list-indexes.md new file mode 100644 index 000000000..3d7b06c0a --- /dev/null +++ b/examples/1.9.x/server-graphql/examples/vectorsdb/list-indexes.md @@ -0,0 +1,24 @@ +```graphql +query { + vectorsDBListIndexes( + databaseId: "", + collectionId: "", + queries: [], + total: false + ) { + total + indexes { + _id + _createdAt + _updatedAt + key + type + status + error + attributes + lengths + orders + } + } +} +``` diff --git a/examples/1.9.x/server-graphql/examples/vectorsdb/list-transactions.md b/examples/1.9.x/server-graphql/examples/vectorsdb/list-transactions.md new file mode 100644 index 000000000..1f2ea4aa4 --- /dev/null +++ b/examples/1.9.x/server-graphql/examples/vectorsdb/list-transactions.md @@ -0,0 +1,17 @@ +```graphql +query { + vectorsDBListTransactions( + queries: [] + ) { + total + transactions { + _id + _createdAt + _updatedAt + status + operations + expiresAt + } + } +} +``` diff --git a/examples/1.9.x/server-graphql/examples/vectorsdb/list.md b/examples/1.9.x/server-graphql/examples/vectorsdb/list.md new file mode 100644 index 000000000..c3a29569c --- /dev/null +++ b/examples/1.9.x/server-graphql/examples/vectorsdb/list.md @@ -0,0 +1,20 @@ +```graphql +query { + vectorsDBList( + queries: [], + search: "", + total: false + ) { + total + databases { + _id + name + _createdAt + _updatedAt + enabled + type + status + } + } +} +``` diff --git a/examples/1.9.x/server-graphql/examples/vectorsdb/update-collection.md b/examples/1.9.x/server-graphql/examples/vectorsdb/update-collection.md new file mode 100644 index 000000000..c51530a15 --- /dev/null +++ b/examples/1.9.x/server-graphql/examples/vectorsdb/update-collection.md @@ -0,0 +1,74 @@ +```graphql +mutation { + vectorsDBUpdateCollection( + databaseId: "", + collectionId: "", + name: "", + dimension: 1, + permissions: ["read("any")"], + documentSecurity: false, + enabled: false + ) { + _id + _createdAt + _updatedAt + _permissions + databaseId + name + enabled + documentSecurity + attributes + indexes { + _id + _createdAt + _updatedAt + key + type + status + error + attributes + lengths + orders + } + bytesMax + bytesUsed + dimension + } +} +mutation { + vectorsDBUpdateCollection( + databaseId: "", + collectionId: "", + name: "", + dimension: 1, + permissions: ["read("any")"], + documentSecurity: false, + enabled: false + ) { + _id + _createdAt + _updatedAt + _permissions + databaseId + name + enabled + documentSecurity + attributes + indexes { + _id + _createdAt + _updatedAt + key + type + status + error + attributes + lengths + orders + } + bytesMax + bytesUsed + dimension + } +} +``` diff --git a/examples/1.9.x/server-graphql/examples/vectorsdb/update-document.md b/examples/1.9.x/server-graphql/examples/vectorsdb/update-document.md new file mode 100644 index 000000000..076c5f808 --- /dev/null +++ b/examples/1.9.x/server-graphql/examples/vectorsdb/update-document.md @@ -0,0 +1,40 @@ +```graphql +mutation { + vectorsDBUpdateDocument( + databaseId: "", + collectionId: "", + documentId: "", + data: "{}", + permissions: ["read("any")"], + transactionId: "" + ) { + _id + _sequence + _collectionId + _databaseId + _createdAt + _updatedAt + _permissions + data + } +} +mutation { + vectorsDBUpdateDocument( + databaseId: "", + collectionId: "", + documentId: "", + data: "{}", + permissions: ["read("any")"], + transactionId: "" + ) { + _id + _sequence + _collectionId + _databaseId + _createdAt + _updatedAt + _permissions + data + } +} +``` diff --git a/examples/1.9.x/server-graphql/examples/vectorsdb/update-documents.md b/examples/1.9.x/server-graphql/examples/vectorsdb/update-documents.md new file mode 100644 index 000000000..d1af5442d --- /dev/null +++ b/examples/1.9.x/server-graphql/examples/vectorsdb/update-documents.md @@ -0,0 +1,44 @@ +```graphql +mutation { + vectorsDBUpdateDocuments( + databaseId: "", + collectionId: "", + data: "{}", + queries: [], + transactionId: "" + ) { + total + documents { + _id + _sequence + _collectionId + _databaseId + _createdAt + _updatedAt + _permissions + data + } + } +} +mutation { + vectorsDBUpdateDocuments( + databaseId: "", + collectionId: "", + data: "{}", + queries: [], + transactionId: "" + ) { + total + documents { + _id + _sequence + _collectionId + _databaseId + _createdAt + _updatedAt + _permissions + data + } + } +} +``` diff --git a/examples/1.9.x/server-graphql/examples/vectorsdb/update-transaction.md b/examples/1.9.x/server-graphql/examples/vectorsdb/update-transaction.md new file mode 100644 index 000000000..c84aade1b --- /dev/null +++ b/examples/1.9.x/server-graphql/examples/vectorsdb/update-transaction.md @@ -0,0 +1,30 @@ +```graphql +mutation { + vectorsDBUpdateTransaction( + transactionId: "", + commit: false, + rollback: false + ) { + _id + _createdAt + _updatedAt + status + operations + expiresAt + } +} +mutation { + vectorsDBUpdateTransaction( + transactionId: "", + commit: false, + rollback: false + ) { + _id + _createdAt + _updatedAt + status + operations + expiresAt + } +} +``` diff --git a/examples/1.9.x/server-graphql/examples/vectorsdb/update.md b/examples/1.9.x/server-graphql/examples/vectorsdb/update.md new file mode 100644 index 000000000..5ccaa78e6 --- /dev/null +++ b/examples/1.9.x/server-graphql/examples/vectorsdb/update.md @@ -0,0 +1,32 @@ +```graphql +mutation { + vectorsDBUpdate( + databaseId: "", + name: "", + enabled: false + ) { + _id + name + _createdAt + _updatedAt + enabled + type + status + } +} +mutation { + vectorsDBUpdate( + databaseId: "", + name: "", + enabled: false + ) { + _id + name + _createdAt + _updatedAt + enabled + type + status + } +} +``` diff --git a/examples/1.9.x/server-graphql/examples/vectorsdb/upsert-document.md b/examples/1.9.x/server-graphql/examples/vectorsdb/upsert-document.md new file mode 100644 index 000000000..7888f7cde --- /dev/null +++ b/examples/1.9.x/server-graphql/examples/vectorsdb/upsert-document.md @@ -0,0 +1,40 @@ +```graphql +mutation { + vectorsDBUpsertDocument( + databaseId: "", + collectionId: "", + documentId: "", + data: "{}", + permissions: ["read("any")"], + transactionId: "" + ) { + _id + _sequence + _collectionId + _databaseId + _createdAt + _updatedAt + _permissions + data + } +} +mutation { + vectorsDBUpsertDocument( + databaseId: "", + collectionId: "", + documentId: "", + data: "{}", + permissions: ["read("any")"], + transactionId: "" + ) { + _id + _sequence + _collectionId + _databaseId + _createdAt + _updatedAt + _permissions + data + } +} +``` diff --git a/examples/1.9.x/server-graphql/examples/vectorsdb/upsert-documents.md b/examples/1.9.x/server-graphql/examples/vectorsdb/upsert-documents.md new file mode 100644 index 000000000..67570025b --- /dev/null +++ b/examples/1.9.x/server-graphql/examples/vectorsdb/upsert-documents.md @@ -0,0 +1,42 @@ +```graphql +mutation { + vectorsDBUpsertDocuments( + databaseId: "", + collectionId: "", + documents: [], + transactionId: "" + ) { + total + documents { + _id + _sequence + _collectionId + _databaseId + _createdAt + _updatedAt + _permissions + data + } + } +} +mutation { + vectorsDBUpsertDocuments( + databaseId: "", + collectionId: "", + documents: [], + transactionId: "" + ) { + total + documents { + _id + _sequence + _collectionId + _databaseId + _createdAt + _updatedAt + _permissions + data + } + } +} +``` diff --git a/examples/1.9.x/server-kotlin/java/apps/create-installation-token.md b/examples/1.9.x/server-kotlin/java/apps/create-installation-token.md new file mode 100644 index 000000000..8f3b8704a --- /dev/null +++ b/examples/1.9.x/server-kotlin/java/apps/create-installation-token.md @@ -0,0 +1,26 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Apps; + +Client client = new Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + .setKey(""); // Your secret API key + +Apps apps = new Apps(client); + +apps.createInstallationToken( + "", // appId + "", // installationId + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + +``` diff --git a/examples/1.9.x/server-kotlin/java/apps/create-key.md b/examples/1.9.x/server-kotlin/java/apps/create-key.md new file mode 100644 index 000000000..b086e4068 --- /dev/null +++ b/examples/1.9.x/server-kotlin/java/apps/create-key.md @@ -0,0 +1,25 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Apps; + +Client client = new Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + .setSession(""); // The user session to authenticate with + +Apps apps = new Apps(client); + +apps.createKey( + "", // appId + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + +``` diff --git a/examples/1.9.x/server-kotlin/java/apps/create-secret.md b/examples/1.9.x/server-kotlin/java/apps/create-secret.md new file mode 100644 index 000000000..372ca4a75 --- /dev/null +++ b/examples/1.9.x/server-kotlin/java/apps/create-secret.md @@ -0,0 +1,25 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Apps; + +Client client = new Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + .setSession(""); // The user session to authenticate with + +Apps apps = new Apps(client); + +apps.createSecret( + "", // appId + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + +``` diff --git a/examples/1.9.x/server-kotlin/java/apps/create.md b/examples/1.9.x/server-kotlin/java/apps/create.md new file mode 100644 index 000000000..b0085fb88 --- /dev/null +++ b/examples/1.9.x/server-kotlin/java/apps/create.md @@ -0,0 +1,43 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Apps; + +Client client = new Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + .setSession(""); // The user session to authenticate with + +Apps apps = new Apps(client); + +apps.create( + "", // appId + "", // name + List.of(), // redirectUris + "", // description (optional) + "https://example.com", // clientUri (optional) + "https://example.com", // logoUri (optional) + "https://example.com", // privacyPolicyUrl (optional) + "https://example.com", // termsUrl (optional) + List.of(), // contacts (optional) + "", // tagline (optional) + List.of(), // tags (optional) + List.of(), // images (optional) + "https://example.com", // supportUrl (optional) + "https://example.com", // dataDeletionUrl (optional) + List.of(), // postLogoutRedirectUris (optional) + false, // enabled (optional) + "public", // type (optional) + false, // deviceFlow (optional) + "", // teamId (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + +``` diff --git a/examples/1.9.x/server-kotlin/java/apps/delete-key.md b/examples/1.9.x/server-kotlin/java/apps/delete-key.md new file mode 100644 index 000000000..aa849b21c --- /dev/null +++ b/examples/1.9.x/server-kotlin/java/apps/delete-key.md @@ -0,0 +1,26 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Apps; + +Client client = new Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + .setSession(""); // The user session to authenticate with + +Apps apps = new Apps(client); + +apps.deleteKey( + "", // appId + "", // keyId + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + +``` diff --git a/examples/1.9.x/server-kotlin/java/apps/delete-secret.md b/examples/1.9.x/server-kotlin/java/apps/delete-secret.md new file mode 100644 index 000000000..f4d38682b --- /dev/null +++ b/examples/1.9.x/server-kotlin/java/apps/delete-secret.md @@ -0,0 +1,26 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Apps; + +Client client = new Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + .setSession(""); // The user session to authenticate with + +Apps apps = new Apps(client); + +apps.deleteSecret( + "", // appId + "", // secretId + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + +``` diff --git a/examples/1.9.x/server-kotlin/java/apps/delete-tokens.md b/examples/1.9.x/server-kotlin/java/apps/delete-tokens.md new file mode 100644 index 000000000..4f99fdeea --- /dev/null +++ b/examples/1.9.x/server-kotlin/java/apps/delete-tokens.md @@ -0,0 +1,25 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Apps; + +Client client = new Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + .setSession(""); // The user session to authenticate with + +Apps apps = new Apps(client); + +apps.deleteTokens( + "", // appId + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + +``` diff --git a/examples/1.9.x/server-kotlin/java/apps/delete.md b/examples/1.9.x/server-kotlin/java/apps/delete.md new file mode 100644 index 000000000..a2aa59ce8 --- /dev/null +++ b/examples/1.9.x/server-kotlin/java/apps/delete.md @@ -0,0 +1,25 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Apps; + +Client client = new Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + .setSession(""); // The user session to authenticate with + +Apps apps = new Apps(client); + +apps.delete( + "", // appId + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + +``` diff --git a/examples/1.9.x/server-kotlin/java/apps/get-installation.md b/examples/1.9.x/server-kotlin/java/apps/get-installation.md new file mode 100644 index 000000000..3968844e2 --- /dev/null +++ b/examples/1.9.x/server-kotlin/java/apps/get-installation.md @@ -0,0 +1,26 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Apps; + +Client client = new Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + .setKey(""); // Your secret API key + +Apps apps = new Apps(client); + +apps.getInstallation( + "", // appId + "", // installationId + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + +``` diff --git a/examples/1.9.x/server-kotlin/java/apps/get-key.md b/examples/1.9.x/server-kotlin/java/apps/get-key.md new file mode 100644 index 000000000..1c534a0df --- /dev/null +++ b/examples/1.9.x/server-kotlin/java/apps/get-key.md @@ -0,0 +1,26 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Apps; + +Client client = new Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + .setSession(""); // The user session to authenticate with + +Apps apps = new Apps(client); + +apps.getKey( + "", // appId + "", // keyId + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + +``` diff --git a/examples/1.9.x/server-kotlin/java/apps/get-secret.md b/examples/1.9.x/server-kotlin/java/apps/get-secret.md new file mode 100644 index 000000000..0052e1863 --- /dev/null +++ b/examples/1.9.x/server-kotlin/java/apps/get-secret.md @@ -0,0 +1,26 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Apps; + +Client client = new Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + .setSession(""); // The user session to authenticate with + +Apps apps = new Apps(client); + +apps.getSecret( + "", // appId + "", // secretId + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + +``` diff --git a/examples/1.9.x/server-kotlin/java/apps/get.md b/examples/1.9.x/server-kotlin/java/apps/get.md new file mode 100644 index 000000000..65c66d8f3 --- /dev/null +++ b/examples/1.9.x/server-kotlin/java/apps/get.md @@ -0,0 +1,25 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Apps; + +Client client = new Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + .setSession(""); // The user session to authenticate with + +Apps apps = new Apps(client); + +apps.get( + "", // appId + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + +``` diff --git a/examples/1.9.x/server-kotlin/java/apps/list-installation-scopes.md b/examples/1.9.x/server-kotlin/java/apps/list-installation-scopes.md new file mode 100644 index 000000000..319f3d152 --- /dev/null +++ b/examples/1.9.x/server-kotlin/java/apps/list-installation-scopes.md @@ -0,0 +1,21 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Apps; + +Client client = new Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + .setSession(""); // The user session to authenticate with + +Apps apps = new Apps(client); + +apps.listInstallationScopes(new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); +})); +``` diff --git a/examples/1.9.x/server-kotlin/java/apps/list-installations.md b/examples/1.9.x/server-kotlin/java/apps/list-installations.md new file mode 100644 index 000000000..c0a632ab8 --- /dev/null +++ b/examples/1.9.x/server-kotlin/java/apps/list-installations.md @@ -0,0 +1,27 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Apps; + +Client client = new Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + .setKey(""); // Your secret API key + +Apps apps = new Apps(client); + +apps.listInstallations( + "", // appId + List.of(), // queries (optional) + false, // total (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + +``` diff --git a/examples/1.9.x/server-kotlin/java/apps/list-keys.md b/examples/1.9.x/server-kotlin/java/apps/list-keys.md new file mode 100644 index 000000000..cc290923f --- /dev/null +++ b/examples/1.9.x/server-kotlin/java/apps/list-keys.md @@ -0,0 +1,27 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Apps; + +Client client = new Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + .setSession(""); // The user session to authenticate with + +Apps apps = new Apps(client); + +apps.listKeys( + "", // appId + List.of(), // queries (optional) + false, // total (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + +``` diff --git a/examples/1.9.x/server-kotlin/java/apps/list-o-auth-2-scopes.md b/examples/1.9.x/server-kotlin/java/apps/list-o-auth-2-scopes.md new file mode 100644 index 000000000..94654dc77 --- /dev/null +++ b/examples/1.9.x/server-kotlin/java/apps/list-o-auth-2-scopes.md @@ -0,0 +1,21 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Apps; + +Client client = new Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + .setSession(""); // The user session to authenticate with + +Apps apps = new Apps(client); + +apps.listOAuth2Scopes(new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); +})); +``` diff --git a/examples/1.9.x/server-kotlin/java/apps/list-secrets.md b/examples/1.9.x/server-kotlin/java/apps/list-secrets.md new file mode 100644 index 000000000..6194c0bee --- /dev/null +++ b/examples/1.9.x/server-kotlin/java/apps/list-secrets.md @@ -0,0 +1,27 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Apps; + +Client client = new Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + .setSession(""); // The user session to authenticate with + +Apps apps = new Apps(client); + +apps.listSecrets( + "", // appId + List.of(), // queries (optional) + false, // total (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + +``` diff --git a/examples/1.9.x/server-kotlin/java/apps/list.md b/examples/1.9.x/server-kotlin/java/apps/list.md new file mode 100644 index 000000000..1af06ca0a --- /dev/null +++ b/examples/1.9.x/server-kotlin/java/apps/list.md @@ -0,0 +1,26 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Apps; + +Client client = new Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + .setSession(""); // The user session to authenticate with + +Apps apps = new Apps(client); + +apps.list( + List.of(), // queries (optional) + false, // total (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + +``` diff --git a/examples/1.9.x/server-kotlin/java/apps/update-labels.md b/examples/1.9.x/server-kotlin/java/apps/update-labels.md new file mode 100644 index 000000000..72a0a8e39 --- /dev/null +++ b/examples/1.9.x/server-kotlin/java/apps/update-labels.md @@ -0,0 +1,26 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Apps; + +Client client = new Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + .setKey(""); // Your secret API key + +Apps apps = new Apps(client); + +apps.updateLabels( + "", // appId + List.of(), // labels + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + +``` diff --git a/examples/1.9.x/server-kotlin/java/apps/update-team.md b/examples/1.9.x/server-kotlin/java/apps/update-team.md new file mode 100644 index 000000000..bec576116 --- /dev/null +++ b/examples/1.9.x/server-kotlin/java/apps/update-team.md @@ -0,0 +1,26 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Apps; + +Client client = new Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + .setSession(""); // The user session to authenticate with + +Apps apps = new Apps(client); + +apps.updateTeam( + "", // appId + "", // teamId + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + +``` diff --git a/examples/1.9.x/server-kotlin/java/apps/update.md b/examples/1.9.x/server-kotlin/java/apps/update.md new file mode 100644 index 000000000..06062f13e --- /dev/null +++ b/examples/1.9.x/server-kotlin/java/apps/update.md @@ -0,0 +1,44 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Apps; + +Client client = new Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + .setSession(""); // The user session to authenticate with + +Apps apps = new Apps(client); + +apps.update( + "", // appId + "", // name + "", // description (optional) + "https://example.com", // clientUri (optional) + "https://example.com", // logoUri (optional) + "https://example.com", // privacyPolicyUrl (optional) + "https://example.com", // termsUrl (optional) + List.of(), // contacts (optional) + "", // tagline (optional) + List.of(), // tags (optional) + List.of(), // images (optional) + "https://example.com", // supportUrl (optional) + "https://example.com", // dataDeletionUrl (optional) + false, // enabled (optional) + List.of(), // redirectUris (optional) + List.of(), // postLogoutRedirectUris (optional) + "public", // type (optional) + false, // deviceFlow (optional) + List.of(), // installationScopes (optional) + "https://example.com", // installationRedirectUrl (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + +``` diff --git a/examples/1.9.x/server-kotlin/java/documentsdb/create-collection.md b/examples/1.9.x/server-kotlin/java/documentsdb/create-collection.md new file mode 100644 index 000000000..306abf693 --- /dev/null +++ b/examples/1.9.x/server-kotlin/java/documentsdb/create-collection.md @@ -0,0 +1,34 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.Permission; +import io.appwrite.Role; +import io.appwrite.services.DocumentsDB; + +Client client = new Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + .setKey(""); // Your secret API key + +DocumentsDB documentsDB = new DocumentsDB(client); + +documentsDB.createCollection( + "", // databaseId + "", // collectionId + "", // name + List.of(Permission.read(Role.any())), // permissions (optional) + false, // documentSecurity (optional) + false, // enabled (optional) + List.of(), // attributes (optional) + List.of(), // indexes (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + +``` diff --git a/examples/1.9.x/server-kotlin/java/documentsdb/create-document.md b/examples/1.9.x/server-kotlin/java/documentsdb/create-document.md new file mode 100644 index 000000000..d4ba18835 --- /dev/null +++ b/examples/1.9.x/server-kotlin/java/documentsdb/create-document.md @@ -0,0 +1,37 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.Permission; +import io.appwrite.Role; +import io.appwrite.services.DocumentsDB; + +Client client = new Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + .setSession(""); // The user session to authenticate with + +DocumentsDB documentsDB = new DocumentsDB(client); + +documentsDB.createDocument( + "", // databaseId + "", // collectionId + "", // documentId + Map.of( + "username", "walter.obrien", + "email", "walter.obrien@example.com", + "fullName", "Walter O'Brien", + "age", 30, + "isAdmin", false + ), // data + List.of(Permission.read(Role.any())), // permissions (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + +``` diff --git a/examples/1.9.x/server-kotlin/java/documentsdb/create-documents.md b/examples/1.9.x/server-kotlin/java/documentsdb/create-documents.md new file mode 100644 index 000000000..6cc3e446b --- /dev/null +++ b/examples/1.9.x/server-kotlin/java/documentsdb/create-documents.md @@ -0,0 +1,27 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.DocumentsDB; + +Client client = new Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + .setSession(""); // The user session to authenticate with + +DocumentsDB documentsDB = new DocumentsDB(client); + +documentsDB.createDocuments( + "", // databaseId + "", // collectionId + List.of(), // documents + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + +``` diff --git a/examples/1.9.x/server-kotlin/java/documentsdb/create-index.md b/examples/1.9.x/server-kotlin/java/documentsdb/create-index.md new file mode 100644 index 000000000..95a2363f0 --- /dev/null +++ b/examples/1.9.x/server-kotlin/java/documentsdb/create-index.md @@ -0,0 +1,33 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.DocumentsDB; +import io.appwrite.enums.DocumentsDBIndexType; +import io.appwrite.enums.OrderBy; + +Client client = new Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + .setKey(""); // Your secret API key + +DocumentsDB documentsDB = new DocumentsDB(client); + +documentsDB.createIndex( + "", // databaseId + "", // collectionId + "", // key + DocumentsDBIndexType.KEY, // type + List.of(), // attributes + List.of(OrderBy.ASC), // orders (optional) + List.of(), // lengths (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + +``` diff --git a/examples/1.9.x/server-kotlin/java/documentsdb/create-operations.md b/examples/1.9.x/server-kotlin/java/documentsdb/create-operations.md new file mode 100644 index 000000000..b7dc4880f --- /dev/null +++ b/examples/1.9.x/server-kotlin/java/documentsdb/create-operations.md @@ -0,0 +1,34 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.DocumentsDB; + +Client client = new Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + .setKey(""); // Your secret API key + +DocumentsDB documentsDB = new DocumentsDB(client); + +documentsDB.createOperations( + "", // transactionId + 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(); + return; + } + + System.out.println(result); + }) +); + +``` diff --git a/examples/1.9.x/server-kotlin/java/documentsdb/create-transaction.md b/examples/1.9.x/server-kotlin/java/documentsdb/create-transaction.md new file mode 100644 index 000000000..1cd52e528 --- /dev/null +++ b/examples/1.9.x/server-kotlin/java/documentsdb/create-transaction.md @@ -0,0 +1,25 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.DocumentsDB; + +Client client = new Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + .setKey(""); // Your secret API key + +DocumentsDB documentsDB = new DocumentsDB(client); + +documentsDB.createTransaction( + 60, // ttl (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + +``` diff --git a/examples/1.9.x/server-kotlin/java/documentsdb/create.md b/examples/1.9.x/server-kotlin/java/documentsdb/create.md new file mode 100644 index 000000000..8c433fe83 --- /dev/null +++ b/examples/1.9.x/server-kotlin/java/documentsdb/create.md @@ -0,0 +1,27 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.DocumentsDB; + +Client client = new Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + .setKey(""); // Your secret API key + +DocumentsDB documentsDB = new DocumentsDB(client); + +documentsDB.create( + "", // databaseId + "", // name + false, // enabled (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + +``` diff --git a/examples/1.9.x/server-kotlin/java/documentsdb/decrement-document-attribute.md b/examples/1.9.x/server-kotlin/java/documentsdb/decrement-document-attribute.md new file mode 100644 index 000000000..640eccf70 --- /dev/null +++ b/examples/1.9.x/server-kotlin/java/documentsdb/decrement-document-attribute.md @@ -0,0 +1,31 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.DocumentsDB; + +Client client = new Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + .setSession(""); // The user session to authenticate with + +DocumentsDB documentsDB = new DocumentsDB(client); + +documentsDB.decrementDocumentAttribute( + "", // databaseId + "", // collectionId + "", // documentId + "", // attribute + 0, // value (optional) + 0, // min (optional) + "", // transactionId (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + +``` diff --git a/examples/1.9.x/server-kotlin/java/documentsdb/delete-collection.md b/examples/1.9.x/server-kotlin/java/documentsdb/delete-collection.md new file mode 100644 index 000000000..6953b7ef1 --- /dev/null +++ b/examples/1.9.x/server-kotlin/java/documentsdb/delete-collection.md @@ -0,0 +1,26 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.DocumentsDB; + +Client client = new Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + .setKey(""); // Your secret API key + +DocumentsDB documentsDB = new DocumentsDB(client); + +documentsDB.deleteCollection( + "", // databaseId + "", // collectionId + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + +``` diff --git a/examples/1.9.x/server-kotlin/java/documentsdb/delete-document.md b/examples/1.9.x/server-kotlin/java/documentsdb/delete-document.md new file mode 100644 index 000000000..4cda79cde --- /dev/null +++ b/examples/1.9.x/server-kotlin/java/documentsdb/delete-document.md @@ -0,0 +1,28 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.DocumentsDB; + +Client client = new Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + .setSession(""); // The user session to authenticate with + +DocumentsDB documentsDB = new DocumentsDB(client); + +documentsDB.deleteDocument( + "", // databaseId + "", // collectionId + "", // documentId + "", // transactionId (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + +``` diff --git a/examples/1.9.x/server-kotlin/java/documentsdb/delete-documents.md b/examples/1.9.x/server-kotlin/java/documentsdb/delete-documents.md new file mode 100644 index 000000000..38acb98c3 --- /dev/null +++ b/examples/1.9.x/server-kotlin/java/documentsdb/delete-documents.md @@ -0,0 +1,28 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.DocumentsDB; + +Client client = new Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + .setKey(""); // Your secret API key + +DocumentsDB documentsDB = new DocumentsDB(client); + +documentsDB.deleteDocuments( + "", // databaseId + "", // collectionId + List.of(), // queries (optional) + "", // transactionId (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + +``` diff --git a/examples/1.9.x/server-kotlin/java/documentsdb/delete-index.md b/examples/1.9.x/server-kotlin/java/documentsdb/delete-index.md new file mode 100644 index 000000000..a86ce3a32 --- /dev/null +++ b/examples/1.9.x/server-kotlin/java/documentsdb/delete-index.md @@ -0,0 +1,27 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.DocumentsDB; + +Client client = new Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + .setKey(""); // Your secret API key + +DocumentsDB documentsDB = new DocumentsDB(client); + +documentsDB.deleteIndex( + "", // databaseId + "", // collectionId + "", // key + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + +``` diff --git a/examples/1.9.x/server-kotlin/java/documentsdb/delete-transaction.md b/examples/1.9.x/server-kotlin/java/documentsdb/delete-transaction.md new file mode 100644 index 000000000..e7f4252de --- /dev/null +++ b/examples/1.9.x/server-kotlin/java/documentsdb/delete-transaction.md @@ -0,0 +1,25 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.DocumentsDB; + +Client client = new Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + .setKey(""); // Your secret API key + +DocumentsDB documentsDB = new DocumentsDB(client); + +documentsDB.deleteTransaction( + "", // transactionId + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + +``` diff --git a/examples/1.9.x/server-kotlin/java/documentsdb/delete.md b/examples/1.9.x/server-kotlin/java/documentsdb/delete.md new file mode 100644 index 000000000..31c3dd8a1 --- /dev/null +++ b/examples/1.9.x/server-kotlin/java/documentsdb/delete.md @@ -0,0 +1,25 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.DocumentsDB; + +Client client = new Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + .setKey(""); // Your secret API key + +DocumentsDB documentsDB = new DocumentsDB(client); + +documentsDB.delete( + "", // databaseId + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + +``` diff --git a/examples/1.9.x/server-kotlin/java/documentsdb/get-collection.md b/examples/1.9.x/server-kotlin/java/documentsdb/get-collection.md new file mode 100644 index 000000000..8622d6c86 --- /dev/null +++ b/examples/1.9.x/server-kotlin/java/documentsdb/get-collection.md @@ -0,0 +1,26 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.DocumentsDB; + +Client client = new Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + .setKey(""); // Your secret API key + +DocumentsDB documentsDB = new DocumentsDB(client); + +documentsDB.getCollection( + "", // databaseId + "", // collectionId + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + +``` diff --git a/examples/1.9.x/server-kotlin/java/documentsdb/get-document.md b/examples/1.9.x/server-kotlin/java/documentsdb/get-document.md new file mode 100644 index 000000000..0e75f98a5 --- /dev/null +++ b/examples/1.9.x/server-kotlin/java/documentsdb/get-document.md @@ -0,0 +1,29 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.DocumentsDB; + +Client client = new Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + .setSession(""); // The user session to authenticate with + +DocumentsDB documentsDB = new DocumentsDB(client); + +documentsDB.getDocument( + "", // databaseId + "", // collectionId + "", // documentId + List.of(), // queries (optional) + "", // transactionId (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + +``` diff --git a/examples/1.9.x/server-kotlin/java/documentsdb/get-index.md b/examples/1.9.x/server-kotlin/java/documentsdb/get-index.md new file mode 100644 index 000000000..f387418c1 --- /dev/null +++ b/examples/1.9.x/server-kotlin/java/documentsdb/get-index.md @@ -0,0 +1,27 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.DocumentsDB; + +Client client = new Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + .setKey(""); // Your secret API key + +DocumentsDB documentsDB = new DocumentsDB(client); + +documentsDB.getIndex( + "", // databaseId + "", // collectionId + "", // key + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + +``` diff --git a/examples/1.9.x/server-kotlin/java/documentsdb/get-transaction.md b/examples/1.9.x/server-kotlin/java/documentsdb/get-transaction.md new file mode 100644 index 000000000..e377bf081 --- /dev/null +++ b/examples/1.9.x/server-kotlin/java/documentsdb/get-transaction.md @@ -0,0 +1,25 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.DocumentsDB; + +Client client = new Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + .setKey(""); // Your secret API key + +DocumentsDB documentsDB = new DocumentsDB(client); + +documentsDB.getTransaction( + "", // transactionId + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + +``` diff --git a/examples/1.9.x/server-kotlin/java/documentsdb/get.md b/examples/1.9.x/server-kotlin/java/documentsdb/get.md new file mode 100644 index 000000000..6aba5489b --- /dev/null +++ b/examples/1.9.x/server-kotlin/java/documentsdb/get.md @@ -0,0 +1,25 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.DocumentsDB; + +Client client = new Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + .setKey(""); // Your secret API key + +DocumentsDB documentsDB = new DocumentsDB(client); + +documentsDB.get( + "", // databaseId + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + +``` diff --git a/examples/1.9.x/server-kotlin/java/documentsdb/increment-document-attribute.md b/examples/1.9.x/server-kotlin/java/documentsdb/increment-document-attribute.md new file mode 100644 index 000000000..096a4950a --- /dev/null +++ b/examples/1.9.x/server-kotlin/java/documentsdb/increment-document-attribute.md @@ -0,0 +1,31 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.DocumentsDB; + +Client client = new Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + .setSession(""); // The user session to authenticate with + +DocumentsDB documentsDB = new DocumentsDB(client); + +documentsDB.incrementDocumentAttribute( + "", // databaseId + "", // collectionId + "", // documentId + "", // attribute + 0, // value (optional) + 0, // max (optional) + "", // transactionId (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + +``` diff --git a/examples/1.9.x/server-kotlin/java/documentsdb/list-collections.md b/examples/1.9.x/server-kotlin/java/documentsdb/list-collections.md new file mode 100644 index 000000000..bca8249ea --- /dev/null +++ b/examples/1.9.x/server-kotlin/java/documentsdb/list-collections.md @@ -0,0 +1,28 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.DocumentsDB; + +Client client = new Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + .setKey(""); // Your secret API key + +DocumentsDB documentsDB = new DocumentsDB(client); + +documentsDB.listCollections( + "", // databaseId + List.of(), // queries (optional) + "", // search (optional) + false, // total (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + +``` diff --git a/examples/1.9.x/server-kotlin/java/documentsdb/list-documents.md b/examples/1.9.x/server-kotlin/java/documentsdb/list-documents.md new file mode 100644 index 000000000..8cbcd8aaf --- /dev/null +++ b/examples/1.9.x/server-kotlin/java/documentsdb/list-documents.md @@ -0,0 +1,30 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.DocumentsDB; + +Client client = new Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + .setSession(""); // The user session to authenticate with + +DocumentsDB documentsDB = new DocumentsDB(client); + +documentsDB.listDocuments( + "", // databaseId + "", // collectionId + List.of(), // queries (optional) + "", // transactionId (optional) + false, // total (optional) + 0, // ttl (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + +``` diff --git a/examples/1.9.x/server-kotlin/java/documentsdb/list-indexes.md b/examples/1.9.x/server-kotlin/java/documentsdb/list-indexes.md new file mode 100644 index 000000000..9544488ae --- /dev/null +++ b/examples/1.9.x/server-kotlin/java/documentsdb/list-indexes.md @@ -0,0 +1,28 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.DocumentsDB; + +Client client = new Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + .setKey(""); // Your secret API key + +DocumentsDB documentsDB = new DocumentsDB(client); + +documentsDB.listIndexes( + "", // databaseId + "", // collectionId + List.of(), // queries (optional) + false, // total (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + +``` diff --git a/examples/1.9.x/server-kotlin/java/documentsdb/list-transactions.md b/examples/1.9.x/server-kotlin/java/documentsdb/list-transactions.md new file mode 100644 index 000000000..cc56f53e8 --- /dev/null +++ b/examples/1.9.x/server-kotlin/java/documentsdb/list-transactions.md @@ -0,0 +1,25 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.DocumentsDB; + +Client client = new Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + .setKey(""); // Your secret API key + +DocumentsDB documentsDB = new DocumentsDB(client); + +documentsDB.listTransactions( + List.of(), // queries (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + +``` diff --git a/examples/1.9.x/server-kotlin/java/documentsdb/list.md b/examples/1.9.x/server-kotlin/java/documentsdb/list.md new file mode 100644 index 000000000..0e7b2b48e --- /dev/null +++ b/examples/1.9.x/server-kotlin/java/documentsdb/list.md @@ -0,0 +1,27 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.DocumentsDB; + +Client client = new Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + .setKey(""); // Your secret API key + +DocumentsDB documentsDB = new DocumentsDB(client); + +documentsDB.list( + List.of(), // queries (optional) + "", // search (optional) + false, // total (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + +``` diff --git a/examples/1.9.x/server-kotlin/java/documentsdb/update-collection.md b/examples/1.9.x/server-kotlin/java/documentsdb/update-collection.md new file mode 100644 index 000000000..2e29fd3d5 --- /dev/null +++ b/examples/1.9.x/server-kotlin/java/documentsdb/update-collection.md @@ -0,0 +1,33 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.Permission; +import io.appwrite.Role; +import io.appwrite.services.DocumentsDB; + +Client client = new Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + .setKey(""); // Your secret API key + +DocumentsDB documentsDB = new DocumentsDB(client); + +documentsDB.updateCollection( + "", // databaseId + "", // collectionId + "", // name + List.of(Permission.read(Role.any())), // permissions (optional) + false, // documentSecurity (optional) + false, // enabled (optional) + false, // purge (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + +``` diff --git a/examples/1.9.x/server-kotlin/java/documentsdb/update-document.md b/examples/1.9.x/server-kotlin/java/documentsdb/update-document.md new file mode 100644 index 000000000..c1332928d --- /dev/null +++ b/examples/1.9.x/server-kotlin/java/documentsdb/update-document.md @@ -0,0 +1,32 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.Permission; +import io.appwrite.Role; +import io.appwrite.services.DocumentsDB; + +Client client = new Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + .setSession(""); // The user session to authenticate with + +DocumentsDB documentsDB = new DocumentsDB(client); + +documentsDB.updateDocument( + "", // databaseId + "", // collectionId + "", // documentId + Map.of("a", "b"), // data (optional) + List.of(Permission.read(Role.any())), // permissions (optional) + "", // transactionId (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + +``` diff --git a/examples/1.9.x/server-kotlin/java/documentsdb/update-documents.md b/examples/1.9.x/server-kotlin/java/documentsdb/update-documents.md new file mode 100644 index 000000000..8b96274cb --- /dev/null +++ b/examples/1.9.x/server-kotlin/java/documentsdb/update-documents.md @@ -0,0 +1,29 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.DocumentsDB; + +Client client = new Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + .setKey(""); // Your secret API key + +DocumentsDB documentsDB = new DocumentsDB(client); + +documentsDB.updateDocuments( + "", // databaseId + "", // collectionId + Map.of("a", "b"), // data (optional) + List.of(), // queries (optional) + "", // transactionId (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + +``` diff --git a/examples/1.9.x/server-kotlin/java/documentsdb/update-transaction.md b/examples/1.9.x/server-kotlin/java/documentsdb/update-transaction.md new file mode 100644 index 000000000..17cd8f27b --- /dev/null +++ b/examples/1.9.x/server-kotlin/java/documentsdb/update-transaction.md @@ -0,0 +1,27 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.DocumentsDB; + +Client client = new Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + .setKey(""); // Your secret API key + +DocumentsDB documentsDB = new DocumentsDB(client); + +documentsDB.updateTransaction( + "", // transactionId + false, // commit (optional) + false, // rollback (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + +``` diff --git a/examples/1.9.x/server-kotlin/java/documentsdb/update.md b/examples/1.9.x/server-kotlin/java/documentsdb/update.md new file mode 100644 index 000000000..09ba4ae6e --- /dev/null +++ b/examples/1.9.x/server-kotlin/java/documentsdb/update.md @@ -0,0 +1,27 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.DocumentsDB; + +Client client = new Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + .setKey(""); // Your secret API key + +DocumentsDB documentsDB = new DocumentsDB(client); + +documentsDB.update( + "", // databaseId + "", // name + false, // enabled (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + +``` diff --git a/examples/1.9.x/server-kotlin/java/documentsdb/upsert-document.md b/examples/1.9.x/server-kotlin/java/documentsdb/upsert-document.md new file mode 100644 index 000000000..2c20c630a --- /dev/null +++ b/examples/1.9.x/server-kotlin/java/documentsdb/upsert-document.md @@ -0,0 +1,32 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.Permission; +import io.appwrite.Role; +import io.appwrite.services.DocumentsDB; + +Client client = new Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + .setSession(""); // The user session to authenticate with + +DocumentsDB documentsDB = new DocumentsDB(client); + +documentsDB.upsertDocument( + "", // databaseId + "", // collectionId + "", // documentId + Map.of("a", "b"), // data (optional) + List.of(Permission.read(Role.any())), // permissions (optional) + "", // transactionId (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + +``` diff --git a/examples/1.9.x/server-kotlin/java/documentsdb/upsert-documents.md b/examples/1.9.x/server-kotlin/java/documentsdb/upsert-documents.md new file mode 100644 index 000000000..97582524b --- /dev/null +++ b/examples/1.9.x/server-kotlin/java/documentsdb/upsert-documents.md @@ -0,0 +1,28 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.DocumentsDB; + +Client client = new Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + .setKey(""); // Your secret API key + +DocumentsDB documentsDB = new DocumentsDB(client); + +documentsDB.upsertDocuments( + "", // databaseId + "", // collectionId + List.of(), // documents + "", // transactionId (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + +``` diff --git a/examples/1.9.x/server-kotlin/java/oauth2/approve.md b/examples/1.9.x/server-kotlin/java/oauth2/approve.md new file mode 100644 index 000000000..80e38cb70 --- /dev/null +++ b/examples/1.9.x/server-kotlin/java/oauth2/approve.md @@ -0,0 +1,27 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Oauth2; + +Client client = new Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setSession("") // The user session to authenticate with + .setProject(""); // Your project ID + +Oauth2 oauth2 = new Oauth2(client); + +oauth2.approve( + "", // grant_id + "", // authorization_details (optional) + "", // scope (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + +``` diff --git a/examples/1.9.x/server-kotlin/java/oauth2/authorize-post.md b/examples/1.9.x/server-kotlin/java/oauth2/authorize-post.md new file mode 100644 index 000000000..cc4aa7a4a --- /dev/null +++ b/examples/1.9.x/server-kotlin/java/oauth2/authorize-post.md @@ -0,0 +1,38 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Oauth2; + +Client client = new Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setSession("") // The user session to authenticate with + .setProject(""); // Your project ID + +Oauth2 oauth2 = new Oauth2(client); + +oauth2.authorizePost( + "", // client_id (optional) + "https://example.com", // redirect_uri (optional) + "", // response_type (optional) + "", // scope (optional) + "", // state (optional) + "", // nonce (optional) + "", // code_challenge (optional) + "s256", // code_challenge_method (optional) + "", // prompt (optional) + 0, // max_age (optional) + "", // authorization_details (optional) + "", // resource (optional) + "", // audience (optional) + "", // request_uri (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + +``` diff --git a/examples/1.9.x/server-kotlin/java/oauth2/authorize.md b/examples/1.9.x/server-kotlin/java/oauth2/authorize.md new file mode 100644 index 000000000..23028de21 --- /dev/null +++ b/examples/1.9.x/server-kotlin/java/oauth2/authorize.md @@ -0,0 +1,38 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Oauth2; + +Client client = new Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setSession("") // The user session to authenticate with + .setProject(""); // Your project ID + +Oauth2 oauth2 = new Oauth2(client); + +oauth2.authorize( + "", // client_id (optional) + "https://example.com", // redirect_uri (optional) + "", // response_type (optional) + "", // scope (optional) + "", // state (optional) + "", // nonce (optional) + "", // code_challenge (optional) + "s256", // code_challenge_method (optional) + "", // prompt (optional) + 0, // max_age (optional) + "", // authorization_details (optional) + "", // resource (optional) + "", // audience (optional) + "", // request_uri (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + +``` diff --git a/examples/1.9.x/server-kotlin/java/oauth2/create-device-authorization.md b/examples/1.9.x/server-kotlin/java/oauth2/create-device-authorization.md new file mode 100644 index 000000000..a2a14dc21 --- /dev/null +++ b/examples/1.9.x/server-kotlin/java/oauth2/create-device-authorization.md @@ -0,0 +1,29 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Oauth2; + +Client client = new Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setSession("") // The user session to authenticate with + .setProject(""); // Your project ID + +Oauth2 oauth2 = new Oauth2(client); + +oauth2.createDeviceAuthorization( + "", // client_id (optional) + "", // scope (optional) + "", // authorization_details (optional) + "", // resource (optional) + "", // audience (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + +``` diff --git a/examples/1.9.x/server-kotlin/java/oauth2/create-grant.md b/examples/1.9.x/server-kotlin/java/oauth2/create-grant.md new file mode 100644 index 000000000..9a8adf960 --- /dev/null +++ b/examples/1.9.x/server-kotlin/java/oauth2/create-grant.md @@ -0,0 +1,25 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Oauth2; + +Client client = new Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setSession("") // The user session to authenticate with + .setProject(""); // Your project ID + +Oauth2 oauth2 = new Oauth2(client); + +oauth2.createGrant( + "", // user_code + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + +``` diff --git a/examples/1.9.x/server-kotlin/java/oauth2/create-par.md b/examples/1.9.x/server-kotlin/java/oauth2/create-par.md new file mode 100644 index 000000000..c6d7d14b8 --- /dev/null +++ b/examples/1.9.x/server-kotlin/java/oauth2/create-par.md @@ -0,0 +1,37 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Oauth2; + +Client client = new Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setSession("") // The user session to authenticate with + .setProject(""); // Your project ID + +Oauth2 oauth2 = new Oauth2(client); + +oauth2.createPAR( + "", // client_id + "https://example.com", // redirect_uri + "code", // response_type + "", // scope (optional) + "", // state (optional) + "", // nonce (optional) + "", // code_challenge (optional) + "s256", // code_challenge_method (optional) + "", // prompt (optional) + 0, // max_age (optional) + "", // authorization_details (optional) + "", // resource (optional) + "", // audience (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + +``` diff --git a/examples/1.9.x/server-kotlin/java/oauth2/create-token.md b/examples/1.9.x/server-kotlin/java/oauth2/create-token.md new file mode 100644 index 000000000..39e088696 --- /dev/null +++ b/examples/1.9.x/server-kotlin/java/oauth2/create-token.md @@ -0,0 +1,34 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Oauth2; + +Client client = new Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setSession("") // The user session to authenticate with + .setProject(""); // Your project ID + +Oauth2 oauth2 = new Oauth2(client); + +oauth2.createToken( + "", // grant_type + "", // code (optional) + "", // refresh_token (optional) + "", // device_code (optional) + "", // client_id (optional) + "", // client_secret (optional) + "", // code_verifier (optional) + "https://example.com", // redirect_uri (optional) + "", // resource (optional) + "", // audience (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + +``` diff --git a/examples/1.9.x/server-kotlin/java/oauth2/get-grant.md b/examples/1.9.x/server-kotlin/java/oauth2/get-grant.md new file mode 100644 index 000000000..152e30262 --- /dev/null +++ b/examples/1.9.x/server-kotlin/java/oauth2/get-grant.md @@ -0,0 +1,25 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Oauth2; + +Client client = new Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setSession("") // The user session to authenticate with + .setProject(""); // Your project ID + +Oauth2 oauth2 = new Oauth2(client); + +oauth2.getGrant( + "", // grant_id + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + +``` diff --git a/examples/1.9.x/server-kotlin/java/oauth2/list-organizations.md b/examples/1.9.x/server-kotlin/java/oauth2/list-organizations.md new file mode 100644 index 000000000..73ea72392 --- /dev/null +++ b/examples/1.9.x/server-kotlin/java/oauth2/list-organizations.md @@ -0,0 +1,27 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Oauth2; + +Client client = new Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setSession("") // The user session to authenticate with + .setProject(""); // Your project ID + +Oauth2 oauth2 = new Oauth2(client); + +oauth2.listOrganizations( + 1, // limit (optional) + 0, // offset (optional) + "", // search (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + +``` diff --git a/examples/1.9.x/server-kotlin/java/oauth2/list-projects.md b/examples/1.9.x/server-kotlin/java/oauth2/list-projects.md new file mode 100644 index 000000000..e04a48287 --- /dev/null +++ b/examples/1.9.x/server-kotlin/java/oauth2/list-projects.md @@ -0,0 +1,27 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Oauth2; + +Client client = new Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setSession("") // The user session to authenticate with + .setProject(""); // Your project ID + +Oauth2 oauth2 = new Oauth2(client); + +oauth2.listProjects( + 1, // limit (optional) + 0, // offset (optional) + "", // search (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + +``` diff --git a/examples/1.9.x/server-kotlin/java/oauth2/reject.md b/examples/1.9.x/server-kotlin/java/oauth2/reject.md new file mode 100644 index 000000000..9ed2d9e1b --- /dev/null +++ b/examples/1.9.x/server-kotlin/java/oauth2/reject.md @@ -0,0 +1,25 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Oauth2; + +Client client = new Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setSession("") // The user session to authenticate with + .setProject(""); // Your project ID + +Oauth2 oauth2 = new Oauth2(client); + +oauth2.reject( + "", // grant_id + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + +``` diff --git a/examples/1.9.x/server-kotlin/java/oauth2/revoke.md b/examples/1.9.x/server-kotlin/java/oauth2/revoke.md new file mode 100644 index 000000000..04d52c480 --- /dev/null +++ b/examples/1.9.x/server-kotlin/java/oauth2/revoke.md @@ -0,0 +1,28 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Oauth2; + +Client client = new Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setSession("") // The user session to authenticate with + .setProject(""); // Your project ID + +Oauth2 oauth2 = new Oauth2(client); + +oauth2.revoke( + "", // token + "access_token", // token_type_hint (optional) + "", // client_id (optional) + "", // client_secret (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + +``` diff --git a/examples/1.9.x/server-kotlin/java/organization/create-installation.md b/examples/1.9.x/server-kotlin/java/organization/create-installation.md new file mode 100644 index 000000000..de3e8f5fd --- /dev/null +++ b/examples/1.9.x/server-kotlin/java/organization/create-installation.md @@ -0,0 +1,26 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Organization; + +Client client = new Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + .setSession(""); // The user session to authenticate with + +Organization organization = new Organization(client); + +organization.createInstallation( + "", // appId + "", // authorizationDetails (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + +``` diff --git a/examples/1.9.x/server-kotlin/java/organization/delete-installation.md b/examples/1.9.x/server-kotlin/java/organization/delete-installation.md new file mode 100644 index 000000000..e0c33feb1 --- /dev/null +++ b/examples/1.9.x/server-kotlin/java/organization/delete-installation.md @@ -0,0 +1,25 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Organization; + +Client client = new Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + .setSession(""); // The user session to authenticate with + +Organization organization = new Organization(client); + +organization.deleteInstallation( + "", // installationId + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + +``` diff --git a/examples/1.9.x/server-kotlin/java/organization/get-installation.md b/examples/1.9.x/server-kotlin/java/organization/get-installation.md new file mode 100644 index 000000000..223b2498c --- /dev/null +++ b/examples/1.9.x/server-kotlin/java/organization/get-installation.md @@ -0,0 +1,25 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Organization; + +Client client = new Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + .setSession(""); // The user session to authenticate with + +Organization organization = new Organization(client); + +organization.getInstallation( + "", // installationId + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + +``` diff --git a/examples/1.9.x/server-kotlin/java/organization/list-installations.md b/examples/1.9.x/server-kotlin/java/organization/list-installations.md new file mode 100644 index 000000000..26f9c49d3 --- /dev/null +++ b/examples/1.9.x/server-kotlin/java/organization/list-installations.md @@ -0,0 +1,26 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Organization; + +Client client = new Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + .setSession(""); // The user session to authenticate with + +Organization organization = new Organization(client); + +organization.listInstallations( + List.of(), // queries (optional) + false, // total (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + +``` diff --git a/examples/1.9.x/server-kotlin/java/organization/update-installation.md b/examples/1.9.x/server-kotlin/java/organization/update-installation.md new file mode 100644 index 000000000..d8a704473 --- /dev/null +++ b/examples/1.9.x/server-kotlin/java/organization/update-installation.md @@ -0,0 +1,26 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Organization; + +Client client = new Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + .setSession(""); // The user session to authenticate with + +Organization organization = new Organization(client); + +organization.updateInstallation( + "", // installationId + "", // authorizationDetails (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + +``` diff --git a/examples/1.9.x/server-kotlin/java/project/update-o-auth-2-server.md b/examples/1.9.x/server-kotlin/java/project/update-o-auth-2-server.md index 1cd4df44e..366c8d95e 100644 --- a/examples/1.9.x/server-kotlin/java/project/update-o-auth-2-server.md +++ b/examples/1.9.x/server-kotlin/java/project/update-o-auth-2-server.md @@ -19,6 +19,7 @@ project.updateOAuth2Server( 60, // refreshTokenDuration (optional) 60, // publicAccessTokenDuration (optional) 60, // publicRefreshTokenDuration (optional) + 60, // installationAccessTokenDuration (optional) false, // confidentialPkce (optional) "https://example.com", // verificationUrl (optional) 6, // userCodeLength (optional) diff --git a/examples/1.9.x/server-kotlin/java/teams/create-installation.md b/examples/1.9.x/server-kotlin/java/teams/create-installation.md new file mode 100644 index 000000000..6ea9fa931 --- /dev/null +++ b/examples/1.9.x/server-kotlin/java/teams/create-installation.md @@ -0,0 +1,27 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Teams; + +Client client = new Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + .setSession(""); // The user session to authenticate with + +Teams teams = new Teams(client); + +teams.createInstallation( + "", // teamId + "", // appId + "", // authorizationDetails (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + +``` diff --git a/examples/1.9.x/server-kotlin/java/teams/delete-installation.md b/examples/1.9.x/server-kotlin/java/teams/delete-installation.md new file mode 100644 index 000000000..e1b475943 --- /dev/null +++ b/examples/1.9.x/server-kotlin/java/teams/delete-installation.md @@ -0,0 +1,26 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Teams; + +Client client = new Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + .setSession(""); // The user session to authenticate with + +Teams teams = new Teams(client); + +teams.deleteInstallation( + "", // teamId + "", // installationId + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + +``` diff --git a/examples/1.9.x/server-kotlin/java/teams/get-installation.md b/examples/1.9.x/server-kotlin/java/teams/get-installation.md new file mode 100644 index 000000000..f8659ce9b --- /dev/null +++ b/examples/1.9.x/server-kotlin/java/teams/get-installation.md @@ -0,0 +1,26 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Teams; + +Client client = new Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + .setSession(""); // The user session to authenticate with + +Teams teams = new Teams(client); + +teams.getInstallation( + "", // teamId + "", // installationId + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + +``` diff --git a/examples/1.9.x/server-kotlin/java/teams/list-installations.md b/examples/1.9.x/server-kotlin/java/teams/list-installations.md new file mode 100644 index 000000000..3340fec5a --- /dev/null +++ b/examples/1.9.x/server-kotlin/java/teams/list-installations.md @@ -0,0 +1,27 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Teams; + +Client client = new Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + .setSession(""); // The user session to authenticate with + +Teams teams = new Teams(client); + +teams.listInstallations( + "", // teamId + List.of(), // queries (optional) + false, // total (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + +``` diff --git a/examples/1.9.x/server-kotlin/java/teams/update-installation.md b/examples/1.9.x/server-kotlin/java/teams/update-installation.md new file mode 100644 index 000000000..7c57b7c43 --- /dev/null +++ b/examples/1.9.x/server-kotlin/java/teams/update-installation.md @@ -0,0 +1,27 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Teams; + +Client client = new Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + .setSession(""); // The user session to authenticate with + +Teams teams = new Teams(client); + +teams.updateInstallation( + "", // teamId + "", // installationId + "", // authorizationDetails (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + +``` diff --git a/examples/1.9.x/server-kotlin/java/vectorsdb/create-collection.md b/examples/1.9.x/server-kotlin/java/vectorsdb/create-collection.md new file mode 100644 index 000000000..d3dc60bee --- /dev/null +++ b/examples/1.9.x/server-kotlin/java/vectorsdb/create-collection.md @@ -0,0 +1,33 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.Permission; +import io.appwrite.Role; +import io.appwrite.services.VectorsDB; + +Client client = new Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + .setKey(""); // Your secret API key + +VectorsDB vectorsDB = new VectorsDB(client); + +vectorsDB.createCollection( + "", // databaseId + "", // collectionId + "", // name + 1, // dimension + List.of(Permission.read(Role.any())), // permissions (optional) + false, // documentSecurity (optional) + false, // enabled (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + +``` diff --git a/examples/1.9.x/server-kotlin/java/vectorsdb/create-document.md b/examples/1.9.x/server-kotlin/java/vectorsdb/create-document.md new file mode 100644 index 000000000..474a9410d --- /dev/null +++ b/examples/1.9.x/server-kotlin/java/vectorsdb/create-document.md @@ -0,0 +1,36 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.Permission; +import io.appwrite.Role; +import io.appwrite.services.VectorsDB; + +Client client = new Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + .setSession(""); // The user session to authenticate with + +VectorsDB vectorsDB = new VectorsDB(client); + +vectorsDB.createDocument( + "", // databaseId + "", // collectionId + "", // documentId + Map.of( + "embeddings", List.of(0.12, -0.55, 0.88, 1.02), + "metadata", Map.of( + "key", "value" + ) + ), // data + List.of(Permission.read(Role.any())), // permissions (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + +``` diff --git a/examples/1.9.x/server-kotlin/java/vectorsdb/create-documents.md b/examples/1.9.x/server-kotlin/java/vectorsdb/create-documents.md new file mode 100644 index 000000000..21090e6ab --- /dev/null +++ b/examples/1.9.x/server-kotlin/java/vectorsdb/create-documents.md @@ -0,0 +1,27 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.VectorsDB; + +Client client = new Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + .setKey(""); // Your secret API key + +VectorsDB vectorsDB = new VectorsDB(client); + +vectorsDB.createDocuments( + "", // databaseId + "", // collectionId + List.of(), // documents + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + +``` diff --git a/examples/1.9.x/server-kotlin/java/vectorsdb/create-index.md b/examples/1.9.x/server-kotlin/java/vectorsdb/create-index.md new file mode 100644 index 000000000..3c5c57211 --- /dev/null +++ b/examples/1.9.x/server-kotlin/java/vectorsdb/create-index.md @@ -0,0 +1,33 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.VectorsDB; +import io.appwrite.enums.VectorsDBIndexType; +import io.appwrite.enums.OrderBy; + +Client client = new Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + .setKey(""); // Your secret API key + +VectorsDB vectorsDB = new VectorsDB(client); + +vectorsDB.createIndex( + "", // databaseId + "", // collectionId + "", // key + VectorsDBIndexType.HNSW_EUCLIDEAN, // type + List.of(), // attributes + List.of(OrderBy.ASC), // orders (optional) + List.of(), // lengths (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + +``` diff --git a/examples/1.9.x/server-kotlin/java/vectorsdb/create-operations.md b/examples/1.9.x/server-kotlin/java/vectorsdb/create-operations.md new file mode 100644 index 000000000..bc2f85e7c --- /dev/null +++ b/examples/1.9.x/server-kotlin/java/vectorsdb/create-operations.md @@ -0,0 +1,34 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.VectorsDB; + +Client client = new Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + .setKey(""); // Your secret API key + +VectorsDB vectorsDB = new VectorsDB(client); + +vectorsDB.createOperations( + "", // transactionId + 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(); + return; + } + + System.out.println(result); + }) +); + +``` diff --git a/examples/1.9.x/server-kotlin/java/vectorsdb/create-query.md b/examples/1.9.x/server-kotlin/java/vectorsdb/create-query.md new file mode 100644 index 000000000..21ca0cebb --- /dev/null +++ b/examples/1.9.x/server-kotlin/java/vectorsdb/create-query.md @@ -0,0 +1,30 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.VectorsDB; + +Client client = new Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + .setSession(""); // The user session to authenticate with + +VectorsDB vectorsDB = new VectorsDB(client); + +vectorsDB.createQuery( + "", // databaseId + "", // collectionId + List.of(), // queries (optional) + "", // transactionId (optional) + false, // total (optional) + 0, // ttl (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + +``` diff --git a/examples/1.9.x/server-kotlin/java/vectorsdb/create-text-embeddings.md b/examples/1.9.x/server-kotlin/java/vectorsdb/create-text-embeddings.md new file mode 100644 index 000000000..5cadbf6ea --- /dev/null +++ b/examples/1.9.x/server-kotlin/java/vectorsdb/create-text-embeddings.md @@ -0,0 +1,27 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.VectorsDB; +import io.appwrite.enums.EmbeddingModel; + +Client client = new Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + .setKey(""); // Your secret API key + +VectorsDB vectorsDB = new VectorsDB(client); + +vectorsDB.createTextEmbeddings( + List.of(), // texts + EmbeddingModel.NOMIC_EMBED_TEXT, // model (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + +``` diff --git a/examples/1.9.x/server-kotlin/java/vectorsdb/create-transaction.md b/examples/1.9.x/server-kotlin/java/vectorsdb/create-transaction.md new file mode 100644 index 000000000..c855284b3 --- /dev/null +++ b/examples/1.9.x/server-kotlin/java/vectorsdb/create-transaction.md @@ -0,0 +1,25 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.VectorsDB; + +Client client = new Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + .setKey(""); // Your secret API key + +VectorsDB vectorsDB = new VectorsDB(client); + +vectorsDB.createTransaction( + 60, // ttl (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + +``` diff --git a/examples/1.9.x/server-kotlin/java/vectorsdb/create.md b/examples/1.9.x/server-kotlin/java/vectorsdb/create.md new file mode 100644 index 000000000..e9a1e42e1 --- /dev/null +++ b/examples/1.9.x/server-kotlin/java/vectorsdb/create.md @@ -0,0 +1,27 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.VectorsDB; + +Client client = new Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + .setKey(""); // Your secret API key + +VectorsDB vectorsDB = new VectorsDB(client); + +vectorsDB.create( + "", // databaseId + "", // name + false, // enabled (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + +``` diff --git a/examples/1.9.x/server-kotlin/java/vectorsdb/delete-collection.md b/examples/1.9.x/server-kotlin/java/vectorsdb/delete-collection.md new file mode 100644 index 000000000..c0d9eecbe --- /dev/null +++ b/examples/1.9.x/server-kotlin/java/vectorsdb/delete-collection.md @@ -0,0 +1,26 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.VectorsDB; + +Client client = new Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + .setKey(""); // Your secret API key + +VectorsDB vectorsDB = new VectorsDB(client); + +vectorsDB.deleteCollection( + "", // databaseId + "", // collectionId + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + +``` diff --git a/examples/1.9.x/server-kotlin/java/vectorsdb/delete-document.md b/examples/1.9.x/server-kotlin/java/vectorsdb/delete-document.md new file mode 100644 index 000000000..9ab5e5719 --- /dev/null +++ b/examples/1.9.x/server-kotlin/java/vectorsdb/delete-document.md @@ -0,0 +1,28 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.VectorsDB; + +Client client = new Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + .setSession(""); // The user session to authenticate with + +VectorsDB vectorsDB = new VectorsDB(client); + +vectorsDB.deleteDocument( + "", // databaseId + "", // collectionId + "", // documentId + "", // transactionId (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + +``` diff --git a/examples/1.9.x/server-kotlin/java/vectorsdb/delete-documents.md b/examples/1.9.x/server-kotlin/java/vectorsdb/delete-documents.md new file mode 100644 index 000000000..31a425a4e --- /dev/null +++ b/examples/1.9.x/server-kotlin/java/vectorsdb/delete-documents.md @@ -0,0 +1,28 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.VectorsDB; + +Client client = new Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + .setKey(""); // Your secret API key + +VectorsDB vectorsDB = new VectorsDB(client); + +vectorsDB.deleteDocuments( + "", // databaseId + "", // collectionId + List.of(), // queries (optional) + "", // transactionId (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + +``` diff --git a/examples/1.9.x/server-kotlin/java/vectorsdb/delete-index.md b/examples/1.9.x/server-kotlin/java/vectorsdb/delete-index.md new file mode 100644 index 000000000..a8c4b5721 --- /dev/null +++ b/examples/1.9.x/server-kotlin/java/vectorsdb/delete-index.md @@ -0,0 +1,27 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.VectorsDB; + +Client client = new Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + .setKey(""); // Your secret API key + +VectorsDB vectorsDB = new VectorsDB(client); + +vectorsDB.deleteIndex( + "", // databaseId + "", // collectionId + "", // key + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + +``` diff --git a/examples/1.9.x/server-kotlin/java/vectorsdb/delete-transaction.md b/examples/1.9.x/server-kotlin/java/vectorsdb/delete-transaction.md new file mode 100644 index 000000000..b71ee2a71 --- /dev/null +++ b/examples/1.9.x/server-kotlin/java/vectorsdb/delete-transaction.md @@ -0,0 +1,25 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.VectorsDB; + +Client client = new Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + .setKey(""); // Your secret API key + +VectorsDB vectorsDB = new VectorsDB(client); + +vectorsDB.deleteTransaction( + "", // transactionId + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + +``` diff --git a/examples/1.9.x/server-kotlin/java/vectorsdb/delete.md b/examples/1.9.x/server-kotlin/java/vectorsdb/delete.md new file mode 100644 index 000000000..821dacff3 --- /dev/null +++ b/examples/1.9.x/server-kotlin/java/vectorsdb/delete.md @@ -0,0 +1,25 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.VectorsDB; + +Client client = new Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + .setKey(""); // Your secret API key + +VectorsDB vectorsDB = new VectorsDB(client); + +vectorsDB.delete( + "", // databaseId + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + +``` diff --git a/examples/1.9.x/server-kotlin/java/vectorsdb/get-collection.md b/examples/1.9.x/server-kotlin/java/vectorsdb/get-collection.md new file mode 100644 index 000000000..b158bd890 --- /dev/null +++ b/examples/1.9.x/server-kotlin/java/vectorsdb/get-collection.md @@ -0,0 +1,26 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.VectorsDB; + +Client client = new Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + .setKey(""); // Your secret API key + +VectorsDB vectorsDB = new VectorsDB(client); + +vectorsDB.getCollection( + "", // databaseId + "", // collectionId + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + +``` diff --git a/examples/1.9.x/server-kotlin/java/vectorsdb/get-document.md b/examples/1.9.x/server-kotlin/java/vectorsdb/get-document.md new file mode 100644 index 000000000..8a048ca83 --- /dev/null +++ b/examples/1.9.x/server-kotlin/java/vectorsdb/get-document.md @@ -0,0 +1,29 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.VectorsDB; + +Client client = new Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + .setSession(""); // The user session to authenticate with + +VectorsDB vectorsDB = new VectorsDB(client); + +vectorsDB.getDocument( + "", // databaseId + "", // collectionId + "", // documentId + List.of(), // queries (optional) + "", // transactionId (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + +``` diff --git a/examples/1.9.x/server-kotlin/java/vectorsdb/get-index.md b/examples/1.9.x/server-kotlin/java/vectorsdb/get-index.md new file mode 100644 index 000000000..7470705a4 --- /dev/null +++ b/examples/1.9.x/server-kotlin/java/vectorsdb/get-index.md @@ -0,0 +1,27 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.VectorsDB; + +Client client = new Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + .setKey(""); // Your secret API key + +VectorsDB vectorsDB = new VectorsDB(client); + +vectorsDB.getIndex( + "", // databaseId + "", // collectionId + "", // key + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + +``` diff --git a/examples/1.9.x/server-kotlin/java/vectorsdb/get-transaction.md b/examples/1.9.x/server-kotlin/java/vectorsdb/get-transaction.md new file mode 100644 index 000000000..8996a5661 --- /dev/null +++ b/examples/1.9.x/server-kotlin/java/vectorsdb/get-transaction.md @@ -0,0 +1,25 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.VectorsDB; + +Client client = new Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + .setKey(""); // Your secret API key + +VectorsDB vectorsDB = new VectorsDB(client); + +vectorsDB.getTransaction( + "", // transactionId + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + +``` diff --git a/examples/1.9.x/server-kotlin/java/vectorsdb/get.md b/examples/1.9.x/server-kotlin/java/vectorsdb/get.md new file mode 100644 index 000000000..47c549450 --- /dev/null +++ b/examples/1.9.x/server-kotlin/java/vectorsdb/get.md @@ -0,0 +1,25 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.VectorsDB; + +Client client = new Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + .setKey(""); // Your secret API key + +VectorsDB vectorsDB = new VectorsDB(client); + +vectorsDB.get( + "", // databaseId + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + +``` diff --git a/examples/1.9.x/server-kotlin/java/vectorsdb/list-collections.md b/examples/1.9.x/server-kotlin/java/vectorsdb/list-collections.md new file mode 100644 index 000000000..39b35d590 --- /dev/null +++ b/examples/1.9.x/server-kotlin/java/vectorsdb/list-collections.md @@ -0,0 +1,28 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.VectorsDB; + +Client client = new Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + .setKey(""); // Your secret API key + +VectorsDB vectorsDB = new VectorsDB(client); + +vectorsDB.listCollections( + "", // databaseId + List.of(), // queries (optional) + "", // search (optional) + false, // total (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + +``` diff --git a/examples/1.9.x/server-kotlin/java/vectorsdb/list-documents.md b/examples/1.9.x/server-kotlin/java/vectorsdb/list-documents.md new file mode 100644 index 000000000..857d79677 --- /dev/null +++ b/examples/1.9.x/server-kotlin/java/vectorsdb/list-documents.md @@ -0,0 +1,30 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.VectorsDB; + +Client client = new Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + .setSession(""); // The user session to authenticate with + +VectorsDB vectorsDB = new VectorsDB(client); + +vectorsDB.listDocuments( + "", // databaseId + "", // collectionId + List.of(), // queries (optional) + "", // transactionId (optional) + false, // total (optional) + 0, // ttl (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + +``` diff --git a/examples/1.9.x/server-kotlin/java/vectorsdb/list-indexes.md b/examples/1.9.x/server-kotlin/java/vectorsdb/list-indexes.md new file mode 100644 index 000000000..40b4dbc37 --- /dev/null +++ b/examples/1.9.x/server-kotlin/java/vectorsdb/list-indexes.md @@ -0,0 +1,28 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.VectorsDB; + +Client client = new Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + .setKey(""); // Your secret API key + +VectorsDB vectorsDB = new VectorsDB(client); + +vectorsDB.listIndexes( + "", // databaseId + "", // collectionId + List.of(), // queries (optional) + false, // total (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + +``` diff --git a/examples/1.9.x/server-kotlin/java/vectorsdb/list-transactions.md b/examples/1.9.x/server-kotlin/java/vectorsdb/list-transactions.md new file mode 100644 index 000000000..6b0890a63 --- /dev/null +++ b/examples/1.9.x/server-kotlin/java/vectorsdb/list-transactions.md @@ -0,0 +1,25 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.VectorsDB; + +Client client = new Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + .setKey(""); // Your secret API key + +VectorsDB vectorsDB = new VectorsDB(client); + +vectorsDB.listTransactions( + List.of(), // queries (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + +``` diff --git a/examples/1.9.x/server-kotlin/java/vectorsdb/list.md b/examples/1.9.x/server-kotlin/java/vectorsdb/list.md new file mode 100644 index 000000000..80a20b666 --- /dev/null +++ b/examples/1.9.x/server-kotlin/java/vectorsdb/list.md @@ -0,0 +1,27 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.VectorsDB; + +Client client = new Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + .setKey(""); // Your secret API key + +VectorsDB vectorsDB = new VectorsDB(client); + +vectorsDB.list( + List.of(), // queries (optional) + "", // search (optional) + false, // total (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + +``` diff --git a/examples/1.9.x/server-kotlin/java/vectorsdb/update-collection.md b/examples/1.9.x/server-kotlin/java/vectorsdb/update-collection.md new file mode 100644 index 000000000..9359c8086 --- /dev/null +++ b/examples/1.9.x/server-kotlin/java/vectorsdb/update-collection.md @@ -0,0 +1,33 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.Permission; +import io.appwrite.Role; +import io.appwrite.services.VectorsDB; + +Client client = new Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + .setKey(""); // Your secret API key + +VectorsDB vectorsDB = new VectorsDB(client); + +vectorsDB.updateCollection( + "", // databaseId + "", // collectionId + "", // name + 1, // dimension (optional) + List.of(Permission.read(Role.any())), // permissions (optional) + false, // documentSecurity (optional) + false, // enabled (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + +``` diff --git a/examples/1.9.x/server-kotlin/java/vectorsdb/update-document.md b/examples/1.9.x/server-kotlin/java/vectorsdb/update-document.md new file mode 100644 index 000000000..1800ff492 --- /dev/null +++ b/examples/1.9.x/server-kotlin/java/vectorsdb/update-document.md @@ -0,0 +1,32 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.Permission; +import io.appwrite.Role; +import io.appwrite.services.VectorsDB; + +Client client = new Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + .setSession(""); // The user session to authenticate with + +VectorsDB vectorsDB = new VectorsDB(client); + +vectorsDB.updateDocument( + "", // databaseId + "", // collectionId + "", // documentId + Map.of("a", "b"), // data (optional) + List.of(Permission.read(Role.any())), // permissions (optional) + "", // transactionId (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + +``` diff --git a/examples/1.9.x/server-kotlin/java/vectorsdb/update-documents.md b/examples/1.9.x/server-kotlin/java/vectorsdb/update-documents.md new file mode 100644 index 000000000..820cbe572 --- /dev/null +++ b/examples/1.9.x/server-kotlin/java/vectorsdb/update-documents.md @@ -0,0 +1,29 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.VectorsDB; + +Client client = new Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + .setKey(""); // Your secret API key + +VectorsDB vectorsDB = new VectorsDB(client); + +vectorsDB.updateDocuments( + "", // databaseId + "", // collectionId + Map.of("a", "b"), // data (optional) + List.of(), // queries (optional) + "", // transactionId (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + +``` diff --git a/examples/1.9.x/server-kotlin/java/vectorsdb/update-transaction.md b/examples/1.9.x/server-kotlin/java/vectorsdb/update-transaction.md new file mode 100644 index 000000000..6d648df95 --- /dev/null +++ b/examples/1.9.x/server-kotlin/java/vectorsdb/update-transaction.md @@ -0,0 +1,27 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.VectorsDB; + +Client client = new Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + .setKey(""); // Your secret API key + +VectorsDB vectorsDB = new VectorsDB(client); + +vectorsDB.updateTransaction( + "", // transactionId + false, // commit (optional) + false, // rollback (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + +``` diff --git a/examples/1.9.x/server-kotlin/java/vectorsdb/update.md b/examples/1.9.x/server-kotlin/java/vectorsdb/update.md new file mode 100644 index 000000000..4fc2abe21 --- /dev/null +++ b/examples/1.9.x/server-kotlin/java/vectorsdb/update.md @@ -0,0 +1,27 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.VectorsDB; + +Client client = new Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + .setKey(""); // Your secret API key + +VectorsDB vectorsDB = new VectorsDB(client); + +vectorsDB.update( + "", // databaseId + "", // name + false, // enabled (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + +``` diff --git a/examples/1.9.x/server-kotlin/java/vectorsdb/upsert-document.md b/examples/1.9.x/server-kotlin/java/vectorsdb/upsert-document.md new file mode 100644 index 000000000..cdefe6371 --- /dev/null +++ b/examples/1.9.x/server-kotlin/java/vectorsdb/upsert-document.md @@ -0,0 +1,32 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.Permission; +import io.appwrite.Role; +import io.appwrite.services.VectorsDB; + +Client client = new Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + .setSession(""); // The user session to authenticate with + +VectorsDB vectorsDB = new VectorsDB(client); + +vectorsDB.upsertDocument( + "", // databaseId + "", // collectionId + "", // documentId + Map.of("a", "b"), // data (optional) + List.of(Permission.read(Role.any())), // permissions (optional) + "", // transactionId (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + +``` diff --git a/examples/1.9.x/server-kotlin/java/vectorsdb/upsert-documents.md b/examples/1.9.x/server-kotlin/java/vectorsdb/upsert-documents.md new file mode 100644 index 000000000..6371a0cb5 --- /dev/null +++ b/examples/1.9.x/server-kotlin/java/vectorsdb/upsert-documents.md @@ -0,0 +1,28 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.VectorsDB; + +Client client = new Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + .setKey(""); // Your secret API key + +VectorsDB vectorsDB = new VectorsDB(client); + +vectorsDB.upsertDocuments( + "", // databaseId + "", // collectionId + List.of(), // documents + "", // transactionId (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + +``` diff --git a/examples/1.9.x/server-kotlin/kotlin/apps/create-installation-token.md b/examples/1.9.x/server-kotlin/kotlin/apps/create-installation-token.md new file mode 100644 index 000000000..22f8aa988 --- /dev/null +++ b/examples/1.9.x/server-kotlin/kotlin/apps/create-installation-token.md @@ -0,0 +1,17 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Apps + +val client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + .setKey("") // Your secret API key + +val apps = Apps(client) + +val response = apps.createInstallationToken( + appId = "", + installationId = "" +) +``` diff --git a/examples/1.9.x/server-kotlin/kotlin/apps/create-key.md b/examples/1.9.x/server-kotlin/kotlin/apps/create-key.md new file mode 100644 index 000000000..442ffa6ab --- /dev/null +++ b/examples/1.9.x/server-kotlin/kotlin/apps/create-key.md @@ -0,0 +1,16 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Apps + +val client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + .setSession("") // The user session to authenticate with + +val apps = Apps(client) + +val response = apps.createKey( + appId = "" +) +``` diff --git a/examples/1.9.x/server-kotlin/kotlin/apps/create-secret.md b/examples/1.9.x/server-kotlin/kotlin/apps/create-secret.md new file mode 100644 index 000000000..e659ed7df --- /dev/null +++ b/examples/1.9.x/server-kotlin/kotlin/apps/create-secret.md @@ -0,0 +1,16 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Apps + +val client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + .setSession("") // The user session to authenticate with + +val apps = Apps(client) + +val response = apps.createSecret( + appId = "" +) +``` diff --git a/examples/1.9.x/server-kotlin/kotlin/apps/create.md b/examples/1.9.x/server-kotlin/kotlin/apps/create.md new file mode 100644 index 000000000..dfdf0d645 --- /dev/null +++ b/examples/1.9.x/server-kotlin/kotlin/apps/create.md @@ -0,0 +1,34 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Apps + +val client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + .setSession("") // The user session to authenticate with + +val apps = Apps(client) + +val response = apps.create( + appId = "", + name = "", + redirectUris = listOf(), + description = "", // optional + clientUri = "https://example.com", // optional + logoUri = "https://example.com", // optional + privacyPolicyUrl = "https://example.com", // optional + termsUrl = "https://example.com", // optional + contacts = listOf(), // optional + tagline = "", // optional + tags = listOf(), // optional + images = listOf(), // optional + supportUrl = "https://example.com", // optional + dataDeletionUrl = "https://example.com", // optional + postLogoutRedirectUris = listOf(), // optional + enabled = false, // optional + type = "public", // optional + deviceFlow = false, // optional + teamId = "" // optional +) +``` diff --git a/examples/1.9.x/server-kotlin/kotlin/apps/delete-key.md b/examples/1.9.x/server-kotlin/kotlin/apps/delete-key.md new file mode 100644 index 000000000..0bb018453 --- /dev/null +++ b/examples/1.9.x/server-kotlin/kotlin/apps/delete-key.md @@ -0,0 +1,17 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Apps + +val client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + .setSession("") // The user session to authenticate with + +val apps = Apps(client) + +val response = apps.deleteKey( + appId = "", + keyId = "" +) +``` diff --git a/examples/1.9.x/server-kotlin/kotlin/apps/delete-secret.md b/examples/1.9.x/server-kotlin/kotlin/apps/delete-secret.md new file mode 100644 index 000000000..2b7b38e0b --- /dev/null +++ b/examples/1.9.x/server-kotlin/kotlin/apps/delete-secret.md @@ -0,0 +1,17 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Apps + +val client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + .setSession("") // The user session to authenticate with + +val apps = Apps(client) + +val response = apps.deleteSecret( + appId = "", + secretId = "" +) +``` diff --git a/examples/1.9.x/server-kotlin/kotlin/apps/delete-tokens.md b/examples/1.9.x/server-kotlin/kotlin/apps/delete-tokens.md new file mode 100644 index 000000000..2cfde5f6f --- /dev/null +++ b/examples/1.9.x/server-kotlin/kotlin/apps/delete-tokens.md @@ -0,0 +1,16 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Apps + +val client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + .setSession("") // The user session to authenticate with + +val apps = Apps(client) + +val response = apps.deleteTokens( + appId = "" +) +``` diff --git a/examples/1.9.x/server-kotlin/kotlin/apps/delete.md b/examples/1.9.x/server-kotlin/kotlin/apps/delete.md new file mode 100644 index 000000000..ba61ac1f1 --- /dev/null +++ b/examples/1.9.x/server-kotlin/kotlin/apps/delete.md @@ -0,0 +1,16 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Apps + +val client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + .setSession("") // The user session to authenticate with + +val apps = Apps(client) + +val response = apps.delete( + appId = "" +) +``` diff --git a/examples/1.9.x/server-kotlin/kotlin/apps/get-installation.md b/examples/1.9.x/server-kotlin/kotlin/apps/get-installation.md new file mode 100644 index 000000000..78d681b06 --- /dev/null +++ b/examples/1.9.x/server-kotlin/kotlin/apps/get-installation.md @@ -0,0 +1,17 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Apps + +val client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + .setKey("") // Your secret API key + +val apps = Apps(client) + +val response = apps.getInstallation( + appId = "", + installationId = "" +) +``` diff --git a/examples/1.9.x/server-kotlin/kotlin/apps/get-key.md b/examples/1.9.x/server-kotlin/kotlin/apps/get-key.md new file mode 100644 index 000000000..51190c1bd --- /dev/null +++ b/examples/1.9.x/server-kotlin/kotlin/apps/get-key.md @@ -0,0 +1,17 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Apps + +val client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + .setSession("") // The user session to authenticate with + +val apps = Apps(client) + +val response = apps.getKey( + appId = "", + keyId = "" +) +``` diff --git a/examples/1.9.x/server-kotlin/kotlin/apps/get-secret.md b/examples/1.9.x/server-kotlin/kotlin/apps/get-secret.md new file mode 100644 index 000000000..4788eb7b0 --- /dev/null +++ b/examples/1.9.x/server-kotlin/kotlin/apps/get-secret.md @@ -0,0 +1,17 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Apps + +val client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + .setSession("") // The user session to authenticate with + +val apps = Apps(client) + +val response = apps.getSecret( + appId = "", + secretId = "" +) +``` diff --git a/examples/1.9.x/server-kotlin/kotlin/apps/get.md b/examples/1.9.x/server-kotlin/kotlin/apps/get.md new file mode 100644 index 000000000..b146e1d6c --- /dev/null +++ b/examples/1.9.x/server-kotlin/kotlin/apps/get.md @@ -0,0 +1,16 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Apps + +val client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + .setSession("") // The user session to authenticate with + +val apps = Apps(client) + +val response = apps.get( + appId = "" +) +``` diff --git a/examples/1.9.x/server-kotlin/kotlin/apps/list-installation-scopes.md b/examples/1.9.x/server-kotlin/kotlin/apps/list-installation-scopes.md new file mode 100644 index 000000000..348cc20cb --- /dev/null +++ b/examples/1.9.x/server-kotlin/kotlin/apps/list-installation-scopes.md @@ -0,0 +1,14 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Apps + +val client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + .setSession("") // The user session to authenticate with + +val apps = Apps(client) + +val response = apps.listInstallationScopes() +``` diff --git a/examples/1.9.x/server-kotlin/kotlin/apps/list-installations.md b/examples/1.9.x/server-kotlin/kotlin/apps/list-installations.md new file mode 100644 index 000000000..3dcb194d7 --- /dev/null +++ b/examples/1.9.x/server-kotlin/kotlin/apps/list-installations.md @@ -0,0 +1,18 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Apps + +val client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + .setKey("") // Your secret API key + +val apps = Apps(client) + +val response = apps.listInstallations( + appId = "", + queries = listOf(), // optional + total = false // optional +) +``` diff --git a/examples/1.9.x/server-kotlin/kotlin/apps/list-keys.md b/examples/1.9.x/server-kotlin/kotlin/apps/list-keys.md new file mode 100644 index 000000000..7ebf665b0 --- /dev/null +++ b/examples/1.9.x/server-kotlin/kotlin/apps/list-keys.md @@ -0,0 +1,18 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Apps + +val client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + .setSession("") // The user session to authenticate with + +val apps = Apps(client) + +val response = apps.listKeys( + appId = "", + queries = listOf(), // optional + total = false // optional +) +``` diff --git a/examples/1.9.x/server-kotlin/kotlin/apps/list-o-auth-2-scopes.md b/examples/1.9.x/server-kotlin/kotlin/apps/list-o-auth-2-scopes.md new file mode 100644 index 000000000..8c755786a --- /dev/null +++ b/examples/1.9.x/server-kotlin/kotlin/apps/list-o-auth-2-scopes.md @@ -0,0 +1,14 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Apps + +val client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + .setSession("") // The user session to authenticate with + +val apps = Apps(client) + +val response = apps.listOAuth2Scopes() +``` diff --git a/examples/1.9.x/server-kotlin/kotlin/apps/list-secrets.md b/examples/1.9.x/server-kotlin/kotlin/apps/list-secrets.md new file mode 100644 index 000000000..bfb979b07 --- /dev/null +++ b/examples/1.9.x/server-kotlin/kotlin/apps/list-secrets.md @@ -0,0 +1,18 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Apps + +val client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + .setSession("") // The user session to authenticate with + +val apps = Apps(client) + +val response = apps.listSecrets( + appId = "", + queries = listOf(), // optional + total = false // optional +) +``` diff --git a/examples/1.9.x/server-kotlin/kotlin/apps/list.md b/examples/1.9.x/server-kotlin/kotlin/apps/list.md new file mode 100644 index 000000000..c6861c7ab --- /dev/null +++ b/examples/1.9.x/server-kotlin/kotlin/apps/list.md @@ -0,0 +1,17 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Apps + +val client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + .setSession("") // The user session to authenticate with + +val apps = Apps(client) + +val response = apps.list( + queries = listOf(), // optional + total = false // optional +) +``` diff --git a/examples/1.9.x/server-kotlin/kotlin/apps/update-labels.md b/examples/1.9.x/server-kotlin/kotlin/apps/update-labels.md new file mode 100644 index 000000000..3aecf9b2a --- /dev/null +++ b/examples/1.9.x/server-kotlin/kotlin/apps/update-labels.md @@ -0,0 +1,17 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Apps + +val client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + .setKey("") // Your secret API key + +val apps = Apps(client) + +val response = apps.updateLabels( + appId = "", + labels = listOf() +) +``` diff --git a/examples/1.9.x/server-kotlin/kotlin/apps/update-team.md b/examples/1.9.x/server-kotlin/kotlin/apps/update-team.md new file mode 100644 index 000000000..0992a5012 --- /dev/null +++ b/examples/1.9.x/server-kotlin/kotlin/apps/update-team.md @@ -0,0 +1,17 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Apps + +val client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + .setSession("") // The user session to authenticate with + +val apps = Apps(client) + +val response = apps.updateTeam( + appId = "", + teamId = "" +) +``` diff --git a/examples/1.9.x/server-kotlin/kotlin/apps/update.md b/examples/1.9.x/server-kotlin/kotlin/apps/update.md new file mode 100644 index 000000000..c57ae1861 --- /dev/null +++ b/examples/1.9.x/server-kotlin/kotlin/apps/update.md @@ -0,0 +1,35 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Apps + +val client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + .setSession("") // The user session to authenticate with + +val apps = Apps(client) + +val response = apps.update( + appId = "", + name = "", + description = "", // optional + clientUri = "https://example.com", // optional + logoUri = "https://example.com", // optional + privacyPolicyUrl = "https://example.com", // optional + termsUrl = "https://example.com", // optional + contacts = listOf(), // optional + tagline = "", // optional + tags = listOf(), // optional + images = listOf(), // optional + supportUrl = "https://example.com", // optional + dataDeletionUrl = "https://example.com", // optional + enabled = false, // optional + redirectUris = listOf(), // optional + postLogoutRedirectUris = listOf(), // optional + type = "public", // optional + deviceFlow = false, // optional + installationScopes = listOf(), // optional + installationRedirectUrl = "https://example.com" // optional +) +``` diff --git a/examples/1.9.x/server-kotlin/kotlin/documentsdb/create-collection.md b/examples/1.9.x/server-kotlin/kotlin/documentsdb/create-collection.md new file mode 100644 index 000000000..29974f2de --- /dev/null +++ b/examples/1.9.x/server-kotlin/kotlin/documentsdb/create-collection.md @@ -0,0 +1,25 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.DocumentsDB +import io.appwrite.Permission +import io.appwrite.Role + +val client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + .setKey("") // Your secret API key + +val documentsDB = DocumentsDB(client) + +val response = documentsDB.createCollection( + databaseId = "", + collectionId = "", + name = "", + permissions = listOf(Permission.read(Role.any())), // optional + documentSecurity = false, // optional + enabled = false, // optional + attributes = listOf(), // optional + indexes = listOf() // optional +) +``` diff --git a/examples/1.9.x/server-kotlin/kotlin/documentsdb/create-document.md b/examples/1.9.x/server-kotlin/kotlin/documentsdb/create-document.md new file mode 100644 index 000000000..64c800a44 --- /dev/null +++ b/examples/1.9.x/server-kotlin/kotlin/documentsdb/create-document.md @@ -0,0 +1,28 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.DocumentsDB +import io.appwrite.Permission +import io.appwrite.Role + +val client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + .setSession("") // The user session to authenticate with + +val documentsDB = DocumentsDB(client) + +val response = documentsDB.createDocument( + databaseId = "", + collectionId = "", + documentId = "", + data = mapOf( + "username" to "walter.obrien", + "email" to "walter.obrien@example.com", + "fullName" to "Walter O'Brien", + "age" to 30, + "isAdmin" to false + ), + permissions = listOf(Permission.read(Role.any())) // optional +) +``` diff --git a/examples/1.9.x/server-kotlin/kotlin/documentsdb/create-documents.md b/examples/1.9.x/server-kotlin/kotlin/documentsdb/create-documents.md new file mode 100644 index 000000000..ba73a05dc --- /dev/null +++ b/examples/1.9.x/server-kotlin/kotlin/documentsdb/create-documents.md @@ -0,0 +1,18 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.DocumentsDB + +val client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + .setSession("") // The user session to authenticate with + +val documentsDB = DocumentsDB(client) + +val response = documentsDB.createDocuments( + databaseId = "", + collectionId = "", + documents = listOf() +) +``` diff --git a/examples/1.9.x/server-kotlin/kotlin/documentsdb/create-index.md b/examples/1.9.x/server-kotlin/kotlin/documentsdb/create-index.md new file mode 100644 index 000000000..766066e02 --- /dev/null +++ b/examples/1.9.x/server-kotlin/kotlin/documentsdb/create-index.md @@ -0,0 +1,24 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.DocumentsDB +import io.appwrite.enums.DocumentsDBIndexType +import io.appwrite.enums.OrderBy + +val client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + .setKey("") // Your secret API key + +val documentsDB = DocumentsDB(client) + +val response = documentsDB.createIndex( + databaseId = "", + collectionId = "", + key = "", + type = DocumentsDBIndexType.KEY, + attributes = listOf(), + orders = listOf(OrderBy.ASC), // optional + lengths = listOf() // optional +) +``` diff --git a/examples/1.9.x/server-kotlin/kotlin/documentsdb/create-operations.md b/examples/1.9.x/server-kotlin/kotlin/documentsdb/create-operations.md new file mode 100644 index 000000000..851b65ced --- /dev/null +++ b/examples/1.9.x/server-kotlin/kotlin/documentsdb/create-operations.md @@ -0,0 +1,25 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.DocumentsDB + +val client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + .setKey("") // Your secret API key + +val documentsDB = DocumentsDB(client) + +val response = documentsDB.createOperations( + transactionId = "", + operations = listOf(mapOf( + "action" to "create", + "databaseId" to "", + "collectionId" to "", + "documentId" to "", + "data" to mapOf( + "name" to "Walter O'Brien" + ) + )) // optional +) +``` diff --git a/examples/1.9.x/server-kotlin/kotlin/documentsdb/create-transaction.md b/examples/1.9.x/server-kotlin/kotlin/documentsdb/create-transaction.md new file mode 100644 index 000000000..b695e5326 --- /dev/null +++ b/examples/1.9.x/server-kotlin/kotlin/documentsdb/create-transaction.md @@ -0,0 +1,16 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.DocumentsDB + +val client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + .setKey("") // Your secret API key + +val documentsDB = DocumentsDB(client) + +val response = documentsDB.createTransaction( + ttl = 60 // optional +) +``` diff --git a/examples/1.9.x/server-kotlin/kotlin/documentsdb/create.md b/examples/1.9.x/server-kotlin/kotlin/documentsdb/create.md new file mode 100644 index 000000000..51bbf1664 --- /dev/null +++ b/examples/1.9.x/server-kotlin/kotlin/documentsdb/create.md @@ -0,0 +1,18 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.DocumentsDB + +val client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + .setKey("") // Your secret API key + +val documentsDB = DocumentsDB(client) + +val response = documentsDB.create( + databaseId = "", + name = "", + enabled = false // optional +) +``` diff --git a/examples/1.9.x/server-kotlin/kotlin/documentsdb/decrement-document-attribute.md b/examples/1.9.x/server-kotlin/kotlin/documentsdb/decrement-document-attribute.md new file mode 100644 index 000000000..dff032d0c --- /dev/null +++ b/examples/1.9.x/server-kotlin/kotlin/documentsdb/decrement-document-attribute.md @@ -0,0 +1,22 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.DocumentsDB + +val client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + .setSession("") // The user session to authenticate with + +val documentsDB = DocumentsDB(client) + +val response = documentsDB.decrementDocumentAttribute( + databaseId = "", + collectionId = "", + documentId = "", + attribute = "", + value = 0, // optional + min = 0, // optional + transactionId = "" // optional +) +``` diff --git a/examples/1.9.x/server-kotlin/kotlin/documentsdb/delete-collection.md b/examples/1.9.x/server-kotlin/kotlin/documentsdb/delete-collection.md new file mode 100644 index 000000000..9f57b1889 --- /dev/null +++ b/examples/1.9.x/server-kotlin/kotlin/documentsdb/delete-collection.md @@ -0,0 +1,17 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.DocumentsDB + +val client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + .setKey("") // Your secret API key + +val documentsDB = DocumentsDB(client) + +val response = documentsDB.deleteCollection( + databaseId = "", + collectionId = "" +) +``` diff --git a/examples/1.9.x/server-kotlin/kotlin/documentsdb/delete-document.md b/examples/1.9.x/server-kotlin/kotlin/documentsdb/delete-document.md new file mode 100644 index 000000000..36624b6c9 --- /dev/null +++ b/examples/1.9.x/server-kotlin/kotlin/documentsdb/delete-document.md @@ -0,0 +1,19 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.DocumentsDB + +val client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + .setSession("") // The user session to authenticate with + +val documentsDB = DocumentsDB(client) + +val response = documentsDB.deleteDocument( + databaseId = "", + collectionId = "", + documentId = "", + transactionId = "" // optional +) +``` diff --git a/examples/1.9.x/server-kotlin/kotlin/documentsdb/delete-documents.md b/examples/1.9.x/server-kotlin/kotlin/documentsdb/delete-documents.md new file mode 100644 index 000000000..9a5397c07 --- /dev/null +++ b/examples/1.9.x/server-kotlin/kotlin/documentsdb/delete-documents.md @@ -0,0 +1,19 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.DocumentsDB + +val client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + .setKey("") // Your secret API key + +val documentsDB = DocumentsDB(client) + +val response = documentsDB.deleteDocuments( + databaseId = "", + collectionId = "", + queries = listOf(), // optional + transactionId = "" // optional +) +``` diff --git a/examples/1.9.x/server-kotlin/kotlin/documentsdb/delete-index.md b/examples/1.9.x/server-kotlin/kotlin/documentsdb/delete-index.md new file mode 100644 index 000000000..46eb72659 --- /dev/null +++ b/examples/1.9.x/server-kotlin/kotlin/documentsdb/delete-index.md @@ -0,0 +1,18 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.DocumentsDB + +val client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + .setKey("") // Your secret API key + +val documentsDB = DocumentsDB(client) + +val response = documentsDB.deleteIndex( + databaseId = "", + collectionId = "", + key = "" +) +``` diff --git a/examples/1.9.x/server-kotlin/kotlin/documentsdb/delete-transaction.md b/examples/1.9.x/server-kotlin/kotlin/documentsdb/delete-transaction.md new file mode 100644 index 000000000..3adfb9a67 --- /dev/null +++ b/examples/1.9.x/server-kotlin/kotlin/documentsdb/delete-transaction.md @@ -0,0 +1,16 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.DocumentsDB + +val client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + .setKey("") // Your secret API key + +val documentsDB = DocumentsDB(client) + +val response = documentsDB.deleteTransaction( + transactionId = "" +) +``` diff --git a/examples/1.9.x/server-kotlin/kotlin/documentsdb/delete.md b/examples/1.9.x/server-kotlin/kotlin/documentsdb/delete.md new file mode 100644 index 000000000..63ef123f8 --- /dev/null +++ b/examples/1.9.x/server-kotlin/kotlin/documentsdb/delete.md @@ -0,0 +1,16 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.DocumentsDB + +val client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + .setKey("") // Your secret API key + +val documentsDB = DocumentsDB(client) + +val response = documentsDB.delete( + databaseId = "" +) +``` diff --git a/examples/1.9.x/server-kotlin/kotlin/documentsdb/get-collection.md b/examples/1.9.x/server-kotlin/kotlin/documentsdb/get-collection.md new file mode 100644 index 000000000..aee65b9b7 --- /dev/null +++ b/examples/1.9.x/server-kotlin/kotlin/documentsdb/get-collection.md @@ -0,0 +1,17 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.DocumentsDB + +val client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + .setKey("") // Your secret API key + +val documentsDB = DocumentsDB(client) + +val response = documentsDB.getCollection( + databaseId = "", + collectionId = "" +) +``` diff --git a/examples/1.9.x/server-kotlin/kotlin/documentsdb/get-document.md b/examples/1.9.x/server-kotlin/kotlin/documentsdb/get-document.md new file mode 100644 index 000000000..eb2aad88f --- /dev/null +++ b/examples/1.9.x/server-kotlin/kotlin/documentsdb/get-document.md @@ -0,0 +1,20 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.DocumentsDB + +val client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + .setSession("") // The user session to authenticate with + +val documentsDB = DocumentsDB(client) + +val response = documentsDB.getDocument( + databaseId = "", + collectionId = "", + documentId = "", + queries = listOf(), // optional + transactionId = "" // optional +) +``` diff --git a/examples/1.9.x/server-kotlin/kotlin/documentsdb/get-index.md b/examples/1.9.x/server-kotlin/kotlin/documentsdb/get-index.md new file mode 100644 index 000000000..5c83dbe7e --- /dev/null +++ b/examples/1.9.x/server-kotlin/kotlin/documentsdb/get-index.md @@ -0,0 +1,18 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.DocumentsDB + +val client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + .setKey("") // Your secret API key + +val documentsDB = DocumentsDB(client) + +val response = documentsDB.getIndex( + databaseId = "", + collectionId = "", + key = "" +) +``` diff --git a/examples/1.9.x/server-kotlin/kotlin/documentsdb/get-transaction.md b/examples/1.9.x/server-kotlin/kotlin/documentsdb/get-transaction.md new file mode 100644 index 000000000..7ac55d4bd --- /dev/null +++ b/examples/1.9.x/server-kotlin/kotlin/documentsdb/get-transaction.md @@ -0,0 +1,16 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.DocumentsDB + +val client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + .setKey("") // Your secret API key + +val documentsDB = DocumentsDB(client) + +val response = documentsDB.getTransaction( + transactionId = "" +) +``` diff --git a/examples/1.9.x/server-kotlin/kotlin/documentsdb/get.md b/examples/1.9.x/server-kotlin/kotlin/documentsdb/get.md new file mode 100644 index 000000000..aa2405569 --- /dev/null +++ b/examples/1.9.x/server-kotlin/kotlin/documentsdb/get.md @@ -0,0 +1,16 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.DocumentsDB + +val client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + .setKey("") // Your secret API key + +val documentsDB = DocumentsDB(client) + +val response = documentsDB.get( + databaseId = "" +) +``` diff --git a/examples/1.9.x/server-kotlin/kotlin/documentsdb/increment-document-attribute.md b/examples/1.9.x/server-kotlin/kotlin/documentsdb/increment-document-attribute.md new file mode 100644 index 000000000..a770461e0 --- /dev/null +++ b/examples/1.9.x/server-kotlin/kotlin/documentsdb/increment-document-attribute.md @@ -0,0 +1,22 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.DocumentsDB + +val client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + .setSession("") // The user session to authenticate with + +val documentsDB = DocumentsDB(client) + +val response = documentsDB.incrementDocumentAttribute( + databaseId = "", + collectionId = "", + documentId = "", + attribute = "", + value = 0, // optional + max = 0, // optional + transactionId = "" // optional +) +``` diff --git a/examples/1.9.x/server-kotlin/kotlin/documentsdb/list-collections.md b/examples/1.9.x/server-kotlin/kotlin/documentsdb/list-collections.md new file mode 100644 index 000000000..0240c1dac --- /dev/null +++ b/examples/1.9.x/server-kotlin/kotlin/documentsdb/list-collections.md @@ -0,0 +1,19 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.DocumentsDB + +val client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + .setKey("") // Your secret API key + +val documentsDB = DocumentsDB(client) + +val response = documentsDB.listCollections( + databaseId = "", + queries = listOf(), // optional + search = "", // optional + total = false // optional +) +``` diff --git a/examples/1.9.x/server-kotlin/kotlin/documentsdb/list-documents.md b/examples/1.9.x/server-kotlin/kotlin/documentsdb/list-documents.md new file mode 100644 index 000000000..d1c688f25 --- /dev/null +++ b/examples/1.9.x/server-kotlin/kotlin/documentsdb/list-documents.md @@ -0,0 +1,21 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.DocumentsDB + +val client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + .setSession("") // The user session to authenticate with + +val documentsDB = DocumentsDB(client) + +val response = documentsDB.listDocuments( + databaseId = "", + collectionId = "", + queries = listOf(), // optional + transactionId = "", // optional + total = false, // optional + ttl = 0 // optional +) +``` diff --git a/examples/1.9.x/server-kotlin/kotlin/documentsdb/list-indexes.md b/examples/1.9.x/server-kotlin/kotlin/documentsdb/list-indexes.md new file mode 100644 index 000000000..b83909ec5 --- /dev/null +++ b/examples/1.9.x/server-kotlin/kotlin/documentsdb/list-indexes.md @@ -0,0 +1,19 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.DocumentsDB + +val client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + .setKey("") // Your secret API key + +val documentsDB = DocumentsDB(client) + +val response = documentsDB.listIndexes( + databaseId = "", + collectionId = "", + queries = listOf(), // optional + total = false // optional +) +``` diff --git a/examples/1.9.x/server-kotlin/kotlin/documentsdb/list-transactions.md b/examples/1.9.x/server-kotlin/kotlin/documentsdb/list-transactions.md new file mode 100644 index 000000000..00967cc24 --- /dev/null +++ b/examples/1.9.x/server-kotlin/kotlin/documentsdb/list-transactions.md @@ -0,0 +1,16 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.DocumentsDB + +val client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + .setKey("") // Your secret API key + +val documentsDB = DocumentsDB(client) + +val response = documentsDB.listTransactions( + queries = listOf() // optional +) +``` diff --git a/examples/1.9.x/server-kotlin/kotlin/documentsdb/list.md b/examples/1.9.x/server-kotlin/kotlin/documentsdb/list.md new file mode 100644 index 000000000..ec0f18b89 --- /dev/null +++ b/examples/1.9.x/server-kotlin/kotlin/documentsdb/list.md @@ -0,0 +1,18 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.DocumentsDB + +val client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + .setKey("") // Your secret API key + +val documentsDB = DocumentsDB(client) + +val response = documentsDB.list( + queries = listOf(), // optional + search = "", // optional + total = false // optional +) +``` diff --git a/examples/1.9.x/server-kotlin/kotlin/documentsdb/update-collection.md b/examples/1.9.x/server-kotlin/kotlin/documentsdb/update-collection.md new file mode 100644 index 000000000..4c873b96d --- /dev/null +++ b/examples/1.9.x/server-kotlin/kotlin/documentsdb/update-collection.md @@ -0,0 +1,24 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.DocumentsDB +import io.appwrite.Permission +import io.appwrite.Role + +val client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + .setKey("") // Your secret API key + +val documentsDB = DocumentsDB(client) + +val response = documentsDB.updateCollection( + databaseId = "", + collectionId = "", + name = "", + permissions = listOf(Permission.read(Role.any())), // optional + documentSecurity = false, // optional + enabled = false, // optional + purge = false // optional +) +``` diff --git a/examples/1.9.x/server-kotlin/kotlin/documentsdb/update-document.md b/examples/1.9.x/server-kotlin/kotlin/documentsdb/update-document.md new file mode 100644 index 000000000..e7bdba5fc --- /dev/null +++ b/examples/1.9.x/server-kotlin/kotlin/documentsdb/update-document.md @@ -0,0 +1,23 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.DocumentsDB +import io.appwrite.Permission +import io.appwrite.Role + +val client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + .setSession("") // The user session to authenticate with + +val documentsDB = DocumentsDB(client) + +val response = documentsDB.updateDocument( + databaseId = "", + collectionId = "", + documentId = "", + data = mapOf( "a" to "b" ), // optional + permissions = listOf(Permission.read(Role.any())), // optional + transactionId = "" // optional +) +``` diff --git a/examples/1.9.x/server-kotlin/kotlin/documentsdb/update-documents.md b/examples/1.9.x/server-kotlin/kotlin/documentsdb/update-documents.md new file mode 100644 index 000000000..175b6eec2 --- /dev/null +++ b/examples/1.9.x/server-kotlin/kotlin/documentsdb/update-documents.md @@ -0,0 +1,20 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.DocumentsDB + +val client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + .setKey("") // Your secret API key + +val documentsDB = DocumentsDB(client) + +val response = documentsDB.updateDocuments( + databaseId = "", + collectionId = "", + data = mapOf( "a" to "b" ), // optional + queries = listOf(), // optional + transactionId = "" // optional +) +``` diff --git a/examples/1.9.x/server-kotlin/kotlin/documentsdb/update-transaction.md b/examples/1.9.x/server-kotlin/kotlin/documentsdb/update-transaction.md new file mode 100644 index 000000000..99ace754e --- /dev/null +++ b/examples/1.9.x/server-kotlin/kotlin/documentsdb/update-transaction.md @@ -0,0 +1,18 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.DocumentsDB + +val client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + .setKey("") // Your secret API key + +val documentsDB = DocumentsDB(client) + +val response = documentsDB.updateTransaction( + transactionId = "", + commit = false, // optional + rollback = false // optional +) +``` diff --git a/examples/1.9.x/server-kotlin/kotlin/documentsdb/update.md b/examples/1.9.x/server-kotlin/kotlin/documentsdb/update.md new file mode 100644 index 000000000..4239c220d --- /dev/null +++ b/examples/1.9.x/server-kotlin/kotlin/documentsdb/update.md @@ -0,0 +1,18 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.DocumentsDB + +val client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + .setKey("") // Your secret API key + +val documentsDB = DocumentsDB(client) + +val response = documentsDB.update( + databaseId = "", + name = "", + enabled = false // optional +) +``` diff --git a/examples/1.9.x/server-kotlin/kotlin/documentsdb/upsert-document.md b/examples/1.9.x/server-kotlin/kotlin/documentsdb/upsert-document.md new file mode 100644 index 000000000..6b31df066 --- /dev/null +++ b/examples/1.9.x/server-kotlin/kotlin/documentsdb/upsert-document.md @@ -0,0 +1,23 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.DocumentsDB +import io.appwrite.Permission +import io.appwrite.Role + +val client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + .setSession("") // The user session to authenticate with + +val documentsDB = DocumentsDB(client) + +val response = documentsDB.upsertDocument( + databaseId = "", + collectionId = "", + documentId = "", + data = mapOf( "a" to "b" ), // optional + permissions = listOf(Permission.read(Role.any())), // optional + transactionId = "" // optional +) +``` diff --git a/examples/1.9.x/server-kotlin/kotlin/documentsdb/upsert-documents.md b/examples/1.9.x/server-kotlin/kotlin/documentsdb/upsert-documents.md new file mode 100644 index 000000000..abf463385 --- /dev/null +++ b/examples/1.9.x/server-kotlin/kotlin/documentsdb/upsert-documents.md @@ -0,0 +1,19 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.DocumentsDB + +val client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + .setKey("") // Your secret API key + +val documentsDB = DocumentsDB(client) + +val response = documentsDB.upsertDocuments( + databaseId = "", + collectionId = "", + documents = listOf(), + transactionId = "" // optional +) +``` diff --git a/examples/1.9.x/server-kotlin/kotlin/oauth2/approve.md b/examples/1.9.x/server-kotlin/kotlin/oauth2/approve.md new file mode 100644 index 000000000..3d81bc89b --- /dev/null +++ b/examples/1.9.x/server-kotlin/kotlin/oauth2/approve.md @@ -0,0 +1,18 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Oauth2 + +val client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setSession("") // The user session to authenticate with + .setProject("") // Your project ID + +val oauth2 = Oauth2(client) + +val response = oauth2.approve( + grant_id = "", + authorization_details = "", // optional + scope = "" // optional +) +``` diff --git a/examples/1.9.x/server-kotlin/kotlin/oauth2/authorize-post.md b/examples/1.9.x/server-kotlin/kotlin/oauth2/authorize-post.md new file mode 100644 index 000000000..dd7ac0419 --- /dev/null +++ b/examples/1.9.x/server-kotlin/kotlin/oauth2/authorize-post.md @@ -0,0 +1,29 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Oauth2 + +val client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setSession("") // The user session to authenticate with + .setProject("") // Your project ID + +val oauth2 = Oauth2(client) + +val response = oauth2.authorizePost( + client_id = "", // optional + redirect_uri = "https://example.com", // optional + response_type = "", // optional + scope = "", // optional + state = "", // optional + nonce = "", // optional + code_challenge = "", // optional + code_challenge_method = "s256", // optional + prompt = "", // optional + max_age = 0, // optional + authorization_details = "", // optional + resource = "", // optional + audience = "", // optional + request_uri = "" // optional +) +``` diff --git a/examples/1.9.x/server-kotlin/kotlin/oauth2/authorize.md b/examples/1.9.x/server-kotlin/kotlin/oauth2/authorize.md new file mode 100644 index 000000000..3b26636da --- /dev/null +++ b/examples/1.9.x/server-kotlin/kotlin/oauth2/authorize.md @@ -0,0 +1,29 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Oauth2 + +val client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setSession("") // The user session to authenticate with + .setProject("") // Your project ID + +val oauth2 = Oauth2(client) + +val response = oauth2.authorize( + client_id = "", // optional + redirect_uri = "https://example.com", // optional + response_type = "", // optional + scope = "", // optional + state = "", // optional + nonce = "", // optional + code_challenge = "", // optional + code_challenge_method = "s256", // optional + prompt = "", // optional + max_age = 0, // optional + authorization_details = "", // optional + resource = "", // optional + audience = "", // optional + request_uri = "" // optional +) +``` diff --git a/examples/1.9.x/server-kotlin/kotlin/oauth2/create-device-authorization.md b/examples/1.9.x/server-kotlin/kotlin/oauth2/create-device-authorization.md new file mode 100644 index 000000000..a7620b0e8 --- /dev/null +++ b/examples/1.9.x/server-kotlin/kotlin/oauth2/create-device-authorization.md @@ -0,0 +1,20 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Oauth2 + +val client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setSession("") // The user session to authenticate with + .setProject("") // Your project ID + +val oauth2 = Oauth2(client) + +val response = oauth2.createDeviceAuthorization( + client_id = "", // optional + scope = "", // optional + authorization_details = "", // optional + resource = "", // optional + audience = "" // optional +) +``` diff --git a/examples/1.9.x/server-kotlin/kotlin/oauth2/create-grant.md b/examples/1.9.x/server-kotlin/kotlin/oauth2/create-grant.md new file mode 100644 index 000000000..09b6b902e --- /dev/null +++ b/examples/1.9.x/server-kotlin/kotlin/oauth2/create-grant.md @@ -0,0 +1,16 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Oauth2 + +val client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setSession("") // The user session to authenticate with + .setProject("") // Your project ID + +val oauth2 = Oauth2(client) + +val response = oauth2.createGrant( + user_code = "" +) +``` diff --git a/examples/1.9.x/server-kotlin/kotlin/oauth2/create-par.md b/examples/1.9.x/server-kotlin/kotlin/oauth2/create-par.md new file mode 100644 index 000000000..c2a011916 --- /dev/null +++ b/examples/1.9.x/server-kotlin/kotlin/oauth2/create-par.md @@ -0,0 +1,28 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Oauth2 + +val client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setSession("") // The user session to authenticate with + .setProject("") // Your project ID + +val oauth2 = Oauth2(client) + +val response = oauth2.createPAR( + client_id = "", + redirect_uri = "https://example.com", + response_type = "code", + scope = "", // optional + state = "", // optional + nonce = "", // optional + code_challenge = "", // optional + code_challenge_method = "s256", // optional + prompt = "", // optional + max_age = 0, // optional + authorization_details = "", // optional + resource = "", // optional + audience = "" // optional +) +``` diff --git a/examples/1.9.x/server-kotlin/kotlin/oauth2/create-token.md b/examples/1.9.x/server-kotlin/kotlin/oauth2/create-token.md new file mode 100644 index 000000000..56ac4afbc --- /dev/null +++ b/examples/1.9.x/server-kotlin/kotlin/oauth2/create-token.md @@ -0,0 +1,25 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Oauth2 + +val client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setSession("") // The user session to authenticate with + .setProject("") // Your project ID + +val oauth2 = Oauth2(client) + +val response = oauth2.createToken( + grant_type = "", + code = "", // optional + refresh_token = "", // optional + device_code = "", // optional + client_id = "", // optional + client_secret = "", // optional + code_verifier = "", // optional + redirect_uri = "https://example.com", // optional + resource = "", // optional + audience = "" // optional +) +``` diff --git a/examples/1.9.x/server-kotlin/kotlin/oauth2/get-grant.md b/examples/1.9.x/server-kotlin/kotlin/oauth2/get-grant.md new file mode 100644 index 000000000..9b859eadc --- /dev/null +++ b/examples/1.9.x/server-kotlin/kotlin/oauth2/get-grant.md @@ -0,0 +1,16 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Oauth2 + +val client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setSession("") // The user session to authenticate with + .setProject("") // Your project ID + +val oauth2 = Oauth2(client) + +val response = oauth2.getGrant( + grant_id = "" +) +``` diff --git a/examples/1.9.x/server-kotlin/kotlin/oauth2/list-organizations.md b/examples/1.9.x/server-kotlin/kotlin/oauth2/list-organizations.md new file mode 100644 index 000000000..d13ed9fb9 --- /dev/null +++ b/examples/1.9.x/server-kotlin/kotlin/oauth2/list-organizations.md @@ -0,0 +1,18 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Oauth2 + +val client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setSession("") // The user session to authenticate with + .setProject("") // Your project ID + +val oauth2 = Oauth2(client) + +val response = oauth2.listOrganizations( + limit = 1, // optional + offset = 0, // optional + search = "" // optional +) +``` diff --git a/examples/1.9.x/server-kotlin/kotlin/oauth2/list-projects.md b/examples/1.9.x/server-kotlin/kotlin/oauth2/list-projects.md new file mode 100644 index 000000000..57fbdb313 --- /dev/null +++ b/examples/1.9.x/server-kotlin/kotlin/oauth2/list-projects.md @@ -0,0 +1,18 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Oauth2 + +val client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setSession("") // The user session to authenticate with + .setProject("") // Your project ID + +val oauth2 = Oauth2(client) + +val response = oauth2.listProjects( + limit = 1, // optional + offset = 0, // optional + search = "" // optional +) +``` diff --git a/examples/1.9.x/server-kotlin/kotlin/oauth2/reject.md b/examples/1.9.x/server-kotlin/kotlin/oauth2/reject.md new file mode 100644 index 000000000..d92373565 --- /dev/null +++ b/examples/1.9.x/server-kotlin/kotlin/oauth2/reject.md @@ -0,0 +1,16 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Oauth2 + +val client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setSession("") // The user session to authenticate with + .setProject("") // Your project ID + +val oauth2 = Oauth2(client) + +val response = oauth2.reject( + grant_id = "" +) +``` diff --git a/examples/1.9.x/server-kotlin/kotlin/oauth2/revoke.md b/examples/1.9.x/server-kotlin/kotlin/oauth2/revoke.md new file mode 100644 index 000000000..4c872846b --- /dev/null +++ b/examples/1.9.x/server-kotlin/kotlin/oauth2/revoke.md @@ -0,0 +1,19 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Oauth2 + +val client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setSession("") // The user session to authenticate with + .setProject("") // Your project ID + +val oauth2 = Oauth2(client) + +val response = oauth2.revoke( + token = "", + token_type_hint = "access_token", // optional + client_id = "", // optional + client_secret = "" // optional +) +``` diff --git a/examples/1.9.x/server-kotlin/kotlin/organization/create-installation.md b/examples/1.9.x/server-kotlin/kotlin/organization/create-installation.md new file mode 100644 index 000000000..8c7664b7a --- /dev/null +++ b/examples/1.9.x/server-kotlin/kotlin/organization/create-installation.md @@ -0,0 +1,17 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Organization + +val client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + .setSession("") // The user session to authenticate with + +val organization = Organization(client) + +val response = organization.createInstallation( + appId = "", + authorizationDetails = "" // optional +) +``` diff --git a/examples/1.9.x/server-kotlin/kotlin/organization/delete-installation.md b/examples/1.9.x/server-kotlin/kotlin/organization/delete-installation.md new file mode 100644 index 000000000..aaa08b0e7 --- /dev/null +++ b/examples/1.9.x/server-kotlin/kotlin/organization/delete-installation.md @@ -0,0 +1,16 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Organization + +val client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + .setSession("") // The user session to authenticate with + +val organization = Organization(client) + +val response = organization.deleteInstallation( + installationId = "" +) +``` diff --git a/examples/1.9.x/server-kotlin/kotlin/organization/get-installation.md b/examples/1.9.x/server-kotlin/kotlin/organization/get-installation.md new file mode 100644 index 000000000..f75319997 --- /dev/null +++ b/examples/1.9.x/server-kotlin/kotlin/organization/get-installation.md @@ -0,0 +1,16 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Organization + +val client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + .setSession("") // The user session to authenticate with + +val organization = Organization(client) + +val response = organization.getInstallation( + installationId = "" +) +``` diff --git a/examples/1.9.x/server-kotlin/kotlin/organization/list-installations.md b/examples/1.9.x/server-kotlin/kotlin/organization/list-installations.md new file mode 100644 index 000000000..e8d79bb66 --- /dev/null +++ b/examples/1.9.x/server-kotlin/kotlin/organization/list-installations.md @@ -0,0 +1,17 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Organization + +val client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + .setSession("") // The user session to authenticate with + +val organization = Organization(client) + +val response = organization.listInstallations( + queries = listOf(), // optional + total = false // optional +) +``` diff --git a/examples/1.9.x/server-kotlin/kotlin/organization/update-installation.md b/examples/1.9.x/server-kotlin/kotlin/organization/update-installation.md new file mode 100644 index 000000000..86dfb7d02 --- /dev/null +++ b/examples/1.9.x/server-kotlin/kotlin/organization/update-installation.md @@ -0,0 +1,17 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Organization + +val client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + .setSession("") // The user session to authenticate with + +val organization = Organization(client) + +val response = organization.updateInstallation( + installationId = "", + authorizationDetails = "" // optional +) +``` diff --git a/examples/1.9.x/server-kotlin/kotlin/project/update-o-auth-2-server.md b/examples/1.9.x/server-kotlin/kotlin/project/update-o-auth-2-server.md index 859c0f8bb..0990c151c 100644 --- a/examples/1.9.x/server-kotlin/kotlin/project/update-o-auth-2-server.md +++ b/examples/1.9.x/server-kotlin/kotlin/project/update-o-auth-2-server.md @@ -19,6 +19,7 @@ val response = project.updateOAuth2Server( refreshTokenDuration = 60, // optional publicAccessTokenDuration = 60, // optional publicRefreshTokenDuration = 60, // optional + installationAccessTokenDuration = 60, // optional confidentialPkce = false, // optional verificationUrl = "https://example.com", // optional userCodeLength = 6, // optional diff --git a/examples/1.9.x/server-kotlin/kotlin/teams/create-installation.md b/examples/1.9.x/server-kotlin/kotlin/teams/create-installation.md new file mode 100644 index 000000000..29199db11 --- /dev/null +++ b/examples/1.9.x/server-kotlin/kotlin/teams/create-installation.md @@ -0,0 +1,18 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Teams + +val client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + .setSession("") // The user session to authenticate with + +val teams = Teams(client) + +val response = teams.createInstallation( + teamId = "", + appId = "", + authorizationDetails = "" // optional +) +``` diff --git a/examples/1.9.x/server-kotlin/kotlin/teams/delete-installation.md b/examples/1.9.x/server-kotlin/kotlin/teams/delete-installation.md new file mode 100644 index 000000000..66fe4d7d7 --- /dev/null +++ b/examples/1.9.x/server-kotlin/kotlin/teams/delete-installation.md @@ -0,0 +1,17 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Teams + +val client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + .setSession("") // The user session to authenticate with + +val teams = Teams(client) + +val response = teams.deleteInstallation( + teamId = "", + installationId = "" +) +``` diff --git a/examples/1.9.x/server-kotlin/kotlin/teams/get-installation.md b/examples/1.9.x/server-kotlin/kotlin/teams/get-installation.md new file mode 100644 index 000000000..c8ffa0029 --- /dev/null +++ b/examples/1.9.x/server-kotlin/kotlin/teams/get-installation.md @@ -0,0 +1,17 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Teams + +val client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + .setSession("") // The user session to authenticate with + +val teams = Teams(client) + +val response = teams.getInstallation( + teamId = "", + installationId = "" +) +``` diff --git a/examples/1.9.x/server-kotlin/kotlin/teams/list-installations.md b/examples/1.9.x/server-kotlin/kotlin/teams/list-installations.md new file mode 100644 index 000000000..2dd540536 --- /dev/null +++ b/examples/1.9.x/server-kotlin/kotlin/teams/list-installations.md @@ -0,0 +1,18 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Teams + +val client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + .setSession("") // The user session to authenticate with + +val teams = Teams(client) + +val response = teams.listInstallations( + teamId = "", + queries = listOf(), // optional + total = false // optional +) +``` diff --git a/examples/1.9.x/server-kotlin/kotlin/teams/update-installation.md b/examples/1.9.x/server-kotlin/kotlin/teams/update-installation.md new file mode 100644 index 000000000..024c866bb --- /dev/null +++ b/examples/1.9.x/server-kotlin/kotlin/teams/update-installation.md @@ -0,0 +1,18 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Teams + +val client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + .setSession("") // The user session to authenticate with + +val teams = Teams(client) + +val response = teams.updateInstallation( + teamId = "", + installationId = "", + authorizationDetails = "" // optional +) +``` diff --git a/examples/1.9.x/server-kotlin/kotlin/vectorsdb/create-collection.md b/examples/1.9.x/server-kotlin/kotlin/vectorsdb/create-collection.md new file mode 100644 index 000000000..0cd1e4a51 --- /dev/null +++ b/examples/1.9.x/server-kotlin/kotlin/vectorsdb/create-collection.md @@ -0,0 +1,24 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.VectorsDB +import io.appwrite.Permission +import io.appwrite.Role + +val client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + .setKey("") // Your secret API key + +val vectorsDB = VectorsDB(client) + +val response = vectorsDB.createCollection( + databaseId = "", + collectionId = "", + name = "", + dimension = 1, + permissions = listOf(Permission.read(Role.any())), // optional + documentSecurity = false, // optional + enabled = false // optional +) +``` diff --git a/examples/1.9.x/server-kotlin/kotlin/vectorsdb/create-document.md b/examples/1.9.x/server-kotlin/kotlin/vectorsdb/create-document.md new file mode 100644 index 000000000..220d27a3d --- /dev/null +++ b/examples/1.9.x/server-kotlin/kotlin/vectorsdb/create-document.md @@ -0,0 +1,27 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.VectorsDB +import io.appwrite.Permission +import io.appwrite.Role + +val client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + .setSession("") // The user session to authenticate with + +val vectorsDB = VectorsDB(client) + +val response = vectorsDB.createDocument( + databaseId = "", + collectionId = "", + documentId = "", + data = mapOf( + "embeddings" to listOf(0.12, -0.55, 0.88, 1.02), + "metadata" to mapOf( + "key" to "value" + ) + ), + permissions = listOf(Permission.read(Role.any())) // optional +) +``` diff --git a/examples/1.9.x/server-kotlin/kotlin/vectorsdb/create-documents.md b/examples/1.9.x/server-kotlin/kotlin/vectorsdb/create-documents.md new file mode 100644 index 000000000..e5fe9a985 --- /dev/null +++ b/examples/1.9.x/server-kotlin/kotlin/vectorsdb/create-documents.md @@ -0,0 +1,18 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.VectorsDB + +val client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + .setKey("") // Your secret API key + +val vectorsDB = VectorsDB(client) + +val response = vectorsDB.createDocuments( + databaseId = "", + collectionId = "", + documents = listOf() +) +``` diff --git a/examples/1.9.x/server-kotlin/kotlin/vectorsdb/create-index.md b/examples/1.9.x/server-kotlin/kotlin/vectorsdb/create-index.md new file mode 100644 index 000000000..c6c661e2a --- /dev/null +++ b/examples/1.9.x/server-kotlin/kotlin/vectorsdb/create-index.md @@ -0,0 +1,24 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.VectorsDB +import io.appwrite.enums.VectorsDBIndexType +import io.appwrite.enums.OrderBy + +val client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + .setKey("") // Your secret API key + +val vectorsDB = VectorsDB(client) + +val response = vectorsDB.createIndex( + databaseId = "", + collectionId = "", + key = "", + type = VectorsDBIndexType.HNSW_EUCLIDEAN, + attributes = listOf(), + orders = listOf(OrderBy.ASC), // optional + lengths = listOf() // optional +) +``` diff --git a/examples/1.9.x/server-kotlin/kotlin/vectorsdb/create-operations.md b/examples/1.9.x/server-kotlin/kotlin/vectorsdb/create-operations.md new file mode 100644 index 000000000..f6bc63626 --- /dev/null +++ b/examples/1.9.x/server-kotlin/kotlin/vectorsdb/create-operations.md @@ -0,0 +1,25 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.VectorsDB + +val client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + .setKey("") // Your secret API key + +val vectorsDB = VectorsDB(client) + +val response = vectorsDB.createOperations( + transactionId = "", + operations = listOf(mapOf( + "action" to "create", + "databaseId" to "", + "collectionId" to "", + "documentId" to "", + "data" to mapOf( + "name" to "Walter O'Brien" + ) + )) // optional +) +``` diff --git a/examples/1.9.x/server-kotlin/kotlin/vectorsdb/create-query.md b/examples/1.9.x/server-kotlin/kotlin/vectorsdb/create-query.md new file mode 100644 index 000000000..c8ab0951e --- /dev/null +++ b/examples/1.9.x/server-kotlin/kotlin/vectorsdb/create-query.md @@ -0,0 +1,21 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.VectorsDB + +val client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + .setSession("") // The user session to authenticate with + +val vectorsDB = VectorsDB(client) + +val response = vectorsDB.createQuery( + databaseId = "", + collectionId = "", + queries = listOf(), // optional + transactionId = "", // optional + total = false, // optional + ttl = 0 // optional +) +``` diff --git a/examples/1.9.x/server-kotlin/kotlin/vectorsdb/create-text-embeddings.md b/examples/1.9.x/server-kotlin/kotlin/vectorsdb/create-text-embeddings.md new file mode 100644 index 000000000..cd00d384d --- /dev/null +++ b/examples/1.9.x/server-kotlin/kotlin/vectorsdb/create-text-embeddings.md @@ -0,0 +1,18 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.VectorsDB +import io.appwrite.enums.EmbeddingModel + +val client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + .setKey("") // Your secret API key + +val vectorsDB = VectorsDB(client) + +val response = vectorsDB.createTextEmbeddings( + texts = listOf(), + model = EmbeddingModel.NOMIC_EMBED_TEXT // optional +) +``` diff --git a/examples/1.9.x/server-kotlin/kotlin/vectorsdb/create-transaction.md b/examples/1.9.x/server-kotlin/kotlin/vectorsdb/create-transaction.md new file mode 100644 index 000000000..b2430a18e --- /dev/null +++ b/examples/1.9.x/server-kotlin/kotlin/vectorsdb/create-transaction.md @@ -0,0 +1,16 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.VectorsDB + +val client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + .setKey("") // Your secret API key + +val vectorsDB = VectorsDB(client) + +val response = vectorsDB.createTransaction( + ttl = 60 // optional +) +``` diff --git a/examples/1.9.x/server-kotlin/kotlin/vectorsdb/create.md b/examples/1.9.x/server-kotlin/kotlin/vectorsdb/create.md new file mode 100644 index 000000000..cff2ab108 --- /dev/null +++ b/examples/1.9.x/server-kotlin/kotlin/vectorsdb/create.md @@ -0,0 +1,18 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.VectorsDB + +val client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + .setKey("") // Your secret API key + +val vectorsDB = VectorsDB(client) + +val response = vectorsDB.create( + databaseId = "", + name = "", + enabled = false // optional +) +``` diff --git a/examples/1.9.x/server-kotlin/kotlin/vectorsdb/delete-collection.md b/examples/1.9.x/server-kotlin/kotlin/vectorsdb/delete-collection.md new file mode 100644 index 000000000..4e929caca --- /dev/null +++ b/examples/1.9.x/server-kotlin/kotlin/vectorsdb/delete-collection.md @@ -0,0 +1,17 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.VectorsDB + +val client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + .setKey("") // Your secret API key + +val vectorsDB = VectorsDB(client) + +val response = vectorsDB.deleteCollection( + databaseId = "", + collectionId = "" +) +``` diff --git a/examples/1.9.x/server-kotlin/kotlin/vectorsdb/delete-document.md b/examples/1.9.x/server-kotlin/kotlin/vectorsdb/delete-document.md new file mode 100644 index 000000000..2fff745da --- /dev/null +++ b/examples/1.9.x/server-kotlin/kotlin/vectorsdb/delete-document.md @@ -0,0 +1,19 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.VectorsDB + +val client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + .setSession("") // The user session to authenticate with + +val vectorsDB = VectorsDB(client) + +val response = vectorsDB.deleteDocument( + databaseId = "", + collectionId = "", + documentId = "", + transactionId = "" // optional +) +``` diff --git a/examples/1.9.x/server-kotlin/kotlin/vectorsdb/delete-documents.md b/examples/1.9.x/server-kotlin/kotlin/vectorsdb/delete-documents.md new file mode 100644 index 000000000..53ecd505d --- /dev/null +++ b/examples/1.9.x/server-kotlin/kotlin/vectorsdb/delete-documents.md @@ -0,0 +1,19 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.VectorsDB + +val client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + .setKey("") // Your secret API key + +val vectorsDB = VectorsDB(client) + +val response = vectorsDB.deleteDocuments( + databaseId = "", + collectionId = "", + queries = listOf(), // optional + transactionId = "" // optional +) +``` diff --git a/examples/1.9.x/server-kotlin/kotlin/vectorsdb/delete-index.md b/examples/1.9.x/server-kotlin/kotlin/vectorsdb/delete-index.md new file mode 100644 index 000000000..d779381cc --- /dev/null +++ b/examples/1.9.x/server-kotlin/kotlin/vectorsdb/delete-index.md @@ -0,0 +1,18 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.VectorsDB + +val client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + .setKey("") // Your secret API key + +val vectorsDB = VectorsDB(client) + +val response = vectorsDB.deleteIndex( + databaseId = "", + collectionId = "", + key = "" +) +``` diff --git a/examples/1.9.x/server-kotlin/kotlin/vectorsdb/delete-transaction.md b/examples/1.9.x/server-kotlin/kotlin/vectorsdb/delete-transaction.md new file mode 100644 index 000000000..f04bef21e --- /dev/null +++ b/examples/1.9.x/server-kotlin/kotlin/vectorsdb/delete-transaction.md @@ -0,0 +1,16 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.VectorsDB + +val client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + .setKey("") // Your secret API key + +val vectorsDB = VectorsDB(client) + +val response = vectorsDB.deleteTransaction( + transactionId = "" +) +``` diff --git a/examples/1.9.x/server-kotlin/kotlin/vectorsdb/delete.md b/examples/1.9.x/server-kotlin/kotlin/vectorsdb/delete.md new file mode 100644 index 000000000..d4d480e5e --- /dev/null +++ b/examples/1.9.x/server-kotlin/kotlin/vectorsdb/delete.md @@ -0,0 +1,16 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.VectorsDB + +val client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + .setKey("") // Your secret API key + +val vectorsDB = VectorsDB(client) + +val response = vectorsDB.delete( + databaseId = "" +) +``` diff --git a/examples/1.9.x/server-kotlin/kotlin/vectorsdb/get-collection.md b/examples/1.9.x/server-kotlin/kotlin/vectorsdb/get-collection.md new file mode 100644 index 000000000..68599a754 --- /dev/null +++ b/examples/1.9.x/server-kotlin/kotlin/vectorsdb/get-collection.md @@ -0,0 +1,17 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.VectorsDB + +val client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + .setKey("") // Your secret API key + +val vectorsDB = VectorsDB(client) + +val response = vectorsDB.getCollection( + databaseId = "", + collectionId = "" +) +``` diff --git a/examples/1.9.x/server-kotlin/kotlin/vectorsdb/get-document.md b/examples/1.9.x/server-kotlin/kotlin/vectorsdb/get-document.md new file mode 100644 index 000000000..9a2fb13f3 --- /dev/null +++ b/examples/1.9.x/server-kotlin/kotlin/vectorsdb/get-document.md @@ -0,0 +1,20 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.VectorsDB + +val client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + .setSession("") // The user session to authenticate with + +val vectorsDB = VectorsDB(client) + +val response = vectorsDB.getDocument( + databaseId = "", + collectionId = "", + documentId = "", + queries = listOf(), // optional + transactionId = "" // optional +) +``` diff --git a/examples/1.9.x/server-kotlin/kotlin/vectorsdb/get-index.md b/examples/1.9.x/server-kotlin/kotlin/vectorsdb/get-index.md new file mode 100644 index 000000000..384492039 --- /dev/null +++ b/examples/1.9.x/server-kotlin/kotlin/vectorsdb/get-index.md @@ -0,0 +1,18 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.VectorsDB + +val client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + .setKey("") // Your secret API key + +val vectorsDB = VectorsDB(client) + +val response = vectorsDB.getIndex( + databaseId = "", + collectionId = "", + key = "" +) +``` diff --git a/examples/1.9.x/server-kotlin/kotlin/vectorsdb/get-transaction.md b/examples/1.9.x/server-kotlin/kotlin/vectorsdb/get-transaction.md new file mode 100644 index 000000000..9fee4491d --- /dev/null +++ b/examples/1.9.x/server-kotlin/kotlin/vectorsdb/get-transaction.md @@ -0,0 +1,16 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.VectorsDB + +val client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + .setKey("") // Your secret API key + +val vectorsDB = VectorsDB(client) + +val response = vectorsDB.getTransaction( + transactionId = "" +) +``` diff --git a/examples/1.9.x/server-kotlin/kotlin/vectorsdb/get.md b/examples/1.9.x/server-kotlin/kotlin/vectorsdb/get.md new file mode 100644 index 000000000..fc9d6bd9b --- /dev/null +++ b/examples/1.9.x/server-kotlin/kotlin/vectorsdb/get.md @@ -0,0 +1,16 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.VectorsDB + +val client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + .setKey("") // Your secret API key + +val vectorsDB = VectorsDB(client) + +val response = vectorsDB.get( + databaseId = "" +) +``` diff --git a/examples/1.9.x/server-kotlin/kotlin/vectorsdb/list-collections.md b/examples/1.9.x/server-kotlin/kotlin/vectorsdb/list-collections.md new file mode 100644 index 000000000..12250df74 --- /dev/null +++ b/examples/1.9.x/server-kotlin/kotlin/vectorsdb/list-collections.md @@ -0,0 +1,19 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.VectorsDB + +val client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + .setKey("") // Your secret API key + +val vectorsDB = VectorsDB(client) + +val response = vectorsDB.listCollections( + databaseId = "", + queries = listOf(), // optional + search = "", // optional + total = false // optional +) +``` diff --git a/examples/1.9.x/server-kotlin/kotlin/vectorsdb/list-documents.md b/examples/1.9.x/server-kotlin/kotlin/vectorsdb/list-documents.md new file mode 100644 index 000000000..ec74ab640 --- /dev/null +++ b/examples/1.9.x/server-kotlin/kotlin/vectorsdb/list-documents.md @@ -0,0 +1,21 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.VectorsDB + +val client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + .setSession("") // The user session to authenticate with + +val vectorsDB = VectorsDB(client) + +val response = vectorsDB.listDocuments( + databaseId = "", + collectionId = "", + queries = listOf(), // optional + transactionId = "", // optional + total = false, // optional + ttl = 0 // optional +) +``` diff --git a/examples/1.9.x/server-kotlin/kotlin/vectorsdb/list-indexes.md b/examples/1.9.x/server-kotlin/kotlin/vectorsdb/list-indexes.md new file mode 100644 index 000000000..28f0fc003 --- /dev/null +++ b/examples/1.9.x/server-kotlin/kotlin/vectorsdb/list-indexes.md @@ -0,0 +1,19 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.VectorsDB + +val client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + .setKey("") // Your secret API key + +val vectorsDB = VectorsDB(client) + +val response = vectorsDB.listIndexes( + databaseId = "", + collectionId = "", + queries = listOf(), // optional + total = false // optional +) +``` diff --git a/examples/1.9.x/server-kotlin/kotlin/vectorsdb/list-transactions.md b/examples/1.9.x/server-kotlin/kotlin/vectorsdb/list-transactions.md new file mode 100644 index 000000000..3801d18e7 --- /dev/null +++ b/examples/1.9.x/server-kotlin/kotlin/vectorsdb/list-transactions.md @@ -0,0 +1,16 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.VectorsDB + +val client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + .setKey("") // Your secret API key + +val vectorsDB = VectorsDB(client) + +val response = vectorsDB.listTransactions( + queries = listOf() // optional +) +``` diff --git a/examples/1.9.x/server-kotlin/kotlin/vectorsdb/list.md b/examples/1.9.x/server-kotlin/kotlin/vectorsdb/list.md new file mode 100644 index 000000000..4051f0f98 --- /dev/null +++ b/examples/1.9.x/server-kotlin/kotlin/vectorsdb/list.md @@ -0,0 +1,18 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.VectorsDB + +val client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + .setKey("") // Your secret API key + +val vectorsDB = VectorsDB(client) + +val response = vectorsDB.list( + queries = listOf(), // optional + search = "", // optional + total = false // optional +) +``` diff --git a/examples/1.9.x/server-kotlin/kotlin/vectorsdb/update-collection.md b/examples/1.9.x/server-kotlin/kotlin/vectorsdb/update-collection.md new file mode 100644 index 000000000..331c85c27 --- /dev/null +++ b/examples/1.9.x/server-kotlin/kotlin/vectorsdb/update-collection.md @@ -0,0 +1,24 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.VectorsDB +import io.appwrite.Permission +import io.appwrite.Role + +val client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + .setKey("") // Your secret API key + +val vectorsDB = VectorsDB(client) + +val response = vectorsDB.updateCollection( + databaseId = "", + collectionId = "", + name = "", + dimension = 1, // optional + permissions = listOf(Permission.read(Role.any())), // optional + documentSecurity = false, // optional + enabled = false // optional +) +``` diff --git a/examples/1.9.x/server-kotlin/kotlin/vectorsdb/update-document.md b/examples/1.9.x/server-kotlin/kotlin/vectorsdb/update-document.md new file mode 100644 index 000000000..572575732 --- /dev/null +++ b/examples/1.9.x/server-kotlin/kotlin/vectorsdb/update-document.md @@ -0,0 +1,23 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.VectorsDB +import io.appwrite.Permission +import io.appwrite.Role + +val client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + .setSession("") // The user session to authenticate with + +val vectorsDB = VectorsDB(client) + +val response = vectorsDB.updateDocument( + databaseId = "", + collectionId = "", + documentId = "", + data = mapOf( "a" to "b" ), // optional + permissions = listOf(Permission.read(Role.any())), // optional + transactionId = "" // optional +) +``` diff --git a/examples/1.9.x/server-kotlin/kotlin/vectorsdb/update-documents.md b/examples/1.9.x/server-kotlin/kotlin/vectorsdb/update-documents.md new file mode 100644 index 000000000..32aac30e7 --- /dev/null +++ b/examples/1.9.x/server-kotlin/kotlin/vectorsdb/update-documents.md @@ -0,0 +1,20 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.VectorsDB + +val client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + .setKey("") // Your secret API key + +val vectorsDB = VectorsDB(client) + +val response = vectorsDB.updateDocuments( + databaseId = "", + collectionId = "", + data = mapOf( "a" to "b" ), // optional + queries = listOf(), // optional + transactionId = "" // optional +) +``` diff --git a/examples/1.9.x/server-kotlin/kotlin/vectorsdb/update-transaction.md b/examples/1.9.x/server-kotlin/kotlin/vectorsdb/update-transaction.md new file mode 100644 index 000000000..5f34609f5 --- /dev/null +++ b/examples/1.9.x/server-kotlin/kotlin/vectorsdb/update-transaction.md @@ -0,0 +1,18 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.VectorsDB + +val client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + .setKey("") // Your secret API key + +val vectorsDB = VectorsDB(client) + +val response = vectorsDB.updateTransaction( + transactionId = "", + commit = false, // optional + rollback = false // optional +) +``` diff --git a/examples/1.9.x/server-kotlin/kotlin/vectorsdb/update.md b/examples/1.9.x/server-kotlin/kotlin/vectorsdb/update.md new file mode 100644 index 000000000..1a42f4fd6 --- /dev/null +++ b/examples/1.9.x/server-kotlin/kotlin/vectorsdb/update.md @@ -0,0 +1,18 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.VectorsDB + +val client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + .setKey("") // Your secret API key + +val vectorsDB = VectorsDB(client) + +val response = vectorsDB.update( + databaseId = "", + name = "", + enabled = false // optional +) +``` diff --git a/examples/1.9.x/server-kotlin/kotlin/vectorsdb/upsert-document.md b/examples/1.9.x/server-kotlin/kotlin/vectorsdb/upsert-document.md new file mode 100644 index 000000000..dd18e1d56 --- /dev/null +++ b/examples/1.9.x/server-kotlin/kotlin/vectorsdb/upsert-document.md @@ -0,0 +1,23 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.VectorsDB +import io.appwrite.Permission +import io.appwrite.Role + +val client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + .setSession("") // The user session to authenticate with + +val vectorsDB = VectorsDB(client) + +val response = vectorsDB.upsertDocument( + databaseId = "", + collectionId = "", + documentId = "", + data = mapOf( "a" to "b" ), // optional + permissions = listOf(Permission.read(Role.any())), // optional + transactionId = "" // optional +) +``` diff --git a/examples/1.9.x/server-kotlin/kotlin/vectorsdb/upsert-documents.md b/examples/1.9.x/server-kotlin/kotlin/vectorsdb/upsert-documents.md new file mode 100644 index 000000000..717222282 --- /dev/null +++ b/examples/1.9.x/server-kotlin/kotlin/vectorsdb/upsert-documents.md @@ -0,0 +1,19 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.VectorsDB + +val client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + .setKey("") // Your secret API key + +val vectorsDB = VectorsDB(client) + +val response = vectorsDB.upsertDocuments( + databaseId = "", + collectionId = "", + documents = listOf(), + transactionId = "" // optional +) +``` diff --git a/examples/1.9.x/server-nodejs/examples/apps/create-installation-token.md b/examples/1.9.x/server-nodejs/examples/apps/create-installation-token.md new file mode 100644 index 000000000..f60d495b1 --- /dev/null +++ b/examples/1.9.x/server-nodejs/examples/apps/create-installation-token.md @@ -0,0 +1,15 @@ +```javascript +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('') // Your project ID + .setKey(''); // Your secret API key + +const apps = new sdk.Apps(client); + +const result = await apps.createInstallationToken({ + appId: '', + installationId: '' +}); +``` diff --git a/examples/1.9.x/server-nodejs/examples/apps/create-key.md b/examples/1.9.x/server-nodejs/examples/apps/create-key.md new file mode 100644 index 000000000..0b358162e --- /dev/null +++ b/examples/1.9.x/server-nodejs/examples/apps/create-key.md @@ -0,0 +1,14 @@ +```javascript +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('') // Your project ID + .setSession(''); // The user session to authenticate with + +const apps = new sdk.Apps(client); + +const result = await apps.createKey({ + appId: '' +}); +``` diff --git a/examples/1.9.x/server-nodejs/examples/apps/create-secret.md b/examples/1.9.x/server-nodejs/examples/apps/create-secret.md new file mode 100644 index 000000000..1f851041c --- /dev/null +++ b/examples/1.9.x/server-nodejs/examples/apps/create-secret.md @@ -0,0 +1,14 @@ +```javascript +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('') // Your project ID + .setSession(''); // The user session to authenticate with + +const apps = new sdk.Apps(client); + +const result = await apps.createSecret({ + appId: '' +}); +``` diff --git a/examples/1.9.x/server-nodejs/examples/apps/create.md b/examples/1.9.x/server-nodejs/examples/apps/create.md new file mode 100644 index 000000000..80339c51a --- /dev/null +++ b/examples/1.9.x/server-nodejs/examples/apps/create.md @@ -0,0 +1,32 @@ +```javascript +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('') // Your project ID + .setSession(''); // The user session to authenticate with + +const apps = new sdk.Apps(client); + +const result = await apps.create({ + appId: '', + name: '', + redirectUris: [], + description: '', // optional + clientUri: 'https://example.com', // optional + logoUri: 'https://example.com', // optional + privacyPolicyUrl: 'https://example.com', // optional + termsUrl: 'https://example.com', // optional + contacts: [], // optional + tagline: '', // optional + tags: [], // optional + images: [], // optional + supportUrl: 'https://example.com', // optional + dataDeletionUrl: 'https://example.com', // optional + postLogoutRedirectUris: [], // optional + enabled: false, // optional + type: 'public', // optional + deviceFlow: false, // optional + teamId: '' // optional +}); +``` diff --git a/examples/1.9.x/server-nodejs/examples/apps/delete-key.md b/examples/1.9.x/server-nodejs/examples/apps/delete-key.md new file mode 100644 index 000000000..f4f0bb5e7 --- /dev/null +++ b/examples/1.9.x/server-nodejs/examples/apps/delete-key.md @@ -0,0 +1,15 @@ +```javascript +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('') // Your project ID + .setSession(''); // The user session to authenticate with + +const apps = new sdk.Apps(client); + +const result = await apps.deleteKey({ + appId: '', + keyId: '' +}); +``` diff --git a/examples/1.9.x/server-nodejs/examples/apps/delete-secret.md b/examples/1.9.x/server-nodejs/examples/apps/delete-secret.md new file mode 100644 index 000000000..eeb1e4395 --- /dev/null +++ b/examples/1.9.x/server-nodejs/examples/apps/delete-secret.md @@ -0,0 +1,15 @@ +```javascript +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('') // Your project ID + .setSession(''); // The user session to authenticate with + +const apps = new sdk.Apps(client); + +const result = await apps.deleteSecret({ + appId: '', + secretId: '' +}); +``` diff --git a/examples/1.9.x/server-nodejs/examples/apps/delete-tokens.md b/examples/1.9.x/server-nodejs/examples/apps/delete-tokens.md new file mode 100644 index 000000000..757af7d4d --- /dev/null +++ b/examples/1.9.x/server-nodejs/examples/apps/delete-tokens.md @@ -0,0 +1,14 @@ +```javascript +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('') // Your project ID + .setSession(''); // The user session to authenticate with + +const apps = new sdk.Apps(client); + +const result = await apps.deleteTokens({ + appId: '' +}); +``` diff --git a/examples/1.9.x/server-nodejs/examples/apps/delete.md b/examples/1.9.x/server-nodejs/examples/apps/delete.md new file mode 100644 index 000000000..fd9138cd8 --- /dev/null +++ b/examples/1.9.x/server-nodejs/examples/apps/delete.md @@ -0,0 +1,14 @@ +```javascript +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('') // Your project ID + .setSession(''); // The user session to authenticate with + +const apps = new sdk.Apps(client); + +const result = await apps.delete({ + appId: '' +}); +``` diff --git a/examples/1.9.x/server-nodejs/examples/apps/get-installation.md b/examples/1.9.x/server-nodejs/examples/apps/get-installation.md new file mode 100644 index 000000000..eb483b23d --- /dev/null +++ b/examples/1.9.x/server-nodejs/examples/apps/get-installation.md @@ -0,0 +1,15 @@ +```javascript +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('') // Your project ID + .setKey(''); // Your secret API key + +const apps = new sdk.Apps(client); + +const result = await apps.getInstallation({ + appId: '', + installationId: '' +}); +``` diff --git a/examples/1.9.x/server-nodejs/examples/apps/get-key.md b/examples/1.9.x/server-nodejs/examples/apps/get-key.md new file mode 100644 index 000000000..afc83cccb --- /dev/null +++ b/examples/1.9.x/server-nodejs/examples/apps/get-key.md @@ -0,0 +1,15 @@ +```javascript +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('') // Your project ID + .setSession(''); // The user session to authenticate with + +const apps = new sdk.Apps(client); + +const result = await apps.getKey({ + appId: '', + keyId: '' +}); +``` diff --git a/examples/1.9.x/server-nodejs/examples/apps/get-secret.md b/examples/1.9.x/server-nodejs/examples/apps/get-secret.md new file mode 100644 index 000000000..4d6a0ec02 --- /dev/null +++ b/examples/1.9.x/server-nodejs/examples/apps/get-secret.md @@ -0,0 +1,15 @@ +```javascript +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('') // Your project ID + .setSession(''); // The user session to authenticate with + +const apps = new sdk.Apps(client); + +const result = await apps.getSecret({ + appId: '', + secretId: '' +}); +``` diff --git a/examples/1.9.x/server-nodejs/examples/apps/get.md b/examples/1.9.x/server-nodejs/examples/apps/get.md new file mode 100644 index 000000000..660c4f424 --- /dev/null +++ b/examples/1.9.x/server-nodejs/examples/apps/get.md @@ -0,0 +1,14 @@ +```javascript +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('') // Your project ID + .setSession(''); // The user session to authenticate with + +const apps = new sdk.Apps(client); + +const result = await apps.get({ + appId: '' +}); +``` diff --git a/examples/1.9.x/server-nodejs/examples/apps/list-installation-scopes.md b/examples/1.9.x/server-nodejs/examples/apps/list-installation-scopes.md new file mode 100644 index 000000000..299d7b70e --- /dev/null +++ b/examples/1.9.x/server-nodejs/examples/apps/list-installation-scopes.md @@ -0,0 +1,12 @@ +```javascript +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('') // Your project ID + .setSession(''); // The user session to authenticate with + +const apps = new sdk.Apps(client); + +const result = await apps.listInstallationScopes(); +``` diff --git a/examples/1.9.x/server-nodejs/examples/apps/list-installations.md b/examples/1.9.x/server-nodejs/examples/apps/list-installations.md new file mode 100644 index 000000000..e410f6668 --- /dev/null +++ b/examples/1.9.x/server-nodejs/examples/apps/list-installations.md @@ -0,0 +1,16 @@ +```javascript +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('') // Your project ID + .setKey(''); // Your secret API key + +const apps = new sdk.Apps(client); + +const result = await apps.listInstallations({ + appId: '', + queries: [], // optional + total: false // optional +}); +``` diff --git a/examples/1.9.x/server-nodejs/examples/apps/list-keys.md b/examples/1.9.x/server-nodejs/examples/apps/list-keys.md new file mode 100644 index 000000000..3a2198fdf --- /dev/null +++ b/examples/1.9.x/server-nodejs/examples/apps/list-keys.md @@ -0,0 +1,16 @@ +```javascript +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('') // Your project ID + .setSession(''); // The user session to authenticate with + +const apps = new sdk.Apps(client); + +const result = await apps.listKeys({ + appId: '', + queries: [], // optional + total: false // optional +}); +``` diff --git a/examples/1.9.x/server-nodejs/examples/apps/list-o-auth-2-scopes.md b/examples/1.9.x/server-nodejs/examples/apps/list-o-auth-2-scopes.md new file mode 100644 index 000000000..6f9253959 --- /dev/null +++ b/examples/1.9.x/server-nodejs/examples/apps/list-o-auth-2-scopes.md @@ -0,0 +1,12 @@ +```javascript +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('') // Your project ID + .setSession(''); // The user session to authenticate with + +const apps = new sdk.Apps(client); + +const result = await apps.listOAuth2Scopes(); +``` diff --git a/examples/1.9.x/server-nodejs/examples/apps/list-secrets.md b/examples/1.9.x/server-nodejs/examples/apps/list-secrets.md new file mode 100644 index 000000000..d1155a5d4 --- /dev/null +++ b/examples/1.9.x/server-nodejs/examples/apps/list-secrets.md @@ -0,0 +1,16 @@ +```javascript +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('') // Your project ID + .setSession(''); // The user session to authenticate with + +const apps = new sdk.Apps(client); + +const result = await apps.listSecrets({ + appId: '', + queries: [], // optional + total: false // optional +}); +``` diff --git a/examples/1.9.x/server-nodejs/examples/apps/list.md b/examples/1.9.x/server-nodejs/examples/apps/list.md new file mode 100644 index 000000000..d5942933d --- /dev/null +++ b/examples/1.9.x/server-nodejs/examples/apps/list.md @@ -0,0 +1,15 @@ +```javascript +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('') // Your project ID + .setSession(''); // The user session to authenticate with + +const apps = new sdk.Apps(client); + +const result = await apps.list({ + queries: [], // optional + total: false // optional +}); +``` diff --git a/examples/1.9.x/server-nodejs/examples/apps/update-labels.md b/examples/1.9.x/server-nodejs/examples/apps/update-labels.md new file mode 100644 index 000000000..67a98fc74 --- /dev/null +++ b/examples/1.9.x/server-nodejs/examples/apps/update-labels.md @@ -0,0 +1,15 @@ +```javascript +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('') // Your project ID + .setKey(''); // Your secret API key + +const apps = new sdk.Apps(client); + +const result = await apps.updateLabels({ + appId: '', + labels: [] +}); +``` diff --git a/examples/1.9.x/server-nodejs/examples/apps/update-team.md b/examples/1.9.x/server-nodejs/examples/apps/update-team.md new file mode 100644 index 000000000..65828dce6 --- /dev/null +++ b/examples/1.9.x/server-nodejs/examples/apps/update-team.md @@ -0,0 +1,15 @@ +```javascript +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('') // Your project ID + .setSession(''); // The user session to authenticate with + +const apps = new sdk.Apps(client); + +const result = await apps.updateTeam({ + appId: '', + teamId: '' +}); +``` diff --git a/examples/1.9.x/server-nodejs/examples/apps/update.md b/examples/1.9.x/server-nodejs/examples/apps/update.md new file mode 100644 index 000000000..2ac2e585b --- /dev/null +++ b/examples/1.9.x/server-nodejs/examples/apps/update.md @@ -0,0 +1,33 @@ +```javascript +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('') // Your project ID + .setSession(''); // The user session to authenticate with + +const apps = new sdk.Apps(client); + +const result = await apps.update({ + appId: '', + name: '', + description: '', // optional + clientUri: 'https://example.com', // optional + logoUri: 'https://example.com', // optional + privacyPolicyUrl: 'https://example.com', // optional + termsUrl: 'https://example.com', // optional + contacts: [], // optional + tagline: '', // optional + tags: [], // optional + images: [], // optional + supportUrl: 'https://example.com', // optional + dataDeletionUrl: 'https://example.com', // optional + enabled: false, // optional + redirectUris: [], // optional + postLogoutRedirectUris: [], // optional + type: 'public', // optional + deviceFlow: false, // optional + installationScopes: [], // optional + installationRedirectUrl: 'https://example.com' // optional +}); +``` diff --git a/examples/1.9.x/server-nodejs/examples/documentsdb/create-collection.md b/examples/1.9.x/server-nodejs/examples/documentsdb/create-collection.md new file mode 100644 index 000000000..6e25ad425 --- /dev/null +++ b/examples/1.9.x/server-nodejs/examples/documentsdb/create-collection.md @@ -0,0 +1,21 @@ +```javascript +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('') // Your project ID + .setKey(''); // Your secret API key + +const documentsDB = new sdk.DocumentsDB(client); + +const result = await documentsDB.createCollection({ + databaseId: '', + collectionId: '', + name: '', + permissions: [sdk.Permission.read(sdk.Role.any())], // optional + documentSecurity: false, // optional + enabled: false, // optional + attributes: [], // optional + indexes: [] // optional +}); +``` diff --git a/examples/1.9.x/server-nodejs/examples/documentsdb/create-document.md b/examples/1.9.x/server-nodejs/examples/documentsdb/create-document.md new file mode 100644 index 000000000..62daf2128 --- /dev/null +++ b/examples/1.9.x/server-nodejs/examples/documentsdb/create-document.md @@ -0,0 +1,24 @@ +```javascript +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('') // Your project ID + .setSession(''); // The user session to authenticate with + +const documentsDB = new sdk.DocumentsDB(client); + +const result = await documentsDB.createDocument({ + databaseId: '', + collectionId: '', + documentId: '', + data: { + "username": "walter.obrien", + "email": "walter.obrien@example.com", + "fullName": "Walter O'Brien", + "age": 30, + "isAdmin": false + }, + permissions: [sdk.Permission.read(sdk.Role.any())] // optional +}); +``` diff --git a/examples/1.9.x/server-nodejs/examples/documentsdb/create-documents.md b/examples/1.9.x/server-nodejs/examples/documentsdb/create-documents.md new file mode 100644 index 000000000..c990675c5 --- /dev/null +++ b/examples/1.9.x/server-nodejs/examples/documentsdb/create-documents.md @@ -0,0 +1,16 @@ +```javascript +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('') // Your project ID + .setSession(''); // The user session to authenticate with + +const documentsDB = new sdk.DocumentsDB(client); + +const result = await documentsDB.createDocuments({ + databaseId: '', + collectionId: '', + documents: [] +}); +``` diff --git a/examples/1.9.x/server-nodejs/examples/documentsdb/create-index.md b/examples/1.9.x/server-nodejs/examples/documentsdb/create-index.md new file mode 100644 index 000000000..bece398ca --- /dev/null +++ b/examples/1.9.x/server-nodejs/examples/documentsdb/create-index.md @@ -0,0 +1,20 @@ +```javascript +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('') // Your project ID + .setKey(''); // Your secret API key + +const documentsDB = new sdk.DocumentsDB(client); + +const result = await documentsDB.createIndex({ + databaseId: '', + collectionId: '', + key: '', + type: sdk.DocumentsDBIndexType.Key, + attributes: [], + orders: [sdk.OrderBy.Asc], // optional + lengths: [] // optional +}); +``` diff --git a/examples/1.9.x/server-nodejs/examples/documentsdb/create-operations.md b/examples/1.9.x/server-nodejs/examples/documentsdb/create-operations.md new file mode 100644 index 000000000..464cc672c --- /dev/null +++ b/examples/1.9.x/server-nodejs/examples/documentsdb/create-operations.md @@ -0,0 +1,25 @@ +```javascript +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('') // Your project ID + .setKey(''); // Your secret API key + +const documentsDB = new sdk.DocumentsDB(client); + +const result = await documentsDB.createOperations({ + transactionId: '', + operations: [ + { + "action": "create", + "databaseId": "", + "collectionId": "", + "documentId": "", + "data": { + "name": "Walter O'Brien" + } + } + ] // optional +}); +``` diff --git a/examples/1.9.x/server-nodejs/examples/documentsdb/create-transaction.md b/examples/1.9.x/server-nodejs/examples/documentsdb/create-transaction.md new file mode 100644 index 000000000..73bbb2fac --- /dev/null +++ b/examples/1.9.x/server-nodejs/examples/documentsdb/create-transaction.md @@ -0,0 +1,14 @@ +```javascript +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('') // Your project ID + .setKey(''); // Your secret API key + +const documentsDB = new sdk.DocumentsDB(client); + +const result = await documentsDB.createTransaction({ + ttl: 60 // optional +}); +``` diff --git a/examples/1.9.x/server-nodejs/examples/documentsdb/create.md b/examples/1.9.x/server-nodejs/examples/documentsdb/create.md new file mode 100644 index 000000000..d6eb43570 --- /dev/null +++ b/examples/1.9.x/server-nodejs/examples/documentsdb/create.md @@ -0,0 +1,16 @@ +```javascript +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('') // Your project ID + .setKey(''); // Your secret API key + +const documentsDB = new sdk.DocumentsDB(client); + +const result = await documentsDB.create({ + databaseId: '', + name: '', + enabled: false // optional +}); +``` diff --git a/examples/1.9.x/server-nodejs/examples/documentsdb/decrement-document-attribute.md b/examples/1.9.x/server-nodejs/examples/documentsdb/decrement-document-attribute.md new file mode 100644 index 000000000..1f3f8dc2a --- /dev/null +++ b/examples/1.9.x/server-nodejs/examples/documentsdb/decrement-document-attribute.md @@ -0,0 +1,20 @@ +```javascript +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('') // Your project ID + .setSession(''); // The user session to authenticate with + +const documentsDB = new sdk.DocumentsDB(client); + +const result = await documentsDB.decrementDocumentAttribute({ + databaseId: '', + collectionId: '', + documentId: '', + attribute: '', + value: null, // optional + min: null, // optional + transactionId: '' // optional +}); +``` diff --git a/examples/1.9.x/server-nodejs/examples/documentsdb/delete-collection.md b/examples/1.9.x/server-nodejs/examples/documentsdb/delete-collection.md new file mode 100644 index 000000000..44cb7cc2a --- /dev/null +++ b/examples/1.9.x/server-nodejs/examples/documentsdb/delete-collection.md @@ -0,0 +1,15 @@ +```javascript +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('') // Your project ID + .setKey(''); // Your secret API key + +const documentsDB = new sdk.DocumentsDB(client); + +const result = await documentsDB.deleteCollection({ + databaseId: '', + collectionId: '' +}); +``` diff --git a/examples/1.9.x/server-nodejs/examples/documentsdb/delete-document.md b/examples/1.9.x/server-nodejs/examples/documentsdb/delete-document.md new file mode 100644 index 000000000..05363fc7b --- /dev/null +++ b/examples/1.9.x/server-nodejs/examples/documentsdb/delete-document.md @@ -0,0 +1,17 @@ +```javascript +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('') // Your project ID + .setSession(''); // The user session to authenticate with + +const documentsDB = new sdk.DocumentsDB(client); + +const result = await documentsDB.deleteDocument({ + databaseId: '', + collectionId: '', + documentId: '', + transactionId: '' // optional +}); +``` diff --git a/examples/1.9.x/server-nodejs/examples/documentsdb/delete-documents.md b/examples/1.9.x/server-nodejs/examples/documentsdb/delete-documents.md new file mode 100644 index 000000000..9c9d02011 --- /dev/null +++ b/examples/1.9.x/server-nodejs/examples/documentsdb/delete-documents.md @@ -0,0 +1,17 @@ +```javascript +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('') // Your project ID + .setKey(''); // Your secret API key + +const documentsDB = new sdk.DocumentsDB(client); + +const result = await documentsDB.deleteDocuments({ + databaseId: '', + collectionId: '', + queries: [], // optional + transactionId: '' // optional +}); +``` diff --git a/examples/1.9.x/server-nodejs/examples/documentsdb/delete-index.md b/examples/1.9.x/server-nodejs/examples/documentsdb/delete-index.md new file mode 100644 index 000000000..cfdfd3e2a --- /dev/null +++ b/examples/1.9.x/server-nodejs/examples/documentsdb/delete-index.md @@ -0,0 +1,16 @@ +```javascript +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('') // Your project ID + .setKey(''); // Your secret API key + +const documentsDB = new sdk.DocumentsDB(client); + +const result = await documentsDB.deleteIndex({ + databaseId: '', + collectionId: '', + key: '' +}); +``` diff --git a/examples/1.9.x/server-nodejs/examples/documentsdb/delete-transaction.md b/examples/1.9.x/server-nodejs/examples/documentsdb/delete-transaction.md new file mode 100644 index 000000000..a8b1e9ecf --- /dev/null +++ b/examples/1.9.x/server-nodejs/examples/documentsdb/delete-transaction.md @@ -0,0 +1,14 @@ +```javascript +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('') // Your project ID + .setKey(''); // Your secret API key + +const documentsDB = new sdk.DocumentsDB(client); + +const result = await documentsDB.deleteTransaction({ + transactionId: '' +}); +``` diff --git a/examples/1.9.x/server-nodejs/examples/documentsdb/delete.md b/examples/1.9.x/server-nodejs/examples/documentsdb/delete.md new file mode 100644 index 000000000..9f6d6c882 --- /dev/null +++ b/examples/1.9.x/server-nodejs/examples/documentsdb/delete.md @@ -0,0 +1,14 @@ +```javascript +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('') // Your project ID + .setKey(''); // Your secret API key + +const documentsDB = new sdk.DocumentsDB(client); + +const result = await documentsDB.delete({ + databaseId: '' +}); +``` diff --git a/examples/1.9.x/server-nodejs/examples/documentsdb/get-collection.md b/examples/1.9.x/server-nodejs/examples/documentsdb/get-collection.md new file mode 100644 index 000000000..49b419c15 --- /dev/null +++ b/examples/1.9.x/server-nodejs/examples/documentsdb/get-collection.md @@ -0,0 +1,15 @@ +```javascript +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('') // Your project ID + .setKey(''); // Your secret API key + +const documentsDB = new sdk.DocumentsDB(client); + +const result = await documentsDB.getCollection({ + databaseId: '', + collectionId: '' +}); +``` diff --git a/examples/1.9.x/server-nodejs/examples/documentsdb/get-document.md b/examples/1.9.x/server-nodejs/examples/documentsdb/get-document.md new file mode 100644 index 000000000..7ef838c8f --- /dev/null +++ b/examples/1.9.x/server-nodejs/examples/documentsdb/get-document.md @@ -0,0 +1,18 @@ +```javascript +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('') // Your project ID + .setSession(''); // The user session to authenticate with + +const documentsDB = new sdk.DocumentsDB(client); + +const result = await documentsDB.getDocument({ + databaseId: '', + collectionId: '', + documentId: '', + queries: [], // optional + transactionId: '' // optional +}); +``` diff --git a/examples/1.9.x/server-nodejs/examples/documentsdb/get-index.md b/examples/1.9.x/server-nodejs/examples/documentsdb/get-index.md new file mode 100644 index 000000000..a44b6d08a --- /dev/null +++ b/examples/1.9.x/server-nodejs/examples/documentsdb/get-index.md @@ -0,0 +1,16 @@ +```javascript +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('') // Your project ID + .setKey(''); // Your secret API key + +const documentsDB = new sdk.DocumentsDB(client); + +const result = await documentsDB.getIndex({ + databaseId: '', + collectionId: '', + key: '' +}); +``` diff --git a/examples/1.9.x/server-nodejs/examples/documentsdb/get-transaction.md b/examples/1.9.x/server-nodejs/examples/documentsdb/get-transaction.md new file mode 100644 index 000000000..74de2fc04 --- /dev/null +++ b/examples/1.9.x/server-nodejs/examples/documentsdb/get-transaction.md @@ -0,0 +1,14 @@ +```javascript +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('') // Your project ID + .setKey(''); // Your secret API key + +const documentsDB = new sdk.DocumentsDB(client); + +const result = await documentsDB.getTransaction({ + transactionId: '' +}); +``` diff --git a/examples/1.9.x/server-nodejs/examples/documentsdb/get.md b/examples/1.9.x/server-nodejs/examples/documentsdb/get.md new file mode 100644 index 000000000..5b8677080 --- /dev/null +++ b/examples/1.9.x/server-nodejs/examples/documentsdb/get.md @@ -0,0 +1,14 @@ +```javascript +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('') // Your project ID + .setKey(''); // Your secret API key + +const documentsDB = new sdk.DocumentsDB(client); + +const result = await documentsDB.get({ + databaseId: '' +}); +``` diff --git a/examples/1.9.x/server-nodejs/examples/documentsdb/increment-document-attribute.md b/examples/1.9.x/server-nodejs/examples/documentsdb/increment-document-attribute.md new file mode 100644 index 000000000..931d73c02 --- /dev/null +++ b/examples/1.9.x/server-nodejs/examples/documentsdb/increment-document-attribute.md @@ -0,0 +1,20 @@ +```javascript +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('') // Your project ID + .setSession(''); // The user session to authenticate with + +const documentsDB = new sdk.DocumentsDB(client); + +const result = await documentsDB.incrementDocumentAttribute({ + databaseId: '', + collectionId: '', + documentId: '', + attribute: '', + value: null, // optional + max: null, // optional + transactionId: '' // optional +}); +``` diff --git a/examples/1.9.x/server-nodejs/examples/documentsdb/list-collections.md b/examples/1.9.x/server-nodejs/examples/documentsdb/list-collections.md new file mode 100644 index 000000000..d640873eb --- /dev/null +++ b/examples/1.9.x/server-nodejs/examples/documentsdb/list-collections.md @@ -0,0 +1,17 @@ +```javascript +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('') // Your project ID + .setKey(''); // Your secret API key + +const documentsDB = new sdk.DocumentsDB(client); + +const result = await documentsDB.listCollections({ + databaseId: '', + queries: [], // optional + search: '', // optional + total: false // optional +}); +``` diff --git a/examples/1.9.x/server-nodejs/examples/documentsdb/list-documents.md b/examples/1.9.x/server-nodejs/examples/documentsdb/list-documents.md new file mode 100644 index 000000000..5d0617374 --- /dev/null +++ b/examples/1.9.x/server-nodejs/examples/documentsdb/list-documents.md @@ -0,0 +1,19 @@ +```javascript +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('') // Your project ID + .setSession(''); // The user session to authenticate with + +const documentsDB = new sdk.DocumentsDB(client); + +const result = await documentsDB.listDocuments({ + databaseId: '', + collectionId: '', + queries: [], // optional + transactionId: '', // optional + total: false, // optional + ttl: 0 // optional +}); +``` diff --git a/examples/1.9.x/server-nodejs/examples/documentsdb/list-indexes.md b/examples/1.9.x/server-nodejs/examples/documentsdb/list-indexes.md new file mode 100644 index 000000000..35c48a84c --- /dev/null +++ b/examples/1.9.x/server-nodejs/examples/documentsdb/list-indexes.md @@ -0,0 +1,17 @@ +```javascript +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('') // Your project ID + .setKey(''); // Your secret API key + +const documentsDB = new sdk.DocumentsDB(client); + +const result = await documentsDB.listIndexes({ + databaseId: '', + collectionId: '', + queries: [], // optional + total: false // optional +}); +``` diff --git a/examples/1.9.x/server-nodejs/examples/documentsdb/list-transactions.md b/examples/1.9.x/server-nodejs/examples/documentsdb/list-transactions.md new file mode 100644 index 000000000..5caad1f5e --- /dev/null +++ b/examples/1.9.x/server-nodejs/examples/documentsdb/list-transactions.md @@ -0,0 +1,14 @@ +```javascript +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('') // Your project ID + .setKey(''); // Your secret API key + +const documentsDB = new sdk.DocumentsDB(client); + +const result = await documentsDB.listTransactions({ + queries: [] // optional +}); +``` diff --git a/examples/1.9.x/server-nodejs/examples/documentsdb/list.md b/examples/1.9.x/server-nodejs/examples/documentsdb/list.md new file mode 100644 index 000000000..70ce780c9 --- /dev/null +++ b/examples/1.9.x/server-nodejs/examples/documentsdb/list.md @@ -0,0 +1,16 @@ +```javascript +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('') // Your project ID + .setKey(''); // Your secret API key + +const documentsDB = new sdk.DocumentsDB(client); + +const result = await documentsDB.list({ + queries: [], // optional + search: '', // optional + total: false // optional +}); +``` diff --git a/examples/1.9.x/server-nodejs/examples/documentsdb/update-collection.md b/examples/1.9.x/server-nodejs/examples/documentsdb/update-collection.md new file mode 100644 index 000000000..8fdb68a90 --- /dev/null +++ b/examples/1.9.x/server-nodejs/examples/documentsdb/update-collection.md @@ -0,0 +1,20 @@ +```javascript +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('') // Your project ID + .setKey(''); // Your secret API key + +const documentsDB = new sdk.DocumentsDB(client); + +const result = await documentsDB.updateCollection({ + databaseId: '', + collectionId: '', + name: '', + permissions: [sdk.Permission.read(sdk.Role.any())], // optional + documentSecurity: false, // optional + enabled: false, // optional + purge: false // optional +}); +``` diff --git a/examples/1.9.x/server-nodejs/examples/documentsdb/update-document.md b/examples/1.9.x/server-nodejs/examples/documentsdb/update-document.md new file mode 100644 index 000000000..17e2d8ff9 --- /dev/null +++ b/examples/1.9.x/server-nodejs/examples/documentsdb/update-document.md @@ -0,0 +1,19 @@ +```javascript +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('') // Your project ID + .setSession(''); // The user session to authenticate with + +const documentsDB = new sdk.DocumentsDB(client); + +const result = await documentsDB.updateDocument({ + databaseId: '', + collectionId: '', + documentId: '', + data: {}, // optional + permissions: [sdk.Permission.read(sdk.Role.any())], // optional + transactionId: '' // optional +}); +``` diff --git a/examples/1.9.x/server-nodejs/examples/documentsdb/update-documents.md b/examples/1.9.x/server-nodejs/examples/documentsdb/update-documents.md new file mode 100644 index 000000000..bb5869e62 --- /dev/null +++ b/examples/1.9.x/server-nodejs/examples/documentsdb/update-documents.md @@ -0,0 +1,18 @@ +```javascript +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('') // Your project ID + .setKey(''); // Your secret API key + +const documentsDB = new sdk.DocumentsDB(client); + +const result = await documentsDB.updateDocuments({ + databaseId: '', + collectionId: '', + data: {}, // optional + queries: [], // optional + transactionId: '' // optional +}); +``` diff --git a/examples/1.9.x/server-nodejs/examples/documentsdb/update-transaction.md b/examples/1.9.x/server-nodejs/examples/documentsdb/update-transaction.md new file mode 100644 index 000000000..2d5c1d658 --- /dev/null +++ b/examples/1.9.x/server-nodejs/examples/documentsdb/update-transaction.md @@ -0,0 +1,16 @@ +```javascript +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('') // Your project ID + .setKey(''); // Your secret API key + +const documentsDB = new sdk.DocumentsDB(client); + +const result = await documentsDB.updateTransaction({ + transactionId: '', + commit: false, // optional + rollback: false // optional +}); +``` diff --git a/examples/1.9.x/server-nodejs/examples/documentsdb/update.md b/examples/1.9.x/server-nodejs/examples/documentsdb/update.md new file mode 100644 index 000000000..bc41f2e8f --- /dev/null +++ b/examples/1.9.x/server-nodejs/examples/documentsdb/update.md @@ -0,0 +1,16 @@ +```javascript +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('') // Your project ID + .setKey(''); // Your secret API key + +const documentsDB = new sdk.DocumentsDB(client); + +const result = await documentsDB.update({ + databaseId: '', + name: '', + enabled: false // optional +}); +``` diff --git a/examples/1.9.x/server-nodejs/examples/documentsdb/upsert-document.md b/examples/1.9.x/server-nodejs/examples/documentsdb/upsert-document.md new file mode 100644 index 000000000..27d66b3bb --- /dev/null +++ b/examples/1.9.x/server-nodejs/examples/documentsdb/upsert-document.md @@ -0,0 +1,19 @@ +```javascript +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('') // Your project ID + .setSession(''); // The user session to authenticate with + +const documentsDB = new sdk.DocumentsDB(client); + +const result = await documentsDB.upsertDocument({ + databaseId: '', + collectionId: '', + documentId: '', + data: {}, // optional + permissions: [sdk.Permission.read(sdk.Role.any())], // optional + transactionId: '' // optional +}); +``` diff --git a/examples/1.9.x/server-nodejs/examples/documentsdb/upsert-documents.md b/examples/1.9.x/server-nodejs/examples/documentsdb/upsert-documents.md new file mode 100644 index 000000000..5efd848fe --- /dev/null +++ b/examples/1.9.x/server-nodejs/examples/documentsdb/upsert-documents.md @@ -0,0 +1,17 @@ +```javascript +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('') // Your project ID + .setKey(''); // Your secret API key + +const documentsDB = new sdk.DocumentsDB(client); + +const result = await documentsDB.upsertDocuments({ + databaseId: '', + collectionId: '', + documents: [], + transactionId: '' // optional +}); +``` diff --git a/examples/1.9.x/server-nodejs/examples/oauth2/approve.md b/examples/1.9.x/server-nodejs/examples/oauth2/approve.md new file mode 100644 index 000000000..64f473bcd --- /dev/null +++ b/examples/1.9.x/server-nodejs/examples/oauth2/approve.md @@ -0,0 +1,16 @@ +```javascript +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setSession('') // The user session to authenticate with + .setProject(''); // Your project ID + +const oauth2 = new sdk.Oauth2(client); + +const result = await oauth2.approve({ + grantId: '', + authorizationDetails: '', // optional + scope: '' // optional +}); +``` diff --git a/examples/1.9.x/server-nodejs/examples/oauth2/authorize-post.md b/examples/1.9.x/server-nodejs/examples/oauth2/authorize-post.md new file mode 100644 index 000000000..9d9317e95 --- /dev/null +++ b/examples/1.9.x/server-nodejs/examples/oauth2/authorize-post.md @@ -0,0 +1,27 @@ +```javascript +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setSession('') // The user session to authenticate with + .setProject(''); // Your project ID + +const oauth2 = new sdk.Oauth2(client); + +const result = await oauth2.authorizePost({ + clientId: '', // optional + redirectUri: 'https://example.com', // optional + responseType: '', // optional + scope: '', // optional + state: '', // optional + nonce: '', // optional + codeChallenge: '', // optional + codeChallengeMethod: 's256', // optional + prompt: '', // optional + maxAge: 0, // optional + authorizationDetails: '', // optional + resource: '', // optional + audience: '', // optional + requestUri: '' // optional +}); +``` diff --git a/examples/1.9.x/server-nodejs/examples/oauth2/authorize.md b/examples/1.9.x/server-nodejs/examples/oauth2/authorize.md new file mode 100644 index 000000000..10b6f6127 --- /dev/null +++ b/examples/1.9.x/server-nodejs/examples/oauth2/authorize.md @@ -0,0 +1,27 @@ +```javascript +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setSession('') // The user session to authenticate with + .setProject(''); // Your project ID + +const oauth2 = new sdk.Oauth2(client); + +const result = await oauth2.authorize({ + clientId: '', // optional + redirectUri: 'https://example.com', // optional + responseType: '', // optional + scope: '', // optional + state: '', // optional + nonce: '', // optional + codeChallenge: '', // optional + codeChallengeMethod: 's256', // optional + prompt: '', // optional + maxAge: 0, // optional + authorizationDetails: '', // optional + resource: '', // optional + audience: '', // optional + requestUri: '' // optional +}); +``` diff --git a/examples/1.9.x/server-nodejs/examples/oauth2/create-device-authorization.md b/examples/1.9.x/server-nodejs/examples/oauth2/create-device-authorization.md new file mode 100644 index 000000000..19710c71a --- /dev/null +++ b/examples/1.9.x/server-nodejs/examples/oauth2/create-device-authorization.md @@ -0,0 +1,18 @@ +```javascript +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setSession('') // The user session to authenticate with + .setProject(''); // Your project ID + +const oauth2 = new sdk.Oauth2(client); + +const result = await oauth2.createDeviceAuthorization({ + clientId: '', // optional + scope: '', // optional + authorizationDetails: '', // optional + resource: '', // optional + audience: '' // optional +}); +``` diff --git a/examples/1.9.x/server-nodejs/examples/oauth2/create-grant.md b/examples/1.9.x/server-nodejs/examples/oauth2/create-grant.md new file mode 100644 index 000000000..0f644eef2 --- /dev/null +++ b/examples/1.9.x/server-nodejs/examples/oauth2/create-grant.md @@ -0,0 +1,14 @@ +```javascript +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setSession('') // The user session to authenticate with + .setProject(''); // Your project ID + +const oauth2 = new sdk.Oauth2(client); + +const result = await oauth2.createGrant({ + userCode: '' +}); +``` diff --git a/examples/1.9.x/server-nodejs/examples/oauth2/create-par.md b/examples/1.9.x/server-nodejs/examples/oauth2/create-par.md new file mode 100644 index 000000000..70623e931 --- /dev/null +++ b/examples/1.9.x/server-nodejs/examples/oauth2/create-par.md @@ -0,0 +1,26 @@ +```javascript +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setSession('') // The user session to authenticate with + .setProject(''); // Your project ID + +const oauth2 = new sdk.Oauth2(client); + +const result = await oauth2.createPAR({ + clientId: '', + redirectUri: 'https://example.com', + responseType: 'code', + scope: '', // optional + state: '', // optional + nonce: '', // optional + codeChallenge: '', // optional + codeChallengeMethod: 's256', // optional + prompt: '', // optional + maxAge: 0, // optional + authorizationDetails: '', // optional + resource: '', // optional + audience: '' // optional +}); +``` diff --git a/examples/1.9.x/server-nodejs/examples/oauth2/create-token.md b/examples/1.9.x/server-nodejs/examples/oauth2/create-token.md new file mode 100644 index 000000000..e27883d77 --- /dev/null +++ b/examples/1.9.x/server-nodejs/examples/oauth2/create-token.md @@ -0,0 +1,23 @@ +```javascript +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setSession('') // The user session to authenticate with + .setProject(''); // Your project ID + +const oauth2 = new sdk.Oauth2(client); + +const result = await oauth2.createToken({ + grantType: '', + code: '', // optional + refreshToken: '', // optional + deviceCode: '', // optional + clientId: '', // optional + clientSecret: '', // optional + codeVerifier: '', // optional + redirectUri: 'https://example.com', // optional + resource: '', // optional + audience: '' // optional +}); +``` diff --git a/examples/1.9.x/server-nodejs/examples/oauth2/get-grant.md b/examples/1.9.x/server-nodejs/examples/oauth2/get-grant.md new file mode 100644 index 000000000..b61981284 --- /dev/null +++ b/examples/1.9.x/server-nodejs/examples/oauth2/get-grant.md @@ -0,0 +1,14 @@ +```javascript +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setSession('') // The user session to authenticate with + .setProject(''); // Your project ID + +const oauth2 = new sdk.Oauth2(client); + +const result = await oauth2.getGrant({ + grantId: '' +}); +``` diff --git a/examples/1.9.x/server-nodejs/examples/oauth2/list-organizations.md b/examples/1.9.x/server-nodejs/examples/oauth2/list-organizations.md new file mode 100644 index 000000000..b9503c218 --- /dev/null +++ b/examples/1.9.x/server-nodejs/examples/oauth2/list-organizations.md @@ -0,0 +1,16 @@ +```javascript +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setSession('') // The user session to authenticate with + .setProject(''); // Your project ID + +const oauth2 = new sdk.Oauth2(client); + +const result = await oauth2.listOrganizations({ + limit: 1, // optional + offset: 0, // optional + search: '' // optional +}); +``` diff --git a/examples/1.9.x/server-nodejs/examples/oauth2/list-projects.md b/examples/1.9.x/server-nodejs/examples/oauth2/list-projects.md new file mode 100644 index 000000000..95e89e927 --- /dev/null +++ b/examples/1.9.x/server-nodejs/examples/oauth2/list-projects.md @@ -0,0 +1,16 @@ +```javascript +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setSession('') // The user session to authenticate with + .setProject(''); // Your project ID + +const oauth2 = new sdk.Oauth2(client); + +const result = await oauth2.listProjects({ + limit: 1, // optional + offset: 0, // optional + search: '' // optional +}); +``` diff --git a/examples/1.9.x/server-nodejs/examples/oauth2/reject.md b/examples/1.9.x/server-nodejs/examples/oauth2/reject.md new file mode 100644 index 000000000..5e5a8ffb7 --- /dev/null +++ b/examples/1.9.x/server-nodejs/examples/oauth2/reject.md @@ -0,0 +1,14 @@ +```javascript +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setSession('') // The user session to authenticate with + .setProject(''); // Your project ID + +const oauth2 = new sdk.Oauth2(client); + +const result = await oauth2.reject({ + grantId: '' +}); +``` diff --git a/examples/1.9.x/server-nodejs/examples/oauth2/revoke.md b/examples/1.9.x/server-nodejs/examples/oauth2/revoke.md new file mode 100644 index 000000000..e853410a9 --- /dev/null +++ b/examples/1.9.x/server-nodejs/examples/oauth2/revoke.md @@ -0,0 +1,17 @@ +```javascript +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setSession('') // The user session to authenticate with + .setProject(''); // Your project ID + +const oauth2 = new sdk.Oauth2(client); + +const result = await oauth2.revoke({ + token: '', + tokenTypeHint: 'access_token', // optional + clientId: '', // optional + clientSecret: '' // optional +}); +``` diff --git a/examples/1.9.x/server-nodejs/examples/organization/create-installation.md b/examples/1.9.x/server-nodejs/examples/organization/create-installation.md new file mode 100644 index 000000000..56558fd0a --- /dev/null +++ b/examples/1.9.x/server-nodejs/examples/organization/create-installation.md @@ -0,0 +1,15 @@ +```javascript +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('') // Your project ID + .setSession(''); // The user session to authenticate with + +const organization = new sdk.Organization(client); + +const result = await organization.createInstallation({ + appId: '', + authorizationDetails: '' // optional +}); +``` diff --git a/examples/1.9.x/server-nodejs/examples/organization/delete-installation.md b/examples/1.9.x/server-nodejs/examples/organization/delete-installation.md new file mode 100644 index 000000000..afc3be5af --- /dev/null +++ b/examples/1.9.x/server-nodejs/examples/organization/delete-installation.md @@ -0,0 +1,14 @@ +```javascript +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('') // Your project ID + .setSession(''); // The user session to authenticate with + +const organization = new sdk.Organization(client); + +const result = await organization.deleteInstallation({ + installationId: '' +}); +``` diff --git a/examples/1.9.x/server-nodejs/examples/organization/get-installation.md b/examples/1.9.x/server-nodejs/examples/organization/get-installation.md new file mode 100644 index 000000000..e5ed10ee5 --- /dev/null +++ b/examples/1.9.x/server-nodejs/examples/organization/get-installation.md @@ -0,0 +1,14 @@ +```javascript +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('') // Your project ID + .setSession(''); // The user session to authenticate with + +const organization = new sdk.Organization(client); + +const result = await organization.getInstallation({ + installationId: '' +}); +``` diff --git a/examples/1.9.x/server-nodejs/examples/organization/list-installations.md b/examples/1.9.x/server-nodejs/examples/organization/list-installations.md new file mode 100644 index 000000000..91f6b6665 --- /dev/null +++ b/examples/1.9.x/server-nodejs/examples/organization/list-installations.md @@ -0,0 +1,15 @@ +```javascript +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('') // Your project ID + .setSession(''); // The user session to authenticate with + +const organization = new sdk.Organization(client); + +const result = await organization.listInstallations({ + queries: [], // optional + total: false // optional +}); +``` diff --git a/examples/1.9.x/server-nodejs/examples/organization/update-installation.md b/examples/1.9.x/server-nodejs/examples/organization/update-installation.md new file mode 100644 index 000000000..59ccac7b4 --- /dev/null +++ b/examples/1.9.x/server-nodejs/examples/organization/update-installation.md @@ -0,0 +1,15 @@ +```javascript +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('') // Your project ID + .setSession(''); // The user session to authenticate with + +const organization = new sdk.Organization(client); + +const result = await organization.updateInstallation({ + installationId: '', + authorizationDetails: '' // optional +}); +``` diff --git a/examples/1.9.x/server-nodejs/examples/project/update-o-auth-2-server.md b/examples/1.9.x/server-nodejs/examples/project/update-o-auth-2-server.md index 0cd95aeeb..a34a5fc64 100644 --- a/examples/1.9.x/server-nodejs/examples/project/update-o-auth-2-server.md +++ b/examples/1.9.x/server-nodejs/examples/project/update-o-auth-2-server.md @@ -17,6 +17,7 @@ const result = await project.updateOAuth2Server({ refreshTokenDuration: 60, // optional publicAccessTokenDuration: 60, // optional publicRefreshTokenDuration: 60, // optional + installationAccessTokenDuration: 60, // optional confidentialPkce: false, // optional verificationUrl: 'https://example.com', // optional userCodeLength: 6, // optional diff --git a/examples/1.9.x/server-nodejs/examples/teams/create-installation.md b/examples/1.9.x/server-nodejs/examples/teams/create-installation.md new file mode 100644 index 000000000..e84f9d89a --- /dev/null +++ b/examples/1.9.x/server-nodejs/examples/teams/create-installation.md @@ -0,0 +1,16 @@ +```javascript +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('') // Your project ID + .setSession(''); // The user session to authenticate with + +const teams = new sdk.Teams(client); + +const result = await teams.createInstallation({ + teamId: '', + appId: '', + authorizationDetails: '' // optional +}); +``` diff --git a/examples/1.9.x/server-nodejs/examples/teams/delete-installation.md b/examples/1.9.x/server-nodejs/examples/teams/delete-installation.md new file mode 100644 index 000000000..d36312902 --- /dev/null +++ b/examples/1.9.x/server-nodejs/examples/teams/delete-installation.md @@ -0,0 +1,15 @@ +```javascript +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('') // Your project ID + .setSession(''); // The user session to authenticate with + +const teams = new sdk.Teams(client); + +const result = await teams.deleteInstallation({ + teamId: '', + installationId: '' +}); +``` diff --git a/examples/1.9.x/server-nodejs/examples/teams/get-installation.md b/examples/1.9.x/server-nodejs/examples/teams/get-installation.md new file mode 100644 index 000000000..47c71f3a2 --- /dev/null +++ b/examples/1.9.x/server-nodejs/examples/teams/get-installation.md @@ -0,0 +1,15 @@ +```javascript +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('') // Your project ID + .setSession(''); // The user session to authenticate with + +const teams = new sdk.Teams(client); + +const result = await teams.getInstallation({ + teamId: '', + installationId: '' +}); +``` diff --git a/examples/1.9.x/server-nodejs/examples/teams/list-installations.md b/examples/1.9.x/server-nodejs/examples/teams/list-installations.md new file mode 100644 index 000000000..ecd4c4202 --- /dev/null +++ b/examples/1.9.x/server-nodejs/examples/teams/list-installations.md @@ -0,0 +1,16 @@ +```javascript +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('') // Your project ID + .setSession(''); // The user session to authenticate with + +const teams = new sdk.Teams(client); + +const result = await teams.listInstallations({ + teamId: '', + queries: [], // optional + total: false // optional +}); +``` diff --git a/examples/1.9.x/server-nodejs/examples/teams/update-installation.md b/examples/1.9.x/server-nodejs/examples/teams/update-installation.md new file mode 100644 index 000000000..f62bdfc75 --- /dev/null +++ b/examples/1.9.x/server-nodejs/examples/teams/update-installation.md @@ -0,0 +1,16 @@ +```javascript +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('') // Your project ID + .setSession(''); // The user session to authenticate with + +const teams = new sdk.Teams(client); + +const result = await teams.updateInstallation({ + teamId: '', + installationId: '', + authorizationDetails: '' // optional +}); +``` diff --git a/examples/1.9.x/server-nodejs/examples/vectorsdb/create-collection.md b/examples/1.9.x/server-nodejs/examples/vectorsdb/create-collection.md new file mode 100644 index 000000000..8745693d5 --- /dev/null +++ b/examples/1.9.x/server-nodejs/examples/vectorsdb/create-collection.md @@ -0,0 +1,20 @@ +```javascript +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('') // Your project ID + .setKey(''); // Your secret API key + +const vectorsDB = new sdk.VectorsDB(client); + +const result = await vectorsDB.createCollection({ + databaseId: '', + collectionId: '', + name: '', + dimension: 1, + permissions: [sdk.Permission.read(sdk.Role.any())], // optional + documentSecurity: false, // optional + enabled: false // optional +}); +``` diff --git a/examples/1.9.x/server-nodejs/examples/vectorsdb/create-document.md b/examples/1.9.x/server-nodejs/examples/vectorsdb/create-document.md new file mode 100644 index 000000000..dc007a918 --- /dev/null +++ b/examples/1.9.x/server-nodejs/examples/vectorsdb/create-document.md @@ -0,0 +1,28 @@ +```javascript +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('') // Your project ID + .setSession(''); // The user session to authenticate with + +const vectorsDB = new sdk.VectorsDB(client); + +const result = await vectorsDB.createDocument({ + databaseId: '', + collectionId: '', + documentId: '', + data: { + "embeddings": [ + 0.12, + -0.55, + 0.88, + 1.02 + ], + "metadata": { + "key": "value" + } + }, + permissions: [sdk.Permission.read(sdk.Role.any())] // optional +}); +``` diff --git a/examples/1.9.x/server-nodejs/examples/vectorsdb/create-documents.md b/examples/1.9.x/server-nodejs/examples/vectorsdb/create-documents.md new file mode 100644 index 000000000..04cad8caf --- /dev/null +++ b/examples/1.9.x/server-nodejs/examples/vectorsdb/create-documents.md @@ -0,0 +1,16 @@ +```javascript +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('') // Your project ID + .setKey(''); // Your secret API key + +const vectorsDB = new sdk.VectorsDB(client); + +const result = await vectorsDB.createDocuments({ + databaseId: '', + collectionId: '', + documents: [] +}); +``` diff --git a/examples/1.9.x/server-nodejs/examples/vectorsdb/create-index.md b/examples/1.9.x/server-nodejs/examples/vectorsdb/create-index.md new file mode 100644 index 000000000..b865aa6f8 --- /dev/null +++ b/examples/1.9.x/server-nodejs/examples/vectorsdb/create-index.md @@ -0,0 +1,20 @@ +```javascript +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('') // Your project ID + .setKey(''); // Your secret API key + +const vectorsDB = new sdk.VectorsDB(client); + +const result = await vectorsDB.createIndex({ + databaseId: '', + collectionId: '', + key: '', + type: sdk.VectorsDBIndexType.HnswEuclidean, + attributes: [], + orders: [sdk.OrderBy.Asc], // optional + lengths: [] // optional +}); +``` diff --git a/examples/1.9.x/server-nodejs/examples/vectorsdb/create-operations.md b/examples/1.9.x/server-nodejs/examples/vectorsdb/create-operations.md new file mode 100644 index 000000000..f88589576 --- /dev/null +++ b/examples/1.9.x/server-nodejs/examples/vectorsdb/create-operations.md @@ -0,0 +1,25 @@ +```javascript +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('') // Your project ID + .setKey(''); // Your secret API key + +const vectorsDB = new sdk.VectorsDB(client); + +const result = await vectorsDB.createOperations({ + transactionId: '', + operations: [ + { + "action": "create", + "databaseId": "", + "collectionId": "", + "documentId": "", + "data": { + "name": "Walter O'Brien" + } + } + ] // optional +}); +``` diff --git a/examples/1.9.x/server-nodejs/examples/vectorsdb/create-query.md b/examples/1.9.x/server-nodejs/examples/vectorsdb/create-query.md new file mode 100644 index 000000000..e693e1a15 --- /dev/null +++ b/examples/1.9.x/server-nodejs/examples/vectorsdb/create-query.md @@ -0,0 +1,19 @@ +```javascript +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('') // Your project ID + .setSession(''); // The user session to authenticate with + +const vectorsDB = new sdk.VectorsDB(client); + +const result = await vectorsDB.createQuery({ + databaseId: '', + collectionId: '', + queries: [], // optional + transactionId: '', // optional + total: false, // optional + ttl: 0 // optional +}); +``` diff --git a/examples/1.9.x/server-nodejs/examples/vectorsdb/create-text-embeddings.md b/examples/1.9.x/server-nodejs/examples/vectorsdb/create-text-embeddings.md new file mode 100644 index 000000000..ce4a4b7ec --- /dev/null +++ b/examples/1.9.x/server-nodejs/examples/vectorsdb/create-text-embeddings.md @@ -0,0 +1,15 @@ +```javascript +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('') // Your project ID + .setKey(''); // Your secret API key + +const vectorsDB = new sdk.VectorsDB(client); + +const result = await vectorsDB.createTextEmbeddings({ + texts: [], + model: sdk.EmbeddingModel.NomicEmbedText // optional +}); +``` diff --git a/examples/1.9.x/server-nodejs/examples/vectorsdb/create-transaction.md b/examples/1.9.x/server-nodejs/examples/vectorsdb/create-transaction.md new file mode 100644 index 000000000..ef39679c8 --- /dev/null +++ b/examples/1.9.x/server-nodejs/examples/vectorsdb/create-transaction.md @@ -0,0 +1,14 @@ +```javascript +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('') // Your project ID + .setKey(''); // Your secret API key + +const vectorsDB = new sdk.VectorsDB(client); + +const result = await vectorsDB.createTransaction({ + ttl: 60 // optional +}); +``` diff --git a/examples/1.9.x/server-nodejs/examples/vectorsdb/create.md b/examples/1.9.x/server-nodejs/examples/vectorsdb/create.md new file mode 100644 index 000000000..e7177fa56 --- /dev/null +++ b/examples/1.9.x/server-nodejs/examples/vectorsdb/create.md @@ -0,0 +1,16 @@ +```javascript +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('') // Your project ID + .setKey(''); // Your secret API key + +const vectorsDB = new sdk.VectorsDB(client); + +const result = await vectorsDB.create({ + databaseId: '', + name: '', + enabled: false // optional +}); +``` diff --git a/examples/1.9.x/server-nodejs/examples/vectorsdb/delete-collection.md b/examples/1.9.x/server-nodejs/examples/vectorsdb/delete-collection.md new file mode 100644 index 000000000..5e66e78d5 --- /dev/null +++ b/examples/1.9.x/server-nodejs/examples/vectorsdb/delete-collection.md @@ -0,0 +1,15 @@ +```javascript +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('') // Your project ID + .setKey(''); // Your secret API key + +const vectorsDB = new sdk.VectorsDB(client); + +const result = await vectorsDB.deleteCollection({ + databaseId: '', + collectionId: '' +}); +``` diff --git a/examples/1.9.x/server-nodejs/examples/vectorsdb/delete-document.md b/examples/1.9.x/server-nodejs/examples/vectorsdb/delete-document.md new file mode 100644 index 000000000..0e115e86d --- /dev/null +++ b/examples/1.9.x/server-nodejs/examples/vectorsdb/delete-document.md @@ -0,0 +1,17 @@ +```javascript +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('') // Your project ID + .setSession(''); // The user session to authenticate with + +const vectorsDB = new sdk.VectorsDB(client); + +const result = await vectorsDB.deleteDocument({ + databaseId: '', + collectionId: '', + documentId: '', + transactionId: '' // optional +}); +``` diff --git a/examples/1.9.x/server-nodejs/examples/vectorsdb/delete-documents.md b/examples/1.9.x/server-nodejs/examples/vectorsdb/delete-documents.md new file mode 100644 index 000000000..7c8d2eca0 --- /dev/null +++ b/examples/1.9.x/server-nodejs/examples/vectorsdb/delete-documents.md @@ -0,0 +1,17 @@ +```javascript +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('') // Your project ID + .setKey(''); // Your secret API key + +const vectorsDB = new sdk.VectorsDB(client); + +const result = await vectorsDB.deleteDocuments({ + databaseId: '', + collectionId: '', + queries: [], // optional + transactionId: '' // optional +}); +``` diff --git a/examples/1.9.x/server-nodejs/examples/vectorsdb/delete-index.md b/examples/1.9.x/server-nodejs/examples/vectorsdb/delete-index.md new file mode 100644 index 000000000..8c09bf5a1 --- /dev/null +++ b/examples/1.9.x/server-nodejs/examples/vectorsdb/delete-index.md @@ -0,0 +1,16 @@ +```javascript +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('') // Your project ID + .setKey(''); // Your secret API key + +const vectorsDB = new sdk.VectorsDB(client); + +const result = await vectorsDB.deleteIndex({ + databaseId: '', + collectionId: '', + key: '' +}); +``` diff --git a/examples/1.9.x/server-nodejs/examples/vectorsdb/delete-transaction.md b/examples/1.9.x/server-nodejs/examples/vectorsdb/delete-transaction.md new file mode 100644 index 000000000..7b361c612 --- /dev/null +++ b/examples/1.9.x/server-nodejs/examples/vectorsdb/delete-transaction.md @@ -0,0 +1,14 @@ +```javascript +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('') // Your project ID + .setKey(''); // Your secret API key + +const vectorsDB = new sdk.VectorsDB(client); + +const result = await vectorsDB.deleteTransaction({ + transactionId: '' +}); +``` diff --git a/examples/1.9.x/server-nodejs/examples/vectorsdb/delete.md b/examples/1.9.x/server-nodejs/examples/vectorsdb/delete.md new file mode 100644 index 000000000..3a2d160f9 --- /dev/null +++ b/examples/1.9.x/server-nodejs/examples/vectorsdb/delete.md @@ -0,0 +1,14 @@ +```javascript +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('') // Your project ID + .setKey(''); // Your secret API key + +const vectorsDB = new sdk.VectorsDB(client); + +const result = await vectorsDB.delete({ + databaseId: '' +}); +``` diff --git a/examples/1.9.x/server-nodejs/examples/vectorsdb/get-collection.md b/examples/1.9.x/server-nodejs/examples/vectorsdb/get-collection.md new file mode 100644 index 000000000..0f419ffb2 --- /dev/null +++ b/examples/1.9.x/server-nodejs/examples/vectorsdb/get-collection.md @@ -0,0 +1,15 @@ +```javascript +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('') // Your project ID + .setKey(''); // Your secret API key + +const vectorsDB = new sdk.VectorsDB(client); + +const result = await vectorsDB.getCollection({ + databaseId: '', + collectionId: '' +}); +``` diff --git a/examples/1.9.x/server-nodejs/examples/vectorsdb/get-document.md b/examples/1.9.x/server-nodejs/examples/vectorsdb/get-document.md new file mode 100644 index 000000000..568c4f53c --- /dev/null +++ b/examples/1.9.x/server-nodejs/examples/vectorsdb/get-document.md @@ -0,0 +1,18 @@ +```javascript +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('') // Your project ID + .setSession(''); // The user session to authenticate with + +const vectorsDB = new sdk.VectorsDB(client); + +const result = await vectorsDB.getDocument({ + databaseId: '', + collectionId: '', + documentId: '', + queries: [], // optional + transactionId: '' // optional +}); +``` diff --git a/examples/1.9.x/server-nodejs/examples/vectorsdb/get-index.md b/examples/1.9.x/server-nodejs/examples/vectorsdb/get-index.md new file mode 100644 index 000000000..34a337b13 --- /dev/null +++ b/examples/1.9.x/server-nodejs/examples/vectorsdb/get-index.md @@ -0,0 +1,16 @@ +```javascript +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('') // Your project ID + .setKey(''); // Your secret API key + +const vectorsDB = new sdk.VectorsDB(client); + +const result = await vectorsDB.getIndex({ + databaseId: '', + collectionId: '', + key: '' +}); +``` diff --git a/examples/1.9.x/server-nodejs/examples/vectorsdb/get-transaction.md b/examples/1.9.x/server-nodejs/examples/vectorsdb/get-transaction.md new file mode 100644 index 000000000..9240c0057 --- /dev/null +++ b/examples/1.9.x/server-nodejs/examples/vectorsdb/get-transaction.md @@ -0,0 +1,14 @@ +```javascript +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('') // Your project ID + .setKey(''); // Your secret API key + +const vectorsDB = new sdk.VectorsDB(client); + +const result = await vectorsDB.getTransaction({ + transactionId: '' +}); +``` diff --git a/examples/1.9.x/server-nodejs/examples/vectorsdb/get.md b/examples/1.9.x/server-nodejs/examples/vectorsdb/get.md new file mode 100644 index 000000000..4660d56aa --- /dev/null +++ b/examples/1.9.x/server-nodejs/examples/vectorsdb/get.md @@ -0,0 +1,14 @@ +```javascript +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('') // Your project ID + .setKey(''); // Your secret API key + +const vectorsDB = new sdk.VectorsDB(client); + +const result = await vectorsDB.get({ + databaseId: '' +}); +``` diff --git a/examples/1.9.x/server-nodejs/examples/vectorsdb/list-collections.md b/examples/1.9.x/server-nodejs/examples/vectorsdb/list-collections.md new file mode 100644 index 000000000..3e28a4828 --- /dev/null +++ b/examples/1.9.x/server-nodejs/examples/vectorsdb/list-collections.md @@ -0,0 +1,17 @@ +```javascript +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('') // Your project ID + .setKey(''); // Your secret API key + +const vectorsDB = new sdk.VectorsDB(client); + +const result = await vectorsDB.listCollections({ + databaseId: '', + queries: [], // optional + search: '', // optional + total: false // optional +}); +``` diff --git a/examples/1.9.x/server-nodejs/examples/vectorsdb/list-documents.md b/examples/1.9.x/server-nodejs/examples/vectorsdb/list-documents.md new file mode 100644 index 000000000..34d00aa44 --- /dev/null +++ b/examples/1.9.x/server-nodejs/examples/vectorsdb/list-documents.md @@ -0,0 +1,19 @@ +```javascript +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('') // Your project ID + .setSession(''); // The user session to authenticate with + +const vectorsDB = new sdk.VectorsDB(client); + +const result = await vectorsDB.listDocuments({ + databaseId: '', + collectionId: '', + queries: [], // optional + transactionId: '', // optional + total: false, // optional + ttl: 0 // optional +}); +``` diff --git a/examples/1.9.x/server-nodejs/examples/vectorsdb/list-indexes.md b/examples/1.9.x/server-nodejs/examples/vectorsdb/list-indexes.md new file mode 100644 index 000000000..c72892537 --- /dev/null +++ b/examples/1.9.x/server-nodejs/examples/vectorsdb/list-indexes.md @@ -0,0 +1,17 @@ +```javascript +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('') // Your project ID + .setKey(''); // Your secret API key + +const vectorsDB = new sdk.VectorsDB(client); + +const result = await vectorsDB.listIndexes({ + databaseId: '', + collectionId: '', + queries: [], // optional + total: false // optional +}); +``` diff --git a/examples/1.9.x/server-nodejs/examples/vectorsdb/list-transactions.md b/examples/1.9.x/server-nodejs/examples/vectorsdb/list-transactions.md new file mode 100644 index 000000000..2a7ab7789 --- /dev/null +++ b/examples/1.9.x/server-nodejs/examples/vectorsdb/list-transactions.md @@ -0,0 +1,14 @@ +```javascript +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('') // Your project ID + .setKey(''); // Your secret API key + +const vectorsDB = new sdk.VectorsDB(client); + +const result = await vectorsDB.listTransactions({ + queries: [] // optional +}); +``` diff --git a/examples/1.9.x/server-nodejs/examples/vectorsdb/list.md b/examples/1.9.x/server-nodejs/examples/vectorsdb/list.md new file mode 100644 index 000000000..b067d0a4d --- /dev/null +++ b/examples/1.9.x/server-nodejs/examples/vectorsdb/list.md @@ -0,0 +1,16 @@ +```javascript +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('') // Your project ID + .setKey(''); // Your secret API key + +const vectorsDB = new sdk.VectorsDB(client); + +const result = await vectorsDB.list({ + queries: [], // optional + search: '', // optional + total: false // optional +}); +``` diff --git a/examples/1.9.x/server-nodejs/examples/vectorsdb/update-collection.md b/examples/1.9.x/server-nodejs/examples/vectorsdb/update-collection.md new file mode 100644 index 000000000..ecfb1d53f --- /dev/null +++ b/examples/1.9.x/server-nodejs/examples/vectorsdb/update-collection.md @@ -0,0 +1,20 @@ +```javascript +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('') // Your project ID + .setKey(''); // Your secret API key + +const vectorsDB = new sdk.VectorsDB(client); + +const result = await vectorsDB.updateCollection({ + databaseId: '', + collectionId: '', + name: '', + dimension: 1, // optional + permissions: [sdk.Permission.read(sdk.Role.any())], // optional + documentSecurity: false, // optional + enabled: false // optional +}); +``` diff --git a/examples/1.9.x/server-nodejs/examples/vectorsdb/update-document.md b/examples/1.9.x/server-nodejs/examples/vectorsdb/update-document.md new file mode 100644 index 000000000..050910374 --- /dev/null +++ b/examples/1.9.x/server-nodejs/examples/vectorsdb/update-document.md @@ -0,0 +1,19 @@ +```javascript +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('') // Your project ID + .setSession(''); // The user session to authenticate with + +const vectorsDB = new sdk.VectorsDB(client); + +const result = await vectorsDB.updateDocument({ + databaseId: '', + collectionId: '', + documentId: '', + data: {}, // optional + permissions: [sdk.Permission.read(sdk.Role.any())], // optional + transactionId: '' // optional +}); +``` diff --git a/examples/1.9.x/server-nodejs/examples/vectorsdb/update-documents.md b/examples/1.9.x/server-nodejs/examples/vectorsdb/update-documents.md new file mode 100644 index 000000000..58733e791 --- /dev/null +++ b/examples/1.9.x/server-nodejs/examples/vectorsdb/update-documents.md @@ -0,0 +1,18 @@ +```javascript +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('') // Your project ID + .setKey(''); // Your secret API key + +const vectorsDB = new sdk.VectorsDB(client); + +const result = await vectorsDB.updateDocuments({ + databaseId: '', + collectionId: '', + data: {}, // optional + queries: [], // optional + transactionId: '' // optional +}); +``` diff --git a/examples/1.9.x/server-nodejs/examples/vectorsdb/update-transaction.md b/examples/1.9.x/server-nodejs/examples/vectorsdb/update-transaction.md new file mode 100644 index 000000000..37c14a1b5 --- /dev/null +++ b/examples/1.9.x/server-nodejs/examples/vectorsdb/update-transaction.md @@ -0,0 +1,16 @@ +```javascript +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('') // Your project ID + .setKey(''); // Your secret API key + +const vectorsDB = new sdk.VectorsDB(client); + +const result = await vectorsDB.updateTransaction({ + transactionId: '', + commit: false, // optional + rollback: false // optional +}); +``` diff --git a/examples/1.9.x/server-nodejs/examples/vectorsdb/update.md b/examples/1.9.x/server-nodejs/examples/vectorsdb/update.md new file mode 100644 index 000000000..ff7d737e0 --- /dev/null +++ b/examples/1.9.x/server-nodejs/examples/vectorsdb/update.md @@ -0,0 +1,16 @@ +```javascript +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('') // Your project ID + .setKey(''); // Your secret API key + +const vectorsDB = new sdk.VectorsDB(client); + +const result = await vectorsDB.update({ + databaseId: '', + name: '', + enabled: false // optional +}); +``` diff --git a/examples/1.9.x/server-nodejs/examples/vectorsdb/upsert-document.md b/examples/1.9.x/server-nodejs/examples/vectorsdb/upsert-document.md new file mode 100644 index 000000000..96c823aa1 --- /dev/null +++ b/examples/1.9.x/server-nodejs/examples/vectorsdb/upsert-document.md @@ -0,0 +1,19 @@ +```javascript +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('') // Your project ID + .setSession(''); // The user session to authenticate with + +const vectorsDB = new sdk.VectorsDB(client); + +const result = await vectorsDB.upsertDocument({ + databaseId: '', + collectionId: '', + documentId: '', + data: {}, // optional + permissions: [sdk.Permission.read(sdk.Role.any())], // optional + transactionId: '' // optional +}); +``` diff --git a/examples/1.9.x/server-nodejs/examples/vectorsdb/upsert-documents.md b/examples/1.9.x/server-nodejs/examples/vectorsdb/upsert-documents.md new file mode 100644 index 000000000..36e20ac7b --- /dev/null +++ b/examples/1.9.x/server-nodejs/examples/vectorsdb/upsert-documents.md @@ -0,0 +1,17 @@ +```javascript +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('') // Your project ID + .setKey(''); // Your secret API key + +const vectorsDB = new sdk.VectorsDB(client); + +const result = await vectorsDB.upsertDocuments({ + databaseId: '', + collectionId: '', + documents: [], + transactionId: '' // optional +}); +``` diff --git a/examples/1.9.x/server-php/examples/apps/create-installation-token.md b/examples/1.9.x/server-php/examples/apps/create-installation-token.md new file mode 100644 index 000000000..ef4ca3809 --- /dev/null +++ b/examples/1.9.x/server-php/examples/apps/create-installation-token.md @@ -0,0 +1,17 @@ +```php +setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('') // Your project ID + ->setKey(''); // Your secret API key + +$apps = new Apps($client); + +$result = $apps->createInstallationToken( + appId: '', + installationId: '' +);``` diff --git a/examples/1.9.x/server-php/examples/apps/create-key.md b/examples/1.9.x/server-php/examples/apps/create-key.md new file mode 100644 index 000000000..7690aeaa8 --- /dev/null +++ b/examples/1.9.x/server-php/examples/apps/create-key.md @@ -0,0 +1,16 @@ +```php +setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('') // Your project ID + ->setSession(''); // The user session to authenticate with + +$apps = new Apps($client); + +$result = $apps->createKey( + appId: '' +);``` diff --git a/examples/1.9.x/server-php/examples/apps/create-secret.md b/examples/1.9.x/server-php/examples/apps/create-secret.md new file mode 100644 index 000000000..cff66b3b3 --- /dev/null +++ b/examples/1.9.x/server-php/examples/apps/create-secret.md @@ -0,0 +1,16 @@ +```php +setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('') // Your project ID + ->setSession(''); // The user session to authenticate with + +$apps = new Apps($client); + +$result = $apps->createSecret( + appId: '' +);``` diff --git a/examples/1.9.x/server-php/examples/apps/create.md b/examples/1.9.x/server-php/examples/apps/create.md new file mode 100644 index 000000000..8c7c2869b --- /dev/null +++ b/examples/1.9.x/server-php/examples/apps/create.md @@ -0,0 +1,34 @@ +```php +setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('') // Your project ID + ->setSession(''); // The user session to authenticate with + +$apps = new Apps($client); + +$result = $apps->create( + appId: '', + name: '', + redirectUris: [], + description: '', // optional + clientUri: 'https://example.com', // optional + logoUri: 'https://example.com', // optional + privacyPolicyUrl: 'https://example.com', // optional + termsUrl: 'https://example.com', // optional + contacts: [], // optional + tagline: '', // optional + tags: [], // optional + images: [], // optional + supportUrl: 'https://example.com', // optional + dataDeletionUrl: 'https://example.com', // optional + postLogoutRedirectUris: [], // optional + enabled: false, // optional + type: 'public', // optional + deviceFlow: false, // optional + teamId: '' // optional +);``` diff --git a/examples/1.9.x/server-php/examples/apps/delete-key.md b/examples/1.9.x/server-php/examples/apps/delete-key.md new file mode 100644 index 000000000..d07194eb6 --- /dev/null +++ b/examples/1.9.x/server-php/examples/apps/delete-key.md @@ -0,0 +1,17 @@ +```php +setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('') // Your project ID + ->setSession(''); // The user session to authenticate with + +$apps = new Apps($client); + +$result = $apps->deleteKey( + appId: '', + keyId: '' +);``` diff --git a/examples/1.9.x/server-php/examples/apps/delete-secret.md b/examples/1.9.x/server-php/examples/apps/delete-secret.md new file mode 100644 index 000000000..df614d6a1 --- /dev/null +++ b/examples/1.9.x/server-php/examples/apps/delete-secret.md @@ -0,0 +1,17 @@ +```php +setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('') // Your project ID + ->setSession(''); // The user session to authenticate with + +$apps = new Apps($client); + +$result = $apps->deleteSecret( + appId: '', + secretId: '' +);``` diff --git a/examples/1.9.x/server-php/examples/apps/delete-tokens.md b/examples/1.9.x/server-php/examples/apps/delete-tokens.md new file mode 100644 index 000000000..200cb9246 --- /dev/null +++ b/examples/1.9.x/server-php/examples/apps/delete-tokens.md @@ -0,0 +1,16 @@ +```php +setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('') // Your project ID + ->setSession(''); // The user session to authenticate with + +$apps = new Apps($client); + +$result = $apps->deleteTokens( + appId: '' +);``` diff --git a/examples/1.9.x/server-php/examples/apps/delete.md b/examples/1.9.x/server-php/examples/apps/delete.md new file mode 100644 index 000000000..38cfcf551 --- /dev/null +++ b/examples/1.9.x/server-php/examples/apps/delete.md @@ -0,0 +1,16 @@ +```php +setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('') // Your project ID + ->setSession(''); // The user session to authenticate with + +$apps = new Apps($client); + +$result = $apps->delete( + appId: '' +);``` diff --git a/examples/1.9.x/server-php/examples/apps/get-installation.md b/examples/1.9.x/server-php/examples/apps/get-installation.md new file mode 100644 index 000000000..63de2616a --- /dev/null +++ b/examples/1.9.x/server-php/examples/apps/get-installation.md @@ -0,0 +1,17 @@ +```php +setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('') // Your project ID + ->setKey(''); // Your secret API key + +$apps = new Apps($client); + +$result = $apps->getInstallation( + appId: '', + installationId: '' +);``` diff --git a/examples/1.9.x/server-php/examples/apps/get-key.md b/examples/1.9.x/server-php/examples/apps/get-key.md new file mode 100644 index 000000000..78e30e196 --- /dev/null +++ b/examples/1.9.x/server-php/examples/apps/get-key.md @@ -0,0 +1,17 @@ +```php +setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('') // Your project ID + ->setSession(''); // The user session to authenticate with + +$apps = new Apps($client); + +$result = $apps->getKey( + appId: '', + keyId: '' +);``` diff --git a/examples/1.9.x/server-php/examples/apps/get-secret.md b/examples/1.9.x/server-php/examples/apps/get-secret.md new file mode 100644 index 000000000..ef4c1d4fb --- /dev/null +++ b/examples/1.9.x/server-php/examples/apps/get-secret.md @@ -0,0 +1,17 @@ +```php +setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('') // Your project ID + ->setSession(''); // The user session to authenticate with + +$apps = new Apps($client); + +$result = $apps->getSecret( + appId: '', + secretId: '' +);``` diff --git a/examples/1.9.x/server-php/examples/apps/get.md b/examples/1.9.x/server-php/examples/apps/get.md new file mode 100644 index 000000000..7c9ce18ae --- /dev/null +++ b/examples/1.9.x/server-php/examples/apps/get.md @@ -0,0 +1,16 @@ +```php +setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('') // Your project ID + ->setSession(''); // The user session to authenticate with + +$apps = new Apps($client); + +$result = $apps->get( + appId: '' +);``` diff --git a/examples/1.9.x/server-php/examples/apps/list-installation-scopes.md b/examples/1.9.x/server-php/examples/apps/list-installation-scopes.md new file mode 100644 index 000000000..f60f6c51f --- /dev/null +++ b/examples/1.9.x/server-php/examples/apps/list-installation-scopes.md @@ -0,0 +1,15 @@ +```php +setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('') // Your project ID + ->setSession(''); // The user session to authenticate with + +$apps = new Apps($client); + +$result = $apps->listInstallationScopes(); +``` diff --git a/examples/1.9.x/server-php/examples/apps/list-installations.md b/examples/1.9.x/server-php/examples/apps/list-installations.md new file mode 100644 index 000000000..fbdff2427 --- /dev/null +++ b/examples/1.9.x/server-php/examples/apps/list-installations.md @@ -0,0 +1,18 @@ +```php +setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('') // Your project ID + ->setKey(''); // Your secret API key + +$apps = new Apps($client); + +$result = $apps->listInstallations( + appId: '', + queries: [], // optional + total: false // optional +);``` diff --git a/examples/1.9.x/server-php/examples/apps/list-keys.md b/examples/1.9.x/server-php/examples/apps/list-keys.md new file mode 100644 index 000000000..8d816537a --- /dev/null +++ b/examples/1.9.x/server-php/examples/apps/list-keys.md @@ -0,0 +1,18 @@ +```php +setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('') // Your project ID + ->setSession(''); // The user session to authenticate with + +$apps = new Apps($client); + +$result = $apps->listKeys( + appId: '', + queries: [], // optional + total: false // optional +);``` diff --git a/examples/1.9.x/server-php/examples/apps/list-o-auth-2-scopes.md b/examples/1.9.x/server-php/examples/apps/list-o-auth-2-scopes.md new file mode 100644 index 000000000..4bcfa44b6 --- /dev/null +++ b/examples/1.9.x/server-php/examples/apps/list-o-auth-2-scopes.md @@ -0,0 +1,15 @@ +```php +setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('') // Your project ID + ->setSession(''); // The user session to authenticate with + +$apps = new Apps($client); + +$result = $apps->listOAuth2Scopes(); +``` diff --git a/examples/1.9.x/server-php/examples/apps/list-secrets.md b/examples/1.9.x/server-php/examples/apps/list-secrets.md new file mode 100644 index 000000000..341fa3456 --- /dev/null +++ b/examples/1.9.x/server-php/examples/apps/list-secrets.md @@ -0,0 +1,18 @@ +```php +setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('') // Your project ID + ->setSession(''); // The user session to authenticate with + +$apps = new Apps($client); + +$result = $apps->listSecrets( + appId: '', + queries: [], // optional + total: false // optional +);``` diff --git a/examples/1.9.x/server-php/examples/apps/list.md b/examples/1.9.x/server-php/examples/apps/list.md new file mode 100644 index 000000000..9add376d1 --- /dev/null +++ b/examples/1.9.x/server-php/examples/apps/list.md @@ -0,0 +1,17 @@ +```php +setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('') // Your project ID + ->setSession(''); // The user session to authenticate with + +$apps = new Apps($client); + +$result = $apps->list( + queries: [], // optional + total: false // optional +);``` diff --git a/examples/1.9.x/server-php/examples/apps/update-labels.md b/examples/1.9.x/server-php/examples/apps/update-labels.md new file mode 100644 index 000000000..e3786e425 --- /dev/null +++ b/examples/1.9.x/server-php/examples/apps/update-labels.md @@ -0,0 +1,17 @@ +```php +setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('') // Your project ID + ->setKey(''); // Your secret API key + +$apps = new Apps($client); + +$result = $apps->updateLabels( + appId: '', + labels: [] +);``` diff --git a/examples/1.9.x/server-php/examples/apps/update-team.md b/examples/1.9.x/server-php/examples/apps/update-team.md new file mode 100644 index 000000000..76ea6ce2d --- /dev/null +++ b/examples/1.9.x/server-php/examples/apps/update-team.md @@ -0,0 +1,17 @@ +```php +setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('') // Your project ID + ->setSession(''); // The user session to authenticate with + +$apps = new Apps($client); + +$result = $apps->updateTeam( + appId: '', + teamId: '' +);``` diff --git a/examples/1.9.x/server-php/examples/apps/update.md b/examples/1.9.x/server-php/examples/apps/update.md new file mode 100644 index 000000000..5d914c744 --- /dev/null +++ b/examples/1.9.x/server-php/examples/apps/update.md @@ -0,0 +1,35 @@ +```php +setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('') // Your project ID + ->setSession(''); // The user session to authenticate with + +$apps = new Apps($client); + +$result = $apps->update( + appId: '', + name: '', + description: '', // optional + clientUri: 'https://example.com', // optional + logoUri: 'https://example.com', // optional + privacyPolicyUrl: 'https://example.com', // optional + termsUrl: 'https://example.com', // optional + contacts: [], // optional + tagline: '', // optional + tags: [], // optional + images: [], // optional + supportUrl: 'https://example.com', // optional + dataDeletionUrl: 'https://example.com', // optional + enabled: false, // optional + redirectUris: [], // optional + postLogoutRedirectUris: [], // optional + type: 'public', // optional + deviceFlow: false, // optional + installationScopes: [], // optional + installationRedirectUrl: 'https://example.com' // optional +);``` diff --git a/examples/1.9.x/server-php/examples/documentsdb/create-collection.md b/examples/1.9.x/server-php/examples/documentsdb/create-collection.md new file mode 100644 index 000000000..3d9b94f31 --- /dev/null +++ b/examples/1.9.x/server-php/examples/documentsdb/create-collection.md @@ -0,0 +1,25 @@ +```php +setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('') // Your project ID + ->setKey(''); // Your secret API key + +$documentsDB = new DocumentsDB($client); + +$result = $documentsDB->createCollection( + databaseId: '', + collectionId: '', + name: '', + permissions: [Permission::read(Role::any())], // optional + documentSecurity: false, // optional + enabled: false, // optional + attributes: [], // optional + indexes: [] // optional +);``` diff --git a/examples/1.9.x/server-php/examples/documentsdb/create-document.md b/examples/1.9.x/server-php/examples/documentsdb/create-document.md new file mode 100644 index 000000000..0470561af --- /dev/null +++ b/examples/1.9.x/server-php/examples/documentsdb/create-document.md @@ -0,0 +1,28 @@ +```php +setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('') // Your project ID + ->setSession(''); // The user session to authenticate with + +$documentsDB = new DocumentsDB($client); + +$result = $documentsDB->createDocument( + databaseId: '', + collectionId: '', + documentId: '', + data: [ + 'username' => 'walter.obrien', + 'email' => 'walter.obrien@example.com', + 'fullName' => 'Walter O'Brien', + 'age' => 30, + 'isAdmin' => false + ], + permissions: [Permission::read(Role::any())] // optional +);``` diff --git a/examples/1.9.x/server-php/examples/documentsdb/create-documents.md b/examples/1.9.x/server-php/examples/documentsdb/create-documents.md new file mode 100644 index 000000000..f6d2d05c4 --- /dev/null +++ b/examples/1.9.x/server-php/examples/documentsdb/create-documents.md @@ -0,0 +1,18 @@ +```php +setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('') // Your project ID + ->setSession(''); // The user session to authenticate with + +$documentsDB = new DocumentsDB($client); + +$result = $documentsDB->createDocuments( + databaseId: '', + collectionId: '', + documents: [] +);``` diff --git a/examples/1.9.x/server-php/examples/documentsdb/create-index.md b/examples/1.9.x/server-php/examples/documentsdb/create-index.md new file mode 100644 index 000000000..771038f3e --- /dev/null +++ b/examples/1.9.x/server-php/examples/documentsdb/create-index.md @@ -0,0 +1,24 @@ +```php +setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('') // Your project ID + ->setKey(''); // Your secret API key + +$documentsDB = new DocumentsDB($client); + +$result = $documentsDB->createIndex( + databaseId: '', + collectionId: '', + key: '', + type: DocumentsDBIndexType::KEY(), + attributes: [], + orders: [OrderBy::ASC()], // optional + lengths: [] // optional +);``` diff --git a/examples/1.9.x/server-php/examples/documentsdb/create-operations.md b/examples/1.9.x/server-php/examples/documentsdb/create-operations.md new file mode 100644 index 000000000..5dc16fbf3 --- /dev/null +++ b/examples/1.9.x/server-php/examples/documentsdb/create-operations.md @@ -0,0 +1,27 @@ +```php +setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('') // Your project ID + ->setKey(''); // Your secret API key + +$documentsDB = new DocumentsDB($client); + +$result = $documentsDB->createOperations( + transactionId: '', + operations: [ + { + "action": "create", + "databaseId": "", + "collectionId": "", + "documentId": "", + "data": { + "name": "Walter O'Brien" + } + } + ] // optional +);``` diff --git a/examples/1.9.x/server-php/examples/documentsdb/create-transaction.md b/examples/1.9.x/server-php/examples/documentsdb/create-transaction.md new file mode 100644 index 000000000..c7714f895 --- /dev/null +++ b/examples/1.9.x/server-php/examples/documentsdb/create-transaction.md @@ -0,0 +1,16 @@ +```php +setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('') // Your project ID + ->setKey(''); // Your secret API key + +$documentsDB = new DocumentsDB($client); + +$result = $documentsDB->createTransaction( + ttl: 60 // optional +);``` diff --git a/examples/1.9.x/server-php/examples/documentsdb/create.md b/examples/1.9.x/server-php/examples/documentsdb/create.md new file mode 100644 index 000000000..cf7368329 --- /dev/null +++ b/examples/1.9.x/server-php/examples/documentsdb/create.md @@ -0,0 +1,18 @@ +```php +setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('') // Your project ID + ->setKey(''); // Your secret API key + +$documentsDB = new DocumentsDB($client); + +$result = $documentsDB->create( + databaseId: '', + name: '', + enabled: false // optional +);``` diff --git a/examples/1.9.x/server-php/examples/documentsdb/decrement-document-attribute.md b/examples/1.9.x/server-php/examples/documentsdb/decrement-document-attribute.md new file mode 100644 index 000000000..cacb75fd1 --- /dev/null +++ b/examples/1.9.x/server-php/examples/documentsdb/decrement-document-attribute.md @@ -0,0 +1,22 @@ +```php +setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('') // Your project ID + ->setSession(''); // The user session to authenticate with + +$documentsDB = new DocumentsDB($client); + +$result = $documentsDB->decrementDocumentAttribute( + databaseId: '', + collectionId: '', + documentId: '', + attribute: '', + value: null, // optional + min: null, // optional + transactionId: '' // optional +);``` diff --git a/examples/1.9.x/server-php/examples/documentsdb/delete-collection.md b/examples/1.9.x/server-php/examples/documentsdb/delete-collection.md new file mode 100644 index 000000000..38745aa3c --- /dev/null +++ b/examples/1.9.x/server-php/examples/documentsdb/delete-collection.md @@ -0,0 +1,17 @@ +```php +setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('') // Your project ID + ->setKey(''); // Your secret API key + +$documentsDB = new DocumentsDB($client); + +$result = $documentsDB->deleteCollection( + databaseId: '', + collectionId: '' +);``` diff --git a/examples/1.9.x/server-php/examples/documentsdb/delete-document.md b/examples/1.9.x/server-php/examples/documentsdb/delete-document.md new file mode 100644 index 000000000..62c2d2e8c --- /dev/null +++ b/examples/1.9.x/server-php/examples/documentsdb/delete-document.md @@ -0,0 +1,19 @@ +```php +setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('') // Your project ID + ->setSession(''); // The user session to authenticate with + +$documentsDB = new DocumentsDB($client); + +$result = $documentsDB->deleteDocument( + databaseId: '', + collectionId: '', + documentId: '', + transactionId: '' // optional +);``` diff --git a/examples/1.9.x/server-php/examples/documentsdb/delete-documents.md b/examples/1.9.x/server-php/examples/documentsdb/delete-documents.md new file mode 100644 index 000000000..82226558c --- /dev/null +++ b/examples/1.9.x/server-php/examples/documentsdb/delete-documents.md @@ -0,0 +1,19 @@ +```php +setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('') // Your project ID + ->setKey(''); // Your secret API key + +$documentsDB = new DocumentsDB($client); + +$result = $documentsDB->deleteDocuments( + databaseId: '', + collectionId: '', + queries: [], // optional + transactionId: '' // optional +);``` diff --git a/examples/1.9.x/server-php/examples/documentsdb/delete-index.md b/examples/1.9.x/server-php/examples/documentsdb/delete-index.md new file mode 100644 index 000000000..fd0264591 --- /dev/null +++ b/examples/1.9.x/server-php/examples/documentsdb/delete-index.md @@ -0,0 +1,18 @@ +```php +setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('') // Your project ID + ->setKey(''); // Your secret API key + +$documentsDB = new DocumentsDB($client); + +$result = $documentsDB->deleteIndex( + databaseId: '', + collectionId: '', + key: '' +);``` diff --git a/examples/1.9.x/server-php/examples/documentsdb/delete-transaction.md b/examples/1.9.x/server-php/examples/documentsdb/delete-transaction.md new file mode 100644 index 000000000..0c64a386a --- /dev/null +++ b/examples/1.9.x/server-php/examples/documentsdb/delete-transaction.md @@ -0,0 +1,16 @@ +```php +setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('') // Your project ID + ->setKey(''); // Your secret API key + +$documentsDB = new DocumentsDB($client); + +$result = $documentsDB->deleteTransaction( + transactionId: '' +);``` diff --git a/examples/1.9.x/server-php/examples/documentsdb/delete.md b/examples/1.9.x/server-php/examples/documentsdb/delete.md new file mode 100644 index 000000000..a3ab19fd0 --- /dev/null +++ b/examples/1.9.x/server-php/examples/documentsdb/delete.md @@ -0,0 +1,16 @@ +```php +setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('') // Your project ID + ->setKey(''); // Your secret API key + +$documentsDB = new DocumentsDB($client); + +$result = $documentsDB->delete( + databaseId: '' +);``` diff --git a/examples/1.9.x/server-php/examples/documentsdb/get-collection.md b/examples/1.9.x/server-php/examples/documentsdb/get-collection.md new file mode 100644 index 000000000..6ff15f9df --- /dev/null +++ b/examples/1.9.x/server-php/examples/documentsdb/get-collection.md @@ -0,0 +1,17 @@ +```php +setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('') // Your project ID + ->setKey(''); // Your secret API key + +$documentsDB = new DocumentsDB($client); + +$result = $documentsDB->getCollection( + databaseId: '', + collectionId: '' +);``` diff --git a/examples/1.9.x/server-php/examples/documentsdb/get-document.md b/examples/1.9.x/server-php/examples/documentsdb/get-document.md new file mode 100644 index 000000000..e0df16b9b --- /dev/null +++ b/examples/1.9.x/server-php/examples/documentsdb/get-document.md @@ -0,0 +1,20 @@ +```php +setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('') // Your project ID + ->setSession(''); // The user session to authenticate with + +$documentsDB = new DocumentsDB($client); + +$result = $documentsDB->getDocument( + databaseId: '', + collectionId: '', + documentId: '', + queries: [], // optional + transactionId: '' // optional +);``` diff --git a/examples/1.9.x/server-php/examples/documentsdb/get-index.md b/examples/1.9.x/server-php/examples/documentsdb/get-index.md new file mode 100644 index 000000000..212fd0150 --- /dev/null +++ b/examples/1.9.x/server-php/examples/documentsdb/get-index.md @@ -0,0 +1,18 @@ +```php +setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('') // Your project ID + ->setKey(''); // Your secret API key + +$documentsDB = new DocumentsDB($client); + +$result = $documentsDB->getIndex( + databaseId: '', + collectionId: '', + key: '' +);``` diff --git a/examples/1.9.x/server-php/examples/documentsdb/get-transaction.md b/examples/1.9.x/server-php/examples/documentsdb/get-transaction.md new file mode 100644 index 000000000..6bc2193a8 --- /dev/null +++ b/examples/1.9.x/server-php/examples/documentsdb/get-transaction.md @@ -0,0 +1,16 @@ +```php +setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('') // Your project ID + ->setKey(''); // Your secret API key + +$documentsDB = new DocumentsDB($client); + +$result = $documentsDB->getTransaction( + transactionId: '' +);``` diff --git a/examples/1.9.x/server-php/examples/documentsdb/get.md b/examples/1.9.x/server-php/examples/documentsdb/get.md new file mode 100644 index 000000000..464d6011c --- /dev/null +++ b/examples/1.9.x/server-php/examples/documentsdb/get.md @@ -0,0 +1,16 @@ +```php +setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('') // Your project ID + ->setKey(''); // Your secret API key + +$documentsDB = new DocumentsDB($client); + +$result = $documentsDB->get( + databaseId: '' +);``` diff --git a/examples/1.9.x/server-php/examples/documentsdb/increment-document-attribute.md b/examples/1.9.x/server-php/examples/documentsdb/increment-document-attribute.md new file mode 100644 index 000000000..5ed6fd3f7 --- /dev/null +++ b/examples/1.9.x/server-php/examples/documentsdb/increment-document-attribute.md @@ -0,0 +1,22 @@ +```php +setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('') // Your project ID + ->setSession(''); // The user session to authenticate with + +$documentsDB = new DocumentsDB($client); + +$result = $documentsDB->incrementDocumentAttribute( + databaseId: '', + collectionId: '', + documentId: '', + attribute: '', + value: null, // optional + max: null, // optional + transactionId: '' // optional +);``` diff --git a/examples/1.9.x/server-php/examples/documentsdb/list-collections.md b/examples/1.9.x/server-php/examples/documentsdb/list-collections.md new file mode 100644 index 000000000..2fe77dd40 --- /dev/null +++ b/examples/1.9.x/server-php/examples/documentsdb/list-collections.md @@ -0,0 +1,19 @@ +```php +setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('') // Your project ID + ->setKey(''); // Your secret API key + +$documentsDB = new DocumentsDB($client); + +$result = $documentsDB->listCollections( + databaseId: '', + queries: [], // optional + search: '', // optional + total: false // optional +);``` diff --git a/examples/1.9.x/server-php/examples/documentsdb/list-documents.md b/examples/1.9.x/server-php/examples/documentsdb/list-documents.md new file mode 100644 index 000000000..76b9cbed4 --- /dev/null +++ b/examples/1.9.x/server-php/examples/documentsdb/list-documents.md @@ -0,0 +1,21 @@ +```php +setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('') // Your project ID + ->setSession(''); // The user session to authenticate with + +$documentsDB = new DocumentsDB($client); + +$result = $documentsDB->listDocuments( + databaseId: '', + collectionId: '', + queries: [], // optional + transactionId: '', // optional + total: false, // optional + ttl: 0 // optional +);``` diff --git a/examples/1.9.x/server-php/examples/documentsdb/list-indexes.md b/examples/1.9.x/server-php/examples/documentsdb/list-indexes.md new file mode 100644 index 000000000..c60aa83a1 --- /dev/null +++ b/examples/1.9.x/server-php/examples/documentsdb/list-indexes.md @@ -0,0 +1,19 @@ +```php +setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('') // Your project ID + ->setKey(''); // Your secret API key + +$documentsDB = new DocumentsDB($client); + +$result = $documentsDB->listIndexes( + databaseId: '', + collectionId: '', + queries: [], // optional + total: false // optional +);``` diff --git a/examples/1.9.x/server-php/examples/documentsdb/list-transactions.md b/examples/1.9.x/server-php/examples/documentsdb/list-transactions.md new file mode 100644 index 000000000..971a64281 --- /dev/null +++ b/examples/1.9.x/server-php/examples/documentsdb/list-transactions.md @@ -0,0 +1,16 @@ +```php +setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('') // Your project ID + ->setKey(''); // Your secret API key + +$documentsDB = new DocumentsDB($client); + +$result = $documentsDB->listTransactions( + queries: [] // optional +);``` diff --git a/examples/1.9.x/server-php/examples/documentsdb/list.md b/examples/1.9.x/server-php/examples/documentsdb/list.md new file mode 100644 index 000000000..5efcd96fe --- /dev/null +++ b/examples/1.9.x/server-php/examples/documentsdb/list.md @@ -0,0 +1,18 @@ +```php +setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('') // Your project ID + ->setKey(''); // Your secret API key + +$documentsDB = new DocumentsDB($client); + +$result = $documentsDB->list( + queries: [], // optional + search: '', // optional + total: false // optional +);``` diff --git a/examples/1.9.x/server-php/examples/documentsdb/update-collection.md b/examples/1.9.x/server-php/examples/documentsdb/update-collection.md new file mode 100644 index 000000000..f2c77a38c --- /dev/null +++ b/examples/1.9.x/server-php/examples/documentsdb/update-collection.md @@ -0,0 +1,24 @@ +```php +setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('') // Your project ID + ->setKey(''); // Your secret API key + +$documentsDB = new DocumentsDB($client); + +$result = $documentsDB->updateCollection( + databaseId: '', + collectionId: '', + name: '', + permissions: [Permission::read(Role::any())], // optional + documentSecurity: false, // optional + enabled: false, // optional + purge: false // optional +);``` diff --git a/examples/1.9.x/server-php/examples/documentsdb/update-document.md b/examples/1.9.x/server-php/examples/documentsdb/update-document.md new file mode 100644 index 000000000..e2ee55d44 --- /dev/null +++ b/examples/1.9.x/server-php/examples/documentsdb/update-document.md @@ -0,0 +1,23 @@ +```php +setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('') // Your project ID + ->setSession(''); // The user session to authenticate with + +$documentsDB = new DocumentsDB($client); + +$result = $documentsDB->updateDocument( + databaseId: '', + collectionId: '', + documentId: '', + data: [], // optional + permissions: [Permission::read(Role::any())], // optional + transactionId: '' // optional +);``` diff --git a/examples/1.9.x/server-php/examples/documentsdb/update-documents.md b/examples/1.9.x/server-php/examples/documentsdb/update-documents.md new file mode 100644 index 000000000..89c0e5d45 --- /dev/null +++ b/examples/1.9.x/server-php/examples/documentsdb/update-documents.md @@ -0,0 +1,20 @@ +```php +setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('') // Your project ID + ->setKey(''); // Your secret API key + +$documentsDB = new DocumentsDB($client); + +$result = $documentsDB->updateDocuments( + databaseId: '', + collectionId: '', + data: [], // optional + queries: [], // optional + transactionId: '' // optional +);``` diff --git a/examples/1.9.x/server-php/examples/documentsdb/update-transaction.md b/examples/1.9.x/server-php/examples/documentsdb/update-transaction.md new file mode 100644 index 000000000..ae5f84a94 --- /dev/null +++ b/examples/1.9.x/server-php/examples/documentsdb/update-transaction.md @@ -0,0 +1,18 @@ +```php +setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('') // Your project ID + ->setKey(''); // Your secret API key + +$documentsDB = new DocumentsDB($client); + +$result = $documentsDB->updateTransaction( + transactionId: '', + commit: false, // optional + rollback: false // optional +);``` diff --git a/examples/1.9.x/server-php/examples/documentsdb/update.md b/examples/1.9.x/server-php/examples/documentsdb/update.md new file mode 100644 index 000000000..c656606c3 --- /dev/null +++ b/examples/1.9.x/server-php/examples/documentsdb/update.md @@ -0,0 +1,18 @@ +```php +setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('') // Your project ID + ->setKey(''); // Your secret API key + +$documentsDB = new DocumentsDB($client); + +$result = $documentsDB->update( + databaseId: '', + name: '', + enabled: false // optional +);``` diff --git a/examples/1.9.x/server-php/examples/documentsdb/upsert-document.md b/examples/1.9.x/server-php/examples/documentsdb/upsert-document.md new file mode 100644 index 000000000..a0c8b0d47 --- /dev/null +++ b/examples/1.9.x/server-php/examples/documentsdb/upsert-document.md @@ -0,0 +1,23 @@ +```php +setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('') // Your project ID + ->setSession(''); // The user session to authenticate with + +$documentsDB = new DocumentsDB($client); + +$result = $documentsDB->upsertDocument( + databaseId: '', + collectionId: '', + documentId: '', + data: [], // optional + permissions: [Permission::read(Role::any())], // optional + transactionId: '' // optional +);``` diff --git a/examples/1.9.x/server-php/examples/documentsdb/upsert-documents.md b/examples/1.9.x/server-php/examples/documentsdb/upsert-documents.md new file mode 100644 index 000000000..bbc577b8a --- /dev/null +++ b/examples/1.9.x/server-php/examples/documentsdb/upsert-documents.md @@ -0,0 +1,19 @@ +```php +setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('') // Your project ID + ->setKey(''); // Your secret API key + +$documentsDB = new DocumentsDB($client); + +$result = $documentsDB->upsertDocuments( + databaseId: '', + collectionId: '', + documents: [], + transactionId: '' // optional +);``` diff --git a/examples/1.9.x/server-php/examples/oauth2/approve.md b/examples/1.9.x/server-php/examples/oauth2/approve.md new file mode 100644 index 000000000..f3c77d1ad --- /dev/null +++ b/examples/1.9.x/server-php/examples/oauth2/approve.md @@ -0,0 +1,18 @@ +```php +setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + ->setSession('') // The user session to authenticate with + ->setProject(''); // Your project ID + +$oauth2 = new Oauth2($client); + +$result = $oauth2->approve( + grantId: '', + authorizationDetails: '', // optional + scope: '' // optional +);``` diff --git a/examples/1.9.x/server-php/examples/oauth2/authorize-post.md b/examples/1.9.x/server-php/examples/oauth2/authorize-post.md new file mode 100644 index 000000000..8f2b1251b --- /dev/null +++ b/examples/1.9.x/server-php/examples/oauth2/authorize-post.md @@ -0,0 +1,29 @@ +```php +setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + ->setSession('') // The user session to authenticate with + ->setProject(''); // Your project ID + +$oauth2 = new Oauth2($client); + +$result = $oauth2->authorizePost( + clientId: '', // optional + redirectUri: 'https://example.com', // optional + responseType: '', // optional + scope: '', // optional + state: '', // optional + nonce: '', // optional + codeChallenge: '', // optional + codeChallengeMethod: 's256', // optional + prompt: '', // optional + maxAge: 0, // optional + authorizationDetails: '', // optional + resource: '', // optional + audience: '', // optional + requestUri: '' // optional +);``` diff --git a/examples/1.9.x/server-php/examples/oauth2/authorize.md b/examples/1.9.x/server-php/examples/oauth2/authorize.md new file mode 100644 index 000000000..c02171254 --- /dev/null +++ b/examples/1.9.x/server-php/examples/oauth2/authorize.md @@ -0,0 +1,29 @@ +```php +setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + ->setSession('') // The user session to authenticate with + ->setProject(''); // Your project ID + +$oauth2 = new Oauth2($client); + +$result = $oauth2->authorize( + clientId: '', // optional + redirectUri: 'https://example.com', // optional + responseType: '', // optional + scope: '', // optional + state: '', // optional + nonce: '', // optional + codeChallenge: '', // optional + codeChallengeMethod: 's256', // optional + prompt: '', // optional + maxAge: 0, // optional + authorizationDetails: '', // optional + resource: '', // optional + audience: '', // optional + requestUri: '' // optional +);``` diff --git a/examples/1.9.x/server-php/examples/oauth2/create-device-authorization.md b/examples/1.9.x/server-php/examples/oauth2/create-device-authorization.md new file mode 100644 index 000000000..6da66a8b5 --- /dev/null +++ b/examples/1.9.x/server-php/examples/oauth2/create-device-authorization.md @@ -0,0 +1,20 @@ +```php +setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + ->setSession('') // The user session to authenticate with + ->setProject(''); // Your project ID + +$oauth2 = new Oauth2($client); + +$result = $oauth2->createDeviceAuthorization( + clientId: '', // optional + scope: '', // optional + authorizationDetails: '', // optional + resource: '', // optional + audience: '' // optional +);``` diff --git a/examples/1.9.x/server-php/examples/oauth2/create-grant.md b/examples/1.9.x/server-php/examples/oauth2/create-grant.md new file mode 100644 index 000000000..598470f65 --- /dev/null +++ b/examples/1.9.x/server-php/examples/oauth2/create-grant.md @@ -0,0 +1,16 @@ +```php +setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + ->setSession('') // The user session to authenticate with + ->setProject(''); // Your project ID + +$oauth2 = new Oauth2($client); + +$result = $oauth2->createGrant( + userCode: '' +);``` diff --git a/examples/1.9.x/server-php/examples/oauth2/create-par.md b/examples/1.9.x/server-php/examples/oauth2/create-par.md new file mode 100644 index 000000000..ca770f1b9 --- /dev/null +++ b/examples/1.9.x/server-php/examples/oauth2/create-par.md @@ -0,0 +1,28 @@ +```php +setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + ->setSession('') // The user session to authenticate with + ->setProject(''); // Your project ID + +$oauth2 = new Oauth2($client); + +$result = $oauth2->createPAR( + clientId: '', + redirectUri: 'https://example.com', + responseType: 'code', + scope: '', // optional + state: '', // optional + nonce: '', // optional + codeChallenge: '', // optional + codeChallengeMethod: 's256', // optional + prompt: '', // optional + maxAge: 0, // optional + authorizationDetails: '', // optional + resource: '', // optional + audience: '' // optional +);``` diff --git a/examples/1.9.x/server-php/examples/oauth2/create-token.md b/examples/1.9.x/server-php/examples/oauth2/create-token.md new file mode 100644 index 000000000..61905d60b --- /dev/null +++ b/examples/1.9.x/server-php/examples/oauth2/create-token.md @@ -0,0 +1,25 @@ +```php +setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + ->setSession('') // The user session to authenticate with + ->setProject(''); // Your project ID + +$oauth2 = new Oauth2($client); + +$result = $oauth2->createToken( + grantType: '', + code: '', // optional + refreshToken: '', // optional + deviceCode: '', // optional + clientId: '', // optional + clientSecret: '', // optional + codeVerifier: '', // optional + redirectUri: 'https://example.com', // optional + resource: '', // optional + audience: '' // optional +);``` diff --git a/examples/1.9.x/server-php/examples/oauth2/get-grant.md b/examples/1.9.x/server-php/examples/oauth2/get-grant.md new file mode 100644 index 000000000..b49798288 --- /dev/null +++ b/examples/1.9.x/server-php/examples/oauth2/get-grant.md @@ -0,0 +1,16 @@ +```php +setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + ->setSession('') // The user session to authenticate with + ->setProject(''); // Your project ID + +$oauth2 = new Oauth2($client); + +$result = $oauth2->getGrant( + grantId: '' +);``` diff --git a/examples/1.9.x/server-php/examples/oauth2/list-organizations.md b/examples/1.9.x/server-php/examples/oauth2/list-organizations.md new file mode 100644 index 000000000..1c2fb1c42 --- /dev/null +++ b/examples/1.9.x/server-php/examples/oauth2/list-organizations.md @@ -0,0 +1,18 @@ +```php +setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + ->setSession('') // The user session to authenticate with + ->setProject(''); // Your project ID + +$oauth2 = new Oauth2($client); + +$result = $oauth2->listOrganizations( + limit: 1, // optional + offset: 0, // optional + search: '' // optional +);``` diff --git a/examples/1.9.x/server-php/examples/oauth2/list-projects.md b/examples/1.9.x/server-php/examples/oauth2/list-projects.md new file mode 100644 index 000000000..ea4ff0321 --- /dev/null +++ b/examples/1.9.x/server-php/examples/oauth2/list-projects.md @@ -0,0 +1,18 @@ +```php +setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + ->setSession('') // The user session to authenticate with + ->setProject(''); // Your project ID + +$oauth2 = new Oauth2($client); + +$result = $oauth2->listProjects( + limit: 1, // optional + offset: 0, // optional + search: '' // optional +);``` diff --git a/examples/1.9.x/server-php/examples/oauth2/reject.md b/examples/1.9.x/server-php/examples/oauth2/reject.md new file mode 100644 index 000000000..65deab846 --- /dev/null +++ b/examples/1.9.x/server-php/examples/oauth2/reject.md @@ -0,0 +1,16 @@ +```php +setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + ->setSession('') // The user session to authenticate with + ->setProject(''); // Your project ID + +$oauth2 = new Oauth2($client); + +$result = $oauth2->reject( + grantId: '' +);``` diff --git a/examples/1.9.x/server-php/examples/oauth2/revoke.md b/examples/1.9.x/server-php/examples/oauth2/revoke.md new file mode 100644 index 000000000..97c7b861e --- /dev/null +++ b/examples/1.9.x/server-php/examples/oauth2/revoke.md @@ -0,0 +1,19 @@ +```php +setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + ->setSession('') // The user session to authenticate with + ->setProject(''); // Your project ID + +$oauth2 = new Oauth2($client); + +$result = $oauth2->revoke( + token: '', + tokenTypeHint: 'access_token', // optional + clientId: '', // optional + clientSecret: '' // optional +);``` diff --git a/examples/1.9.x/server-php/examples/organization/create-installation.md b/examples/1.9.x/server-php/examples/organization/create-installation.md new file mode 100644 index 000000000..51855c476 --- /dev/null +++ b/examples/1.9.x/server-php/examples/organization/create-installation.md @@ -0,0 +1,17 @@ +```php +setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('') // Your project ID + ->setSession(''); // The user session to authenticate with + +$organization = new Organization($client); + +$result = $organization->createInstallation( + appId: '', + authorizationDetails: '' // optional +);``` diff --git a/examples/1.9.x/server-php/examples/organization/delete-installation.md b/examples/1.9.x/server-php/examples/organization/delete-installation.md new file mode 100644 index 000000000..23b8e6926 --- /dev/null +++ b/examples/1.9.x/server-php/examples/organization/delete-installation.md @@ -0,0 +1,16 @@ +```php +setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('') // Your project ID + ->setSession(''); // The user session to authenticate with + +$organization = new Organization($client); + +$result = $organization->deleteInstallation( + installationId: '' +);``` diff --git a/examples/1.9.x/server-php/examples/organization/get-installation.md b/examples/1.9.x/server-php/examples/organization/get-installation.md new file mode 100644 index 000000000..5e4b67633 --- /dev/null +++ b/examples/1.9.x/server-php/examples/organization/get-installation.md @@ -0,0 +1,16 @@ +```php +setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('') // Your project ID + ->setSession(''); // The user session to authenticate with + +$organization = new Organization($client); + +$result = $organization->getInstallation( + installationId: '' +);``` diff --git a/examples/1.9.x/server-php/examples/organization/list-installations.md b/examples/1.9.x/server-php/examples/organization/list-installations.md new file mode 100644 index 000000000..170243d30 --- /dev/null +++ b/examples/1.9.x/server-php/examples/organization/list-installations.md @@ -0,0 +1,17 @@ +```php +setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('') // Your project ID + ->setSession(''); // The user session to authenticate with + +$organization = new Organization($client); + +$result = $organization->listInstallations( + queries: [], // optional + total: false // optional +);``` diff --git a/examples/1.9.x/server-php/examples/organization/update-installation.md b/examples/1.9.x/server-php/examples/organization/update-installation.md new file mode 100644 index 000000000..a35f797ea --- /dev/null +++ b/examples/1.9.x/server-php/examples/organization/update-installation.md @@ -0,0 +1,17 @@ +```php +setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('') // Your project ID + ->setSession(''); // The user session to authenticate with + +$organization = new Organization($client); + +$result = $organization->updateInstallation( + installationId: '', + authorizationDetails: '' // optional +);``` diff --git a/examples/1.9.x/server-php/examples/project/update-o-auth-2-server.md b/examples/1.9.x/server-php/examples/project/update-o-auth-2-server.md index 9c3eb9a82..4a7782f27 100644 --- a/examples/1.9.x/server-php/examples/project/update-o-auth-2-server.md +++ b/examples/1.9.x/server-php/examples/project/update-o-auth-2-server.md @@ -20,6 +20,7 @@ $result = $project->updateOAuth2Server( refreshTokenDuration: 60, // optional publicAccessTokenDuration: 60, // optional publicRefreshTokenDuration: 60, // optional + installationAccessTokenDuration: 60, // optional confidentialPkce: false, // optional verificationUrl: 'https://example.com', // optional userCodeLength: 6, // optional diff --git a/examples/1.9.x/server-php/examples/teams/create-installation.md b/examples/1.9.x/server-php/examples/teams/create-installation.md new file mode 100644 index 000000000..e462cf6b0 --- /dev/null +++ b/examples/1.9.x/server-php/examples/teams/create-installation.md @@ -0,0 +1,18 @@ +```php +setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('') // Your project ID + ->setSession(''); // The user session to authenticate with + +$teams = new Teams($client); + +$result = $teams->createInstallation( + teamId: '', + appId: '', + authorizationDetails: '' // optional +);``` diff --git a/examples/1.9.x/server-php/examples/teams/delete-installation.md b/examples/1.9.x/server-php/examples/teams/delete-installation.md new file mode 100644 index 000000000..091ae091b --- /dev/null +++ b/examples/1.9.x/server-php/examples/teams/delete-installation.md @@ -0,0 +1,17 @@ +```php +setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('') // Your project ID + ->setSession(''); // The user session to authenticate with + +$teams = new Teams($client); + +$result = $teams->deleteInstallation( + teamId: '', + installationId: '' +);``` diff --git a/examples/1.9.x/server-php/examples/teams/get-installation.md b/examples/1.9.x/server-php/examples/teams/get-installation.md new file mode 100644 index 000000000..440afa82e --- /dev/null +++ b/examples/1.9.x/server-php/examples/teams/get-installation.md @@ -0,0 +1,17 @@ +```php +setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('') // Your project ID + ->setSession(''); // The user session to authenticate with + +$teams = new Teams($client); + +$result = $teams->getInstallation( + teamId: '', + installationId: '' +);``` diff --git a/examples/1.9.x/server-php/examples/teams/list-installations.md b/examples/1.9.x/server-php/examples/teams/list-installations.md new file mode 100644 index 000000000..678ab4bce --- /dev/null +++ b/examples/1.9.x/server-php/examples/teams/list-installations.md @@ -0,0 +1,18 @@ +```php +setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('') // Your project ID + ->setSession(''); // The user session to authenticate with + +$teams = new Teams($client); + +$result = $teams->listInstallations( + teamId: '', + queries: [], // optional + total: false // optional +);``` diff --git a/examples/1.9.x/server-php/examples/teams/update-installation.md b/examples/1.9.x/server-php/examples/teams/update-installation.md new file mode 100644 index 000000000..36cdd0300 --- /dev/null +++ b/examples/1.9.x/server-php/examples/teams/update-installation.md @@ -0,0 +1,18 @@ +```php +setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('') // Your project ID + ->setSession(''); // The user session to authenticate with + +$teams = new Teams($client); + +$result = $teams->updateInstallation( + teamId: '', + installationId: '', + authorizationDetails: '' // optional +);``` diff --git a/examples/1.9.x/server-php/examples/vectorsdb/create-collection.md b/examples/1.9.x/server-php/examples/vectorsdb/create-collection.md new file mode 100644 index 000000000..52f3705d6 --- /dev/null +++ b/examples/1.9.x/server-php/examples/vectorsdb/create-collection.md @@ -0,0 +1,24 @@ +```php +setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('') // Your project ID + ->setKey(''); // Your secret API key + +$vectorsDB = new VectorsDB($client); + +$result = $vectorsDB->createCollection( + databaseId: '', + collectionId: '', + name: '', + dimension: 1, + permissions: [Permission::read(Role::any())], // optional + documentSecurity: false, // optional + enabled: false // optional +);``` diff --git a/examples/1.9.x/server-php/examples/vectorsdb/create-document.md b/examples/1.9.x/server-php/examples/vectorsdb/create-document.md new file mode 100644 index 000000000..c5e618714 --- /dev/null +++ b/examples/1.9.x/server-php/examples/vectorsdb/create-document.md @@ -0,0 +1,32 @@ +```php +setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('') // Your project ID + ->setSession(''); // The user session to authenticate with + +$vectorsDB = new VectorsDB($client); + +$result = $vectorsDB->createDocument( + databaseId: '', + collectionId: '', + documentId: '', + data: [ + 'embeddings' => [ + '0' => 0.12, + '1' => -0.55, + '2' => 0.88, + '3' => 1.02 + ], + 'metadata' => [ + 'key' => 'value' + ] + ], + permissions: [Permission::read(Role::any())] // optional +);``` diff --git a/examples/1.9.x/server-php/examples/vectorsdb/create-documents.md b/examples/1.9.x/server-php/examples/vectorsdb/create-documents.md new file mode 100644 index 000000000..3c075bfd8 --- /dev/null +++ b/examples/1.9.x/server-php/examples/vectorsdb/create-documents.md @@ -0,0 +1,18 @@ +```php +setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('') // Your project ID + ->setKey(''); // Your secret API key + +$vectorsDB = new VectorsDB($client); + +$result = $vectorsDB->createDocuments( + databaseId: '', + collectionId: '', + documents: [] +);``` diff --git a/examples/1.9.x/server-php/examples/vectorsdb/create-index.md b/examples/1.9.x/server-php/examples/vectorsdb/create-index.md new file mode 100644 index 000000000..f3a97b6cb --- /dev/null +++ b/examples/1.9.x/server-php/examples/vectorsdb/create-index.md @@ -0,0 +1,24 @@ +```php +setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('') // Your project ID + ->setKey(''); // Your secret API key + +$vectorsDB = new VectorsDB($client); + +$result = $vectorsDB->createIndex( + databaseId: '', + collectionId: '', + key: '', + type: VectorsDBIndexType::HNSWEUCLIDEAN(), + attributes: [], + orders: [OrderBy::ASC()], // optional + lengths: [] // optional +);``` diff --git a/examples/1.9.x/server-php/examples/vectorsdb/create-operations.md b/examples/1.9.x/server-php/examples/vectorsdb/create-operations.md new file mode 100644 index 000000000..cbf480331 --- /dev/null +++ b/examples/1.9.x/server-php/examples/vectorsdb/create-operations.md @@ -0,0 +1,27 @@ +```php +setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('') // Your project ID + ->setKey(''); // Your secret API key + +$vectorsDB = new VectorsDB($client); + +$result = $vectorsDB->createOperations( + transactionId: '', + operations: [ + { + "action": "create", + "databaseId": "", + "collectionId": "", + "documentId": "", + "data": { + "name": "Walter O'Brien" + } + } + ] // optional +);``` diff --git a/examples/1.9.x/server-php/examples/vectorsdb/create-query.md b/examples/1.9.x/server-php/examples/vectorsdb/create-query.md new file mode 100644 index 000000000..3d4857155 --- /dev/null +++ b/examples/1.9.x/server-php/examples/vectorsdb/create-query.md @@ -0,0 +1,21 @@ +```php +setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('') // Your project ID + ->setSession(''); // The user session to authenticate with + +$vectorsDB = new VectorsDB($client); + +$result = $vectorsDB->createQuery( + databaseId: '', + collectionId: '', + queries: [], // optional + transactionId: '', // optional + total: false, // optional + ttl: 0 // optional +);``` diff --git a/examples/1.9.x/server-php/examples/vectorsdb/create-text-embeddings.md b/examples/1.9.x/server-php/examples/vectorsdb/create-text-embeddings.md new file mode 100644 index 000000000..7c4423ec4 --- /dev/null +++ b/examples/1.9.x/server-php/examples/vectorsdb/create-text-embeddings.md @@ -0,0 +1,18 @@ +```php +setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('') // Your project ID + ->setKey(''); // Your secret API key + +$vectorsDB = new VectorsDB($client); + +$result = $vectorsDB->createTextEmbeddings( + texts: [], + model: EmbeddingModel::NOMICEMBEDTEXT() // optional +);``` diff --git a/examples/1.9.x/server-php/examples/vectorsdb/create-transaction.md b/examples/1.9.x/server-php/examples/vectorsdb/create-transaction.md new file mode 100644 index 000000000..52d9914ac --- /dev/null +++ b/examples/1.9.x/server-php/examples/vectorsdb/create-transaction.md @@ -0,0 +1,16 @@ +```php +setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('') // Your project ID + ->setKey(''); // Your secret API key + +$vectorsDB = new VectorsDB($client); + +$result = $vectorsDB->createTransaction( + ttl: 60 // optional +);``` diff --git a/examples/1.9.x/server-php/examples/vectorsdb/create.md b/examples/1.9.x/server-php/examples/vectorsdb/create.md new file mode 100644 index 000000000..ff277ce38 --- /dev/null +++ b/examples/1.9.x/server-php/examples/vectorsdb/create.md @@ -0,0 +1,18 @@ +```php +setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('') // Your project ID + ->setKey(''); // Your secret API key + +$vectorsDB = new VectorsDB($client); + +$result = $vectorsDB->create( + databaseId: '', + name: '', + enabled: false // optional +);``` diff --git a/examples/1.9.x/server-php/examples/vectorsdb/delete-collection.md b/examples/1.9.x/server-php/examples/vectorsdb/delete-collection.md new file mode 100644 index 000000000..94db9f465 --- /dev/null +++ b/examples/1.9.x/server-php/examples/vectorsdb/delete-collection.md @@ -0,0 +1,17 @@ +```php +setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('') // Your project ID + ->setKey(''); // Your secret API key + +$vectorsDB = new VectorsDB($client); + +$result = $vectorsDB->deleteCollection( + databaseId: '', + collectionId: '' +);``` diff --git a/examples/1.9.x/server-php/examples/vectorsdb/delete-document.md b/examples/1.9.x/server-php/examples/vectorsdb/delete-document.md new file mode 100644 index 000000000..c0a72608a --- /dev/null +++ b/examples/1.9.x/server-php/examples/vectorsdb/delete-document.md @@ -0,0 +1,19 @@ +```php +setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('') // Your project ID + ->setSession(''); // The user session to authenticate with + +$vectorsDB = new VectorsDB($client); + +$result = $vectorsDB->deleteDocument( + databaseId: '', + collectionId: '', + documentId: '', + transactionId: '' // optional +);``` diff --git a/examples/1.9.x/server-php/examples/vectorsdb/delete-documents.md b/examples/1.9.x/server-php/examples/vectorsdb/delete-documents.md new file mode 100644 index 000000000..b64527fa1 --- /dev/null +++ b/examples/1.9.x/server-php/examples/vectorsdb/delete-documents.md @@ -0,0 +1,19 @@ +```php +setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('') // Your project ID + ->setKey(''); // Your secret API key + +$vectorsDB = new VectorsDB($client); + +$result = $vectorsDB->deleteDocuments( + databaseId: '', + collectionId: '', + queries: [], // optional + transactionId: '' // optional +);``` diff --git a/examples/1.9.x/server-php/examples/vectorsdb/delete-index.md b/examples/1.9.x/server-php/examples/vectorsdb/delete-index.md new file mode 100644 index 000000000..d4335ccec --- /dev/null +++ b/examples/1.9.x/server-php/examples/vectorsdb/delete-index.md @@ -0,0 +1,18 @@ +```php +setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('') // Your project ID + ->setKey(''); // Your secret API key + +$vectorsDB = new VectorsDB($client); + +$result = $vectorsDB->deleteIndex( + databaseId: '', + collectionId: '', + key: '' +);``` diff --git a/examples/1.9.x/server-php/examples/vectorsdb/delete-transaction.md b/examples/1.9.x/server-php/examples/vectorsdb/delete-transaction.md new file mode 100644 index 000000000..c45d7cbbd --- /dev/null +++ b/examples/1.9.x/server-php/examples/vectorsdb/delete-transaction.md @@ -0,0 +1,16 @@ +```php +setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('') // Your project ID + ->setKey(''); // Your secret API key + +$vectorsDB = new VectorsDB($client); + +$result = $vectorsDB->deleteTransaction( + transactionId: '' +);``` diff --git a/examples/1.9.x/server-php/examples/vectorsdb/delete.md b/examples/1.9.x/server-php/examples/vectorsdb/delete.md new file mode 100644 index 000000000..c801a0eaf --- /dev/null +++ b/examples/1.9.x/server-php/examples/vectorsdb/delete.md @@ -0,0 +1,16 @@ +```php +setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('') // Your project ID + ->setKey(''); // Your secret API key + +$vectorsDB = new VectorsDB($client); + +$result = $vectorsDB->delete( + databaseId: '' +);``` diff --git a/examples/1.9.x/server-php/examples/vectorsdb/get-collection.md b/examples/1.9.x/server-php/examples/vectorsdb/get-collection.md new file mode 100644 index 000000000..3bcef2d9c --- /dev/null +++ b/examples/1.9.x/server-php/examples/vectorsdb/get-collection.md @@ -0,0 +1,17 @@ +```php +setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('') // Your project ID + ->setKey(''); // Your secret API key + +$vectorsDB = new VectorsDB($client); + +$result = $vectorsDB->getCollection( + databaseId: '', + collectionId: '' +);``` diff --git a/examples/1.9.x/server-php/examples/vectorsdb/get-document.md b/examples/1.9.x/server-php/examples/vectorsdb/get-document.md new file mode 100644 index 000000000..c9fe95523 --- /dev/null +++ b/examples/1.9.x/server-php/examples/vectorsdb/get-document.md @@ -0,0 +1,20 @@ +```php +setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('') // Your project ID + ->setSession(''); // The user session to authenticate with + +$vectorsDB = new VectorsDB($client); + +$result = $vectorsDB->getDocument( + databaseId: '', + collectionId: '', + documentId: '', + queries: [], // optional + transactionId: '' // optional +);``` diff --git a/examples/1.9.x/server-php/examples/vectorsdb/get-index.md b/examples/1.9.x/server-php/examples/vectorsdb/get-index.md new file mode 100644 index 000000000..ece97595d --- /dev/null +++ b/examples/1.9.x/server-php/examples/vectorsdb/get-index.md @@ -0,0 +1,18 @@ +```php +setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('') // Your project ID + ->setKey(''); // Your secret API key + +$vectorsDB = new VectorsDB($client); + +$result = $vectorsDB->getIndex( + databaseId: '', + collectionId: '', + key: '' +);``` diff --git a/examples/1.9.x/server-php/examples/vectorsdb/get-transaction.md b/examples/1.9.x/server-php/examples/vectorsdb/get-transaction.md new file mode 100644 index 000000000..ef69fd822 --- /dev/null +++ b/examples/1.9.x/server-php/examples/vectorsdb/get-transaction.md @@ -0,0 +1,16 @@ +```php +setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('') // Your project ID + ->setKey(''); // Your secret API key + +$vectorsDB = new VectorsDB($client); + +$result = $vectorsDB->getTransaction( + transactionId: '' +);``` diff --git a/examples/1.9.x/server-php/examples/vectorsdb/get.md b/examples/1.9.x/server-php/examples/vectorsdb/get.md new file mode 100644 index 000000000..94b0f2556 --- /dev/null +++ b/examples/1.9.x/server-php/examples/vectorsdb/get.md @@ -0,0 +1,16 @@ +```php +setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('') // Your project ID + ->setKey(''); // Your secret API key + +$vectorsDB = new VectorsDB($client); + +$result = $vectorsDB->get( + databaseId: '' +);``` diff --git a/examples/1.9.x/server-php/examples/vectorsdb/list-collections.md b/examples/1.9.x/server-php/examples/vectorsdb/list-collections.md new file mode 100644 index 000000000..f1234b6e7 --- /dev/null +++ b/examples/1.9.x/server-php/examples/vectorsdb/list-collections.md @@ -0,0 +1,19 @@ +```php +setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('') // Your project ID + ->setKey(''); // Your secret API key + +$vectorsDB = new VectorsDB($client); + +$result = $vectorsDB->listCollections( + databaseId: '', + queries: [], // optional + search: '', // optional + total: false // optional +);``` diff --git a/examples/1.9.x/server-php/examples/vectorsdb/list-documents.md b/examples/1.9.x/server-php/examples/vectorsdb/list-documents.md new file mode 100644 index 000000000..54e7502ca --- /dev/null +++ b/examples/1.9.x/server-php/examples/vectorsdb/list-documents.md @@ -0,0 +1,21 @@ +```php +setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('') // Your project ID + ->setSession(''); // The user session to authenticate with + +$vectorsDB = new VectorsDB($client); + +$result = $vectorsDB->listDocuments( + databaseId: '', + collectionId: '', + queries: [], // optional + transactionId: '', // optional + total: false, // optional + ttl: 0 // optional +);``` diff --git a/examples/1.9.x/server-php/examples/vectorsdb/list-indexes.md b/examples/1.9.x/server-php/examples/vectorsdb/list-indexes.md new file mode 100644 index 000000000..d1e862459 --- /dev/null +++ b/examples/1.9.x/server-php/examples/vectorsdb/list-indexes.md @@ -0,0 +1,19 @@ +```php +setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('') // Your project ID + ->setKey(''); // Your secret API key + +$vectorsDB = new VectorsDB($client); + +$result = $vectorsDB->listIndexes( + databaseId: '', + collectionId: '', + queries: [], // optional + total: false // optional +);``` diff --git a/examples/1.9.x/server-php/examples/vectorsdb/list-transactions.md b/examples/1.9.x/server-php/examples/vectorsdb/list-transactions.md new file mode 100644 index 000000000..905773c91 --- /dev/null +++ b/examples/1.9.x/server-php/examples/vectorsdb/list-transactions.md @@ -0,0 +1,16 @@ +```php +setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('') // Your project ID + ->setKey(''); // Your secret API key + +$vectorsDB = new VectorsDB($client); + +$result = $vectorsDB->listTransactions( + queries: [] // optional +);``` diff --git a/examples/1.9.x/server-php/examples/vectorsdb/list.md b/examples/1.9.x/server-php/examples/vectorsdb/list.md new file mode 100644 index 000000000..9037a8254 --- /dev/null +++ b/examples/1.9.x/server-php/examples/vectorsdb/list.md @@ -0,0 +1,18 @@ +```php +setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('') // Your project ID + ->setKey(''); // Your secret API key + +$vectorsDB = new VectorsDB($client); + +$result = $vectorsDB->list( + queries: [], // optional + search: '', // optional + total: false // optional +);``` diff --git a/examples/1.9.x/server-php/examples/vectorsdb/update-collection.md b/examples/1.9.x/server-php/examples/vectorsdb/update-collection.md new file mode 100644 index 000000000..38a244afc --- /dev/null +++ b/examples/1.9.x/server-php/examples/vectorsdb/update-collection.md @@ -0,0 +1,24 @@ +```php +setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('') // Your project ID + ->setKey(''); // Your secret API key + +$vectorsDB = new VectorsDB($client); + +$result = $vectorsDB->updateCollection( + databaseId: '', + collectionId: '', + name: '', + dimension: 1, // optional + permissions: [Permission::read(Role::any())], // optional + documentSecurity: false, // optional + enabled: false // optional +);``` diff --git a/examples/1.9.x/server-php/examples/vectorsdb/update-document.md b/examples/1.9.x/server-php/examples/vectorsdb/update-document.md new file mode 100644 index 000000000..e5061c194 --- /dev/null +++ b/examples/1.9.x/server-php/examples/vectorsdb/update-document.md @@ -0,0 +1,23 @@ +```php +setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('') // Your project ID + ->setSession(''); // The user session to authenticate with + +$vectorsDB = new VectorsDB($client); + +$result = $vectorsDB->updateDocument( + databaseId: '', + collectionId: '', + documentId: '', + data: [], // optional + permissions: [Permission::read(Role::any())], // optional + transactionId: '' // optional +);``` diff --git a/examples/1.9.x/server-php/examples/vectorsdb/update-documents.md b/examples/1.9.x/server-php/examples/vectorsdb/update-documents.md new file mode 100644 index 000000000..77c3e8797 --- /dev/null +++ b/examples/1.9.x/server-php/examples/vectorsdb/update-documents.md @@ -0,0 +1,20 @@ +```php +setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('') // Your project ID + ->setKey(''); // Your secret API key + +$vectorsDB = new VectorsDB($client); + +$result = $vectorsDB->updateDocuments( + databaseId: '', + collectionId: '', + data: [], // optional + queries: [], // optional + transactionId: '' // optional +);``` diff --git a/examples/1.9.x/server-php/examples/vectorsdb/update-transaction.md b/examples/1.9.x/server-php/examples/vectorsdb/update-transaction.md new file mode 100644 index 000000000..986684eb5 --- /dev/null +++ b/examples/1.9.x/server-php/examples/vectorsdb/update-transaction.md @@ -0,0 +1,18 @@ +```php +setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('') // Your project ID + ->setKey(''); // Your secret API key + +$vectorsDB = new VectorsDB($client); + +$result = $vectorsDB->updateTransaction( + transactionId: '', + commit: false, // optional + rollback: false // optional +);``` diff --git a/examples/1.9.x/server-php/examples/vectorsdb/update.md b/examples/1.9.x/server-php/examples/vectorsdb/update.md new file mode 100644 index 000000000..ee79ddffb --- /dev/null +++ b/examples/1.9.x/server-php/examples/vectorsdb/update.md @@ -0,0 +1,18 @@ +```php +setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('') // Your project ID + ->setKey(''); // Your secret API key + +$vectorsDB = new VectorsDB($client); + +$result = $vectorsDB->update( + databaseId: '', + name: '', + enabled: false // optional +);``` diff --git a/examples/1.9.x/server-php/examples/vectorsdb/upsert-document.md b/examples/1.9.x/server-php/examples/vectorsdb/upsert-document.md new file mode 100644 index 000000000..ef7f550f8 --- /dev/null +++ b/examples/1.9.x/server-php/examples/vectorsdb/upsert-document.md @@ -0,0 +1,23 @@ +```php +setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('') // Your project ID + ->setSession(''); // The user session to authenticate with + +$vectorsDB = new VectorsDB($client); + +$result = $vectorsDB->upsertDocument( + databaseId: '', + collectionId: '', + documentId: '', + data: [], // optional + permissions: [Permission::read(Role::any())], // optional + transactionId: '' // optional +);``` diff --git a/examples/1.9.x/server-php/examples/vectorsdb/upsert-documents.md b/examples/1.9.x/server-php/examples/vectorsdb/upsert-documents.md new file mode 100644 index 000000000..b047462f2 --- /dev/null +++ b/examples/1.9.x/server-php/examples/vectorsdb/upsert-documents.md @@ -0,0 +1,19 @@ +```php +setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('') // Your project ID + ->setKey(''); // Your secret API key + +$vectorsDB = new VectorsDB($client); + +$result = $vectorsDB->upsertDocuments( + databaseId: '', + collectionId: '', + documents: [], + transactionId: '' // optional +);``` diff --git a/examples/1.9.x/server-python/examples/apps/create-installation-token.md b/examples/1.9.x/server-python/examples/apps/create-installation-token.md new file mode 100644 index 000000000..62a62ca6f --- /dev/null +++ b/examples/1.9.x/server-python/examples/apps/create-installation-token.md @@ -0,0 +1,19 @@ +```python +from appwrite.client import Client +from appwrite.services.apps import Apps +from appwrite.models import Oauth2Token + +client = Client() +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('') # Your project ID +client.set_key('') # Your secret API key + +apps = Apps(client) + +result: Oauth2Token = apps.create_installation_token( + app_id = '', + installation_id = '' +) + +print(result.model_dump()) +``` diff --git a/examples/1.9.x/server-python/examples/apps/create-key.md b/examples/1.9.x/server-python/examples/apps/create-key.md new file mode 100644 index 000000000..2821ba653 --- /dev/null +++ b/examples/1.9.x/server-python/examples/apps/create-key.md @@ -0,0 +1,18 @@ +```python +from appwrite.client import Client +from appwrite.services.apps import Apps +from appwrite.models import AppKey + +client = Client() +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('') # Your project ID +client.set_session('') # The user session to authenticate with + +apps = Apps(client) + +result: AppKey = apps.create_key( + app_id = '' +) + +print(result.model_dump()) +``` diff --git a/examples/1.9.x/server-python/examples/apps/delete-key.md b/examples/1.9.x/server-python/examples/apps/delete-key.md new file mode 100644 index 000000000..dca52e39d --- /dev/null +++ b/examples/1.9.x/server-python/examples/apps/delete-key.md @@ -0,0 +1,16 @@ +```python +from appwrite.client import Client +from appwrite.services.apps import Apps + +client = Client() +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('') # Your project ID +client.set_session('') # The user session to authenticate with + +apps = Apps(client) + +result = apps.delete_key( + app_id = '', + key_id = '' +) +``` diff --git a/examples/1.9.x/server-python/examples/apps/get-installation.md b/examples/1.9.x/server-python/examples/apps/get-installation.md new file mode 100644 index 000000000..f6a52721e --- /dev/null +++ b/examples/1.9.x/server-python/examples/apps/get-installation.md @@ -0,0 +1,19 @@ +```python +from appwrite.client import Client +from appwrite.services.apps import Apps +from appwrite.models import AppInstallation + +client = Client() +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('') # Your project ID +client.set_key('') # Your secret API key + +apps = Apps(client) + +result: AppInstallation = apps.get_installation( + app_id = '', + installation_id = '' +) + +print(result.model_dump()) +``` diff --git a/examples/1.9.x/server-python/examples/apps/get-key.md b/examples/1.9.x/server-python/examples/apps/get-key.md new file mode 100644 index 000000000..4df3d4244 --- /dev/null +++ b/examples/1.9.x/server-python/examples/apps/get-key.md @@ -0,0 +1,19 @@ +```python +from appwrite.client import Client +from appwrite.services.apps import Apps +from appwrite.models import AppKey + +client = Client() +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('') # Your project ID +client.set_session('') # The user session to authenticate with + +apps = Apps(client) + +result: AppKey = apps.get_key( + app_id = '', + key_id = '' +) + +print(result.model_dump()) +``` diff --git a/examples/1.9.x/server-python/examples/apps/list-installation-scopes.md b/examples/1.9.x/server-python/examples/apps/list-installation-scopes.md new file mode 100644 index 000000000..4705cf7b0 --- /dev/null +++ b/examples/1.9.x/server-python/examples/apps/list-installation-scopes.md @@ -0,0 +1,16 @@ +```python +from appwrite.client import Client +from appwrite.services.apps import Apps +from appwrite.models import AppScopeList + +client = Client() +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('') # Your project ID +client.set_session('') # The user session to authenticate with + +apps = Apps(client) + +result: AppScopeList = apps.list_installation_scopes() + +print(result.model_dump()) +``` diff --git a/examples/1.9.x/server-python/examples/apps/list-installations.md b/examples/1.9.x/server-python/examples/apps/list-installations.md new file mode 100644 index 000000000..f5e292b28 --- /dev/null +++ b/examples/1.9.x/server-python/examples/apps/list-installations.md @@ -0,0 +1,20 @@ +```python +from appwrite.client import Client +from appwrite.services.apps import Apps +from appwrite.models import AppInstallationList + +client = Client() +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('') # Your project ID +client.set_key('') # Your secret API key + +apps = Apps(client) + +result: AppInstallationList = apps.list_installations( + app_id = '', + queries = [], # optional + total = False # optional +) + +print(result.model_dump()) +``` diff --git a/examples/1.9.x/server-python/examples/apps/list-keys.md b/examples/1.9.x/server-python/examples/apps/list-keys.md new file mode 100644 index 000000000..7ed785437 --- /dev/null +++ b/examples/1.9.x/server-python/examples/apps/list-keys.md @@ -0,0 +1,20 @@ +```python +from appwrite.client import Client +from appwrite.services.apps import Apps +from appwrite.models import AppKeyList + +client = Client() +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('') # Your project ID +client.set_session('') # The user session to authenticate with + +apps = Apps(client) + +result: AppKeyList = apps.list_keys( + app_id = '', + queries = [], # optional + total = False # optional +) + +print(result.model_dump()) +``` diff --git a/examples/1.9.x/server-python/examples/apps/update.md b/examples/1.9.x/server-python/examples/apps/update.md index 49c85efbe..c9006df6f 100644 --- a/examples/1.9.x/server-python/examples/apps/update.md +++ b/examples/1.9.x/server-python/examples/apps/update.md @@ -28,7 +28,9 @@ result: App = apps.update( redirect_uris = [], # optional post_logout_redirect_uris = [], # optional type = 'public', # optional - device_flow = False # optional + device_flow = False, # optional + installation_scopes = [], # optional + installation_redirect_url = 'https://example.com' # optional ) print(result.model_dump()) diff --git a/examples/1.9.x/server-python/examples/documentsdb/create-collection.md b/examples/1.9.x/server-python/examples/documentsdb/create-collection.md new file mode 100644 index 000000000..b717460fc --- /dev/null +++ b/examples/1.9.x/server-python/examples/documentsdb/create-collection.md @@ -0,0 +1,27 @@ +```python +from appwrite.client import Client +from appwrite.services.documents_db import DocumentsDB +from appwrite.models import Collection +from appwrite.permission import Permission +from appwrite.role import Role + +client = Client() +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('') # Your project ID +client.set_key('') # Your secret API key + +documents_db = DocumentsDB(client) + +result: Collection = documents_db.create_collection( + database_id = '', + collection_id = '', + name = '', + permissions = [Permission.read(Role.any())], # optional + document_security = False, # optional + enabled = False, # optional + attributes = [], # optional + indexes = [] # optional +) + +print(result.model_dump()) +``` diff --git a/examples/1.9.x/server-python/examples/documentsdb/create-document.md b/examples/1.9.x/server-python/examples/documentsdb/create-document.md new file mode 100644 index 000000000..1fa38033a --- /dev/null +++ b/examples/1.9.x/server-python/examples/documentsdb/create-document.md @@ -0,0 +1,30 @@ +```python +from appwrite.client import Client +from appwrite.services.documents_db import DocumentsDB +from appwrite.models import Document +from appwrite.permission import Permission +from appwrite.role import Role + +client = Client() +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('') # Your project ID +client.set_session('') # The user session to authenticate with + +documents_db = DocumentsDB(client) + +result: Document = documents_db.create_document( + database_id = '', + collection_id = '', + document_id = '', + data = { + "username": "walter.obrien", + "email": "walter.obrien@example.com", + "fullName": "Walter O'Brien", + "age": 30, + "isAdmin": False + }, + permissions = [Permission.read(Role.any())] # optional +) + +print(result.model_dump()) +``` diff --git a/examples/1.9.x/server-python/examples/documentsdb/create-documents.md b/examples/1.9.x/server-python/examples/documentsdb/create-documents.md new file mode 100644 index 000000000..661c32dda --- /dev/null +++ b/examples/1.9.x/server-python/examples/documentsdb/create-documents.md @@ -0,0 +1,20 @@ +```python +from appwrite.client import Client +from appwrite.services.documents_db import DocumentsDB +from appwrite.models import DocumentList + +client = Client() +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('') # Your project ID +client.set_session('') # The user session to authenticate with + +documents_db = DocumentsDB(client) + +result: DocumentList = documents_db.create_documents( + database_id = '', + collection_id = '', + documents = [] +) + +print(result.model_dump()) +``` diff --git a/examples/1.9.x/server-python/examples/documentsdb/create-index.md b/examples/1.9.x/server-python/examples/documentsdb/create-index.md new file mode 100644 index 000000000..3f2fcf0b6 --- /dev/null +++ b/examples/1.9.x/server-python/examples/documentsdb/create-index.md @@ -0,0 +1,26 @@ +```python +from appwrite.client import Client +from appwrite.services.documents_db import DocumentsDB +from appwrite.models import Index +from appwrite.enums import DocumentsDBIndexType +from appwrite.enums import OrderBy + +client = Client() +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('') # Your project ID +client.set_key('') # Your secret API key + +documents_db = DocumentsDB(client) + +result: Index = documents_db.create_index( + database_id = '', + collection_id = '', + key = '', + type = DocumentsDBIndexType.KEY, + attributes = [], + orders = [OrderBy.ASC], # optional + lengths = [] # optional +) + +print(result.model_dump()) +``` diff --git a/examples/1.9.x/server-python/examples/documentsdb/create-operations.md b/examples/1.9.x/server-python/examples/documentsdb/create-operations.md new file mode 100644 index 000000000..23128e81e --- /dev/null +++ b/examples/1.9.x/server-python/examples/documentsdb/create-operations.md @@ -0,0 +1,29 @@ +```python +from appwrite.client import Client +from appwrite.services.documents_db import DocumentsDB +from appwrite.models import Transaction + +client = Client() +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('') # Your project ID +client.set_key('') # Your secret API key + +documents_db = DocumentsDB(client) + +result: Transaction = documents_db.create_operations( + transaction_id = '', + operations = [ + { + "action": "create", + "databaseId": "", + "collectionId": "", + "documentId": "", + "data": { + "name": "Walter O'Brien" + } + } + ] # optional +) + +print(result.model_dump()) +``` diff --git a/examples/1.9.x/server-python/examples/documentsdb/create-transaction.md b/examples/1.9.x/server-python/examples/documentsdb/create-transaction.md new file mode 100644 index 000000000..d34b358e5 --- /dev/null +++ b/examples/1.9.x/server-python/examples/documentsdb/create-transaction.md @@ -0,0 +1,18 @@ +```python +from appwrite.client import Client +from appwrite.services.documents_db import DocumentsDB +from appwrite.models import Transaction + +client = Client() +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('') # Your project ID +client.set_key('') # Your secret API key + +documents_db = DocumentsDB(client) + +result: Transaction = documents_db.create_transaction( + ttl = 60 # optional +) + +print(result.model_dump()) +``` diff --git a/examples/1.9.x/server-python/examples/documentsdb/create.md b/examples/1.9.x/server-python/examples/documentsdb/create.md new file mode 100644 index 000000000..753759bee --- /dev/null +++ b/examples/1.9.x/server-python/examples/documentsdb/create.md @@ -0,0 +1,20 @@ +```python +from appwrite.client import Client +from appwrite.services.documents_db import DocumentsDB +from appwrite.models import Database + +client = Client() +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('') # Your project ID +client.set_key('') # Your secret API key + +documents_db = DocumentsDB(client) + +result: Database = documents_db.create( + database_id = '', + name = '', + enabled = False # optional +) + +print(result.model_dump()) +``` diff --git a/examples/1.9.x/server-python/examples/documentsdb/decrement-document-attribute.md b/examples/1.9.x/server-python/examples/documentsdb/decrement-document-attribute.md new file mode 100644 index 000000000..d10b6f2b5 --- /dev/null +++ b/examples/1.9.x/server-python/examples/documentsdb/decrement-document-attribute.md @@ -0,0 +1,24 @@ +```python +from appwrite.client import Client +from appwrite.services.documents_db import DocumentsDB +from appwrite.models import Document + +client = Client() +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('') # Your project ID +client.set_session('') # The user session to authenticate with + +documents_db = DocumentsDB(client) + +result: Document = documents_db.decrement_document_attribute( + database_id = '', + collection_id = '', + document_id = '', + attribute = '', + value = None, # optional + min = None, # optional + transaction_id = '' # optional +) + +print(result.model_dump()) +``` diff --git a/examples/1.9.x/server-python/examples/documentsdb/delete-collection.md b/examples/1.9.x/server-python/examples/documentsdb/delete-collection.md new file mode 100644 index 000000000..1652ab2be --- /dev/null +++ b/examples/1.9.x/server-python/examples/documentsdb/delete-collection.md @@ -0,0 +1,16 @@ +```python +from appwrite.client import Client +from appwrite.services.documents_db import DocumentsDB + +client = Client() +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('') # Your project ID +client.set_key('') # Your secret API key + +documents_db = DocumentsDB(client) + +result = documents_db.delete_collection( + database_id = '', + collection_id = '' +) +``` diff --git a/examples/1.9.x/server-python/examples/documentsdb/delete-document.md b/examples/1.9.x/server-python/examples/documentsdb/delete-document.md new file mode 100644 index 000000000..e588088e0 --- /dev/null +++ b/examples/1.9.x/server-python/examples/documentsdb/delete-document.md @@ -0,0 +1,18 @@ +```python +from appwrite.client import Client +from appwrite.services.documents_db import DocumentsDB + +client = Client() +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('') # Your project ID +client.set_session('') # The user session to authenticate with + +documents_db = DocumentsDB(client) + +result = documents_db.delete_document( + database_id = '', + collection_id = '', + document_id = '', + transaction_id = '' # optional +) +``` diff --git a/examples/1.9.x/server-python/examples/documentsdb/delete-documents.md b/examples/1.9.x/server-python/examples/documentsdb/delete-documents.md new file mode 100644 index 000000000..8bc343de9 --- /dev/null +++ b/examples/1.9.x/server-python/examples/documentsdb/delete-documents.md @@ -0,0 +1,21 @@ +```python +from appwrite.client import Client +from appwrite.services.documents_db import DocumentsDB +from appwrite.models import DocumentList + +client = Client() +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('') # Your project ID +client.set_key('') # Your secret API key + +documents_db = DocumentsDB(client) + +result: DocumentList = documents_db.delete_documents( + database_id = '', + collection_id = '', + queries = [], # optional + transaction_id = '' # optional +) + +print(result.model_dump()) +``` diff --git a/examples/1.9.x/server-python/examples/documentsdb/delete-index.md b/examples/1.9.x/server-python/examples/documentsdb/delete-index.md new file mode 100644 index 000000000..da51459d7 --- /dev/null +++ b/examples/1.9.x/server-python/examples/documentsdb/delete-index.md @@ -0,0 +1,17 @@ +```python +from appwrite.client import Client +from appwrite.services.documents_db import DocumentsDB + +client = Client() +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('') # Your project ID +client.set_key('') # Your secret API key + +documents_db = DocumentsDB(client) + +result = documents_db.delete_index( + database_id = '', + collection_id = '', + key = '' +) +``` diff --git a/examples/1.9.x/server-python/examples/documentsdb/delete-transaction.md b/examples/1.9.x/server-python/examples/documentsdb/delete-transaction.md new file mode 100644 index 000000000..009bf807d --- /dev/null +++ b/examples/1.9.x/server-python/examples/documentsdb/delete-transaction.md @@ -0,0 +1,15 @@ +```python +from appwrite.client import Client +from appwrite.services.documents_db import DocumentsDB + +client = Client() +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('') # Your project ID +client.set_key('') # Your secret API key + +documents_db = DocumentsDB(client) + +result = documents_db.delete_transaction( + transaction_id = '' +) +``` diff --git a/examples/1.9.x/server-python/examples/documentsdb/delete.md b/examples/1.9.x/server-python/examples/documentsdb/delete.md new file mode 100644 index 000000000..648450918 --- /dev/null +++ b/examples/1.9.x/server-python/examples/documentsdb/delete.md @@ -0,0 +1,15 @@ +```python +from appwrite.client import Client +from appwrite.services.documents_db import DocumentsDB + +client = Client() +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('') # Your project ID +client.set_key('') # Your secret API key + +documents_db = DocumentsDB(client) + +result = documents_db.delete( + database_id = '' +) +``` diff --git a/examples/1.9.x/server-python/examples/documentsdb/get-collection.md b/examples/1.9.x/server-python/examples/documentsdb/get-collection.md new file mode 100644 index 000000000..5ec739b89 --- /dev/null +++ b/examples/1.9.x/server-python/examples/documentsdb/get-collection.md @@ -0,0 +1,19 @@ +```python +from appwrite.client import Client +from appwrite.services.documents_db import DocumentsDB +from appwrite.models import Collection + +client = Client() +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('') # Your project ID +client.set_key('') # Your secret API key + +documents_db = DocumentsDB(client) + +result: Collection = documents_db.get_collection( + database_id = '', + collection_id = '' +) + +print(result.model_dump()) +``` diff --git a/examples/1.9.x/server-python/examples/documentsdb/get-document.md b/examples/1.9.x/server-python/examples/documentsdb/get-document.md new file mode 100644 index 000000000..3f0006e7c --- /dev/null +++ b/examples/1.9.x/server-python/examples/documentsdb/get-document.md @@ -0,0 +1,22 @@ +```python +from appwrite.client import Client +from appwrite.services.documents_db import DocumentsDB +from appwrite.models import Document + +client = Client() +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('') # Your project ID +client.set_session('') # The user session to authenticate with + +documents_db = DocumentsDB(client) + +result: Document = documents_db.get_document( + database_id = '', + collection_id = '', + document_id = '', + queries = [], # optional + transaction_id = '' # optional +) + +print(result.model_dump()) +``` diff --git a/examples/1.9.x/server-python/examples/documentsdb/get-index.md b/examples/1.9.x/server-python/examples/documentsdb/get-index.md new file mode 100644 index 000000000..f3887506b --- /dev/null +++ b/examples/1.9.x/server-python/examples/documentsdb/get-index.md @@ -0,0 +1,20 @@ +```python +from appwrite.client import Client +from appwrite.services.documents_db import DocumentsDB +from appwrite.models import Index + +client = Client() +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('') # Your project ID +client.set_key('') # Your secret API key + +documents_db = DocumentsDB(client) + +result: Index = documents_db.get_index( + database_id = '', + collection_id = '', + key = '' +) + +print(result.model_dump()) +``` diff --git a/examples/1.9.x/server-python/examples/documentsdb/get-transaction.md b/examples/1.9.x/server-python/examples/documentsdb/get-transaction.md new file mode 100644 index 000000000..27d88ee76 --- /dev/null +++ b/examples/1.9.x/server-python/examples/documentsdb/get-transaction.md @@ -0,0 +1,18 @@ +```python +from appwrite.client import Client +from appwrite.services.documents_db import DocumentsDB +from appwrite.models import Transaction + +client = Client() +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('') # Your project ID +client.set_key('') # Your secret API key + +documents_db = DocumentsDB(client) + +result: Transaction = documents_db.get_transaction( + transaction_id = '' +) + +print(result.model_dump()) +``` diff --git a/examples/1.9.x/server-python/examples/documentsdb/get.md b/examples/1.9.x/server-python/examples/documentsdb/get.md new file mode 100644 index 000000000..fc2ffb9b1 --- /dev/null +++ b/examples/1.9.x/server-python/examples/documentsdb/get.md @@ -0,0 +1,18 @@ +```python +from appwrite.client import Client +from appwrite.services.documents_db import DocumentsDB +from appwrite.models import Database + +client = Client() +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('') # Your project ID +client.set_key('') # Your secret API key + +documents_db = DocumentsDB(client) + +result: Database = documents_db.get( + database_id = '' +) + +print(result.model_dump()) +``` diff --git a/examples/1.9.x/server-python/examples/documentsdb/increment-document-attribute.md b/examples/1.9.x/server-python/examples/documentsdb/increment-document-attribute.md new file mode 100644 index 000000000..c235865ac --- /dev/null +++ b/examples/1.9.x/server-python/examples/documentsdb/increment-document-attribute.md @@ -0,0 +1,24 @@ +```python +from appwrite.client import Client +from appwrite.services.documents_db import DocumentsDB +from appwrite.models import Document + +client = Client() +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('') # Your project ID +client.set_session('') # The user session to authenticate with + +documents_db = DocumentsDB(client) + +result: Document = documents_db.increment_document_attribute( + database_id = '', + collection_id = '', + document_id = '', + attribute = '', + value = None, # optional + max = None, # optional + transaction_id = '' # optional +) + +print(result.model_dump()) +``` diff --git a/examples/1.9.x/server-python/examples/documentsdb/list-collections.md b/examples/1.9.x/server-python/examples/documentsdb/list-collections.md new file mode 100644 index 000000000..0d72a3761 --- /dev/null +++ b/examples/1.9.x/server-python/examples/documentsdb/list-collections.md @@ -0,0 +1,21 @@ +```python +from appwrite.client import Client +from appwrite.services.documents_db import DocumentsDB +from appwrite.models import CollectionList + +client = Client() +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('') # Your project ID +client.set_key('') # Your secret API key + +documents_db = DocumentsDB(client) + +result: CollectionList = documents_db.list_collections( + database_id = '', + queries = [], # optional + search = '', # optional + total = False # optional +) + +print(result.model_dump()) +``` diff --git a/examples/1.9.x/server-python/examples/documentsdb/list-documents.md b/examples/1.9.x/server-python/examples/documentsdb/list-documents.md new file mode 100644 index 000000000..c1b2a3607 --- /dev/null +++ b/examples/1.9.x/server-python/examples/documentsdb/list-documents.md @@ -0,0 +1,23 @@ +```python +from appwrite.client import Client +from appwrite.services.documents_db import DocumentsDB +from appwrite.models import DocumentList + +client = Client() +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('') # Your project ID +client.set_session('') # The user session to authenticate with + +documents_db = DocumentsDB(client) + +result: DocumentList = documents_db.list_documents( + database_id = '', + collection_id = '', + queries = [], # optional + transaction_id = '', # optional + total = False, # optional + ttl = 0 # optional +) + +print(result.model_dump()) +``` diff --git a/examples/1.9.x/server-python/examples/documentsdb/list-indexes.md b/examples/1.9.x/server-python/examples/documentsdb/list-indexes.md new file mode 100644 index 000000000..26655d728 --- /dev/null +++ b/examples/1.9.x/server-python/examples/documentsdb/list-indexes.md @@ -0,0 +1,21 @@ +```python +from appwrite.client import Client +from appwrite.services.documents_db import DocumentsDB +from appwrite.models import IndexList + +client = Client() +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('') # Your project ID +client.set_key('') # Your secret API key + +documents_db = DocumentsDB(client) + +result: IndexList = documents_db.list_indexes( + database_id = '', + collection_id = '', + queries = [], # optional + total = False # optional +) + +print(result.model_dump()) +``` diff --git a/examples/1.9.x/server-python/examples/documentsdb/list-transactions.md b/examples/1.9.x/server-python/examples/documentsdb/list-transactions.md new file mode 100644 index 000000000..6dc7aae2f --- /dev/null +++ b/examples/1.9.x/server-python/examples/documentsdb/list-transactions.md @@ -0,0 +1,18 @@ +```python +from appwrite.client import Client +from appwrite.services.documents_db import DocumentsDB +from appwrite.models import TransactionList + +client = Client() +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('') # Your project ID +client.set_key('') # Your secret API key + +documents_db = DocumentsDB(client) + +result: TransactionList = documents_db.list_transactions( + queries = [] # optional +) + +print(result.model_dump()) +``` diff --git a/examples/1.9.x/server-python/examples/documentsdb/list.md b/examples/1.9.x/server-python/examples/documentsdb/list.md new file mode 100644 index 000000000..5fbe94848 --- /dev/null +++ b/examples/1.9.x/server-python/examples/documentsdb/list.md @@ -0,0 +1,20 @@ +```python +from appwrite.client import Client +from appwrite.services.documents_db import DocumentsDB +from appwrite.models import DatabaseList + +client = Client() +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('') # Your project ID +client.set_key('') # Your secret API key + +documents_db = DocumentsDB(client) + +result: DatabaseList = documents_db.list( + queries = [], # optional + search = '', # optional + total = False # optional +) + +print(result.model_dump()) +``` diff --git a/examples/1.9.x/server-python/examples/documentsdb/update-collection.md b/examples/1.9.x/server-python/examples/documentsdb/update-collection.md new file mode 100644 index 000000000..955fb28fa --- /dev/null +++ b/examples/1.9.x/server-python/examples/documentsdb/update-collection.md @@ -0,0 +1,26 @@ +```python +from appwrite.client import Client +from appwrite.services.documents_db import DocumentsDB +from appwrite.models import Collection +from appwrite.permission import Permission +from appwrite.role import Role + +client = Client() +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('') # Your project ID +client.set_key('') # Your secret API key + +documents_db = DocumentsDB(client) + +result: Collection = documents_db.update_collection( + database_id = '', + collection_id = '', + name = '', + permissions = [Permission.read(Role.any())], # optional + document_security = False, # optional + enabled = False, # optional + purge = False # optional +) + +print(result.model_dump()) +``` diff --git a/examples/1.9.x/server-python/examples/documentsdb/update-document.md b/examples/1.9.x/server-python/examples/documentsdb/update-document.md new file mode 100644 index 000000000..cf0bfcc9d --- /dev/null +++ b/examples/1.9.x/server-python/examples/documentsdb/update-document.md @@ -0,0 +1,25 @@ +```python +from appwrite.client import Client +from appwrite.services.documents_db import DocumentsDB +from appwrite.models import Document +from appwrite.permission import Permission +from appwrite.role import Role + +client = Client() +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('') # Your project ID +client.set_session('') # The user session to authenticate with + +documents_db = DocumentsDB(client) + +result: Document = documents_db.update_document( + database_id = '', + collection_id = '', + document_id = '', + data = {}, # optional + permissions = [Permission.read(Role.any())], # optional + transaction_id = '' # optional +) + +print(result.model_dump()) +``` diff --git a/examples/1.9.x/server-python/examples/documentsdb/update-documents.md b/examples/1.9.x/server-python/examples/documentsdb/update-documents.md new file mode 100644 index 000000000..2c183e55a --- /dev/null +++ b/examples/1.9.x/server-python/examples/documentsdb/update-documents.md @@ -0,0 +1,22 @@ +```python +from appwrite.client import Client +from appwrite.services.documents_db import DocumentsDB +from appwrite.models import DocumentList + +client = Client() +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('') # Your project ID +client.set_key('') # Your secret API key + +documents_db = DocumentsDB(client) + +result: DocumentList = documents_db.update_documents( + database_id = '', + collection_id = '', + data = {}, # optional + queries = [], # optional + transaction_id = '' # optional +) + +print(result.model_dump()) +``` diff --git a/examples/1.9.x/server-python/examples/documentsdb/update-transaction.md b/examples/1.9.x/server-python/examples/documentsdb/update-transaction.md new file mode 100644 index 000000000..fff946cba --- /dev/null +++ b/examples/1.9.x/server-python/examples/documentsdb/update-transaction.md @@ -0,0 +1,20 @@ +```python +from appwrite.client import Client +from appwrite.services.documents_db import DocumentsDB +from appwrite.models import Transaction + +client = Client() +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('') # Your project ID +client.set_key('') # Your secret API key + +documents_db = DocumentsDB(client) + +result: Transaction = documents_db.update_transaction( + transaction_id = '', + commit = False, # optional + rollback = False # optional +) + +print(result.model_dump()) +``` diff --git a/examples/1.9.x/server-python/examples/documentsdb/update.md b/examples/1.9.x/server-python/examples/documentsdb/update.md new file mode 100644 index 000000000..1e0c0692f --- /dev/null +++ b/examples/1.9.x/server-python/examples/documentsdb/update.md @@ -0,0 +1,20 @@ +```python +from appwrite.client import Client +from appwrite.services.documents_db import DocumentsDB +from appwrite.models import Database + +client = Client() +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('') # Your project ID +client.set_key('') # Your secret API key + +documents_db = DocumentsDB(client) + +result: Database = documents_db.update( + database_id = '', + name = '', + enabled = False # optional +) + +print(result.model_dump()) +``` diff --git a/examples/1.9.x/server-python/examples/documentsdb/upsert-document.md b/examples/1.9.x/server-python/examples/documentsdb/upsert-document.md new file mode 100644 index 000000000..07086f4a8 --- /dev/null +++ b/examples/1.9.x/server-python/examples/documentsdb/upsert-document.md @@ -0,0 +1,25 @@ +```python +from appwrite.client import Client +from appwrite.services.documents_db import DocumentsDB +from appwrite.models import Document +from appwrite.permission import Permission +from appwrite.role import Role + +client = Client() +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('') # Your project ID +client.set_session('') # The user session to authenticate with + +documents_db = DocumentsDB(client) + +result: Document = documents_db.upsert_document( + database_id = '', + collection_id = '', + document_id = '', + data = {}, # optional + permissions = [Permission.read(Role.any())], # optional + transaction_id = '' # optional +) + +print(result.model_dump()) +``` diff --git a/examples/1.9.x/server-python/examples/documentsdb/upsert-documents.md b/examples/1.9.x/server-python/examples/documentsdb/upsert-documents.md new file mode 100644 index 000000000..d98b227c2 --- /dev/null +++ b/examples/1.9.x/server-python/examples/documentsdb/upsert-documents.md @@ -0,0 +1,21 @@ +```python +from appwrite.client import Client +from appwrite.services.documents_db import DocumentsDB +from appwrite.models import DocumentList + +client = Client() +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('') # Your project ID +client.set_key('') # Your secret API key + +documents_db = DocumentsDB(client) + +result: DocumentList = documents_db.upsert_documents( + database_id = '', + collection_id = '', + documents = [], + transaction_id = '' # optional +) + +print(result.model_dump()) +``` diff --git a/examples/1.9.x/server-python/examples/organization/create-installation.md b/examples/1.9.x/server-python/examples/organization/create-installation.md new file mode 100644 index 000000000..c7af602af --- /dev/null +++ b/examples/1.9.x/server-python/examples/organization/create-installation.md @@ -0,0 +1,19 @@ +```python +from appwrite.client import Client +from appwrite.services.organization import Organization +from appwrite.models import AppInstallation + +client = Client() +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('') # Your project ID +client.set_session('') # The user session to authenticate with + +organization = Organization(client) + +result: AppInstallation = organization.create_installation( + app_id = '', + authorization_details = '' # optional +) + +print(result.model_dump()) +``` diff --git a/examples/1.9.x/server-python/examples/organization/delete-installation.md b/examples/1.9.x/server-python/examples/organization/delete-installation.md new file mode 100644 index 000000000..827902820 --- /dev/null +++ b/examples/1.9.x/server-python/examples/organization/delete-installation.md @@ -0,0 +1,15 @@ +```python +from appwrite.client import Client +from appwrite.services.organization import Organization + +client = Client() +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('') # Your project ID +client.set_session('') # The user session to authenticate with + +organization = Organization(client) + +result = organization.delete_installation( + installation_id = '' +) +``` diff --git a/examples/1.9.x/server-python/examples/organization/get-installation.md b/examples/1.9.x/server-python/examples/organization/get-installation.md new file mode 100644 index 000000000..0bd78a30f --- /dev/null +++ b/examples/1.9.x/server-python/examples/organization/get-installation.md @@ -0,0 +1,18 @@ +```python +from appwrite.client import Client +from appwrite.services.organization import Organization +from appwrite.models import AppInstallation + +client = Client() +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('') # Your project ID +client.set_session('') # The user session to authenticate with + +organization = Organization(client) + +result: AppInstallation = organization.get_installation( + installation_id = '' +) + +print(result.model_dump()) +``` diff --git a/examples/1.9.x/server-python/examples/organization/list-installations.md b/examples/1.9.x/server-python/examples/organization/list-installations.md new file mode 100644 index 000000000..c2ebe4e80 --- /dev/null +++ b/examples/1.9.x/server-python/examples/organization/list-installations.md @@ -0,0 +1,19 @@ +```python +from appwrite.client import Client +from appwrite.services.organization import Organization +from appwrite.models import AppInstallationList + +client = Client() +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('') # Your project ID +client.set_session('') # The user session to authenticate with + +organization = Organization(client) + +result: AppInstallationList = organization.list_installations( + queries = [], # optional + total = False # optional +) + +print(result.model_dump()) +``` diff --git a/examples/1.9.x/server-python/examples/organization/update-installation.md b/examples/1.9.x/server-python/examples/organization/update-installation.md new file mode 100644 index 000000000..ab8301b29 --- /dev/null +++ b/examples/1.9.x/server-python/examples/organization/update-installation.md @@ -0,0 +1,19 @@ +```python +from appwrite.client import Client +from appwrite.services.organization import Organization +from appwrite.models import AppInstallation + +client = Client() +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('') # Your project ID +client.set_session('') # The user session to authenticate with + +organization = Organization(client) + +result: AppInstallation = organization.update_installation( + installation_id = '', + authorization_details = '' # optional +) + +print(result.model_dump()) +``` diff --git a/examples/1.9.x/server-python/examples/project/update-o-auth-2-server.md b/examples/1.9.x/server-python/examples/project/update-o-auth-2-server.md index 6be24c54a..bce0876e8 100644 --- a/examples/1.9.x/server-python/examples/project/update-o-auth-2-server.md +++ b/examples/1.9.x/server-python/examples/project/update-o-auth-2-server.md @@ -19,6 +19,7 @@ result: ProjectModel = project.update_o_auth2_server( refresh_token_duration = 60, # optional public_access_token_duration = 60, # optional public_refresh_token_duration = 60, # optional + installation_access_token_duration = 60, # optional confidential_pkce = False, # optional verification_url = 'https://example.com', # optional user_code_length = 6, # optional diff --git a/examples/1.9.x/server-python/examples/teams/create-installation.md b/examples/1.9.x/server-python/examples/teams/create-installation.md new file mode 100644 index 000000000..185e379fd --- /dev/null +++ b/examples/1.9.x/server-python/examples/teams/create-installation.md @@ -0,0 +1,20 @@ +```python +from appwrite.client import Client +from appwrite.services.teams import Teams +from appwrite.models import AppInstallation + +client = Client() +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('') # Your project ID +client.set_session('') # The user session to authenticate with + +teams = Teams(client) + +result: AppInstallation = teams.create_installation( + team_id = '', + app_id = '', + authorization_details = '' # optional +) + +print(result.model_dump()) +``` diff --git a/examples/1.9.x/server-python/examples/teams/delete-installation.md b/examples/1.9.x/server-python/examples/teams/delete-installation.md new file mode 100644 index 000000000..912195d36 --- /dev/null +++ b/examples/1.9.x/server-python/examples/teams/delete-installation.md @@ -0,0 +1,16 @@ +```python +from appwrite.client import Client +from appwrite.services.teams import Teams + +client = Client() +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('') # Your project ID +client.set_session('') # The user session to authenticate with + +teams = Teams(client) + +result = teams.delete_installation( + team_id = '', + installation_id = '' +) +``` diff --git a/examples/1.9.x/server-python/examples/teams/get-installation.md b/examples/1.9.x/server-python/examples/teams/get-installation.md new file mode 100644 index 000000000..06ad5f01f --- /dev/null +++ b/examples/1.9.x/server-python/examples/teams/get-installation.md @@ -0,0 +1,19 @@ +```python +from appwrite.client import Client +from appwrite.services.teams import Teams +from appwrite.models import AppInstallation + +client = Client() +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('') # Your project ID +client.set_session('') # The user session to authenticate with + +teams = Teams(client) + +result: AppInstallation = teams.get_installation( + team_id = '', + installation_id = '' +) + +print(result.model_dump()) +``` diff --git a/examples/1.9.x/server-python/examples/teams/list-installations.md b/examples/1.9.x/server-python/examples/teams/list-installations.md new file mode 100644 index 000000000..fbc9485b4 --- /dev/null +++ b/examples/1.9.x/server-python/examples/teams/list-installations.md @@ -0,0 +1,20 @@ +```python +from appwrite.client import Client +from appwrite.services.teams import Teams +from appwrite.models import AppInstallationList + +client = Client() +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('') # Your project ID +client.set_session('') # The user session to authenticate with + +teams = Teams(client) + +result: AppInstallationList = teams.list_installations( + team_id = '', + queries = [], # optional + total = False # optional +) + +print(result.model_dump()) +``` diff --git a/examples/1.9.x/server-python/examples/teams/update-installation.md b/examples/1.9.x/server-python/examples/teams/update-installation.md new file mode 100644 index 000000000..a5df12133 --- /dev/null +++ b/examples/1.9.x/server-python/examples/teams/update-installation.md @@ -0,0 +1,20 @@ +```python +from appwrite.client import Client +from appwrite.services.teams import Teams +from appwrite.models import AppInstallation + +client = Client() +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('') # Your project ID +client.set_session('') # The user session to authenticate with + +teams = Teams(client) + +result: AppInstallation = teams.update_installation( + team_id = '', + installation_id = '', + authorization_details = '' # optional +) + +print(result.model_dump()) +``` diff --git a/examples/1.9.x/server-python/examples/vectorsdb/create-collection.md b/examples/1.9.x/server-python/examples/vectorsdb/create-collection.md new file mode 100644 index 000000000..793aa3f5d --- /dev/null +++ b/examples/1.9.x/server-python/examples/vectorsdb/create-collection.md @@ -0,0 +1,26 @@ +```python +from appwrite.client import Client +from appwrite.services.vectors_db import VectorsDB +from appwrite.models import VectorsdbCollection +from appwrite.permission import Permission +from appwrite.role import Role + +client = Client() +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('') # Your project ID +client.set_key('') # Your secret API key + +vectors_db = VectorsDB(client) + +result: VectorsdbCollection = vectors_db.create_collection( + database_id = '', + collection_id = '', + name = '', + dimension = 1, + permissions = [Permission.read(Role.any())], # optional + document_security = False, # optional + enabled = False # optional +) + +print(result.model_dump()) +``` diff --git a/examples/1.9.x/server-python/examples/vectorsdb/create-document.md b/examples/1.9.x/server-python/examples/vectorsdb/create-document.md new file mode 100644 index 000000000..d032a9913 --- /dev/null +++ b/examples/1.9.x/server-python/examples/vectorsdb/create-document.md @@ -0,0 +1,34 @@ +```python +from appwrite.client import Client +from appwrite.services.vectors_db import VectorsDB +from appwrite.models import Document +from appwrite.permission import Permission +from appwrite.role import Role + +client = Client() +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('') # Your project ID +client.set_session('') # The user session to authenticate with + +vectors_db = VectorsDB(client) + +result: Document = vectors_db.create_document( + database_id = '', + collection_id = '', + document_id = '', + data = { + "embeddings": [ + 0.12, + -0.55, + 0.88, + 1.02 + ], + "metadata": { + "key": "value" + } + }, + permissions = [Permission.read(Role.any())] # optional +) + +print(result.model_dump()) +``` diff --git a/examples/1.9.x/server-python/examples/vectorsdb/create-documents.md b/examples/1.9.x/server-python/examples/vectorsdb/create-documents.md new file mode 100644 index 000000000..431aec82e --- /dev/null +++ b/examples/1.9.x/server-python/examples/vectorsdb/create-documents.md @@ -0,0 +1,20 @@ +```python +from appwrite.client import Client +from appwrite.services.vectors_db import VectorsDB +from appwrite.models import DocumentList + +client = Client() +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('') # Your project ID +client.set_key('') # Your secret API key + +vectors_db = VectorsDB(client) + +result: DocumentList = vectors_db.create_documents( + database_id = '', + collection_id = '', + documents = [] +) + +print(result.model_dump()) +``` diff --git a/examples/1.9.x/server-python/examples/vectorsdb/create-index.md b/examples/1.9.x/server-python/examples/vectorsdb/create-index.md new file mode 100644 index 000000000..e0656bce7 --- /dev/null +++ b/examples/1.9.x/server-python/examples/vectorsdb/create-index.md @@ -0,0 +1,26 @@ +```python +from appwrite.client import Client +from appwrite.services.vectors_db import VectorsDB +from appwrite.models import Index +from appwrite.enums import VectorsDBIndexType +from appwrite.enums import OrderBy + +client = Client() +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('') # Your project ID +client.set_key('') # Your secret API key + +vectors_db = VectorsDB(client) + +result: Index = vectors_db.create_index( + database_id = '', + collection_id = '', + key = '', + type = VectorsDBIndexType.HNSW_EUCLIDEAN, + attributes = [], + orders = [OrderBy.ASC], # optional + lengths = [] # optional +) + +print(result.model_dump()) +``` diff --git a/examples/1.9.x/server-python/examples/vectorsdb/create-operations.md b/examples/1.9.x/server-python/examples/vectorsdb/create-operations.md new file mode 100644 index 000000000..e19a89363 --- /dev/null +++ b/examples/1.9.x/server-python/examples/vectorsdb/create-operations.md @@ -0,0 +1,29 @@ +```python +from appwrite.client import Client +from appwrite.services.vectors_db import VectorsDB +from appwrite.models import Transaction + +client = Client() +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('') # Your project ID +client.set_key('') # Your secret API key + +vectors_db = VectorsDB(client) + +result: Transaction = vectors_db.create_operations( + transaction_id = '', + operations = [ + { + "action": "create", + "databaseId": "", + "collectionId": "", + "documentId": "", + "data": { + "name": "Walter O'Brien" + } + } + ] # optional +) + +print(result.model_dump()) +``` diff --git a/examples/1.9.x/server-python/examples/vectorsdb/create-query.md b/examples/1.9.x/server-python/examples/vectorsdb/create-query.md new file mode 100644 index 000000000..093a4653f --- /dev/null +++ b/examples/1.9.x/server-python/examples/vectorsdb/create-query.md @@ -0,0 +1,23 @@ +```python +from appwrite.client import Client +from appwrite.services.vectors_db import VectorsDB +from appwrite.models import DocumentList + +client = Client() +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('') # Your project ID +client.set_session('') # The user session to authenticate with + +vectors_db = VectorsDB(client) + +result: DocumentList = vectors_db.create_query( + database_id = '', + collection_id = '', + queries = [], # optional + transaction_id = '', # optional + total = False, # optional + ttl = 0 # optional +) + +print(result.model_dump()) +``` diff --git a/examples/1.9.x/server-python/examples/vectorsdb/create-text-embeddings.md b/examples/1.9.x/server-python/examples/vectorsdb/create-text-embeddings.md new file mode 100644 index 000000000..1d51a60fe --- /dev/null +++ b/examples/1.9.x/server-python/examples/vectorsdb/create-text-embeddings.md @@ -0,0 +1,20 @@ +```python +from appwrite.client import Client +from appwrite.services.vectors_db import VectorsDB +from appwrite.models import EmbeddingList +from appwrite.enums import EmbeddingModel + +client = Client() +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('') # Your project ID +client.set_key('') # Your secret API key + +vectors_db = VectorsDB(client) + +result: EmbeddingList = vectors_db.create_text_embeddings( + texts = [], + model = EmbeddingModel.NOMIC_EMBED_TEXT # optional +) + +print(result.model_dump()) +``` diff --git a/examples/1.9.x/server-python/examples/vectorsdb/create-transaction.md b/examples/1.9.x/server-python/examples/vectorsdb/create-transaction.md new file mode 100644 index 000000000..6b6cd6316 --- /dev/null +++ b/examples/1.9.x/server-python/examples/vectorsdb/create-transaction.md @@ -0,0 +1,18 @@ +```python +from appwrite.client import Client +from appwrite.services.vectors_db import VectorsDB +from appwrite.models import Transaction + +client = Client() +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('') # Your project ID +client.set_key('') # Your secret API key + +vectors_db = VectorsDB(client) + +result: Transaction = vectors_db.create_transaction( + ttl = 60 # optional +) + +print(result.model_dump()) +``` diff --git a/examples/1.9.x/server-python/examples/vectorsdb/create.md b/examples/1.9.x/server-python/examples/vectorsdb/create.md new file mode 100644 index 000000000..2fe4347f9 --- /dev/null +++ b/examples/1.9.x/server-python/examples/vectorsdb/create.md @@ -0,0 +1,20 @@ +```python +from appwrite.client import Client +from appwrite.services.vectors_db import VectorsDB +from appwrite.models import Database + +client = Client() +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('') # Your project ID +client.set_key('') # Your secret API key + +vectors_db = VectorsDB(client) + +result: Database = vectors_db.create( + database_id = '', + name = '', + enabled = False # optional +) + +print(result.model_dump()) +``` diff --git a/examples/1.9.x/server-python/examples/vectorsdb/delete-collection.md b/examples/1.9.x/server-python/examples/vectorsdb/delete-collection.md new file mode 100644 index 000000000..b96a628bb --- /dev/null +++ b/examples/1.9.x/server-python/examples/vectorsdb/delete-collection.md @@ -0,0 +1,16 @@ +```python +from appwrite.client import Client +from appwrite.services.vectors_db import VectorsDB + +client = Client() +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('') # Your project ID +client.set_key('') # Your secret API key + +vectors_db = VectorsDB(client) + +result = vectors_db.delete_collection( + database_id = '', + collection_id = '' +) +``` diff --git a/examples/1.9.x/server-python/examples/vectorsdb/delete-document.md b/examples/1.9.x/server-python/examples/vectorsdb/delete-document.md new file mode 100644 index 000000000..3915b9379 --- /dev/null +++ b/examples/1.9.x/server-python/examples/vectorsdb/delete-document.md @@ -0,0 +1,18 @@ +```python +from appwrite.client import Client +from appwrite.services.vectors_db import VectorsDB + +client = Client() +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('') # Your project ID +client.set_session('') # The user session to authenticate with + +vectors_db = VectorsDB(client) + +result = vectors_db.delete_document( + database_id = '', + collection_id = '', + document_id = '', + transaction_id = '' # optional +) +``` diff --git a/examples/1.9.x/server-python/examples/vectorsdb/delete-documents.md b/examples/1.9.x/server-python/examples/vectorsdb/delete-documents.md new file mode 100644 index 000000000..f1bee6ee3 --- /dev/null +++ b/examples/1.9.x/server-python/examples/vectorsdb/delete-documents.md @@ -0,0 +1,21 @@ +```python +from appwrite.client import Client +from appwrite.services.vectors_db import VectorsDB +from appwrite.models import DocumentList + +client = Client() +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('') # Your project ID +client.set_key('') # Your secret API key + +vectors_db = VectorsDB(client) + +result: DocumentList = vectors_db.delete_documents( + database_id = '', + collection_id = '', + queries = [], # optional + transaction_id = '' # optional +) + +print(result.model_dump()) +``` diff --git a/examples/1.9.x/server-python/examples/vectorsdb/delete-index.md b/examples/1.9.x/server-python/examples/vectorsdb/delete-index.md new file mode 100644 index 000000000..7dc89739a --- /dev/null +++ b/examples/1.9.x/server-python/examples/vectorsdb/delete-index.md @@ -0,0 +1,17 @@ +```python +from appwrite.client import Client +from appwrite.services.vectors_db import VectorsDB + +client = Client() +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('') # Your project ID +client.set_key('') # Your secret API key + +vectors_db = VectorsDB(client) + +result = vectors_db.delete_index( + database_id = '', + collection_id = '', + key = '' +) +``` diff --git a/examples/1.9.x/server-python/examples/vectorsdb/delete-transaction.md b/examples/1.9.x/server-python/examples/vectorsdb/delete-transaction.md new file mode 100644 index 000000000..58a367f73 --- /dev/null +++ b/examples/1.9.x/server-python/examples/vectorsdb/delete-transaction.md @@ -0,0 +1,15 @@ +```python +from appwrite.client import Client +from appwrite.services.vectors_db import VectorsDB + +client = Client() +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('') # Your project ID +client.set_key('') # Your secret API key + +vectors_db = VectorsDB(client) + +result = vectors_db.delete_transaction( + transaction_id = '' +) +``` diff --git a/examples/1.9.x/server-python/examples/vectorsdb/delete.md b/examples/1.9.x/server-python/examples/vectorsdb/delete.md new file mode 100644 index 000000000..da1c5a491 --- /dev/null +++ b/examples/1.9.x/server-python/examples/vectorsdb/delete.md @@ -0,0 +1,15 @@ +```python +from appwrite.client import Client +from appwrite.services.vectors_db import VectorsDB + +client = Client() +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('') # Your project ID +client.set_key('') # Your secret API key + +vectors_db = VectorsDB(client) + +result = vectors_db.delete( + database_id = '' +) +``` diff --git a/examples/1.9.x/server-python/examples/vectorsdb/get-collection.md b/examples/1.9.x/server-python/examples/vectorsdb/get-collection.md new file mode 100644 index 000000000..2616d72a2 --- /dev/null +++ b/examples/1.9.x/server-python/examples/vectorsdb/get-collection.md @@ -0,0 +1,19 @@ +```python +from appwrite.client import Client +from appwrite.services.vectors_db import VectorsDB +from appwrite.models import VectorsdbCollection + +client = Client() +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('') # Your project ID +client.set_key('') # Your secret API key + +vectors_db = VectorsDB(client) + +result: VectorsdbCollection = vectors_db.get_collection( + database_id = '', + collection_id = '' +) + +print(result.model_dump()) +``` diff --git a/examples/1.9.x/server-python/examples/vectorsdb/get-document.md b/examples/1.9.x/server-python/examples/vectorsdb/get-document.md new file mode 100644 index 000000000..a484c5ddb --- /dev/null +++ b/examples/1.9.x/server-python/examples/vectorsdb/get-document.md @@ -0,0 +1,22 @@ +```python +from appwrite.client import Client +from appwrite.services.vectors_db import VectorsDB +from appwrite.models import Document + +client = Client() +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('') # Your project ID +client.set_session('') # The user session to authenticate with + +vectors_db = VectorsDB(client) + +result: Document = vectors_db.get_document( + database_id = '', + collection_id = '', + document_id = '', + queries = [], # optional + transaction_id = '' # optional +) + +print(result.model_dump()) +``` diff --git a/examples/1.9.x/server-python/examples/vectorsdb/get-index.md b/examples/1.9.x/server-python/examples/vectorsdb/get-index.md new file mode 100644 index 000000000..31f910447 --- /dev/null +++ b/examples/1.9.x/server-python/examples/vectorsdb/get-index.md @@ -0,0 +1,20 @@ +```python +from appwrite.client import Client +from appwrite.services.vectors_db import VectorsDB +from appwrite.models import Index + +client = Client() +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('') # Your project ID +client.set_key('') # Your secret API key + +vectors_db = VectorsDB(client) + +result: Index = vectors_db.get_index( + database_id = '', + collection_id = '', + key = '' +) + +print(result.model_dump()) +``` diff --git a/examples/1.9.x/server-python/examples/vectorsdb/get-transaction.md b/examples/1.9.x/server-python/examples/vectorsdb/get-transaction.md new file mode 100644 index 000000000..601ed0b04 --- /dev/null +++ b/examples/1.9.x/server-python/examples/vectorsdb/get-transaction.md @@ -0,0 +1,18 @@ +```python +from appwrite.client import Client +from appwrite.services.vectors_db import VectorsDB +from appwrite.models import Transaction + +client = Client() +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('') # Your project ID +client.set_key('') # Your secret API key + +vectors_db = VectorsDB(client) + +result: Transaction = vectors_db.get_transaction( + transaction_id = '' +) + +print(result.model_dump()) +``` diff --git a/examples/1.9.x/server-python/examples/vectorsdb/get.md b/examples/1.9.x/server-python/examples/vectorsdb/get.md new file mode 100644 index 000000000..b251b427e --- /dev/null +++ b/examples/1.9.x/server-python/examples/vectorsdb/get.md @@ -0,0 +1,18 @@ +```python +from appwrite.client import Client +from appwrite.services.vectors_db import VectorsDB +from appwrite.models import Database + +client = Client() +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('') # Your project ID +client.set_key('') # Your secret API key + +vectors_db = VectorsDB(client) + +result: Database = vectors_db.get( + database_id = '' +) + +print(result.model_dump()) +``` diff --git a/examples/1.9.x/server-python/examples/vectorsdb/list-collections.md b/examples/1.9.x/server-python/examples/vectorsdb/list-collections.md new file mode 100644 index 000000000..184c3c3f6 --- /dev/null +++ b/examples/1.9.x/server-python/examples/vectorsdb/list-collections.md @@ -0,0 +1,21 @@ +```python +from appwrite.client import Client +from appwrite.services.vectors_db import VectorsDB +from appwrite.models import VectorsdbCollectionList + +client = Client() +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('') # Your project ID +client.set_key('') # Your secret API key + +vectors_db = VectorsDB(client) + +result: VectorsdbCollectionList = vectors_db.list_collections( + database_id = '', + queries = [], # optional + search = '', # optional + total = False # optional +) + +print(result.model_dump()) +``` diff --git a/examples/1.9.x/server-python/examples/vectorsdb/list-documents.md b/examples/1.9.x/server-python/examples/vectorsdb/list-documents.md new file mode 100644 index 000000000..5ac3ab2fe --- /dev/null +++ b/examples/1.9.x/server-python/examples/vectorsdb/list-documents.md @@ -0,0 +1,23 @@ +```python +from appwrite.client import Client +from appwrite.services.vectors_db import VectorsDB +from appwrite.models import DocumentList + +client = Client() +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('') # Your project ID +client.set_session('') # The user session to authenticate with + +vectors_db = VectorsDB(client) + +result: DocumentList = vectors_db.list_documents( + database_id = '', + collection_id = '', + queries = [], # optional + transaction_id = '', # optional + total = False, # optional + ttl = 0 # optional +) + +print(result.model_dump()) +``` diff --git a/examples/1.9.x/server-python/examples/vectorsdb/list-indexes.md b/examples/1.9.x/server-python/examples/vectorsdb/list-indexes.md new file mode 100644 index 000000000..c72e98002 --- /dev/null +++ b/examples/1.9.x/server-python/examples/vectorsdb/list-indexes.md @@ -0,0 +1,21 @@ +```python +from appwrite.client import Client +from appwrite.services.vectors_db import VectorsDB +from appwrite.models import IndexList + +client = Client() +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('') # Your project ID +client.set_key('') # Your secret API key + +vectors_db = VectorsDB(client) + +result: IndexList = vectors_db.list_indexes( + database_id = '', + collection_id = '', + queries = [], # optional + total = False # optional +) + +print(result.model_dump()) +``` diff --git a/examples/1.9.x/server-python/examples/vectorsdb/list-transactions.md b/examples/1.9.x/server-python/examples/vectorsdb/list-transactions.md new file mode 100644 index 000000000..d21db0122 --- /dev/null +++ b/examples/1.9.x/server-python/examples/vectorsdb/list-transactions.md @@ -0,0 +1,18 @@ +```python +from appwrite.client import Client +from appwrite.services.vectors_db import VectorsDB +from appwrite.models import TransactionList + +client = Client() +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('') # Your project ID +client.set_key('') # Your secret API key + +vectors_db = VectorsDB(client) + +result: TransactionList = vectors_db.list_transactions( + queries = [] # optional +) + +print(result.model_dump()) +``` diff --git a/examples/1.9.x/server-python/examples/vectorsdb/list.md b/examples/1.9.x/server-python/examples/vectorsdb/list.md new file mode 100644 index 000000000..ac87bca38 --- /dev/null +++ b/examples/1.9.x/server-python/examples/vectorsdb/list.md @@ -0,0 +1,20 @@ +```python +from appwrite.client import Client +from appwrite.services.vectors_db import VectorsDB +from appwrite.models import DatabaseList + +client = Client() +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('') # Your project ID +client.set_key('') # Your secret API key + +vectors_db = VectorsDB(client) + +result: DatabaseList = vectors_db.list( + queries = [], # optional + search = '', # optional + total = False # optional +) + +print(result.model_dump()) +``` diff --git a/examples/1.9.x/server-python/examples/vectorsdb/update-collection.md b/examples/1.9.x/server-python/examples/vectorsdb/update-collection.md new file mode 100644 index 000000000..3dcf8903e --- /dev/null +++ b/examples/1.9.x/server-python/examples/vectorsdb/update-collection.md @@ -0,0 +1,26 @@ +```python +from appwrite.client import Client +from appwrite.services.vectors_db import VectorsDB +from appwrite.models import VectorsdbCollection +from appwrite.permission import Permission +from appwrite.role import Role + +client = Client() +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('') # Your project ID +client.set_key('') # Your secret API key + +vectors_db = VectorsDB(client) + +result: VectorsdbCollection = vectors_db.update_collection( + database_id = '', + collection_id = '', + name = '', + dimension = 1, # optional + permissions = [Permission.read(Role.any())], # optional + document_security = False, # optional + enabled = False # optional +) + +print(result.model_dump()) +``` diff --git a/examples/1.9.x/server-python/examples/vectorsdb/update-document.md b/examples/1.9.x/server-python/examples/vectorsdb/update-document.md new file mode 100644 index 000000000..c70c2bc16 --- /dev/null +++ b/examples/1.9.x/server-python/examples/vectorsdb/update-document.md @@ -0,0 +1,25 @@ +```python +from appwrite.client import Client +from appwrite.services.vectors_db import VectorsDB +from appwrite.models import Document +from appwrite.permission import Permission +from appwrite.role import Role + +client = Client() +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('') # Your project ID +client.set_session('') # The user session to authenticate with + +vectors_db = VectorsDB(client) + +result: Document = vectors_db.update_document( + database_id = '', + collection_id = '', + document_id = '', + data = {}, # optional + permissions = [Permission.read(Role.any())], # optional + transaction_id = '' # optional +) + +print(result.model_dump()) +``` diff --git a/examples/1.9.x/server-python/examples/vectorsdb/update-documents.md b/examples/1.9.x/server-python/examples/vectorsdb/update-documents.md new file mode 100644 index 000000000..5c947cd1a --- /dev/null +++ b/examples/1.9.x/server-python/examples/vectorsdb/update-documents.md @@ -0,0 +1,22 @@ +```python +from appwrite.client import Client +from appwrite.services.vectors_db import VectorsDB +from appwrite.models import DocumentList + +client = Client() +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('') # Your project ID +client.set_key('') # Your secret API key + +vectors_db = VectorsDB(client) + +result: DocumentList = vectors_db.update_documents( + database_id = '', + collection_id = '', + data = {}, # optional + queries = [], # optional + transaction_id = '' # optional +) + +print(result.model_dump()) +``` diff --git a/examples/1.9.x/server-python/examples/vectorsdb/update-transaction.md b/examples/1.9.x/server-python/examples/vectorsdb/update-transaction.md new file mode 100644 index 000000000..276c25c85 --- /dev/null +++ b/examples/1.9.x/server-python/examples/vectorsdb/update-transaction.md @@ -0,0 +1,20 @@ +```python +from appwrite.client import Client +from appwrite.services.vectors_db import VectorsDB +from appwrite.models import Transaction + +client = Client() +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('') # Your project ID +client.set_key('') # Your secret API key + +vectors_db = VectorsDB(client) + +result: Transaction = vectors_db.update_transaction( + transaction_id = '', + commit = False, # optional + rollback = False # optional +) + +print(result.model_dump()) +``` diff --git a/examples/1.9.x/server-python/examples/vectorsdb/update.md b/examples/1.9.x/server-python/examples/vectorsdb/update.md new file mode 100644 index 000000000..c2bcb3dc4 --- /dev/null +++ b/examples/1.9.x/server-python/examples/vectorsdb/update.md @@ -0,0 +1,20 @@ +```python +from appwrite.client import Client +from appwrite.services.vectors_db import VectorsDB +from appwrite.models import Database + +client = Client() +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('') # Your project ID +client.set_key('') # Your secret API key + +vectors_db = VectorsDB(client) + +result: Database = vectors_db.update( + database_id = '', + name = '', + enabled = False # optional +) + +print(result.model_dump()) +``` diff --git a/examples/1.9.x/server-python/examples/vectorsdb/upsert-document.md b/examples/1.9.x/server-python/examples/vectorsdb/upsert-document.md new file mode 100644 index 000000000..95f916d3e --- /dev/null +++ b/examples/1.9.x/server-python/examples/vectorsdb/upsert-document.md @@ -0,0 +1,25 @@ +```python +from appwrite.client import Client +from appwrite.services.vectors_db import VectorsDB +from appwrite.models import Document +from appwrite.permission import Permission +from appwrite.role import Role + +client = Client() +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('') # Your project ID +client.set_session('') # The user session to authenticate with + +vectors_db = VectorsDB(client) + +result: Document = vectors_db.upsert_document( + database_id = '', + collection_id = '', + document_id = '', + data = {}, # optional + permissions = [Permission.read(Role.any())], # optional + transaction_id = '' # optional +) + +print(result.model_dump()) +``` diff --git a/examples/1.9.x/server-python/examples/vectorsdb/upsert-documents.md b/examples/1.9.x/server-python/examples/vectorsdb/upsert-documents.md new file mode 100644 index 000000000..5eb3d2d1a --- /dev/null +++ b/examples/1.9.x/server-python/examples/vectorsdb/upsert-documents.md @@ -0,0 +1,21 @@ +```python +from appwrite.client import Client +from appwrite.services.vectors_db import VectorsDB +from appwrite.models import DocumentList + +client = Client() +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('') # Your project ID +client.set_key('') # Your secret API key + +vectors_db = VectorsDB(client) + +result: DocumentList = vectors_db.upsert_documents( + database_id = '', + collection_id = '', + documents = [], + transaction_id = '' # optional +) + +print(result.model_dump()) +``` diff --git a/examples/1.9.x/server-rest/examples/apps/create-installation-token.md b/examples/1.9.x/server-rest/examples/apps/create-installation-token.md new file mode 100644 index 000000000..facead205 --- /dev/null +++ b/examples/1.9.x/server-rest/examples/apps/create-installation-token.md @@ -0,0 +1,10 @@ +```http +POST /v1/apps/{appId}/installations/{installationId}/tokens HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +Accept: application/json +X-Appwrite-Response-Format: 1.9.5 +X-Appwrite-Project: + + +``` diff --git a/examples/1.9.x/server-rest/examples/apps/create-key.md b/examples/1.9.x/server-rest/examples/apps/create-key.md new file mode 100644 index 000000000..9b8032358 --- /dev/null +++ b/examples/1.9.x/server-rest/examples/apps/create-key.md @@ -0,0 +1,10 @@ +```http +POST /v1/apps/{appId}/keys HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +Accept: application/json +X-Appwrite-Response-Format: 1.9.5 +X-Appwrite-Project: + + +``` diff --git a/examples/1.9.x/server-rest/examples/apps/create-secret.md b/examples/1.9.x/server-rest/examples/apps/create-secret.md new file mode 100644 index 000000000..e94742f84 --- /dev/null +++ b/examples/1.9.x/server-rest/examples/apps/create-secret.md @@ -0,0 +1,10 @@ +```http +POST /v1/apps/{appId}/secrets HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +Accept: application/json +X-Appwrite-Response-Format: 1.9.5 +X-Appwrite-Project: + + +``` diff --git a/examples/1.9.x/server-rest/examples/apps/create.md b/examples/1.9.x/server-rest/examples/apps/create.md new file mode 100644 index 000000000..68ac3e9e4 --- /dev/null +++ b/examples/1.9.x/server-rest/examples/apps/create.md @@ -0,0 +1,52 @@ +```http +POST /v1/apps HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +Accept: application/json +X-Appwrite-Response-Format: 1.9.5 +X-Appwrite-Project: + +{ + "appId": "", + "name": "", + "description": "", + "clientUri": "https://example.com", + "logoUri": "https://example.com", + "privacyPolicyUrl": "https://example.com", + "termsUrl": "https://example.com", + "contacts": [], + "tagline": "", + "tags": [], + "images": [], + "supportUrl": "https://example.com", + "dataDeletionUrl": "https://example.com", + "redirectUris": [], + "postLogoutRedirectUris": [], + "enabled": false, + "type": "public", + "deviceFlow": false, + "teamId": "" +} + +{ + "appId": "", + "name": "", + "description": "", + "clientUri": "https://example.com", + "logoUri": "https://example.com", + "privacyPolicyUrl": "https://example.com", + "termsUrl": "https://example.com", + "contacts": [], + "tagline": "", + "tags": [], + "images": [], + "supportUrl": "https://example.com", + "dataDeletionUrl": "https://example.com", + "redirectUris": [], + "postLogoutRedirectUris": [], + "enabled": false, + "type": "public", + "deviceFlow": false, + "teamId": "" +} +``` diff --git a/examples/1.9.x/server-rest/examples/apps/delete-key.md b/examples/1.9.x/server-rest/examples/apps/delete-key.md new file mode 100644 index 000000000..0683a7668 --- /dev/null +++ b/examples/1.9.x/server-rest/examples/apps/delete-key.md @@ -0,0 +1,10 @@ +```http +DELETE /v1/apps/{appId}/keys/{keyId} HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +Accept: application/json +X-Appwrite-Response-Format: 1.9.5 +X-Appwrite-Project: + + +``` diff --git a/examples/1.9.x/server-rest/examples/apps/delete-secret.md b/examples/1.9.x/server-rest/examples/apps/delete-secret.md new file mode 100644 index 000000000..e83dfab64 --- /dev/null +++ b/examples/1.9.x/server-rest/examples/apps/delete-secret.md @@ -0,0 +1,10 @@ +```http +DELETE /v1/apps/{appId}/secrets/{secretId} HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +Accept: application/json +X-Appwrite-Response-Format: 1.9.5 +X-Appwrite-Project: + + +``` diff --git a/examples/1.9.x/server-rest/examples/apps/delete-tokens.md b/examples/1.9.x/server-rest/examples/apps/delete-tokens.md new file mode 100644 index 000000000..ae3aca782 --- /dev/null +++ b/examples/1.9.x/server-rest/examples/apps/delete-tokens.md @@ -0,0 +1,10 @@ +```http +DELETE /v1/apps/{appId}/tokens HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +Accept: application/json +X-Appwrite-Response-Format: 1.9.5 +X-Appwrite-Project: + + +``` diff --git a/examples/1.9.x/server-rest/examples/apps/delete.md b/examples/1.9.x/server-rest/examples/apps/delete.md new file mode 100644 index 000000000..77195f773 --- /dev/null +++ b/examples/1.9.x/server-rest/examples/apps/delete.md @@ -0,0 +1,10 @@ +```http +DELETE /v1/apps/{appId} HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +Accept: application/json +X-Appwrite-Response-Format: 1.9.5 +X-Appwrite-Project: + + +``` diff --git a/examples/1.9.x/server-rest/examples/apps/get-installation.md b/examples/1.9.x/server-rest/examples/apps/get-installation.md new file mode 100644 index 000000000..96f6a1cbb --- /dev/null +++ b/examples/1.9.x/server-rest/examples/apps/get-installation.md @@ -0,0 +1,8 @@ +```http +GET /v1/apps/{appId}/installations/{installationId} HTTP/1.1 +Host: cloud.appwrite.io +Accept: application/json +X-Appwrite-Response-Format: 1.9.5 +X-Appwrite-Project: + +``` diff --git a/examples/1.9.x/server-rest/examples/apps/get-key.md b/examples/1.9.x/server-rest/examples/apps/get-key.md new file mode 100644 index 000000000..231b74a13 --- /dev/null +++ b/examples/1.9.x/server-rest/examples/apps/get-key.md @@ -0,0 +1,8 @@ +```http +GET /v1/apps/{appId}/keys/{keyId} HTTP/1.1 +Host: cloud.appwrite.io +Accept: application/json +X-Appwrite-Response-Format: 1.9.5 +X-Appwrite-Project: + +``` diff --git a/examples/1.9.x/server-rest/examples/apps/get-secret.md b/examples/1.9.x/server-rest/examples/apps/get-secret.md new file mode 100644 index 000000000..c373fa47c --- /dev/null +++ b/examples/1.9.x/server-rest/examples/apps/get-secret.md @@ -0,0 +1,8 @@ +```http +GET /v1/apps/{appId}/secrets/{secretId} HTTP/1.1 +Host: cloud.appwrite.io +Accept: application/json +X-Appwrite-Response-Format: 1.9.5 +X-Appwrite-Project: + +``` diff --git a/examples/1.9.x/server-rest/examples/apps/get.md b/examples/1.9.x/server-rest/examples/apps/get.md new file mode 100644 index 000000000..ef5386e68 --- /dev/null +++ b/examples/1.9.x/server-rest/examples/apps/get.md @@ -0,0 +1,8 @@ +```http +GET /v1/apps/{appId} HTTP/1.1 +Host: cloud.appwrite.io +Accept: application/json +X-Appwrite-Response-Format: 1.9.5 +X-Appwrite-Project: + +``` diff --git a/examples/1.9.x/server-rest/examples/apps/list-installation-scopes.md b/examples/1.9.x/server-rest/examples/apps/list-installation-scopes.md new file mode 100644 index 000000000..1add78a0a --- /dev/null +++ b/examples/1.9.x/server-rest/examples/apps/list-installation-scopes.md @@ -0,0 +1,8 @@ +```http +GET /v1/apps/scopes/installations HTTP/1.1 +Host: cloud.appwrite.io +Accept: application/json +X-Appwrite-Response-Format: 1.9.5 +X-Appwrite-Project: + +``` diff --git a/examples/1.9.x/server-rest/examples/apps/list-installations.md b/examples/1.9.x/server-rest/examples/apps/list-installations.md new file mode 100644 index 000000000..d4165644c --- /dev/null +++ b/examples/1.9.x/server-rest/examples/apps/list-installations.md @@ -0,0 +1,8 @@ +```http +GET /v1/apps/{appId}/installations HTTP/1.1 +Host: cloud.appwrite.io +Accept: application/json +X-Appwrite-Response-Format: 1.9.5 +X-Appwrite-Project: + +``` diff --git a/examples/1.9.x/server-rest/examples/apps/list-keys.md b/examples/1.9.x/server-rest/examples/apps/list-keys.md new file mode 100644 index 000000000..01a5ac6aa --- /dev/null +++ b/examples/1.9.x/server-rest/examples/apps/list-keys.md @@ -0,0 +1,8 @@ +```http +GET /v1/apps/{appId}/keys HTTP/1.1 +Host: cloud.appwrite.io +Accept: application/json +X-Appwrite-Response-Format: 1.9.5 +X-Appwrite-Project: + +``` diff --git a/examples/1.9.x/server-rest/examples/apps/list-o-auth-2-scopes.md b/examples/1.9.x/server-rest/examples/apps/list-o-auth-2-scopes.md new file mode 100644 index 000000000..b7f30e5f5 --- /dev/null +++ b/examples/1.9.x/server-rest/examples/apps/list-o-auth-2-scopes.md @@ -0,0 +1,8 @@ +```http +GET /v1/apps/scopes/oauth2 HTTP/1.1 +Host: cloud.appwrite.io +Accept: application/json +X-Appwrite-Response-Format: 1.9.5 +X-Appwrite-Project: + +``` diff --git a/examples/1.9.x/server-rest/examples/apps/list-secrets.md b/examples/1.9.x/server-rest/examples/apps/list-secrets.md new file mode 100644 index 000000000..e3ea77786 --- /dev/null +++ b/examples/1.9.x/server-rest/examples/apps/list-secrets.md @@ -0,0 +1,8 @@ +```http +GET /v1/apps/{appId}/secrets HTTP/1.1 +Host: cloud.appwrite.io +Accept: application/json +X-Appwrite-Response-Format: 1.9.5 +X-Appwrite-Project: + +``` diff --git a/examples/1.9.x/server-rest/examples/apps/list.md b/examples/1.9.x/server-rest/examples/apps/list.md new file mode 100644 index 000000000..825f6a2e7 --- /dev/null +++ b/examples/1.9.x/server-rest/examples/apps/list.md @@ -0,0 +1,8 @@ +```http +GET /v1/apps HTTP/1.1 +Host: cloud.appwrite.io +Accept: application/json +X-Appwrite-Response-Format: 1.9.5 +X-Appwrite-Project: + +``` diff --git a/examples/1.9.x/server-rest/examples/apps/update-labels.md b/examples/1.9.x/server-rest/examples/apps/update-labels.md new file mode 100644 index 000000000..32e38605a --- /dev/null +++ b/examples/1.9.x/server-rest/examples/apps/update-labels.md @@ -0,0 +1,16 @@ +```http +PUT /v1/apps/{appId}/labels HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +Accept: application/json +X-Appwrite-Response-Format: 1.9.5 +X-Appwrite-Project: + +{ + "labels": [] +} + +{ + "labels": [] +} +``` diff --git a/examples/1.9.x/server-rest/examples/apps/update-team.md b/examples/1.9.x/server-rest/examples/apps/update-team.md new file mode 100644 index 000000000..6c4e045d4 --- /dev/null +++ b/examples/1.9.x/server-rest/examples/apps/update-team.md @@ -0,0 +1,16 @@ +```http +PATCH /v1/apps/{appId}/team HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +Accept: application/json +X-Appwrite-Response-Format: 1.9.5 +X-Appwrite-Project: + +{ + "teamId": "" +} + +{ + "teamId": "" +} +``` diff --git a/examples/1.9.x/server-rest/examples/apps/update.md b/examples/1.9.x/server-rest/examples/apps/update.md new file mode 100644 index 000000000..a29ec8760 --- /dev/null +++ b/examples/1.9.x/server-rest/examples/apps/update.md @@ -0,0 +1,52 @@ +```http +PUT /v1/apps/{appId} HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +Accept: application/json +X-Appwrite-Response-Format: 1.9.5 +X-Appwrite-Project: + +{ + "name": "", + "description": "", + "clientUri": "https://example.com", + "logoUri": "https://example.com", + "privacyPolicyUrl": "https://example.com", + "termsUrl": "https://example.com", + "contacts": [], + "tagline": "", + "tags": [], + "images": [], + "supportUrl": "https://example.com", + "dataDeletionUrl": "https://example.com", + "enabled": false, + "redirectUris": [], + "postLogoutRedirectUris": [], + "type": "public", + "deviceFlow": false, + "installationScopes": [], + "installationRedirectUrl": "https://example.com" +} + +{ + "name": "", + "description": "", + "clientUri": "https://example.com", + "logoUri": "https://example.com", + "privacyPolicyUrl": "https://example.com", + "termsUrl": "https://example.com", + "contacts": [], + "tagline": "", + "tags": [], + "images": [], + "supportUrl": "https://example.com", + "dataDeletionUrl": "https://example.com", + "enabled": false, + "redirectUris": [], + "postLogoutRedirectUris": [], + "type": "public", + "deviceFlow": false, + "installationScopes": [], + "installationRedirectUrl": "https://example.com" +} +``` diff --git a/examples/1.9.x/server-rest/examples/documentsdb/create-collection.md b/examples/1.9.x/server-rest/examples/documentsdb/create-collection.md new file mode 100644 index 000000000..163f90511 --- /dev/null +++ b/examples/1.9.x/server-rest/examples/documentsdb/create-collection.md @@ -0,0 +1,28 @@ +```http +POST /v1/documentsdb/{databaseId}/collections HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +Accept: application/json +X-Appwrite-Response-Format: 1.9.5 +X-Appwrite-Project: + +{ + "collectionId": "", + "name": "", + "permissions": ["read(\"any\")"], + "documentSecurity": false, + "enabled": false, + "attributes": [], + "indexes": [] +} + +{ + "collectionId": "", + "name": "", + "permissions": ["read(\"any\")"], + "documentSecurity": false, + "enabled": false, + "attributes": [], + "indexes": [] +} +``` diff --git a/examples/1.9.x/server-rest/examples/documentsdb/create-document.md b/examples/1.9.x/server-rest/examples/documentsdb/create-document.md new file mode 100644 index 000000000..ab98253a9 --- /dev/null +++ b/examples/1.9.x/server-rest/examples/documentsdb/create-document.md @@ -0,0 +1,32 @@ +```http +POST /v1/documentsdb/{databaseId}/collections/{collectionId}/documents HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +Accept: application/json +X-Appwrite-Response-Format: 1.9.5 +X-Appwrite-Project: + +{ + "documentId": "", + "data": { + "username": "walter.obrien", + "email": "walter.obrien@example.com", + "fullName": "Walter O'Brien", + "age": 30, + "isAdmin": false + }, + "permissions": ["read(\"any\")"] +} + +{ + "documentId": "", + "data": { + "username": "walter.obrien", + "email": "walter.obrien@example.com", + "fullName": "Walter O'Brien", + "age": 30, + "isAdmin": false + }, + "permissions": ["read(\"any\")"] +} +``` diff --git a/examples/1.9.x/server-rest/examples/documentsdb/create-documents.md b/examples/1.9.x/server-rest/examples/documentsdb/create-documents.md new file mode 100644 index 000000000..d02f6d000 --- /dev/null +++ b/examples/1.9.x/server-rest/examples/documentsdb/create-documents.md @@ -0,0 +1,16 @@ +```http +POST /v1/documentsdb/{databaseId}/collections/{collectionId}/documents HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +Accept: application/json +X-Appwrite-Response-Format: 1.9.5 +X-Appwrite-Project: + +{ + "documents": [] +} + +{ + "documents": [] +} +``` diff --git a/examples/1.9.x/server-rest/examples/documentsdb/create-index.md b/examples/1.9.x/server-rest/examples/documentsdb/create-index.md new file mode 100644 index 000000000..149bc5b17 --- /dev/null +++ b/examples/1.9.x/server-rest/examples/documentsdb/create-index.md @@ -0,0 +1,24 @@ +```http +POST /v1/documentsdb/{databaseId}/collections/{collectionId}/indexes HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +Accept: application/json +X-Appwrite-Response-Format: 1.9.5 +X-Appwrite-Project: + +{ + "key": "", + "type": "key", + "attributes": [], + "orders": [], + "lengths": [] +} + +{ + "key": "", + "type": "key", + "attributes": [], + "orders": [], + "lengths": [] +} +``` diff --git a/examples/1.9.x/server-rest/examples/documentsdb/create-operations.md b/examples/1.9.x/server-rest/examples/documentsdb/create-operations.md new file mode 100644 index 000000000..7fe0e74a7 --- /dev/null +++ b/examples/1.9.x/server-rest/examples/documentsdb/create-operations.md @@ -0,0 +1,36 @@ +```http +POST /v1/documentsdb/transactions/{transactionId}/operations HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +Accept: application/json +X-Appwrite-Response-Format: 1.9.5 +X-Appwrite-Project: + +{ + "operations": [ + { + "action": "create", + "databaseId": "", + "collectionId": "", + "documentId": "", + "data": { + "name": "Walter O'Brien" + } + } + ] +} + +{ + "operations": [ + { + "action": "create", + "databaseId": "", + "collectionId": "", + "documentId": "", + "data": { + "name": "Walter O'Brien" + } + } + ] +} +``` diff --git a/examples/1.9.x/server-rest/examples/documentsdb/create-transaction.md b/examples/1.9.x/server-rest/examples/documentsdb/create-transaction.md new file mode 100644 index 000000000..49413e449 --- /dev/null +++ b/examples/1.9.x/server-rest/examples/documentsdb/create-transaction.md @@ -0,0 +1,16 @@ +```http +POST /v1/documentsdb/transactions HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +Accept: application/json +X-Appwrite-Response-Format: 1.9.5 +X-Appwrite-Project: + +{ + "ttl": 60 +} + +{ + "ttl": 60 +} +``` diff --git a/examples/1.9.x/server-rest/examples/documentsdb/create.md b/examples/1.9.x/server-rest/examples/documentsdb/create.md new file mode 100644 index 000000000..45c9409fc --- /dev/null +++ b/examples/1.9.x/server-rest/examples/documentsdb/create.md @@ -0,0 +1,20 @@ +```http +POST /v1/documentsdb HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +Accept: application/json +X-Appwrite-Response-Format: 1.9.5 +X-Appwrite-Project: + +{ + "databaseId": "", + "name": "", + "enabled": false +} + +{ + "databaseId": "", + "name": "", + "enabled": false +} +``` diff --git a/examples/1.9.x/server-rest/examples/documentsdb/decrement-document-attribute.md b/examples/1.9.x/server-rest/examples/documentsdb/decrement-document-attribute.md new file mode 100644 index 000000000..c9dbeea35 --- /dev/null +++ b/examples/1.9.x/server-rest/examples/documentsdb/decrement-document-attribute.md @@ -0,0 +1,20 @@ +```http +PATCH /v1/documentsdb/{databaseId}/collections/{collectionId}/documents/{documentId}/{attribute}/decrement HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +Accept: application/json +X-Appwrite-Response-Format: 1.9.5 +X-Appwrite-Project: + +{ + "value": 0, + "min": 0, + "transactionId": "" +} + +{ + "value": 0, + "min": 0, + "transactionId": "" +} +``` diff --git a/examples/1.9.x/server-rest/examples/documentsdb/delete-collection.md b/examples/1.9.x/server-rest/examples/documentsdb/delete-collection.md new file mode 100644 index 000000000..5826f8e40 --- /dev/null +++ b/examples/1.9.x/server-rest/examples/documentsdb/delete-collection.md @@ -0,0 +1,8 @@ +```http +DELETE /v1/documentsdb/{databaseId}/collections/{collectionId} HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.9.5 +X-Appwrite-Project: + +``` diff --git a/examples/1.9.x/server-rest/examples/documentsdb/delete-document.md b/examples/1.9.x/server-rest/examples/documentsdb/delete-document.md new file mode 100644 index 000000000..db633a78b --- /dev/null +++ b/examples/1.9.x/server-rest/examples/documentsdb/delete-document.md @@ -0,0 +1,8 @@ +```http +DELETE /v1/documentsdb/{databaseId}/collections/{collectionId}/documents/{documentId} HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.9.5 +X-Appwrite-Project: + +``` diff --git a/examples/1.9.x/server-rest/examples/documentsdb/delete-documents.md b/examples/1.9.x/server-rest/examples/documentsdb/delete-documents.md new file mode 100644 index 000000000..08a2ac538 --- /dev/null +++ b/examples/1.9.x/server-rest/examples/documentsdb/delete-documents.md @@ -0,0 +1,10 @@ +```http +DELETE /v1/documentsdb/{databaseId}/collections/{collectionId}/documents HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +Accept: application/json +X-Appwrite-Response-Format: 1.9.5 +X-Appwrite-Project: + + +``` diff --git a/examples/1.9.x/server-rest/examples/documentsdb/delete-index.md b/examples/1.9.x/server-rest/examples/documentsdb/delete-index.md new file mode 100644 index 000000000..a85e4f03e --- /dev/null +++ b/examples/1.9.x/server-rest/examples/documentsdb/delete-index.md @@ -0,0 +1,8 @@ +```http +DELETE /v1/documentsdb/{databaseId}/collections/{collectionId}/indexes/{key} HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.9.5 +X-Appwrite-Project: + +``` diff --git a/examples/1.9.x/server-rest/examples/documentsdb/delete-transaction.md b/examples/1.9.x/server-rest/examples/documentsdb/delete-transaction.md new file mode 100644 index 000000000..d18f990c4 --- /dev/null +++ b/examples/1.9.x/server-rest/examples/documentsdb/delete-transaction.md @@ -0,0 +1,8 @@ +```http +DELETE /v1/documentsdb/transactions/{transactionId} HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.9.5 +X-Appwrite-Project: + +``` diff --git a/examples/1.9.x/server-rest/examples/documentsdb/delete.md b/examples/1.9.x/server-rest/examples/documentsdb/delete.md new file mode 100644 index 000000000..66d24a10e --- /dev/null +++ b/examples/1.9.x/server-rest/examples/documentsdb/delete.md @@ -0,0 +1,8 @@ +```http +DELETE /v1/documentsdb/{databaseId} HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.9.5 +X-Appwrite-Project: + +``` diff --git a/examples/1.9.x/server-rest/examples/documentsdb/get-collection.md b/examples/1.9.x/server-rest/examples/documentsdb/get-collection.md new file mode 100644 index 000000000..435c30709 --- /dev/null +++ b/examples/1.9.x/server-rest/examples/documentsdb/get-collection.md @@ -0,0 +1,8 @@ +```http +GET /v1/documentsdb/{databaseId}/collections/{collectionId} HTTP/1.1 +Host: cloud.appwrite.io +Accept: application/json +X-Appwrite-Response-Format: 1.9.5 +X-Appwrite-Project: + +``` diff --git a/examples/1.9.x/server-rest/examples/documentsdb/get-document.md b/examples/1.9.x/server-rest/examples/documentsdb/get-document.md new file mode 100644 index 000000000..2c5c87396 --- /dev/null +++ b/examples/1.9.x/server-rest/examples/documentsdb/get-document.md @@ -0,0 +1,8 @@ +```http +GET /v1/documentsdb/{databaseId}/collections/{collectionId}/documents/{documentId} HTTP/1.1 +Host: cloud.appwrite.io +Accept: application/json +X-Appwrite-Response-Format: 1.9.5 +X-Appwrite-Project: + +``` diff --git a/examples/1.9.x/server-rest/examples/documentsdb/get-index.md b/examples/1.9.x/server-rest/examples/documentsdb/get-index.md new file mode 100644 index 000000000..eb445e9f0 --- /dev/null +++ b/examples/1.9.x/server-rest/examples/documentsdb/get-index.md @@ -0,0 +1,8 @@ +```http +GET /v1/documentsdb/{databaseId}/collections/{collectionId}/indexes/{key} HTTP/1.1 +Host: cloud.appwrite.io +Accept: application/json +X-Appwrite-Response-Format: 1.9.5 +X-Appwrite-Project: + +``` diff --git a/examples/1.9.x/server-rest/examples/documentsdb/get-transaction.md b/examples/1.9.x/server-rest/examples/documentsdb/get-transaction.md new file mode 100644 index 000000000..2a137017c --- /dev/null +++ b/examples/1.9.x/server-rest/examples/documentsdb/get-transaction.md @@ -0,0 +1,8 @@ +```http +GET /v1/documentsdb/transactions/{transactionId} HTTP/1.1 +Host: cloud.appwrite.io +Accept: application/json +X-Appwrite-Response-Format: 1.9.5 +X-Appwrite-Project: + +``` diff --git a/examples/1.9.x/server-rest/examples/documentsdb/get.md b/examples/1.9.x/server-rest/examples/documentsdb/get.md new file mode 100644 index 000000000..dd61c4f31 --- /dev/null +++ b/examples/1.9.x/server-rest/examples/documentsdb/get.md @@ -0,0 +1,8 @@ +```http +GET /v1/documentsdb/{databaseId} HTTP/1.1 +Host: cloud.appwrite.io +Accept: application/json +X-Appwrite-Response-Format: 1.9.5 +X-Appwrite-Project: + +``` diff --git a/examples/1.9.x/server-rest/examples/documentsdb/increment-document-attribute.md b/examples/1.9.x/server-rest/examples/documentsdb/increment-document-attribute.md new file mode 100644 index 000000000..436abe3da --- /dev/null +++ b/examples/1.9.x/server-rest/examples/documentsdb/increment-document-attribute.md @@ -0,0 +1,20 @@ +```http +PATCH /v1/documentsdb/{databaseId}/collections/{collectionId}/documents/{documentId}/{attribute}/increment HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +Accept: application/json +X-Appwrite-Response-Format: 1.9.5 +X-Appwrite-Project: + +{ + "value": 0, + "max": 0, + "transactionId": "" +} + +{ + "value": 0, + "max": 0, + "transactionId": "" +} +``` diff --git a/examples/1.9.x/server-rest/examples/documentsdb/list-collections.md b/examples/1.9.x/server-rest/examples/documentsdb/list-collections.md new file mode 100644 index 000000000..8e854a66b --- /dev/null +++ b/examples/1.9.x/server-rest/examples/documentsdb/list-collections.md @@ -0,0 +1,8 @@ +```http +GET /v1/documentsdb/{databaseId}/collections HTTP/1.1 +Host: cloud.appwrite.io +Accept: application/json +X-Appwrite-Response-Format: 1.9.5 +X-Appwrite-Project: + +``` diff --git a/examples/1.9.x/server-rest/examples/documentsdb/list-documents.md b/examples/1.9.x/server-rest/examples/documentsdb/list-documents.md new file mode 100644 index 000000000..d4648b527 --- /dev/null +++ b/examples/1.9.x/server-rest/examples/documentsdb/list-documents.md @@ -0,0 +1,8 @@ +```http +GET /v1/documentsdb/{databaseId}/collections/{collectionId}/documents HTTP/1.1 +Host: cloud.appwrite.io +Accept: application/json +X-Appwrite-Response-Format: 1.9.5 +X-Appwrite-Project: + +``` diff --git a/examples/1.9.x/server-rest/examples/documentsdb/list-indexes.md b/examples/1.9.x/server-rest/examples/documentsdb/list-indexes.md new file mode 100644 index 000000000..60ec8d739 --- /dev/null +++ b/examples/1.9.x/server-rest/examples/documentsdb/list-indexes.md @@ -0,0 +1,8 @@ +```http +GET /v1/documentsdb/{databaseId}/collections/{collectionId}/indexes HTTP/1.1 +Host: cloud.appwrite.io +Accept: application/json +X-Appwrite-Response-Format: 1.9.5 +X-Appwrite-Project: + +``` diff --git a/examples/1.9.x/server-rest/examples/documentsdb/list-transactions.md b/examples/1.9.x/server-rest/examples/documentsdb/list-transactions.md new file mode 100644 index 000000000..1722cfbcb --- /dev/null +++ b/examples/1.9.x/server-rest/examples/documentsdb/list-transactions.md @@ -0,0 +1,8 @@ +```http +GET /v1/documentsdb/transactions HTTP/1.1 +Host: cloud.appwrite.io +Accept: application/json +X-Appwrite-Response-Format: 1.9.5 +X-Appwrite-Project: + +``` diff --git a/examples/1.9.x/server-rest/examples/documentsdb/list.md b/examples/1.9.x/server-rest/examples/documentsdb/list.md new file mode 100644 index 000000000..2fa54e1e4 --- /dev/null +++ b/examples/1.9.x/server-rest/examples/documentsdb/list.md @@ -0,0 +1,8 @@ +```http +GET /v1/documentsdb HTTP/1.1 +Host: cloud.appwrite.io +Accept: application/json +X-Appwrite-Response-Format: 1.9.5 +X-Appwrite-Project: + +``` diff --git a/examples/1.9.x/server-rest/examples/documentsdb/update-collection.md b/examples/1.9.x/server-rest/examples/documentsdb/update-collection.md new file mode 100644 index 000000000..939e251a4 --- /dev/null +++ b/examples/1.9.x/server-rest/examples/documentsdb/update-collection.md @@ -0,0 +1,24 @@ +```http +PUT /v1/documentsdb/{databaseId}/collections/{collectionId} HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +Accept: application/json +X-Appwrite-Response-Format: 1.9.5 +X-Appwrite-Project: + +{ + "name": "", + "permissions": ["read(\"any\")"], + "documentSecurity": false, + "enabled": false, + "purge": false +} + +{ + "name": "", + "permissions": ["read(\"any\")"], + "documentSecurity": false, + "enabled": false, + "purge": false +} +``` diff --git a/examples/1.9.x/server-rest/examples/documentsdb/update-document.md b/examples/1.9.x/server-rest/examples/documentsdb/update-document.md new file mode 100644 index 000000000..1a55ff0a5 --- /dev/null +++ b/examples/1.9.x/server-rest/examples/documentsdb/update-document.md @@ -0,0 +1,20 @@ +```http +PATCH /v1/documentsdb/{databaseId}/collections/{collectionId}/documents/{documentId} HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +Accept: application/json +X-Appwrite-Response-Format: 1.9.5 +X-Appwrite-Project: + +{ + "data": {}, + "permissions": ["read(\"any\")"], + "transactionId": "" +} + +{ + "data": {}, + "permissions": ["read(\"any\")"], + "transactionId": "" +} +``` diff --git a/examples/1.9.x/server-rest/examples/documentsdb/update-documents.md b/examples/1.9.x/server-rest/examples/documentsdb/update-documents.md new file mode 100644 index 000000000..9c141abbd --- /dev/null +++ b/examples/1.9.x/server-rest/examples/documentsdb/update-documents.md @@ -0,0 +1,20 @@ +```http +PATCH /v1/documentsdb/{databaseId}/collections/{collectionId}/documents HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +Accept: application/json +X-Appwrite-Response-Format: 1.9.5 +X-Appwrite-Project: + +{ + "data": {}, + "queries": [], + "transactionId": "" +} + +{ + "data": {}, + "queries": [], + "transactionId": "" +} +``` diff --git a/examples/1.9.x/server-rest/examples/documentsdb/update-transaction.md b/examples/1.9.x/server-rest/examples/documentsdb/update-transaction.md new file mode 100644 index 000000000..22334f5d2 --- /dev/null +++ b/examples/1.9.x/server-rest/examples/documentsdb/update-transaction.md @@ -0,0 +1,18 @@ +```http +PATCH /v1/documentsdb/transactions/{transactionId} HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +Accept: application/json +X-Appwrite-Response-Format: 1.9.5 +X-Appwrite-Project: + +{ + "commit": false, + "rollback": false +} + +{ + "commit": false, + "rollback": false +} +``` diff --git a/examples/1.9.x/server-rest/examples/documentsdb/update.md b/examples/1.9.x/server-rest/examples/documentsdb/update.md new file mode 100644 index 000000000..e30aefb17 --- /dev/null +++ b/examples/1.9.x/server-rest/examples/documentsdb/update.md @@ -0,0 +1,18 @@ +```http +PUT /v1/documentsdb/{databaseId} HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +Accept: application/json +X-Appwrite-Response-Format: 1.9.5 +X-Appwrite-Project: + +{ + "name": "", + "enabled": false +} + +{ + "name": "", + "enabled": false +} +``` diff --git a/examples/1.9.x/server-rest/examples/documentsdb/upsert-document.md b/examples/1.9.x/server-rest/examples/documentsdb/upsert-document.md new file mode 100644 index 000000000..5f74cb61a --- /dev/null +++ b/examples/1.9.x/server-rest/examples/documentsdb/upsert-document.md @@ -0,0 +1,20 @@ +```http +PUT /v1/documentsdb/{databaseId}/collections/{collectionId}/documents/{documentId} HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +Accept: application/json +X-Appwrite-Response-Format: 1.9.5 +X-Appwrite-Project: + +{ + "data": {}, + "permissions": ["read(\"any\")"], + "transactionId": "" +} + +{ + "data": {}, + "permissions": ["read(\"any\")"], + "transactionId": "" +} +``` diff --git a/examples/1.9.x/server-rest/examples/documentsdb/upsert-documents.md b/examples/1.9.x/server-rest/examples/documentsdb/upsert-documents.md new file mode 100644 index 000000000..18daf5d55 --- /dev/null +++ b/examples/1.9.x/server-rest/examples/documentsdb/upsert-documents.md @@ -0,0 +1,18 @@ +```http +PUT /v1/documentsdb/{databaseId}/collections/{collectionId}/documents HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +Accept: application/json +X-Appwrite-Response-Format: 1.9.5 +X-Appwrite-Project: + +{ + "documents": [], + "transactionId": "" +} + +{ + "documents": [], + "transactionId": "" +} +``` diff --git a/examples/1.9.x/server-rest/examples/oauth2/approve.md b/examples/1.9.x/server-rest/examples/oauth2/approve.md new file mode 100644 index 000000000..e28abe61a --- /dev/null +++ b/examples/1.9.x/server-rest/examples/oauth2/approve.md @@ -0,0 +1,19 @@ +```http +POST /v1/oauth2/{project_id}/approve HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +Accept: application/json +X-Appwrite-Response-Format: 1.9.5 + +{ + "grant_id": "", + "authorization_details": "", + "scope": "" +} + +{ + "grant_id": "", + "authorization_details": "", + "scope": "" +} +``` diff --git a/examples/1.9.x/server-rest/examples/oauth2/authorize-post.md b/examples/1.9.x/server-rest/examples/oauth2/authorize-post.md new file mode 100644 index 000000000..9a627a5f3 --- /dev/null +++ b/examples/1.9.x/server-rest/examples/oauth2/authorize-post.md @@ -0,0 +1,41 @@ +```http +POST /v1/oauth2/{project_id}/authorize HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +Accept: application/json +X-Appwrite-Response-Format: 1.9.5 + +{ + "client_id": "", + "redirect_uri": "https://example.com", + "response_type": "", + "scope": "", + "state": "", + "nonce": "", + "code_challenge": "", + "code_challenge_method": "s256", + "prompt": "", + "max_age": 0, + "authorization_details": "", + "resource": "", + "audience": "", + "request_uri": "" +} + +{ + "client_id": "", + "redirect_uri": "https://example.com", + "response_type": "", + "scope": "", + "state": "", + "nonce": "", + "code_challenge": "", + "code_challenge_method": "s256", + "prompt": "", + "max_age": 0, + "authorization_details": "", + "resource": "", + "audience": "", + "request_uri": "" +} +``` diff --git a/examples/1.9.x/server-rest/examples/oauth2/authorize.md b/examples/1.9.x/server-rest/examples/oauth2/authorize.md new file mode 100644 index 000000000..057108c5d --- /dev/null +++ b/examples/1.9.x/server-rest/examples/oauth2/authorize.md @@ -0,0 +1,7 @@ +```http +GET /v1/oauth2/{project_id}/authorize HTTP/1.1 +Host: cloud.appwrite.io +Accept: application/json +X-Appwrite-Response-Format: 1.9.5 + +``` diff --git a/examples/1.9.x/server-rest/examples/oauth2/create-device-authorization.md b/examples/1.9.x/server-rest/examples/oauth2/create-device-authorization.md new file mode 100644 index 000000000..d416d01b0 --- /dev/null +++ b/examples/1.9.x/server-rest/examples/oauth2/create-device-authorization.md @@ -0,0 +1,23 @@ +```http +POST /v1/oauth2/{project_id}/device_authorization HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +Accept: application/json +X-Appwrite-Response-Format: 1.9.5 + +{ + "client_id": "", + "scope": "", + "authorization_details": "", + "resource": "", + "audience": "" +} + +{ + "client_id": "", + "scope": "", + "authorization_details": "", + "resource": "", + "audience": "" +} +``` diff --git a/examples/1.9.x/server-rest/examples/oauth2/create-grant.md b/examples/1.9.x/server-rest/examples/oauth2/create-grant.md new file mode 100644 index 000000000..3265f783e --- /dev/null +++ b/examples/1.9.x/server-rest/examples/oauth2/create-grant.md @@ -0,0 +1,15 @@ +```http +POST /v1/oauth2/{project_id}/grants HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +Accept: application/json +X-Appwrite-Response-Format: 1.9.5 + +{ + "user_code": "" +} + +{ + "user_code": "" +} +``` diff --git a/examples/1.9.x/server-rest/examples/oauth2/create-par.md b/examples/1.9.x/server-rest/examples/oauth2/create-par.md new file mode 100644 index 000000000..bd49df9cc --- /dev/null +++ b/examples/1.9.x/server-rest/examples/oauth2/create-par.md @@ -0,0 +1,39 @@ +```http +POST /v1/oauth2/{project_id}/par HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +Accept: application/json +X-Appwrite-Response-Format: 1.9.5 + +{ + "client_id": "", + "redirect_uri": "https://example.com", + "response_type": "code", + "scope": "", + "state": "", + "nonce": "", + "code_challenge": "", + "code_challenge_method": "s256", + "prompt": "", + "max_age": 0, + "authorization_details": "", + "resource": "", + "audience": "" +} + +{ + "client_id": "", + "redirect_uri": "https://example.com", + "response_type": "code", + "scope": "", + "state": "", + "nonce": "", + "code_challenge": "", + "code_challenge_method": "s256", + "prompt": "", + "max_age": 0, + "authorization_details": "", + "resource": "", + "audience": "" +} +``` diff --git a/examples/1.9.x/server-rest/examples/oauth2/create-token.md b/examples/1.9.x/server-rest/examples/oauth2/create-token.md new file mode 100644 index 000000000..41c648c74 --- /dev/null +++ b/examples/1.9.x/server-rest/examples/oauth2/create-token.md @@ -0,0 +1,33 @@ +```http +POST /v1/oauth2/{project_id}/token HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +Accept: application/json +X-Appwrite-Response-Format: 1.9.5 + +{ + "grant_type": "", + "code": "", + "refresh_token": "", + "device_code": "", + "client_id": "", + "client_secret": "", + "code_verifier": "", + "redirect_uri": "https://example.com", + "resource": "", + "audience": "" +} + +{ + "grant_type": "", + "code": "", + "refresh_token": "", + "device_code": "", + "client_id": "", + "client_secret": "", + "code_verifier": "", + "redirect_uri": "https://example.com", + "resource": "", + "audience": "" +} +``` diff --git a/examples/1.9.x/server-rest/examples/oauth2/get-grant.md b/examples/1.9.x/server-rest/examples/oauth2/get-grant.md new file mode 100644 index 000000000..6edb712f0 --- /dev/null +++ b/examples/1.9.x/server-rest/examples/oauth2/get-grant.md @@ -0,0 +1,7 @@ +```http +GET /v1/oauth2/{project_id}/grants/{grant_id} HTTP/1.1 +Host: cloud.appwrite.io +Accept: application/json +X-Appwrite-Response-Format: 1.9.5 + +``` diff --git a/examples/1.9.x/server-rest/examples/oauth2/list-organizations.md b/examples/1.9.x/server-rest/examples/oauth2/list-organizations.md new file mode 100644 index 000000000..a3b7b2bda --- /dev/null +++ b/examples/1.9.x/server-rest/examples/oauth2/list-organizations.md @@ -0,0 +1,7 @@ +```http +GET /v1/oauth2/{project_id}/organizations HTTP/1.1 +Host: cloud.appwrite.io +Accept: application/json +X-Appwrite-Response-Format: 1.9.5 + +``` diff --git a/examples/1.9.x/server-rest/examples/oauth2/list-projects.md b/examples/1.9.x/server-rest/examples/oauth2/list-projects.md new file mode 100644 index 000000000..f7ff24b4e --- /dev/null +++ b/examples/1.9.x/server-rest/examples/oauth2/list-projects.md @@ -0,0 +1,7 @@ +```http +GET /v1/oauth2/{project_id}/projects HTTP/1.1 +Host: cloud.appwrite.io +Accept: application/json +X-Appwrite-Response-Format: 1.9.5 + +``` diff --git a/examples/1.9.x/server-rest/examples/oauth2/reject.md b/examples/1.9.x/server-rest/examples/oauth2/reject.md new file mode 100644 index 000000000..c716a844d --- /dev/null +++ b/examples/1.9.x/server-rest/examples/oauth2/reject.md @@ -0,0 +1,15 @@ +```http +POST /v1/oauth2/{project_id}/reject HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +Accept: application/json +X-Appwrite-Response-Format: 1.9.5 + +{ + "grant_id": "" +} + +{ + "grant_id": "" +} +``` diff --git a/examples/1.9.x/server-rest/examples/oauth2/revoke.md b/examples/1.9.x/server-rest/examples/oauth2/revoke.md new file mode 100644 index 000000000..5c7cec0b2 --- /dev/null +++ b/examples/1.9.x/server-rest/examples/oauth2/revoke.md @@ -0,0 +1,21 @@ +```http +POST /v1/oauth2/{project_id}/revoke HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +Accept: application/json +X-Appwrite-Response-Format: 1.9.5 + +{ + "token": "", + "token_type_hint": "access_token", + "client_id": "", + "client_secret": "" +} + +{ + "token": "", + "token_type_hint": "access_token", + "client_id": "", + "client_secret": "" +} +``` diff --git a/examples/1.9.x/server-rest/examples/organization/create-installation.md b/examples/1.9.x/server-rest/examples/organization/create-installation.md new file mode 100644 index 000000000..f45971a20 --- /dev/null +++ b/examples/1.9.x/server-rest/examples/organization/create-installation.md @@ -0,0 +1,18 @@ +```http +POST /v1/organization/installations HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +Accept: application/json +X-Appwrite-Response-Format: 1.9.5 +X-Appwrite-Project: + +{ + "appId": "", + "authorizationDetails": "" +} + +{ + "appId": "", + "authorizationDetails": "" +} +``` diff --git a/examples/1.9.x/server-rest/examples/organization/delete-installation.md b/examples/1.9.x/server-rest/examples/organization/delete-installation.md new file mode 100644 index 000000000..fe7ad3527 --- /dev/null +++ b/examples/1.9.x/server-rest/examples/organization/delete-installation.md @@ -0,0 +1,10 @@ +```http +DELETE /v1/organization/installations/{installationId} HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +Accept: application/json +X-Appwrite-Response-Format: 1.9.5 +X-Appwrite-Project: + + +``` diff --git a/examples/1.9.x/server-rest/examples/organization/get-installation.md b/examples/1.9.x/server-rest/examples/organization/get-installation.md new file mode 100644 index 000000000..362704b64 --- /dev/null +++ b/examples/1.9.x/server-rest/examples/organization/get-installation.md @@ -0,0 +1,8 @@ +```http +GET /v1/organization/installations/{installationId} HTTP/1.1 +Host: cloud.appwrite.io +Accept: application/json +X-Appwrite-Response-Format: 1.9.5 +X-Appwrite-Project: + +``` diff --git a/examples/1.9.x/server-rest/examples/organization/list-installations.md b/examples/1.9.x/server-rest/examples/organization/list-installations.md new file mode 100644 index 000000000..92686c09f --- /dev/null +++ b/examples/1.9.x/server-rest/examples/organization/list-installations.md @@ -0,0 +1,8 @@ +```http +GET /v1/organization/installations HTTP/1.1 +Host: cloud.appwrite.io +Accept: application/json +X-Appwrite-Response-Format: 1.9.5 +X-Appwrite-Project: + +``` diff --git a/examples/1.9.x/server-rest/examples/organization/update-installation.md b/examples/1.9.x/server-rest/examples/organization/update-installation.md new file mode 100644 index 000000000..55bade3ff --- /dev/null +++ b/examples/1.9.x/server-rest/examples/organization/update-installation.md @@ -0,0 +1,16 @@ +```http +PUT /v1/organization/installations/{installationId} HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +Accept: application/json +X-Appwrite-Response-Format: 1.9.5 +X-Appwrite-Project: + +{ + "authorizationDetails": "" +} + +{ + "authorizationDetails": "" +} +``` diff --git a/examples/1.9.x/server-rest/examples/project/update-o-auth-2-server.md b/examples/1.9.x/server-rest/examples/project/update-o-auth-2-server.md index 3cb4eb800..d50fe334e 100644 --- a/examples/1.9.x/server-rest/examples/project/update-o-auth-2-server.md +++ b/examples/1.9.x/server-rest/examples/project/update-o-auth-2-server.md @@ -15,6 +15,7 @@ X-Appwrite-Project: "refreshTokenDuration": 60, "publicAccessTokenDuration": 60, "publicRefreshTokenDuration": 60, + "installationAccessTokenDuration": 60, "confidentialPkce": false, "verificationUrl": "https://example.com", "userCodeLength": 6, @@ -32,6 +33,7 @@ X-Appwrite-Project: "refreshTokenDuration": 60, "publicAccessTokenDuration": 60, "publicRefreshTokenDuration": 60, + "installationAccessTokenDuration": 60, "confidentialPkce": false, "verificationUrl": "https://example.com", "userCodeLength": 6, diff --git a/examples/1.9.x/server-rest/examples/teams/create-installation.md b/examples/1.9.x/server-rest/examples/teams/create-installation.md new file mode 100644 index 000000000..5b57f4942 --- /dev/null +++ b/examples/1.9.x/server-rest/examples/teams/create-installation.md @@ -0,0 +1,18 @@ +```http +POST /v1/teams/{teamId}/installations HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +Accept: application/json +X-Appwrite-Response-Format: 1.9.5 +X-Appwrite-Project: + +{ + "appId": "", + "authorizationDetails": "" +} + +{ + "appId": "", + "authorizationDetails": "" +} +``` diff --git a/examples/1.9.x/server-rest/examples/teams/delete-installation.md b/examples/1.9.x/server-rest/examples/teams/delete-installation.md new file mode 100644 index 000000000..007ab3c33 --- /dev/null +++ b/examples/1.9.x/server-rest/examples/teams/delete-installation.md @@ -0,0 +1,10 @@ +```http +DELETE /v1/teams/{teamId}/installations/{installationId} HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +Accept: application/json +X-Appwrite-Response-Format: 1.9.5 +X-Appwrite-Project: + + +``` diff --git a/examples/1.9.x/server-rest/examples/teams/get-installation.md b/examples/1.9.x/server-rest/examples/teams/get-installation.md new file mode 100644 index 000000000..28041c473 --- /dev/null +++ b/examples/1.9.x/server-rest/examples/teams/get-installation.md @@ -0,0 +1,8 @@ +```http +GET /v1/teams/{teamId}/installations/{installationId} HTTP/1.1 +Host: cloud.appwrite.io +Accept: application/json +X-Appwrite-Response-Format: 1.9.5 +X-Appwrite-Project: + +``` diff --git a/examples/1.9.x/server-rest/examples/teams/list-installations.md b/examples/1.9.x/server-rest/examples/teams/list-installations.md new file mode 100644 index 000000000..4dda30775 --- /dev/null +++ b/examples/1.9.x/server-rest/examples/teams/list-installations.md @@ -0,0 +1,8 @@ +```http +GET /v1/teams/{teamId}/installations HTTP/1.1 +Host: cloud.appwrite.io +Accept: application/json +X-Appwrite-Response-Format: 1.9.5 +X-Appwrite-Project: + +``` diff --git a/examples/1.9.x/server-rest/examples/teams/update-installation.md b/examples/1.9.x/server-rest/examples/teams/update-installation.md new file mode 100644 index 000000000..6be5630a8 --- /dev/null +++ b/examples/1.9.x/server-rest/examples/teams/update-installation.md @@ -0,0 +1,16 @@ +```http +PUT /v1/teams/{teamId}/installations/{installationId} HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +Accept: application/json +X-Appwrite-Response-Format: 1.9.5 +X-Appwrite-Project: + +{ + "authorizationDetails": "" +} + +{ + "authorizationDetails": "" +} +``` diff --git a/examples/1.9.x/server-rest/examples/vectorsdb/create-collection.md b/examples/1.9.x/server-rest/examples/vectorsdb/create-collection.md new file mode 100644 index 000000000..dfc11c679 --- /dev/null +++ b/examples/1.9.x/server-rest/examples/vectorsdb/create-collection.md @@ -0,0 +1,26 @@ +```http +POST /v1/vectorsdb/{databaseId}/collections HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +Accept: application/json +X-Appwrite-Response-Format: 1.9.5 +X-Appwrite-Project: + +{ + "collectionId": "", + "name": "", + "dimension": 1, + "permissions": ["read(\"any\")"], + "documentSecurity": false, + "enabled": false +} + +{ + "collectionId": "", + "name": "", + "dimension": 1, + "permissions": ["read(\"any\")"], + "documentSecurity": false, + "enabled": false +} +``` diff --git a/examples/1.9.x/server-rest/examples/vectorsdb/create-document.md b/examples/1.9.x/server-rest/examples/vectorsdb/create-document.md new file mode 100644 index 000000000..f8457c730 --- /dev/null +++ b/examples/1.9.x/server-rest/examples/vectorsdb/create-document.md @@ -0,0 +1,40 @@ +```http +POST /v1/vectorsdb/{databaseId}/collections/{collectionId}/documents HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +Accept: application/json +X-Appwrite-Response-Format: 1.9.5 +X-Appwrite-Project: + +{ + "documentId": "", + "data": { + "embeddings": [ + 0.12, + -0.55, + 0.88, + 1.02 + ], + "metadata": { + "key": "value" + } + }, + "permissions": ["read(\"any\")"] +} + +{ + "documentId": "", + "data": { + "embeddings": [ + 0.12, + -0.55, + 0.88, + 1.02 + ], + "metadata": { + "key": "value" + } + }, + "permissions": ["read(\"any\")"] +} +``` diff --git a/examples/1.9.x/server-rest/examples/vectorsdb/create-documents.md b/examples/1.9.x/server-rest/examples/vectorsdb/create-documents.md new file mode 100644 index 000000000..c135603fb --- /dev/null +++ b/examples/1.9.x/server-rest/examples/vectorsdb/create-documents.md @@ -0,0 +1,16 @@ +```http +POST /v1/vectorsdb/{databaseId}/collections/{collectionId}/documents HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +Accept: application/json +X-Appwrite-Response-Format: 1.9.5 +X-Appwrite-Project: + +{ + "documents": [] +} + +{ + "documents": [] +} +``` diff --git a/examples/1.9.x/server-rest/examples/vectorsdb/create-index.md b/examples/1.9.x/server-rest/examples/vectorsdb/create-index.md new file mode 100644 index 000000000..5fdf6cc17 --- /dev/null +++ b/examples/1.9.x/server-rest/examples/vectorsdb/create-index.md @@ -0,0 +1,24 @@ +```http +POST /v1/vectorsdb/{databaseId}/collections/{collectionId}/indexes HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +Accept: application/json +X-Appwrite-Response-Format: 1.9.5 +X-Appwrite-Project: + +{ + "key": "", + "type": "hnsw_euclidean", + "attributes": [], + "orders": [], + "lengths": [] +} + +{ + "key": "", + "type": "hnsw_euclidean", + "attributes": [], + "orders": [], + "lengths": [] +} +``` diff --git a/examples/1.9.x/server-rest/examples/vectorsdb/create-operations.md b/examples/1.9.x/server-rest/examples/vectorsdb/create-operations.md new file mode 100644 index 000000000..4d0afb5f5 --- /dev/null +++ b/examples/1.9.x/server-rest/examples/vectorsdb/create-operations.md @@ -0,0 +1,36 @@ +```http +POST /v1/vectorsdb/transactions/{transactionId}/operations HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +Accept: application/json +X-Appwrite-Response-Format: 1.9.5 +X-Appwrite-Project: + +{ + "operations": [ + { + "action": "create", + "databaseId": "", + "collectionId": "", + "documentId": "", + "data": { + "name": "Walter O'Brien" + } + } + ] +} + +{ + "operations": [ + { + "action": "create", + "databaseId": "", + "collectionId": "", + "documentId": "", + "data": { + "name": "Walter O'Brien" + } + } + ] +} +``` diff --git a/examples/1.9.x/server-rest/examples/vectorsdb/create-query.md b/examples/1.9.x/server-rest/examples/vectorsdb/create-query.md new file mode 100644 index 000000000..bd0f29627 --- /dev/null +++ b/examples/1.9.x/server-rest/examples/vectorsdb/create-query.md @@ -0,0 +1,22 @@ +```http +POST /v1/vectorsdb/{databaseId}/collections/{collectionId}/documents/query HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +Accept: application/json +X-Appwrite-Response-Format: 1.9.5 +X-Appwrite-Project: + +{ + "queries": [], + "transactionId": "", + "total": false, + "ttl": 0 +} + +{ + "queries": [], + "transactionId": "", + "total": false, + "ttl": 0 +} +``` diff --git a/examples/1.9.x/server-rest/examples/vectorsdb/create-text-embeddings.md b/examples/1.9.x/server-rest/examples/vectorsdb/create-text-embeddings.md new file mode 100644 index 000000000..c8280d303 --- /dev/null +++ b/examples/1.9.x/server-rest/examples/vectorsdb/create-text-embeddings.md @@ -0,0 +1,18 @@ +```http +POST /v1/vectorsdb/embeddings/text HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +Accept: application/json +X-Appwrite-Response-Format: 1.9.5 +X-Appwrite-Project: + +{ + "texts": [], + "model": "nomic-embed-text" +} + +{ + "texts": [], + "model": "nomic-embed-text" +} +``` diff --git a/examples/1.9.x/server-rest/examples/vectorsdb/create-transaction.md b/examples/1.9.x/server-rest/examples/vectorsdb/create-transaction.md new file mode 100644 index 000000000..c65101ec7 --- /dev/null +++ b/examples/1.9.x/server-rest/examples/vectorsdb/create-transaction.md @@ -0,0 +1,16 @@ +```http +POST /v1/vectorsdb/transactions HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +Accept: application/json +X-Appwrite-Response-Format: 1.9.5 +X-Appwrite-Project: + +{ + "ttl": 60 +} + +{ + "ttl": 60 +} +``` diff --git a/examples/1.9.x/server-rest/examples/vectorsdb/create.md b/examples/1.9.x/server-rest/examples/vectorsdb/create.md new file mode 100644 index 000000000..1041b9814 --- /dev/null +++ b/examples/1.9.x/server-rest/examples/vectorsdb/create.md @@ -0,0 +1,20 @@ +```http +POST /v1/vectorsdb HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +Accept: application/json +X-Appwrite-Response-Format: 1.9.5 +X-Appwrite-Project: + +{ + "databaseId": "", + "name": "", + "enabled": false +} + +{ + "databaseId": "", + "name": "", + "enabled": false +} +``` diff --git a/examples/1.9.x/server-rest/examples/vectorsdb/delete-collection.md b/examples/1.9.x/server-rest/examples/vectorsdb/delete-collection.md new file mode 100644 index 000000000..865096916 --- /dev/null +++ b/examples/1.9.x/server-rest/examples/vectorsdb/delete-collection.md @@ -0,0 +1,8 @@ +```http +DELETE /v1/vectorsdb/{databaseId}/collections/{collectionId} HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.9.5 +X-Appwrite-Project: + +``` diff --git a/examples/1.9.x/server-rest/examples/vectorsdb/delete-document.md b/examples/1.9.x/server-rest/examples/vectorsdb/delete-document.md new file mode 100644 index 000000000..dfbfff59f --- /dev/null +++ b/examples/1.9.x/server-rest/examples/vectorsdb/delete-document.md @@ -0,0 +1,8 @@ +```http +DELETE /v1/vectorsdb/{databaseId}/collections/{collectionId}/documents/{documentId} HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.9.5 +X-Appwrite-Project: + +``` diff --git a/examples/1.9.x/server-rest/examples/vectorsdb/delete-documents.md b/examples/1.9.x/server-rest/examples/vectorsdb/delete-documents.md new file mode 100644 index 000000000..287b5936a --- /dev/null +++ b/examples/1.9.x/server-rest/examples/vectorsdb/delete-documents.md @@ -0,0 +1,10 @@ +```http +DELETE /v1/vectorsdb/{databaseId}/collections/{collectionId}/documents HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +Accept: application/json +X-Appwrite-Response-Format: 1.9.5 +X-Appwrite-Project: + + +``` diff --git a/examples/1.9.x/server-rest/examples/vectorsdb/delete-index.md b/examples/1.9.x/server-rest/examples/vectorsdb/delete-index.md new file mode 100644 index 000000000..5a4fc457d --- /dev/null +++ b/examples/1.9.x/server-rest/examples/vectorsdb/delete-index.md @@ -0,0 +1,8 @@ +```http +DELETE /v1/vectorsdb/{databaseId}/collections/{collectionId}/indexes/{key} HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.9.5 +X-Appwrite-Project: + +``` diff --git a/examples/1.9.x/server-rest/examples/vectorsdb/delete-transaction.md b/examples/1.9.x/server-rest/examples/vectorsdb/delete-transaction.md new file mode 100644 index 000000000..08aa28226 --- /dev/null +++ b/examples/1.9.x/server-rest/examples/vectorsdb/delete-transaction.md @@ -0,0 +1,8 @@ +```http +DELETE /v1/vectorsdb/transactions/{transactionId} HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.9.5 +X-Appwrite-Project: + +``` diff --git a/examples/1.9.x/server-rest/examples/vectorsdb/delete.md b/examples/1.9.x/server-rest/examples/vectorsdb/delete.md new file mode 100644 index 000000000..f2948d92a --- /dev/null +++ b/examples/1.9.x/server-rest/examples/vectorsdb/delete.md @@ -0,0 +1,8 @@ +```http +DELETE /v1/vectorsdb/{databaseId} HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +X-Appwrite-Response-Format: 1.9.5 +X-Appwrite-Project: + +``` diff --git a/examples/1.9.x/server-rest/examples/vectorsdb/get-collection.md b/examples/1.9.x/server-rest/examples/vectorsdb/get-collection.md new file mode 100644 index 000000000..05c8bb388 --- /dev/null +++ b/examples/1.9.x/server-rest/examples/vectorsdb/get-collection.md @@ -0,0 +1,8 @@ +```http +GET /v1/vectorsdb/{databaseId}/collections/{collectionId} HTTP/1.1 +Host: cloud.appwrite.io +Accept: application/json +X-Appwrite-Response-Format: 1.9.5 +X-Appwrite-Project: + +``` diff --git a/examples/1.9.x/server-rest/examples/vectorsdb/get-document.md b/examples/1.9.x/server-rest/examples/vectorsdb/get-document.md new file mode 100644 index 000000000..5af60d4bb --- /dev/null +++ b/examples/1.9.x/server-rest/examples/vectorsdb/get-document.md @@ -0,0 +1,8 @@ +```http +GET /v1/vectorsdb/{databaseId}/collections/{collectionId}/documents/{documentId} HTTP/1.1 +Host: cloud.appwrite.io +Accept: application/json +X-Appwrite-Response-Format: 1.9.5 +X-Appwrite-Project: + +``` diff --git a/examples/1.9.x/server-rest/examples/vectorsdb/get-index.md b/examples/1.9.x/server-rest/examples/vectorsdb/get-index.md new file mode 100644 index 000000000..aee2b25d0 --- /dev/null +++ b/examples/1.9.x/server-rest/examples/vectorsdb/get-index.md @@ -0,0 +1,8 @@ +```http +GET /v1/vectorsdb/{databaseId}/collections/{collectionId}/indexes/{key} HTTP/1.1 +Host: cloud.appwrite.io +Accept: application/json +X-Appwrite-Response-Format: 1.9.5 +X-Appwrite-Project: + +``` diff --git a/examples/1.9.x/server-rest/examples/vectorsdb/get-transaction.md b/examples/1.9.x/server-rest/examples/vectorsdb/get-transaction.md new file mode 100644 index 000000000..c7854652d --- /dev/null +++ b/examples/1.9.x/server-rest/examples/vectorsdb/get-transaction.md @@ -0,0 +1,8 @@ +```http +GET /v1/vectorsdb/transactions/{transactionId} HTTP/1.1 +Host: cloud.appwrite.io +Accept: application/json +X-Appwrite-Response-Format: 1.9.5 +X-Appwrite-Project: + +``` diff --git a/examples/1.9.x/server-rest/examples/vectorsdb/get.md b/examples/1.9.x/server-rest/examples/vectorsdb/get.md new file mode 100644 index 000000000..db507a9f7 --- /dev/null +++ b/examples/1.9.x/server-rest/examples/vectorsdb/get.md @@ -0,0 +1,8 @@ +```http +GET /v1/vectorsdb/{databaseId} HTTP/1.1 +Host: cloud.appwrite.io +Accept: application/json +X-Appwrite-Response-Format: 1.9.5 +X-Appwrite-Project: + +``` diff --git a/examples/1.9.x/server-rest/examples/vectorsdb/list-collections.md b/examples/1.9.x/server-rest/examples/vectorsdb/list-collections.md new file mode 100644 index 000000000..4e88d475e --- /dev/null +++ b/examples/1.9.x/server-rest/examples/vectorsdb/list-collections.md @@ -0,0 +1,8 @@ +```http +GET /v1/vectorsdb/{databaseId}/collections HTTP/1.1 +Host: cloud.appwrite.io +Accept: application/json +X-Appwrite-Response-Format: 1.9.5 +X-Appwrite-Project: + +``` diff --git a/examples/1.9.x/server-rest/examples/vectorsdb/list-documents.md b/examples/1.9.x/server-rest/examples/vectorsdb/list-documents.md new file mode 100644 index 000000000..a2542dd4c --- /dev/null +++ b/examples/1.9.x/server-rest/examples/vectorsdb/list-documents.md @@ -0,0 +1,8 @@ +```http +GET /v1/vectorsdb/{databaseId}/collections/{collectionId}/documents HTTP/1.1 +Host: cloud.appwrite.io +Accept: application/json +X-Appwrite-Response-Format: 1.9.5 +X-Appwrite-Project: + +``` diff --git a/examples/1.9.x/server-rest/examples/vectorsdb/list-indexes.md b/examples/1.9.x/server-rest/examples/vectorsdb/list-indexes.md new file mode 100644 index 000000000..df9b8c5d5 --- /dev/null +++ b/examples/1.9.x/server-rest/examples/vectorsdb/list-indexes.md @@ -0,0 +1,8 @@ +```http +GET /v1/vectorsdb/{databaseId}/collections/{collectionId}/indexes HTTP/1.1 +Host: cloud.appwrite.io +Accept: application/json +X-Appwrite-Response-Format: 1.9.5 +X-Appwrite-Project: + +``` diff --git a/examples/1.9.x/server-rest/examples/vectorsdb/list-transactions.md b/examples/1.9.x/server-rest/examples/vectorsdb/list-transactions.md new file mode 100644 index 000000000..417bba928 --- /dev/null +++ b/examples/1.9.x/server-rest/examples/vectorsdb/list-transactions.md @@ -0,0 +1,8 @@ +```http +GET /v1/vectorsdb/transactions HTTP/1.1 +Host: cloud.appwrite.io +Accept: application/json +X-Appwrite-Response-Format: 1.9.5 +X-Appwrite-Project: + +``` diff --git a/examples/1.9.x/server-rest/examples/vectorsdb/list.md b/examples/1.9.x/server-rest/examples/vectorsdb/list.md new file mode 100644 index 000000000..81e4ee3ff --- /dev/null +++ b/examples/1.9.x/server-rest/examples/vectorsdb/list.md @@ -0,0 +1,8 @@ +```http +GET /v1/vectorsdb HTTP/1.1 +Host: cloud.appwrite.io +Accept: application/json +X-Appwrite-Response-Format: 1.9.5 +X-Appwrite-Project: + +``` diff --git a/examples/1.9.x/server-rest/examples/vectorsdb/update-collection.md b/examples/1.9.x/server-rest/examples/vectorsdb/update-collection.md new file mode 100644 index 000000000..e4dd349b0 --- /dev/null +++ b/examples/1.9.x/server-rest/examples/vectorsdb/update-collection.md @@ -0,0 +1,24 @@ +```http +PUT /v1/vectorsdb/{databaseId}/collections/{collectionId} HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +Accept: application/json +X-Appwrite-Response-Format: 1.9.5 +X-Appwrite-Project: + +{ + "name": "", + "dimension": 1, + "permissions": ["read(\"any\")"], + "documentSecurity": false, + "enabled": false +} + +{ + "name": "", + "dimension": 1, + "permissions": ["read(\"any\")"], + "documentSecurity": false, + "enabled": false +} +``` diff --git a/examples/1.9.x/server-rest/examples/vectorsdb/update-document.md b/examples/1.9.x/server-rest/examples/vectorsdb/update-document.md new file mode 100644 index 000000000..04171c2a7 --- /dev/null +++ b/examples/1.9.x/server-rest/examples/vectorsdb/update-document.md @@ -0,0 +1,20 @@ +```http +PATCH /v1/vectorsdb/{databaseId}/collections/{collectionId}/documents/{documentId} HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +Accept: application/json +X-Appwrite-Response-Format: 1.9.5 +X-Appwrite-Project: + +{ + "data": {}, + "permissions": ["read(\"any\")"], + "transactionId": "" +} + +{ + "data": {}, + "permissions": ["read(\"any\")"], + "transactionId": "" +} +``` diff --git a/examples/1.9.x/server-rest/examples/vectorsdb/update-documents.md b/examples/1.9.x/server-rest/examples/vectorsdb/update-documents.md new file mode 100644 index 000000000..bcc994a75 --- /dev/null +++ b/examples/1.9.x/server-rest/examples/vectorsdb/update-documents.md @@ -0,0 +1,20 @@ +```http +PATCH /v1/vectorsdb/{databaseId}/collections/{collectionId}/documents HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +Accept: application/json +X-Appwrite-Response-Format: 1.9.5 +X-Appwrite-Project: + +{ + "data": {}, + "queries": [], + "transactionId": "" +} + +{ + "data": {}, + "queries": [], + "transactionId": "" +} +``` diff --git a/examples/1.9.x/server-rest/examples/vectorsdb/update-transaction.md b/examples/1.9.x/server-rest/examples/vectorsdb/update-transaction.md new file mode 100644 index 000000000..e850087bf --- /dev/null +++ b/examples/1.9.x/server-rest/examples/vectorsdb/update-transaction.md @@ -0,0 +1,18 @@ +```http +PATCH /v1/vectorsdb/transactions/{transactionId} HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +Accept: application/json +X-Appwrite-Response-Format: 1.9.5 +X-Appwrite-Project: + +{ + "commit": false, + "rollback": false +} + +{ + "commit": false, + "rollback": false +} +``` diff --git a/examples/1.9.x/server-rest/examples/vectorsdb/update.md b/examples/1.9.x/server-rest/examples/vectorsdb/update.md new file mode 100644 index 000000000..0e1527b96 --- /dev/null +++ b/examples/1.9.x/server-rest/examples/vectorsdb/update.md @@ -0,0 +1,18 @@ +```http +PUT /v1/vectorsdb/{databaseId} HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +Accept: application/json +X-Appwrite-Response-Format: 1.9.5 +X-Appwrite-Project: + +{ + "name": "", + "enabled": false +} + +{ + "name": "", + "enabled": false +} +``` diff --git a/examples/1.9.x/server-rest/examples/vectorsdb/upsert-document.md b/examples/1.9.x/server-rest/examples/vectorsdb/upsert-document.md new file mode 100644 index 000000000..77b261881 --- /dev/null +++ b/examples/1.9.x/server-rest/examples/vectorsdb/upsert-document.md @@ -0,0 +1,20 @@ +```http +PUT /v1/vectorsdb/{databaseId}/collections/{collectionId}/documents/{documentId} HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +Accept: application/json +X-Appwrite-Response-Format: 1.9.5 +X-Appwrite-Project: + +{ + "data": {}, + "permissions": ["read(\"any\")"], + "transactionId": "" +} + +{ + "data": {}, + "permissions": ["read(\"any\")"], + "transactionId": "" +} +``` diff --git a/examples/1.9.x/server-rest/examples/vectorsdb/upsert-documents.md b/examples/1.9.x/server-rest/examples/vectorsdb/upsert-documents.md new file mode 100644 index 000000000..095c4d438 --- /dev/null +++ b/examples/1.9.x/server-rest/examples/vectorsdb/upsert-documents.md @@ -0,0 +1,18 @@ +```http +PUT /v1/vectorsdb/{databaseId}/collections/{collectionId}/documents HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +Accept: application/json +X-Appwrite-Response-Format: 1.9.5 +X-Appwrite-Project: + +{ + "documents": [], + "transactionId": "" +} + +{ + "documents": [], + "transactionId": "" +} +``` diff --git a/examples/1.9.x/server-ruby/examples/apps/create-installation-token.md b/examples/1.9.x/server-ruby/examples/apps/create-installation-token.md new file mode 100644 index 000000000..7c71cecc8 --- /dev/null +++ b/examples/1.9.x/server-ruby/examples/apps/create-installation-token.md @@ -0,0 +1,17 @@ +```ruby +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('') # Your project ID + .set_key('') # Your secret API key + +apps = Apps.new(client) + +result = apps.create_installation_token( + app_id: '', + installation_id: '' +) +``` diff --git a/examples/1.9.x/server-ruby/examples/apps/create-key.md b/examples/1.9.x/server-ruby/examples/apps/create-key.md new file mode 100644 index 000000000..312434779 --- /dev/null +++ b/examples/1.9.x/server-ruby/examples/apps/create-key.md @@ -0,0 +1,16 @@ +```ruby +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('') # Your project ID + .set_session('') # The user session to authenticate with + +apps = Apps.new(client) + +result = apps.create_key( + app_id: '' +) +``` diff --git a/examples/1.9.x/server-ruby/examples/apps/create-secret.md b/examples/1.9.x/server-ruby/examples/apps/create-secret.md new file mode 100644 index 000000000..7b26ea6ad --- /dev/null +++ b/examples/1.9.x/server-ruby/examples/apps/create-secret.md @@ -0,0 +1,16 @@ +```ruby +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('') # Your project ID + .set_session('') # The user session to authenticate with + +apps = Apps.new(client) + +result = apps.create_secret( + app_id: '' +) +``` diff --git a/examples/1.9.x/server-ruby/examples/apps/create.md b/examples/1.9.x/server-ruby/examples/apps/create.md new file mode 100644 index 000000000..94da7f010 --- /dev/null +++ b/examples/1.9.x/server-ruby/examples/apps/create.md @@ -0,0 +1,34 @@ +```ruby +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('') # Your project ID + .set_session('') # The user session to authenticate with + +apps = Apps.new(client) + +result = apps.create( + app_id: '', + name: '', + redirect_uris: [], + description: '', # optional + client_uri: 'https://example.com', # optional + logo_uri: 'https://example.com', # optional + privacy_policy_url: 'https://example.com', # optional + terms_url: 'https://example.com', # optional + contacts: [], # optional + tagline: '', # optional + tags: [], # optional + images: [], # optional + support_url: 'https://example.com', # optional + data_deletion_url: 'https://example.com', # optional + post_logout_redirect_uris: [], # optional + enabled: false, # optional + type: 'public', # optional + device_flow: false, # optional + team_id: '' # optional +) +``` diff --git a/examples/1.9.x/server-ruby/examples/apps/delete-key.md b/examples/1.9.x/server-ruby/examples/apps/delete-key.md new file mode 100644 index 000000000..70ea81fac --- /dev/null +++ b/examples/1.9.x/server-ruby/examples/apps/delete-key.md @@ -0,0 +1,17 @@ +```ruby +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('') # Your project ID + .set_session('') # The user session to authenticate with + +apps = Apps.new(client) + +result = apps.delete_key( + app_id: '', + key_id: '' +) +``` diff --git a/examples/1.9.x/server-ruby/examples/apps/delete-secret.md b/examples/1.9.x/server-ruby/examples/apps/delete-secret.md new file mode 100644 index 000000000..a0335204d --- /dev/null +++ b/examples/1.9.x/server-ruby/examples/apps/delete-secret.md @@ -0,0 +1,17 @@ +```ruby +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('') # Your project ID + .set_session('') # The user session to authenticate with + +apps = Apps.new(client) + +result = apps.delete_secret( + app_id: '', + secret_id: '' +) +``` diff --git a/examples/1.9.x/server-ruby/examples/apps/delete-tokens.md b/examples/1.9.x/server-ruby/examples/apps/delete-tokens.md new file mode 100644 index 000000000..e15cf22bb --- /dev/null +++ b/examples/1.9.x/server-ruby/examples/apps/delete-tokens.md @@ -0,0 +1,16 @@ +```ruby +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('') # Your project ID + .set_session('') # The user session to authenticate with + +apps = Apps.new(client) + +result = apps.delete_tokens( + app_id: '' +) +``` diff --git a/examples/1.9.x/server-ruby/examples/apps/delete.md b/examples/1.9.x/server-ruby/examples/apps/delete.md new file mode 100644 index 000000000..614c50270 --- /dev/null +++ b/examples/1.9.x/server-ruby/examples/apps/delete.md @@ -0,0 +1,16 @@ +```ruby +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('') # Your project ID + .set_session('') # The user session to authenticate with + +apps = Apps.new(client) + +result = apps.delete( + app_id: '' +) +``` diff --git a/examples/1.9.x/server-ruby/examples/apps/get-installation.md b/examples/1.9.x/server-ruby/examples/apps/get-installation.md new file mode 100644 index 000000000..5db2961b4 --- /dev/null +++ b/examples/1.9.x/server-ruby/examples/apps/get-installation.md @@ -0,0 +1,17 @@ +```ruby +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('') # Your project ID + .set_key('') # Your secret API key + +apps = Apps.new(client) + +result = apps.get_installation( + app_id: '', + installation_id: '' +) +``` diff --git a/examples/1.9.x/server-ruby/examples/apps/get-key.md b/examples/1.9.x/server-ruby/examples/apps/get-key.md new file mode 100644 index 000000000..b6b1c2afe --- /dev/null +++ b/examples/1.9.x/server-ruby/examples/apps/get-key.md @@ -0,0 +1,17 @@ +```ruby +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('') # Your project ID + .set_session('') # The user session to authenticate with + +apps = Apps.new(client) + +result = apps.get_key( + app_id: '', + key_id: '' +) +``` diff --git a/examples/1.9.x/server-ruby/examples/apps/get-secret.md b/examples/1.9.x/server-ruby/examples/apps/get-secret.md new file mode 100644 index 000000000..57adff386 --- /dev/null +++ b/examples/1.9.x/server-ruby/examples/apps/get-secret.md @@ -0,0 +1,17 @@ +```ruby +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('') # Your project ID + .set_session('') # The user session to authenticate with + +apps = Apps.new(client) + +result = apps.get_secret( + app_id: '', + secret_id: '' +) +``` diff --git a/examples/1.9.x/server-ruby/examples/apps/get.md b/examples/1.9.x/server-ruby/examples/apps/get.md new file mode 100644 index 000000000..9f06a501e --- /dev/null +++ b/examples/1.9.x/server-ruby/examples/apps/get.md @@ -0,0 +1,16 @@ +```ruby +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('') # Your project ID + .set_session('') # The user session to authenticate with + +apps = Apps.new(client) + +result = apps.get( + app_id: '' +) +``` diff --git a/examples/1.9.x/server-ruby/examples/apps/list-installation-scopes.md b/examples/1.9.x/server-ruby/examples/apps/list-installation-scopes.md new file mode 100644 index 000000000..eef52129a --- /dev/null +++ b/examples/1.9.x/server-ruby/examples/apps/list-installation-scopes.md @@ -0,0 +1,14 @@ +```ruby +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('') # Your project ID + .set_session('') # The user session to authenticate with + +apps = Apps.new(client) + +result = apps.list_installation_scopes() +``` diff --git a/examples/1.9.x/server-ruby/examples/apps/list-installations.md b/examples/1.9.x/server-ruby/examples/apps/list-installations.md new file mode 100644 index 000000000..da01dc8ee --- /dev/null +++ b/examples/1.9.x/server-ruby/examples/apps/list-installations.md @@ -0,0 +1,18 @@ +```ruby +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('') # Your project ID + .set_key('') # Your secret API key + +apps = Apps.new(client) + +result = apps.list_installations( + app_id: '', + queries: [], # optional + total: false # optional +) +``` diff --git a/examples/1.9.x/server-ruby/examples/apps/list-keys.md b/examples/1.9.x/server-ruby/examples/apps/list-keys.md new file mode 100644 index 000000000..9a7e19ec3 --- /dev/null +++ b/examples/1.9.x/server-ruby/examples/apps/list-keys.md @@ -0,0 +1,18 @@ +```ruby +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('') # Your project ID + .set_session('') # The user session to authenticate with + +apps = Apps.new(client) + +result = apps.list_keys( + app_id: '', + queries: [], # optional + total: false # optional +) +``` diff --git a/examples/1.9.x/server-ruby/examples/apps/list-o-auth-2-scopes.md b/examples/1.9.x/server-ruby/examples/apps/list-o-auth-2-scopes.md new file mode 100644 index 000000000..92cbb8046 --- /dev/null +++ b/examples/1.9.x/server-ruby/examples/apps/list-o-auth-2-scopes.md @@ -0,0 +1,14 @@ +```ruby +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('') # Your project ID + .set_session('') # The user session to authenticate with + +apps = Apps.new(client) + +result = apps.list_o_auth2_scopes() +``` diff --git a/examples/1.9.x/server-ruby/examples/apps/list-secrets.md b/examples/1.9.x/server-ruby/examples/apps/list-secrets.md new file mode 100644 index 000000000..f77289035 --- /dev/null +++ b/examples/1.9.x/server-ruby/examples/apps/list-secrets.md @@ -0,0 +1,18 @@ +```ruby +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('') # Your project ID + .set_session('') # The user session to authenticate with + +apps = Apps.new(client) + +result = apps.list_secrets( + app_id: '', + queries: [], # optional + total: false # optional +) +``` diff --git a/examples/1.9.x/server-ruby/examples/apps/list.md b/examples/1.9.x/server-ruby/examples/apps/list.md new file mode 100644 index 000000000..75ab272ee --- /dev/null +++ b/examples/1.9.x/server-ruby/examples/apps/list.md @@ -0,0 +1,17 @@ +```ruby +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('') # Your project ID + .set_session('') # The user session to authenticate with + +apps = Apps.new(client) + +result = apps.list( + queries: [], # optional + total: false # optional +) +``` diff --git a/examples/1.9.x/server-ruby/examples/apps/update-labels.md b/examples/1.9.x/server-ruby/examples/apps/update-labels.md new file mode 100644 index 000000000..1705f8bfe --- /dev/null +++ b/examples/1.9.x/server-ruby/examples/apps/update-labels.md @@ -0,0 +1,17 @@ +```ruby +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('') # Your project ID + .set_key('') # Your secret API key + +apps = Apps.new(client) + +result = apps.update_labels( + app_id: '', + labels: [] +) +``` diff --git a/examples/1.9.x/server-ruby/examples/apps/update-team.md b/examples/1.9.x/server-ruby/examples/apps/update-team.md new file mode 100644 index 000000000..a47a58e51 --- /dev/null +++ b/examples/1.9.x/server-ruby/examples/apps/update-team.md @@ -0,0 +1,17 @@ +```ruby +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('') # Your project ID + .set_session('') # The user session to authenticate with + +apps = Apps.new(client) + +result = apps.update_team( + app_id: '', + team_id: '' +) +``` diff --git a/examples/1.9.x/server-ruby/examples/apps/update.md b/examples/1.9.x/server-ruby/examples/apps/update.md new file mode 100644 index 000000000..f8fd0a32f --- /dev/null +++ b/examples/1.9.x/server-ruby/examples/apps/update.md @@ -0,0 +1,35 @@ +```ruby +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('') # Your project ID + .set_session('') # The user session to authenticate with + +apps = Apps.new(client) + +result = apps.update( + app_id: '', + name: '', + description: '', # optional + client_uri: 'https://example.com', # optional + logo_uri: 'https://example.com', # optional + privacy_policy_url: 'https://example.com', # optional + terms_url: 'https://example.com', # optional + contacts: [], # optional + tagline: '', # optional + tags: [], # optional + images: [], # optional + support_url: 'https://example.com', # optional + data_deletion_url: 'https://example.com', # optional + enabled: false, # optional + redirect_uris: [], # optional + post_logout_redirect_uris: [], # optional + type: 'public', # optional + device_flow: false, # optional + installation_scopes: [], # optional + installation_redirect_url: 'https://example.com' # optional +) +``` diff --git a/examples/1.9.x/server-ruby/examples/documentsdb/create-collection.md b/examples/1.9.x/server-ruby/examples/documentsdb/create-collection.md new file mode 100644 index 000000000..60b4570f6 --- /dev/null +++ b/examples/1.9.x/server-ruby/examples/documentsdb/create-collection.md @@ -0,0 +1,25 @@ +```ruby +require 'appwrite' + +include Appwrite +include Appwrite::Permission +include Appwrite::Role + +client = Client.new + .set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('') # Your project ID + .set_key('') # Your secret API key + +documents_db = DocumentsDB.new(client) + +result = documents_db.create_collection( + database_id: '', + collection_id: '', + name: '', + permissions: [Permission.read(Role.any())], # optional + document_security: false, # optional + enabled: false, # optional + attributes: [], # optional + indexes: [] # optional +) +``` diff --git a/examples/1.9.x/server-ruby/examples/documentsdb/create-document.md b/examples/1.9.x/server-ruby/examples/documentsdb/create-document.md new file mode 100644 index 000000000..074b9b7f3 --- /dev/null +++ b/examples/1.9.x/server-ruby/examples/documentsdb/create-document.md @@ -0,0 +1,28 @@ +```ruby +require 'appwrite' + +include Appwrite +include Appwrite::Permission +include Appwrite::Role + +client = Client.new + .set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('') # Your project ID + .set_session('') # The user session to authenticate with + +documents_db = DocumentsDB.new(client) + +result = documents_db.create_document( + database_id: '', + collection_id: '', + document_id: '', + data: { + "username" => "walter.obrien", + "email" => "walter.obrien@example.com", + "fullName" => "Walter O'Brien", + "age" => 30, + "isAdmin" => false + }, + permissions: [Permission.read(Role.any())] # optional +) +``` diff --git a/examples/1.9.x/server-ruby/examples/documentsdb/create-documents.md b/examples/1.9.x/server-ruby/examples/documentsdb/create-documents.md new file mode 100644 index 000000000..feb10f302 --- /dev/null +++ b/examples/1.9.x/server-ruby/examples/documentsdb/create-documents.md @@ -0,0 +1,18 @@ +```ruby +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('') # Your project ID + .set_session('') # The user session to authenticate with + +documents_db = DocumentsDB.new(client) + +result = documents_db.create_documents( + database_id: '', + collection_id: '', + documents: [] +) +``` diff --git a/examples/1.9.x/server-ruby/examples/documentsdb/create-index.md b/examples/1.9.x/server-ruby/examples/documentsdb/create-index.md new file mode 100644 index 000000000..03a22fd68 --- /dev/null +++ b/examples/1.9.x/server-ruby/examples/documentsdb/create-index.md @@ -0,0 +1,23 @@ +```ruby +require 'appwrite' + +include Appwrite +include Appwrite::Enums + +client = Client.new + .set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('') # Your project ID + .set_key('') # Your secret API key + +documents_db = DocumentsDB.new(client) + +result = documents_db.create_index( + database_id: '', + collection_id: '', + key: '', + type: DocumentsDBIndexType::KEY, + attributes: [], + orders: [OrderBy::ASC], # optional + lengths: [] # optional +) +``` diff --git a/examples/1.9.x/server-ruby/examples/documentsdb/create-operations.md b/examples/1.9.x/server-ruby/examples/documentsdb/create-operations.md new file mode 100644 index 000000000..8f96a15ca --- /dev/null +++ b/examples/1.9.x/server-ruby/examples/documentsdb/create-operations.md @@ -0,0 +1,27 @@ +```ruby +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('') # Your project ID + .set_key('') # Your secret API key + +documents_db = DocumentsDB.new(client) + +result = documents_db.create_operations( + transaction_id: '', + operations: [ + { + "action": "create", + "databaseId": "", + "collectionId": "", + "documentId": "", + "data": { + "name": "Walter O'Brien" + } + } + ] # optional +) +``` diff --git a/examples/1.9.x/server-ruby/examples/documentsdb/create-transaction.md b/examples/1.9.x/server-ruby/examples/documentsdb/create-transaction.md new file mode 100644 index 000000000..5f56cb235 --- /dev/null +++ b/examples/1.9.x/server-ruby/examples/documentsdb/create-transaction.md @@ -0,0 +1,16 @@ +```ruby +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('') # Your project ID + .set_key('') # Your secret API key + +documents_db = DocumentsDB.new(client) + +result = documents_db.create_transaction( + ttl: 60 # optional +) +``` diff --git a/examples/1.9.x/server-ruby/examples/documentsdb/create.md b/examples/1.9.x/server-ruby/examples/documentsdb/create.md new file mode 100644 index 000000000..48a26042d --- /dev/null +++ b/examples/1.9.x/server-ruby/examples/documentsdb/create.md @@ -0,0 +1,18 @@ +```ruby +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('') # Your project ID + .set_key('') # Your secret API key + +documents_db = DocumentsDB.new(client) + +result = documents_db.create( + database_id: '', + name: '', + enabled: false # optional +) +``` diff --git a/examples/1.9.x/server-ruby/examples/documentsdb/decrement-document-attribute.md b/examples/1.9.x/server-ruby/examples/documentsdb/decrement-document-attribute.md new file mode 100644 index 000000000..9529577d4 --- /dev/null +++ b/examples/1.9.x/server-ruby/examples/documentsdb/decrement-document-attribute.md @@ -0,0 +1,22 @@ +```ruby +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('') # Your project ID + .set_session('') # The user session to authenticate with + +documents_db = DocumentsDB.new(client) + +result = documents_db.decrement_document_attribute( + database_id: '', + collection_id: '', + document_id: '', + attribute: '', + value: null, # optional + min: null, # optional + transaction_id: '' # optional +) +``` diff --git a/examples/1.9.x/server-ruby/examples/documentsdb/delete-collection.md b/examples/1.9.x/server-ruby/examples/documentsdb/delete-collection.md new file mode 100644 index 000000000..886b2d68a --- /dev/null +++ b/examples/1.9.x/server-ruby/examples/documentsdb/delete-collection.md @@ -0,0 +1,17 @@ +```ruby +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('') # Your project ID + .set_key('') # Your secret API key + +documents_db = DocumentsDB.new(client) + +result = documents_db.delete_collection( + database_id: '', + collection_id: '' +) +``` diff --git a/examples/1.9.x/server-ruby/examples/documentsdb/delete-document.md b/examples/1.9.x/server-ruby/examples/documentsdb/delete-document.md new file mode 100644 index 000000000..d4482765f --- /dev/null +++ b/examples/1.9.x/server-ruby/examples/documentsdb/delete-document.md @@ -0,0 +1,19 @@ +```ruby +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('') # Your project ID + .set_session('') # The user session to authenticate with + +documents_db = DocumentsDB.new(client) + +result = documents_db.delete_document( + database_id: '', + collection_id: '', + document_id: '', + transaction_id: '' # optional +) +``` diff --git a/examples/1.9.x/server-ruby/examples/documentsdb/delete-documents.md b/examples/1.9.x/server-ruby/examples/documentsdb/delete-documents.md new file mode 100644 index 000000000..cd628c75f --- /dev/null +++ b/examples/1.9.x/server-ruby/examples/documentsdb/delete-documents.md @@ -0,0 +1,19 @@ +```ruby +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('') # Your project ID + .set_key('') # Your secret API key + +documents_db = DocumentsDB.new(client) + +result = documents_db.delete_documents( + database_id: '', + collection_id: '', + queries: [], # optional + transaction_id: '' # optional +) +``` diff --git a/examples/1.9.x/server-ruby/examples/documentsdb/delete-index.md b/examples/1.9.x/server-ruby/examples/documentsdb/delete-index.md new file mode 100644 index 000000000..c9f092be7 --- /dev/null +++ b/examples/1.9.x/server-ruby/examples/documentsdb/delete-index.md @@ -0,0 +1,18 @@ +```ruby +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('') # Your project ID + .set_key('') # Your secret API key + +documents_db = DocumentsDB.new(client) + +result = documents_db.delete_index( + database_id: '', + collection_id: '', + key: '' +) +``` diff --git a/examples/1.9.x/server-ruby/examples/documentsdb/delete-transaction.md b/examples/1.9.x/server-ruby/examples/documentsdb/delete-transaction.md new file mode 100644 index 000000000..017d541bc --- /dev/null +++ b/examples/1.9.x/server-ruby/examples/documentsdb/delete-transaction.md @@ -0,0 +1,16 @@ +```ruby +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('') # Your project ID + .set_key('') # Your secret API key + +documents_db = DocumentsDB.new(client) + +result = documents_db.delete_transaction( + transaction_id: '' +) +``` diff --git a/examples/1.9.x/server-ruby/examples/documentsdb/delete.md b/examples/1.9.x/server-ruby/examples/documentsdb/delete.md new file mode 100644 index 000000000..668637d51 --- /dev/null +++ b/examples/1.9.x/server-ruby/examples/documentsdb/delete.md @@ -0,0 +1,16 @@ +```ruby +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('') # Your project ID + .set_key('') # Your secret API key + +documents_db = DocumentsDB.new(client) + +result = documents_db.delete( + database_id: '' +) +``` diff --git a/examples/1.9.x/server-ruby/examples/documentsdb/get-collection.md b/examples/1.9.x/server-ruby/examples/documentsdb/get-collection.md new file mode 100644 index 000000000..d92c81093 --- /dev/null +++ b/examples/1.9.x/server-ruby/examples/documentsdb/get-collection.md @@ -0,0 +1,17 @@ +```ruby +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('') # Your project ID + .set_key('') # Your secret API key + +documents_db = DocumentsDB.new(client) + +result = documents_db.get_collection( + database_id: '', + collection_id: '' +) +``` diff --git a/examples/1.9.x/server-ruby/examples/documentsdb/get-document.md b/examples/1.9.x/server-ruby/examples/documentsdb/get-document.md new file mode 100644 index 000000000..8f5b5c685 --- /dev/null +++ b/examples/1.9.x/server-ruby/examples/documentsdb/get-document.md @@ -0,0 +1,20 @@ +```ruby +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('') # Your project ID + .set_session('') # The user session to authenticate with + +documents_db = DocumentsDB.new(client) + +result = documents_db.get_document( + database_id: '', + collection_id: '', + document_id: '', + queries: [], # optional + transaction_id: '' # optional +) +``` diff --git a/examples/1.9.x/server-ruby/examples/documentsdb/get-index.md b/examples/1.9.x/server-ruby/examples/documentsdb/get-index.md new file mode 100644 index 000000000..8176bccfb --- /dev/null +++ b/examples/1.9.x/server-ruby/examples/documentsdb/get-index.md @@ -0,0 +1,18 @@ +```ruby +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('') # Your project ID + .set_key('') # Your secret API key + +documents_db = DocumentsDB.new(client) + +result = documents_db.get_index( + database_id: '', + collection_id: '', + key: '' +) +``` diff --git a/examples/1.9.x/server-ruby/examples/documentsdb/get-transaction.md b/examples/1.9.x/server-ruby/examples/documentsdb/get-transaction.md new file mode 100644 index 000000000..3b586e38e --- /dev/null +++ b/examples/1.9.x/server-ruby/examples/documentsdb/get-transaction.md @@ -0,0 +1,16 @@ +```ruby +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('') # Your project ID + .set_key('') # Your secret API key + +documents_db = DocumentsDB.new(client) + +result = documents_db.get_transaction( + transaction_id: '' +) +``` diff --git a/examples/1.9.x/server-ruby/examples/documentsdb/get.md b/examples/1.9.x/server-ruby/examples/documentsdb/get.md new file mode 100644 index 000000000..ad7d06ab3 --- /dev/null +++ b/examples/1.9.x/server-ruby/examples/documentsdb/get.md @@ -0,0 +1,16 @@ +```ruby +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('') # Your project ID + .set_key('') # Your secret API key + +documents_db = DocumentsDB.new(client) + +result = documents_db.get( + database_id: '' +) +``` diff --git a/examples/1.9.x/server-ruby/examples/documentsdb/increment-document-attribute.md b/examples/1.9.x/server-ruby/examples/documentsdb/increment-document-attribute.md new file mode 100644 index 000000000..53ac32255 --- /dev/null +++ b/examples/1.9.x/server-ruby/examples/documentsdb/increment-document-attribute.md @@ -0,0 +1,22 @@ +```ruby +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('') # Your project ID + .set_session('') # The user session to authenticate with + +documents_db = DocumentsDB.new(client) + +result = documents_db.increment_document_attribute( + database_id: '', + collection_id: '', + document_id: '', + attribute: '', + value: null, # optional + max: null, # optional + transaction_id: '' # optional +) +``` diff --git a/examples/1.9.x/server-ruby/examples/documentsdb/list-collections.md b/examples/1.9.x/server-ruby/examples/documentsdb/list-collections.md new file mode 100644 index 000000000..6a784fb0f --- /dev/null +++ b/examples/1.9.x/server-ruby/examples/documentsdb/list-collections.md @@ -0,0 +1,19 @@ +```ruby +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('') # Your project ID + .set_key('') # Your secret API key + +documents_db = DocumentsDB.new(client) + +result = documents_db.list_collections( + database_id: '', + queries: [], # optional + search: '', # optional + total: false # optional +) +``` diff --git a/examples/1.9.x/server-ruby/examples/documentsdb/list-documents.md b/examples/1.9.x/server-ruby/examples/documentsdb/list-documents.md new file mode 100644 index 000000000..a2562675d --- /dev/null +++ b/examples/1.9.x/server-ruby/examples/documentsdb/list-documents.md @@ -0,0 +1,21 @@ +```ruby +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('') # Your project ID + .set_session('') # The user session to authenticate with + +documents_db = DocumentsDB.new(client) + +result = documents_db.list_documents( + database_id: '', + collection_id: '', + queries: [], # optional + transaction_id: '', # optional + total: false, # optional + ttl: 0 # optional +) +``` diff --git a/examples/1.9.x/server-ruby/examples/documentsdb/list-indexes.md b/examples/1.9.x/server-ruby/examples/documentsdb/list-indexes.md new file mode 100644 index 000000000..b23b14915 --- /dev/null +++ b/examples/1.9.x/server-ruby/examples/documentsdb/list-indexes.md @@ -0,0 +1,19 @@ +```ruby +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('') # Your project ID + .set_key('') # Your secret API key + +documents_db = DocumentsDB.new(client) + +result = documents_db.list_indexes( + database_id: '', + collection_id: '', + queries: [], # optional + total: false # optional +) +``` diff --git a/examples/1.9.x/server-ruby/examples/documentsdb/list-transactions.md b/examples/1.9.x/server-ruby/examples/documentsdb/list-transactions.md new file mode 100644 index 000000000..82d368e17 --- /dev/null +++ b/examples/1.9.x/server-ruby/examples/documentsdb/list-transactions.md @@ -0,0 +1,16 @@ +```ruby +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('') # Your project ID + .set_key('') # Your secret API key + +documents_db = DocumentsDB.new(client) + +result = documents_db.list_transactions( + queries: [] # optional +) +``` diff --git a/examples/1.9.x/server-ruby/examples/documentsdb/list.md b/examples/1.9.x/server-ruby/examples/documentsdb/list.md new file mode 100644 index 000000000..df827a109 --- /dev/null +++ b/examples/1.9.x/server-ruby/examples/documentsdb/list.md @@ -0,0 +1,18 @@ +```ruby +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('') # Your project ID + .set_key('') # Your secret API key + +documents_db = DocumentsDB.new(client) + +result = documents_db.list( + queries: [], # optional + search: '', # optional + total: false # optional +) +``` diff --git a/examples/1.9.x/server-ruby/examples/documentsdb/update-collection.md b/examples/1.9.x/server-ruby/examples/documentsdb/update-collection.md new file mode 100644 index 000000000..2be8dca6f --- /dev/null +++ b/examples/1.9.x/server-ruby/examples/documentsdb/update-collection.md @@ -0,0 +1,24 @@ +```ruby +require 'appwrite' + +include Appwrite +include Appwrite::Permission +include Appwrite::Role + +client = Client.new + .set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('') # Your project ID + .set_key('') # Your secret API key + +documents_db = DocumentsDB.new(client) + +result = documents_db.update_collection( + database_id: '', + collection_id: '', + name: '', + permissions: [Permission.read(Role.any())], # optional + document_security: false, # optional + enabled: false, # optional + purge: false # optional +) +``` diff --git a/examples/1.9.x/server-ruby/examples/documentsdb/update-document.md b/examples/1.9.x/server-ruby/examples/documentsdb/update-document.md new file mode 100644 index 000000000..90e51e069 --- /dev/null +++ b/examples/1.9.x/server-ruby/examples/documentsdb/update-document.md @@ -0,0 +1,23 @@ +```ruby +require 'appwrite' + +include Appwrite +include Appwrite::Permission +include Appwrite::Role + +client = Client.new + .set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('') # Your project ID + .set_session('') # The user session to authenticate with + +documents_db = DocumentsDB.new(client) + +result = documents_db.update_document( + database_id: '', + collection_id: '', + document_id: '', + data: {}, # optional + permissions: [Permission.read(Role.any())], # optional + transaction_id: '' # optional +) +``` diff --git a/examples/1.9.x/server-ruby/examples/documentsdb/update-documents.md b/examples/1.9.x/server-ruby/examples/documentsdb/update-documents.md new file mode 100644 index 000000000..4f3bb64e9 --- /dev/null +++ b/examples/1.9.x/server-ruby/examples/documentsdb/update-documents.md @@ -0,0 +1,20 @@ +```ruby +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('') # Your project ID + .set_key('') # Your secret API key + +documents_db = DocumentsDB.new(client) + +result = documents_db.update_documents( + database_id: '', + collection_id: '', + data: {}, # optional + queries: [], # optional + transaction_id: '' # optional +) +``` diff --git a/examples/1.9.x/server-ruby/examples/documentsdb/update-transaction.md b/examples/1.9.x/server-ruby/examples/documentsdb/update-transaction.md new file mode 100644 index 000000000..37a638e26 --- /dev/null +++ b/examples/1.9.x/server-ruby/examples/documentsdb/update-transaction.md @@ -0,0 +1,18 @@ +```ruby +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('') # Your project ID + .set_key('') # Your secret API key + +documents_db = DocumentsDB.new(client) + +result = documents_db.update_transaction( + transaction_id: '', + commit: false, # optional + rollback: false # optional +) +``` diff --git a/examples/1.9.x/server-ruby/examples/documentsdb/update.md b/examples/1.9.x/server-ruby/examples/documentsdb/update.md new file mode 100644 index 000000000..05d20a94d --- /dev/null +++ b/examples/1.9.x/server-ruby/examples/documentsdb/update.md @@ -0,0 +1,18 @@ +```ruby +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('') # Your project ID + .set_key('') # Your secret API key + +documents_db = DocumentsDB.new(client) + +result = documents_db.update( + database_id: '', + name: '', + enabled: false # optional +) +``` diff --git a/examples/1.9.x/server-ruby/examples/documentsdb/upsert-document.md b/examples/1.9.x/server-ruby/examples/documentsdb/upsert-document.md new file mode 100644 index 000000000..ca6bace1b --- /dev/null +++ b/examples/1.9.x/server-ruby/examples/documentsdb/upsert-document.md @@ -0,0 +1,23 @@ +```ruby +require 'appwrite' + +include Appwrite +include Appwrite::Permission +include Appwrite::Role + +client = Client.new + .set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('') # Your project ID + .set_session('') # The user session to authenticate with + +documents_db = DocumentsDB.new(client) + +result = documents_db.upsert_document( + database_id: '', + collection_id: '', + document_id: '', + data: {}, # optional + permissions: [Permission.read(Role.any())], # optional + transaction_id: '' # optional +) +``` diff --git a/examples/1.9.x/server-ruby/examples/documentsdb/upsert-documents.md b/examples/1.9.x/server-ruby/examples/documentsdb/upsert-documents.md new file mode 100644 index 000000000..f7f05970e --- /dev/null +++ b/examples/1.9.x/server-ruby/examples/documentsdb/upsert-documents.md @@ -0,0 +1,19 @@ +```ruby +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('') # Your project ID + .set_key('') # Your secret API key + +documents_db = DocumentsDB.new(client) + +result = documents_db.upsert_documents( + database_id: '', + collection_id: '', + documents: [], + transaction_id: '' # optional +) +``` diff --git a/examples/1.9.x/server-ruby/examples/oauth2/approve.md b/examples/1.9.x/server-ruby/examples/oauth2/approve.md new file mode 100644 index 000000000..6576dbecc --- /dev/null +++ b/examples/1.9.x/server-ruby/examples/oauth2/approve.md @@ -0,0 +1,18 @@ +```ruby +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint + .set_session('') # The user session to authenticate with + .set_project('') # Your project ID + +oauth2 = Oauth2.new(client) + +result = oauth2.approve( + grant_id: '', + authorization_details: '', # optional + scope: '' # optional +) +``` diff --git a/examples/1.9.x/server-ruby/examples/oauth2/authorize-post.md b/examples/1.9.x/server-ruby/examples/oauth2/authorize-post.md new file mode 100644 index 000000000..75f092a2e --- /dev/null +++ b/examples/1.9.x/server-ruby/examples/oauth2/authorize-post.md @@ -0,0 +1,29 @@ +```ruby +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint + .set_session('') # The user session to authenticate with + .set_project('') # Your project ID + +oauth2 = Oauth2.new(client) + +result = oauth2.authorize_post( + client_id: '', # optional + redirect_uri: 'https://example.com', # optional + response_type: '', # optional + scope: '', # optional + state: '', # optional + nonce: '', # optional + code_challenge: '', # optional + code_challenge_method: 's256', # optional + prompt: '', # optional + max_age: 0, # optional + authorization_details: '', # optional + resource: '', # optional + audience: '', # optional + request_uri: '' # optional +) +``` diff --git a/examples/1.9.x/server-ruby/examples/oauth2/authorize.md b/examples/1.9.x/server-ruby/examples/oauth2/authorize.md new file mode 100644 index 000000000..d7d5befc9 --- /dev/null +++ b/examples/1.9.x/server-ruby/examples/oauth2/authorize.md @@ -0,0 +1,29 @@ +```ruby +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint + .set_session('') # The user session to authenticate with + .set_project('') # Your project ID + +oauth2 = Oauth2.new(client) + +result = oauth2.authorize( + client_id: '', # optional + redirect_uri: 'https://example.com', # optional + response_type: '', # optional + scope: '', # optional + state: '', # optional + nonce: '', # optional + code_challenge: '', # optional + code_challenge_method: 's256', # optional + prompt: '', # optional + max_age: 0, # optional + authorization_details: '', # optional + resource: '', # optional + audience: '', # optional + request_uri: '' # optional +) +``` diff --git a/examples/1.9.x/server-ruby/examples/oauth2/create-device-authorization.md b/examples/1.9.x/server-ruby/examples/oauth2/create-device-authorization.md new file mode 100644 index 000000000..102671db5 --- /dev/null +++ b/examples/1.9.x/server-ruby/examples/oauth2/create-device-authorization.md @@ -0,0 +1,20 @@ +```ruby +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint + .set_session('') # The user session to authenticate with + .set_project('') # Your project ID + +oauth2 = Oauth2.new(client) + +result = oauth2.create_device_authorization( + client_id: '', # optional + scope: '', # optional + authorization_details: '', # optional + resource: '', # optional + audience: '' # optional +) +``` diff --git a/examples/1.9.x/server-ruby/examples/oauth2/create-grant.md b/examples/1.9.x/server-ruby/examples/oauth2/create-grant.md new file mode 100644 index 000000000..9184cbf76 --- /dev/null +++ b/examples/1.9.x/server-ruby/examples/oauth2/create-grant.md @@ -0,0 +1,16 @@ +```ruby +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint + .set_session('') # The user session to authenticate with + .set_project('') # Your project ID + +oauth2 = Oauth2.new(client) + +result = oauth2.create_grant( + user_code: '' +) +``` diff --git a/examples/1.9.x/server-ruby/examples/oauth2/create-par.md b/examples/1.9.x/server-ruby/examples/oauth2/create-par.md new file mode 100644 index 000000000..192e5ff14 --- /dev/null +++ b/examples/1.9.x/server-ruby/examples/oauth2/create-par.md @@ -0,0 +1,28 @@ +```ruby +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint + .set_session('') # The user session to authenticate with + .set_project('') # Your project ID + +oauth2 = Oauth2.new(client) + +result = oauth2.create_par( + client_id: '', + redirect_uri: 'https://example.com', + response_type: 'code', + scope: '', # optional + state: '', # optional + nonce: '', # optional + code_challenge: '', # optional + code_challenge_method: 's256', # optional + prompt: '', # optional + max_age: 0, # optional + authorization_details: '', # optional + resource: '', # optional + audience: '' # optional +) +``` diff --git a/examples/1.9.x/server-ruby/examples/oauth2/create-token.md b/examples/1.9.x/server-ruby/examples/oauth2/create-token.md new file mode 100644 index 000000000..6e0cabc1d --- /dev/null +++ b/examples/1.9.x/server-ruby/examples/oauth2/create-token.md @@ -0,0 +1,25 @@ +```ruby +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint + .set_session('') # The user session to authenticate with + .set_project('') # Your project ID + +oauth2 = Oauth2.new(client) + +result = oauth2.create_token( + grant_type: '', + code: '', # optional + refresh_token: '', # optional + device_code: '', # optional + client_id: '', # optional + client_secret: '', # optional + code_verifier: '', # optional + redirect_uri: 'https://example.com', # optional + resource: '', # optional + audience: '' # optional +) +``` diff --git a/examples/1.9.x/server-ruby/examples/oauth2/get-grant.md b/examples/1.9.x/server-ruby/examples/oauth2/get-grant.md new file mode 100644 index 000000000..e6b807638 --- /dev/null +++ b/examples/1.9.x/server-ruby/examples/oauth2/get-grant.md @@ -0,0 +1,16 @@ +```ruby +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint + .set_session('') # The user session to authenticate with + .set_project('') # Your project ID + +oauth2 = Oauth2.new(client) + +result = oauth2.get_grant( + grant_id: '' +) +``` diff --git a/examples/1.9.x/server-ruby/examples/oauth2/list-organizations.md b/examples/1.9.x/server-ruby/examples/oauth2/list-organizations.md new file mode 100644 index 000000000..28b026e4c --- /dev/null +++ b/examples/1.9.x/server-ruby/examples/oauth2/list-organizations.md @@ -0,0 +1,18 @@ +```ruby +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint + .set_session('') # The user session to authenticate with + .set_project('') # Your project ID + +oauth2 = Oauth2.new(client) + +result = oauth2.list_organizations( + limit: 1, # optional + offset: 0, # optional + search: '' # optional +) +``` diff --git a/examples/1.9.x/server-ruby/examples/oauth2/list-projects.md b/examples/1.9.x/server-ruby/examples/oauth2/list-projects.md new file mode 100644 index 000000000..3f8c64f24 --- /dev/null +++ b/examples/1.9.x/server-ruby/examples/oauth2/list-projects.md @@ -0,0 +1,18 @@ +```ruby +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint + .set_session('') # The user session to authenticate with + .set_project('') # Your project ID + +oauth2 = Oauth2.new(client) + +result = oauth2.list_projects( + limit: 1, # optional + offset: 0, # optional + search: '' # optional +) +``` diff --git a/examples/1.9.x/server-ruby/examples/oauth2/reject.md b/examples/1.9.x/server-ruby/examples/oauth2/reject.md new file mode 100644 index 000000000..bf00d9903 --- /dev/null +++ b/examples/1.9.x/server-ruby/examples/oauth2/reject.md @@ -0,0 +1,16 @@ +```ruby +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint + .set_session('') # The user session to authenticate with + .set_project('') # Your project ID + +oauth2 = Oauth2.new(client) + +result = oauth2.reject( + grant_id: '' +) +``` diff --git a/examples/1.9.x/server-ruby/examples/oauth2/revoke.md b/examples/1.9.x/server-ruby/examples/oauth2/revoke.md new file mode 100644 index 000000000..6b7094513 --- /dev/null +++ b/examples/1.9.x/server-ruby/examples/oauth2/revoke.md @@ -0,0 +1,19 @@ +```ruby +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint + .set_session('') # The user session to authenticate with + .set_project('') # Your project ID + +oauth2 = Oauth2.new(client) + +result = oauth2.revoke( + token: '', + token_type_hint: 'access_token', # optional + client_id: '', # optional + client_secret: '' # optional +) +``` diff --git a/examples/1.9.x/server-ruby/examples/organization/create-installation.md b/examples/1.9.x/server-ruby/examples/organization/create-installation.md new file mode 100644 index 000000000..a36a41e02 --- /dev/null +++ b/examples/1.9.x/server-ruby/examples/organization/create-installation.md @@ -0,0 +1,17 @@ +```ruby +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('') # Your project ID + .set_session('') # The user session to authenticate with + +organization = Organization.new(client) + +result = organization.create_installation( + app_id: '', + authorization_details: '' # optional +) +``` diff --git a/examples/1.9.x/server-ruby/examples/organization/delete-installation.md b/examples/1.9.x/server-ruby/examples/organization/delete-installation.md new file mode 100644 index 000000000..c906fc18b --- /dev/null +++ b/examples/1.9.x/server-ruby/examples/organization/delete-installation.md @@ -0,0 +1,16 @@ +```ruby +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('') # Your project ID + .set_session('') # The user session to authenticate with + +organization = Organization.new(client) + +result = organization.delete_installation( + installation_id: '' +) +``` diff --git a/examples/1.9.x/server-ruby/examples/organization/get-installation.md b/examples/1.9.x/server-ruby/examples/organization/get-installation.md new file mode 100644 index 000000000..32c087663 --- /dev/null +++ b/examples/1.9.x/server-ruby/examples/organization/get-installation.md @@ -0,0 +1,16 @@ +```ruby +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('') # Your project ID + .set_session('') # The user session to authenticate with + +organization = Organization.new(client) + +result = organization.get_installation( + installation_id: '' +) +``` diff --git a/examples/1.9.x/server-ruby/examples/organization/list-installations.md b/examples/1.9.x/server-ruby/examples/organization/list-installations.md new file mode 100644 index 000000000..92214d266 --- /dev/null +++ b/examples/1.9.x/server-ruby/examples/organization/list-installations.md @@ -0,0 +1,17 @@ +```ruby +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('') # Your project ID + .set_session('') # The user session to authenticate with + +organization = Organization.new(client) + +result = organization.list_installations( + queries: [], # optional + total: false # optional +) +``` diff --git a/examples/1.9.x/server-ruby/examples/organization/update-installation.md b/examples/1.9.x/server-ruby/examples/organization/update-installation.md new file mode 100644 index 000000000..db7c932e9 --- /dev/null +++ b/examples/1.9.x/server-ruby/examples/organization/update-installation.md @@ -0,0 +1,17 @@ +```ruby +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('') # Your project ID + .set_session('') # The user session to authenticate with + +organization = Organization.new(client) + +result = organization.update_installation( + installation_id: '', + authorization_details: '' # optional +) +``` diff --git a/examples/1.9.x/server-ruby/examples/project/update-o-auth-2-server.md b/examples/1.9.x/server-ruby/examples/project/update-o-auth-2-server.md index b3ab33993..92a56d272 100644 --- a/examples/1.9.x/server-ruby/examples/project/update-o-auth-2-server.md +++ b/examples/1.9.x/server-ruby/examples/project/update-o-auth-2-server.md @@ -19,6 +19,7 @@ result = project.update_o_auth2_server( refresh_token_duration: 60, # optional public_access_token_duration: 60, # optional public_refresh_token_duration: 60, # optional + installation_access_token_duration: 60, # optional confidential_pkce: false, # optional verification_url: 'https://example.com', # optional user_code_length: 6, # optional diff --git a/examples/1.9.x/server-ruby/examples/teams/create-installation.md b/examples/1.9.x/server-ruby/examples/teams/create-installation.md new file mode 100644 index 000000000..326c84cca --- /dev/null +++ b/examples/1.9.x/server-ruby/examples/teams/create-installation.md @@ -0,0 +1,18 @@ +```ruby +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('') # Your project ID + .set_session('') # The user session to authenticate with + +teams = Teams.new(client) + +result = teams.create_installation( + team_id: '', + app_id: '', + authorization_details: '' # optional +) +``` diff --git a/examples/1.9.x/server-ruby/examples/teams/delete-installation.md b/examples/1.9.x/server-ruby/examples/teams/delete-installation.md new file mode 100644 index 000000000..420b289d7 --- /dev/null +++ b/examples/1.9.x/server-ruby/examples/teams/delete-installation.md @@ -0,0 +1,17 @@ +```ruby +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('') # Your project ID + .set_session('') # The user session to authenticate with + +teams = Teams.new(client) + +result = teams.delete_installation( + team_id: '', + installation_id: '' +) +``` diff --git a/examples/1.9.x/server-ruby/examples/teams/get-installation.md b/examples/1.9.x/server-ruby/examples/teams/get-installation.md new file mode 100644 index 000000000..f1200564b --- /dev/null +++ b/examples/1.9.x/server-ruby/examples/teams/get-installation.md @@ -0,0 +1,17 @@ +```ruby +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('') # Your project ID + .set_session('') # The user session to authenticate with + +teams = Teams.new(client) + +result = teams.get_installation( + team_id: '', + installation_id: '' +) +``` diff --git a/examples/1.9.x/server-ruby/examples/teams/list-installations.md b/examples/1.9.x/server-ruby/examples/teams/list-installations.md new file mode 100644 index 000000000..cfd7ea617 --- /dev/null +++ b/examples/1.9.x/server-ruby/examples/teams/list-installations.md @@ -0,0 +1,18 @@ +```ruby +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('') # Your project ID + .set_session('') # The user session to authenticate with + +teams = Teams.new(client) + +result = teams.list_installations( + team_id: '', + queries: [], # optional + total: false # optional +) +``` diff --git a/examples/1.9.x/server-ruby/examples/teams/update-installation.md b/examples/1.9.x/server-ruby/examples/teams/update-installation.md new file mode 100644 index 000000000..666093200 --- /dev/null +++ b/examples/1.9.x/server-ruby/examples/teams/update-installation.md @@ -0,0 +1,18 @@ +```ruby +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('') # Your project ID + .set_session('') # The user session to authenticate with + +teams = Teams.new(client) + +result = teams.update_installation( + team_id: '', + installation_id: '', + authorization_details: '' # optional +) +``` diff --git a/examples/1.9.x/server-ruby/examples/vectorsdb/create-collection.md b/examples/1.9.x/server-ruby/examples/vectorsdb/create-collection.md new file mode 100644 index 000000000..b449f541e --- /dev/null +++ b/examples/1.9.x/server-ruby/examples/vectorsdb/create-collection.md @@ -0,0 +1,24 @@ +```ruby +require 'appwrite' + +include Appwrite +include Appwrite::Permission +include Appwrite::Role + +client = Client.new + .set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('') # Your project ID + .set_key('') # Your secret API key + +vectors_db = VectorsDB.new(client) + +result = vectors_db.create_collection( + database_id: '', + collection_id: '', + name: '', + dimension: 1, + permissions: [Permission.read(Role.any())], # optional + document_security: false, # optional + enabled: false # optional +) +``` diff --git a/examples/1.9.x/server-ruby/examples/vectorsdb/create-document.md b/examples/1.9.x/server-ruby/examples/vectorsdb/create-document.md new file mode 100644 index 000000000..4ad9aa46c --- /dev/null +++ b/examples/1.9.x/server-ruby/examples/vectorsdb/create-document.md @@ -0,0 +1,32 @@ +```ruby +require 'appwrite' + +include Appwrite +include Appwrite::Permission +include Appwrite::Role + +client = Client.new + .set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('') # Your project ID + .set_session('') # The user session to authenticate with + +vectors_db = VectorsDB.new(client) + +result = vectors_db.create_document( + database_id: '', + collection_id: '', + document_id: '', + data: { + "embeddings" => { + "0" => 0.12, + "1" => -0.55, + "2" => 0.88, + "3" => 1.02 + }, + "metadata" => { + "key" => "value" + } + }, + permissions: [Permission.read(Role.any())] # optional +) +``` diff --git a/examples/1.9.x/server-ruby/examples/vectorsdb/create-documents.md b/examples/1.9.x/server-ruby/examples/vectorsdb/create-documents.md new file mode 100644 index 000000000..0fcac72bd --- /dev/null +++ b/examples/1.9.x/server-ruby/examples/vectorsdb/create-documents.md @@ -0,0 +1,18 @@ +```ruby +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('') # Your project ID + .set_key('') # Your secret API key + +vectors_db = VectorsDB.new(client) + +result = vectors_db.create_documents( + database_id: '', + collection_id: '', + documents: [] +) +``` diff --git a/examples/1.9.x/server-ruby/examples/vectorsdb/create-index.md b/examples/1.9.x/server-ruby/examples/vectorsdb/create-index.md new file mode 100644 index 000000000..f3295b8a4 --- /dev/null +++ b/examples/1.9.x/server-ruby/examples/vectorsdb/create-index.md @@ -0,0 +1,23 @@ +```ruby +require 'appwrite' + +include Appwrite +include Appwrite::Enums + +client = Client.new + .set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('') # Your project ID + .set_key('') # Your secret API key + +vectors_db = VectorsDB.new(client) + +result = vectors_db.create_index( + database_id: '', + collection_id: '', + key: '', + type: VectorsDBIndexType::HNSW_EUCLIDEAN, + attributes: [], + orders: [OrderBy::ASC], # optional + lengths: [] # optional +) +``` diff --git a/examples/1.9.x/server-ruby/examples/vectorsdb/create-operations.md b/examples/1.9.x/server-ruby/examples/vectorsdb/create-operations.md new file mode 100644 index 000000000..6817930bb --- /dev/null +++ b/examples/1.9.x/server-ruby/examples/vectorsdb/create-operations.md @@ -0,0 +1,27 @@ +```ruby +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('') # Your project ID + .set_key('') # Your secret API key + +vectors_db = VectorsDB.new(client) + +result = vectors_db.create_operations( + transaction_id: '', + operations: [ + { + "action": "create", + "databaseId": "", + "collectionId": "", + "documentId": "", + "data": { + "name": "Walter O'Brien" + } + } + ] # optional +) +``` diff --git a/examples/1.9.x/server-ruby/examples/vectorsdb/create-query.md b/examples/1.9.x/server-ruby/examples/vectorsdb/create-query.md new file mode 100644 index 000000000..917cdac2c --- /dev/null +++ b/examples/1.9.x/server-ruby/examples/vectorsdb/create-query.md @@ -0,0 +1,21 @@ +```ruby +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('') # Your project ID + .set_session('') # The user session to authenticate with + +vectors_db = VectorsDB.new(client) + +result = vectors_db.create_query( + database_id: '', + collection_id: '', + queries: [], # optional + transaction_id: '', # optional + total: false, # optional + ttl: 0 # optional +) +``` diff --git a/examples/1.9.x/server-ruby/examples/vectorsdb/create-text-embeddings.md b/examples/1.9.x/server-ruby/examples/vectorsdb/create-text-embeddings.md new file mode 100644 index 000000000..24e2e15a7 --- /dev/null +++ b/examples/1.9.x/server-ruby/examples/vectorsdb/create-text-embeddings.md @@ -0,0 +1,18 @@ +```ruby +require 'appwrite' + +include Appwrite +include Appwrite::Enums + +client = Client.new + .set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('') # Your project ID + .set_key('') # Your secret API key + +vectors_db = VectorsDB.new(client) + +result = vectors_db.create_text_embeddings( + texts: [], + model: EmbeddingModel::NOMIC_EMBED_TEXT # optional +) +``` diff --git a/examples/1.9.x/server-ruby/examples/vectorsdb/create-transaction.md b/examples/1.9.x/server-ruby/examples/vectorsdb/create-transaction.md new file mode 100644 index 000000000..509255332 --- /dev/null +++ b/examples/1.9.x/server-ruby/examples/vectorsdb/create-transaction.md @@ -0,0 +1,16 @@ +```ruby +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('') # Your project ID + .set_key('') # Your secret API key + +vectors_db = VectorsDB.new(client) + +result = vectors_db.create_transaction( + ttl: 60 # optional +) +``` diff --git a/examples/1.9.x/server-ruby/examples/vectorsdb/create.md b/examples/1.9.x/server-ruby/examples/vectorsdb/create.md new file mode 100644 index 000000000..eefcfd0e4 --- /dev/null +++ b/examples/1.9.x/server-ruby/examples/vectorsdb/create.md @@ -0,0 +1,18 @@ +```ruby +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('') # Your project ID + .set_key('') # Your secret API key + +vectors_db = VectorsDB.new(client) + +result = vectors_db.create( + database_id: '', + name: '', + enabled: false # optional +) +``` diff --git a/examples/1.9.x/server-ruby/examples/vectorsdb/delete-collection.md b/examples/1.9.x/server-ruby/examples/vectorsdb/delete-collection.md new file mode 100644 index 000000000..fc3bd763e --- /dev/null +++ b/examples/1.9.x/server-ruby/examples/vectorsdb/delete-collection.md @@ -0,0 +1,17 @@ +```ruby +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('') # Your project ID + .set_key('') # Your secret API key + +vectors_db = VectorsDB.new(client) + +result = vectors_db.delete_collection( + database_id: '', + collection_id: '' +) +``` diff --git a/examples/1.9.x/server-ruby/examples/vectorsdb/delete-document.md b/examples/1.9.x/server-ruby/examples/vectorsdb/delete-document.md new file mode 100644 index 000000000..40718f324 --- /dev/null +++ b/examples/1.9.x/server-ruby/examples/vectorsdb/delete-document.md @@ -0,0 +1,19 @@ +```ruby +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('') # Your project ID + .set_session('') # The user session to authenticate with + +vectors_db = VectorsDB.new(client) + +result = vectors_db.delete_document( + database_id: '', + collection_id: '', + document_id: '', + transaction_id: '' # optional +) +``` diff --git a/examples/1.9.x/server-ruby/examples/vectorsdb/delete-documents.md b/examples/1.9.x/server-ruby/examples/vectorsdb/delete-documents.md new file mode 100644 index 000000000..bb1173a38 --- /dev/null +++ b/examples/1.9.x/server-ruby/examples/vectorsdb/delete-documents.md @@ -0,0 +1,19 @@ +```ruby +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('') # Your project ID + .set_key('') # Your secret API key + +vectors_db = VectorsDB.new(client) + +result = vectors_db.delete_documents( + database_id: '', + collection_id: '', + queries: [], # optional + transaction_id: '' # optional +) +``` diff --git a/examples/1.9.x/server-ruby/examples/vectorsdb/delete-index.md b/examples/1.9.x/server-ruby/examples/vectorsdb/delete-index.md new file mode 100644 index 000000000..013a2de61 --- /dev/null +++ b/examples/1.9.x/server-ruby/examples/vectorsdb/delete-index.md @@ -0,0 +1,18 @@ +```ruby +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('') # Your project ID + .set_key('') # Your secret API key + +vectors_db = VectorsDB.new(client) + +result = vectors_db.delete_index( + database_id: '', + collection_id: '', + key: '' +) +``` diff --git a/examples/1.9.x/server-ruby/examples/vectorsdb/delete-transaction.md b/examples/1.9.x/server-ruby/examples/vectorsdb/delete-transaction.md new file mode 100644 index 000000000..4124aac36 --- /dev/null +++ b/examples/1.9.x/server-ruby/examples/vectorsdb/delete-transaction.md @@ -0,0 +1,16 @@ +```ruby +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('') # Your project ID + .set_key('') # Your secret API key + +vectors_db = VectorsDB.new(client) + +result = vectors_db.delete_transaction( + transaction_id: '' +) +``` diff --git a/examples/1.9.x/server-ruby/examples/vectorsdb/delete.md b/examples/1.9.x/server-ruby/examples/vectorsdb/delete.md new file mode 100644 index 000000000..6be5631a1 --- /dev/null +++ b/examples/1.9.x/server-ruby/examples/vectorsdb/delete.md @@ -0,0 +1,16 @@ +```ruby +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('') # Your project ID + .set_key('') # Your secret API key + +vectors_db = VectorsDB.new(client) + +result = vectors_db.delete( + database_id: '' +) +``` diff --git a/examples/1.9.x/server-ruby/examples/vectorsdb/get-collection.md b/examples/1.9.x/server-ruby/examples/vectorsdb/get-collection.md new file mode 100644 index 000000000..dae8e5315 --- /dev/null +++ b/examples/1.9.x/server-ruby/examples/vectorsdb/get-collection.md @@ -0,0 +1,17 @@ +```ruby +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('') # Your project ID + .set_key('') # Your secret API key + +vectors_db = VectorsDB.new(client) + +result = vectors_db.get_collection( + database_id: '', + collection_id: '' +) +``` diff --git a/examples/1.9.x/server-ruby/examples/vectorsdb/get-document.md b/examples/1.9.x/server-ruby/examples/vectorsdb/get-document.md new file mode 100644 index 000000000..49bfc862f --- /dev/null +++ b/examples/1.9.x/server-ruby/examples/vectorsdb/get-document.md @@ -0,0 +1,20 @@ +```ruby +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('') # Your project ID + .set_session('') # The user session to authenticate with + +vectors_db = VectorsDB.new(client) + +result = vectors_db.get_document( + database_id: '', + collection_id: '', + document_id: '', + queries: [], # optional + transaction_id: '' # optional +) +``` diff --git a/examples/1.9.x/server-ruby/examples/vectorsdb/get-index.md b/examples/1.9.x/server-ruby/examples/vectorsdb/get-index.md new file mode 100644 index 000000000..5499c0b18 --- /dev/null +++ b/examples/1.9.x/server-ruby/examples/vectorsdb/get-index.md @@ -0,0 +1,18 @@ +```ruby +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('') # Your project ID + .set_key('') # Your secret API key + +vectors_db = VectorsDB.new(client) + +result = vectors_db.get_index( + database_id: '', + collection_id: '', + key: '' +) +``` diff --git a/examples/1.9.x/server-ruby/examples/vectorsdb/get-transaction.md b/examples/1.9.x/server-ruby/examples/vectorsdb/get-transaction.md new file mode 100644 index 000000000..584134d61 --- /dev/null +++ b/examples/1.9.x/server-ruby/examples/vectorsdb/get-transaction.md @@ -0,0 +1,16 @@ +```ruby +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('') # Your project ID + .set_key('') # Your secret API key + +vectors_db = VectorsDB.new(client) + +result = vectors_db.get_transaction( + transaction_id: '' +) +``` diff --git a/examples/1.9.x/server-ruby/examples/vectorsdb/get.md b/examples/1.9.x/server-ruby/examples/vectorsdb/get.md new file mode 100644 index 000000000..cea4329f6 --- /dev/null +++ b/examples/1.9.x/server-ruby/examples/vectorsdb/get.md @@ -0,0 +1,16 @@ +```ruby +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('') # Your project ID + .set_key('') # Your secret API key + +vectors_db = VectorsDB.new(client) + +result = vectors_db.get( + database_id: '' +) +``` diff --git a/examples/1.9.x/server-ruby/examples/vectorsdb/list-collections.md b/examples/1.9.x/server-ruby/examples/vectorsdb/list-collections.md new file mode 100644 index 000000000..dc85e4ac0 --- /dev/null +++ b/examples/1.9.x/server-ruby/examples/vectorsdb/list-collections.md @@ -0,0 +1,19 @@ +```ruby +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('') # Your project ID + .set_key('') # Your secret API key + +vectors_db = VectorsDB.new(client) + +result = vectors_db.list_collections( + database_id: '', + queries: [], # optional + search: '', # optional + total: false # optional +) +``` diff --git a/examples/1.9.x/server-ruby/examples/vectorsdb/list-documents.md b/examples/1.9.x/server-ruby/examples/vectorsdb/list-documents.md new file mode 100644 index 000000000..c60da651f --- /dev/null +++ b/examples/1.9.x/server-ruby/examples/vectorsdb/list-documents.md @@ -0,0 +1,21 @@ +```ruby +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('') # Your project ID + .set_session('') # The user session to authenticate with + +vectors_db = VectorsDB.new(client) + +result = vectors_db.list_documents( + database_id: '', + collection_id: '', + queries: [], # optional + transaction_id: '', # optional + total: false, # optional + ttl: 0 # optional +) +``` diff --git a/examples/1.9.x/server-ruby/examples/vectorsdb/list-indexes.md b/examples/1.9.x/server-ruby/examples/vectorsdb/list-indexes.md new file mode 100644 index 000000000..2df5e6825 --- /dev/null +++ b/examples/1.9.x/server-ruby/examples/vectorsdb/list-indexes.md @@ -0,0 +1,19 @@ +```ruby +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('') # Your project ID + .set_key('') # Your secret API key + +vectors_db = VectorsDB.new(client) + +result = vectors_db.list_indexes( + database_id: '', + collection_id: '', + queries: [], # optional + total: false # optional +) +``` diff --git a/examples/1.9.x/server-ruby/examples/vectorsdb/list-transactions.md b/examples/1.9.x/server-ruby/examples/vectorsdb/list-transactions.md new file mode 100644 index 000000000..9c2182da6 --- /dev/null +++ b/examples/1.9.x/server-ruby/examples/vectorsdb/list-transactions.md @@ -0,0 +1,16 @@ +```ruby +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('') # Your project ID + .set_key('') # Your secret API key + +vectors_db = VectorsDB.new(client) + +result = vectors_db.list_transactions( + queries: [] # optional +) +``` diff --git a/examples/1.9.x/server-ruby/examples/vectorsdb/list.md b/examples/1.9.x/server-ruby/examples/vectorsdb/list.md new file mode 100644 index 000000000..2b52c5985 --- /dev/null +++ b/examples/1.9.x/server-ruby/examples/vectorsdb/list.md @@ -0,0 +1,18 @@ +```ruby +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('') # Your project ID + .set_key('') # Your secret API key + +vectors_db = VectorsDB.new(client) + +result = vectors_db.list( + queries: [], # optional + search: '', # optional + total: false # optional +) +``` diff --git a/examples/1.9.x/server-ruby/examples/vectorsdb/update-collection.md b/examples/1.9.x/server-ruby/examples/vectorsdb/update-collection.md new file mode 100644 index 000000000..0dfdac139 --- /dev/null +++ b/examples/1.9.x/server-ruby/examples/vectorsdb/update-collection.md @@ -0,0 +1,24 @@ +```ruby +require 'appwrite' + +include Appwrite +include Appwrite::Permission +include Appwrite::Role + +client = Client.new + .set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('') # Your project ID + .set_key('') # Your secret API key + +vectors_db = VectorsDB.new(client) + +result = vectors_db.update_collection( + database_id: '', + collection_id: '', + name: '', + dimension: 1, # optional + permissions: [Permission.read(Role.any())], # optional + document_security: false, # optional + enabled: false # optional +) +``` diff --git a/examples/1.9.x/server-ruby/examples/vectorsdb/update-document.md b/examples/1.9.x/server-ruby/examples/vectorsdb/update-document.md new file mode 100644 index 000000000..b4fdb3731 --- /dev/null +++ b/examples/1.9.x/server-ruby/examples/vectorsdb/update-document.md @@ -0,0 +1,23 @@ +```ruby +require 'appwrite' + +include Appwrite +include Appwrite::Permission +include Appwrite::Role + +client = Client.new + .set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('') # Your project ID + .set_session('') # The user session to authenticate with + +vectors_db = VectorsDB.new(client) + +result = vectors_db.update_document( + database_id: '', + collection_id: '', + document_id: '', + data: {}, # optional + permissions: [Permission.read(Role.any())], # optional + transaction_id: '' # optional +) +``` diff --git a/examples/1.9.x/server-ruby/examples/vectorsdb/update-documents.md b/examples/1.9.x/server-ruby/examples/vectorsdb/update-documents.md new file mode 100644 index 000000000..2f4d27a41 --- /dev/null +++ b/examples/1.9.x/server-ruby/examples/vectorsdb/update-documents.md @@ -0,0 +1,20 @@ +```ruby +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('') # Your project ID + .set_key('') # Your secret API key + +vectors_db = VectorsDB.new(client) + +result = vectors_db.update_documents( + database_id: '', + collection_id: '', + data: {}, # optional + queries: [], # optional + transaction_id: '' # optional +) +``` diff --git a/examples/1.9.x/server-ruby/examples/vectorsdb/update-transaction.md b/examples/1.9.x/server-ruby/examples/vectorsdb/update-transaction.md new file mode 100644 index 000000000..96fbc93da --- /dev/null +++ b/examples/1.9.x/server-ruby/examples/vectorsdb/update-transaction.md @@ -0,0 +1,18 @@ +```ruby +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('') # Your project ID + .set_key('') # Your secret API key + +vectors_db = VectorsDB.new(client) + +result = vectors_db.update_transaction( + transaction_id: '', + commit: false, # optional + rollback: false # optional +) +``` diff --git a/examples/1.9.x/server-ruby/examples/vectorsdb/update.md b/examples/1.9.x/server-ruby/examples/vectorsdb/update.md new file mode 100644 index 000000000..205ec54a3 --- /dev/null +++ b/examples/1.9.x/server-ruby/examples/vectorsdb/update.md @@ -0,0 +1,18 @@ +```ruby +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('') # Your project ID + .set_key('') # Your secret API key + +vectors_db = VectorsDB.new(client) + +result = vectors_db.update( + database_id: '', + name: '', + enabled: false # optional +) +``` diff --git a/examples/1.9.x/server-ruby/examples/vectorsdb/upsert-document.md b/examples/1.9.x/server-ruby/examples/vectorsdb/upsert-document.md new file mode 100644 index 000000000..788890374 --- /dev/null +++ b/examples/1.9.x/server-ruby/examples/vectorsdb/upsert-document.md @@ -0,0 +1,23 @@ +```ruby +require 'appwrite' + +include Appwrite +include Appwrite::Permission +include Appwrite::Role + +client = Client.new + .set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('') # Your project ID + .set_session('') # The user session to authenticate with + +vectors_db = VectorsDB.new(client) + +result = vectors_db.upsert_document( + database_id: '', + collection_id: '', + document_id: '', + data: {}, # optional + permissions: [Permission.read(Role.any())], # optional + transaction_id: '' # optional +) +``` diff --git a/examples/1.9.x/server-ruby/examples/vectorsdb/upsert-documents.md b/examples/1.9.x/server-ruby/examples/vectorsdb/upsert-documents.md new file mode 100644 index 000000000..d737f1072 --- /dev/null +++ b/examples/1.9.x/server-ruby/examples/vectorsdb/upsert-documents.md @@ -0,0 +1,19 @@ +```ruby +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('') # Your project ID + .set_key('') # Your secret API key + +vectors_db = VectorsDB.new(client) + +result = vectors_db.upsert_documents( + database_id: '', + collection_id: '', + documents: [], + transaction_id: '' # optional +) +``` diff --git a/examples/1.9.x/server-rust/examples/apps/create-installation-token.md b/examples/1.9.x/server-rust/examples/apps/create-installation-token.md new file mode 100644 index 000000000..fcc3c08f7 --- /dev/null +++ b/examples/1.9.x/server-rust/examples/apps/create-installation-token.md @@ -0,0 +1,23 @@ +```rust +use appwrite::Client; +use appwrite::services::Apps; + +#[tokio::main] +async fn main() -> Result<(), Box> { + let client = Client::new(); + client.set_endpoint("https://.cloud.appwrite.io/v1"); // Your API Endpoint + client.set_project(""); // Your project ID + client.set_key(""); // Your secret API key + + let apps = Apps::new(&client); + + let result = apps.create_installation_token( + "", + "" + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/1.9.x/server-rust/examples/apps/create-key.md b/examples/1.9.x/server-rust/examples/apps/create-key.md new file mode 100644 index 000000000..4aba64fe8 --- /dev/null +++ b/examples/1.9.x/server-rust/examples/apps/create-key.md @@ -0,0 +1,22 @@ +```rust +use appwrite::Client; +use appwrite::services::Apps; + +#[tokio::main] +async fn main() -> Result<(), Box> { + let client = Client::new(); + client.set_endpoint("https://.cloud.appwrite.io/v1"); // Your API Endpoint + client.set_project(""); // Your project ID + client.set_session(""); // The user session to authenticate with + + let apps = Apps::new(&client); + + let result = apps.create_key( + "" + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/1.9.x/server-rust/examples/apps/create-secret.md b/examples/1.9.x/server-rust/examples/apps/create-secret.md new file mode 100644 index 000000000..4714bdcd0 --- /dev/null +++ b/examples/1.9.x/server-rust/examples/apps/create-secret.md @@ -0,0 +1,22 @@ +```rust +use appwrite::Client; +use appwrite::services::Apps; + +#[tokio::main] +async fn main() -> Result<(), Box> { + let client = Client::new(); + client.set_endpoint("https://.cloud.appwrite.io/v1"); // Your API Endpoint + client.set_project(""); // Your project ID + client.set_session(""); // The user session to authenticate with + + let apps = Apps::new(&client); + + let result = apps.create_secret( + "" + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/1.9.x/server-rust/examples/apps/create.md b/examples/1.9.x/server-rust/examples/apps/create.md new file mode 100644 index 000000000..908863079 --- /dev/null +++ b/examples/1.9.x/server-rust/examples/apps/create.md @@ -0,0 +1,40 @@ +```rust +use appwrite::Client; +use appwrite::services::Apps; + +#[tokio::main] +async fn main() -> Result<(), Box> { + let client = Client::new(); + client.set_endpoint("https://.cloud.appwrite.io/v1"); // Your API Endpoint + client.set_project(""); // Your project ID + client.set_session(""); // The user session to authenticate with + + let apps = Apps::new(&client); + + let result = apps.create( + "", + "", + vec![], + Some(""), // optional + Some("https://example.com"), // optional + Some("https://example.com"), // optional + Some("https://example.com"), // optional + Some("https://example.com"), // optional + Some(vec![]), // optional + Some(""), // optional + Some(vec![]), // optional + Some(vec![]), // optional + Some("https://example.com"), // optional + Some("https://example.com"), // optional + Some(vec![]), // optional + Some(false), // optional + Some("public"), // optional + Some(false), // optional + Some("") // optional + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/1.9.x/server-rust/examples/apps/delete-key.md b/examples/1.9.x/server-rust/examples/apps/delete-key.md new file mode 100644 index 000000000..1d3bf370b --- /dev/null +++ b/examples/1.9.x/server-rust/examples/apps/delete-key.md @@ -0,0 +1,23 @@ +```rust +use appwrite::Client; +use appwrite::services::Apps; + +#[tokio::main] +async fn main() -> Result<(), Box> { + let client = Client::new(); + client.set_endpoint("https://.cloud.appwrite.io/v1"); // Your API Endpoint + client.set_project(""); // Your project ID + client.set_session(""); // The user session to authenticate with + + let apps = Apps::new(&client); + + let result = apps.delete_key( + "", + "" + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/1.9.x/server-rust/examples/apps/delete-secret.md b/examples/1.9.x/server-rust/examples/apps/delete-secret.md new file mode 100644 index 000000000..1fa363ccf --- /dev/null +++ b/examples/1.9.x/server-rust/examples/apps/delete-secret.md @@ -0,0 +1,23 @@ +```rust +use appwrite::Client; +use appwrite::services::Apps; + +#[tokio::main] +async fn main() -> Result<(), Box> { + let client = Client::new(); + client.set_endpoint("https://.cloud.appwrite.io/v1"); // Your API Endpoint + client.set_project(""); // Your project ID + client.set_session(""); // The user session to authenticate with + + let apps = Apps::new(&client); + + let result = apps.delete_secret( + "", + "" + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/1.9.x/server-rust/examples/apps/delete-tokens.md b/examples/1.9.x/server-rust/examples/apps/delete-tokens.md new file mode 100644 index 000000000..febc173e7 --- /dev/null +++ b/examples/1.9.x/server-rust/examples/apps/delete-tokens.md @@ -0,0 +1,22 @@ +```rust +use appwrite::Client; +use appwrite::services::Apps; + +#[tokio::main] +async fn main() -> Result<(), Box> { + let client = Client::new(); + client.set_endpoint("https://.cloud.appwrite.io/v1"); // Your API Endpoint + client.set_project(""); // Your project ID + client.set_session(""); // The user session to authenticate with + + let apps = Apps::new(&client); + + let result = apps.delete_tokens( + "" + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/1.9.x/server-rust/examples/apps/delete.md b/examples/1.9.x/server-rust/examples/apps/delete.md new file mode 100644 index 000000000..84d8cfd72 --- /dev/null +++ b/examples/1.9.x/server-rust/examples/apps/delete.md @@ -0,0 +1,22 @@ +```rust +use appwrite::Client; +use appwrite::services::Apps; + +#[tokio::main] +async fn main() -> Result<(), Box> { + let client = Client::new(); + client.set_endpoint("https://.cloud.appwrite.io/v1"); // Your API Endpoint + client.set_project(""); // Your project ID + client.set_session(""); // The user session to authenticate with + + let apps = Apps::new(&client); + + let result = apps.delete( + "" + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/1.9.x/server-rust/examples/apps/get-installation.md b/examples/1.9.x/server-rust/examples/apps/get-installation.md new file mode 100644 index 000000000..dfc9209e0 --- /dev/null +++ b/examples/1.9.x/server-rust/examples/apps/get-installation.md @@ -0,0 +1,23 @@ +```rust +use appwrite::Client; +use appwrite::services::Apps; + +#[tokio::main] +async fn main() -> Result<(), Box> { + let client = Client::new(); + client.set_endpoint("https://.cloud.appwrite.io/v1"); // Your API Endpoint + client.set_project(""); // Your project ID + client.set_key(""); // Your secret API key + + let apps = Apps::new(&client); + + let result = apps.get_installation( + "", + "" + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/1.9.x/server-rust/examples/apps/get-key.md b/examples/1.9.x/server-rust/examples/apps/get-key.md new file mode 100644 index 000000000..cd5a613b4 --- /dev/null +++ b/examples/1.9.x/server-rust/examples/apps/get-key.md @@ -0,0 +1,23 @@ +```rust +use appwrite::Client; +use appwrite::services::Apps; + +#[tokio::main] +async fn main() -> Result<(), Box> { + let client = Client::new(); + client.set_endpoint("https://.cloud.appwrite.io/v1"); // Your API Endpoint + client.set_project(""); // Your project ID + client.set_session(""); // The user session to authenticate with + + let apps = Apps::new(&client); + + let result = apps.get_key( + "", + "" + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/1.9.x/server-rust/examples/apps/get-secret.md b/examples/1.9.x/server-rust/examples/apps/get-secret.md new file mode 100644 index 000000000..6d4a76af5 --- /dev/null +++ b/examples/1.9.x/server-rust/examples/apps/get-secret.md @@ -0,0 +1,23 @@ +```rust +use appwrite::Client; +use appwrite::services::Apps; + +#[tokio::main] +async fn main() -> Result<(), Box> { + let client = Client::new(); + client.set_endpoint("https://.cloud.appwrite.io/v1"); // Your API Endpoint + client.set_project(""); // Your project ID + client.set_session(""); // The user session to authenticate with + + let apps = Apps::new(&client); + + let result = apps.get_secret( + "", + "" + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/1.9.x/server-rust/examples/apps/get.md b/examples/1.9.x/server-rust/examples/apps/get.md new file mode 100644 index 000000000..d1f2839e3 --- /dev/null +++ b/examples/1.9.x/server-rust/examples/apps/get.md @@ -0,0 +1,22 @@ +```rust +use appwrite::Client; +use appwrite::services::Apps; + +#[tokio::main] +async fn main() -> Result<(), Box> { + let client = Client::new(); + client.set_endpoint("https://.cloud.appwrite.io/v1"); // Your API Endpoint + client.set_project(""); // Your project ID + client.set_session(""); // The user session to authenticate with + + let apps = Apps::new(&client); + + let result = apps.get( + "" + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/1.9.x/server-rust/examples/apps/list-installation-scopes.md b/examples/1.9.x/server-rust/examples/apps/list-installation-scopes.md new file mode 100644 index 000000000..9e1dd5450 --- /dev/null +++ b/examples/1.9.x/server-rust/examples/apps/list-installation-scopes.md @@ -0,0 +1,20 @@ +```rust +use appwrite::Client; +use appwrite::services::Apps; + +#[tokio::main] +async fn main() -> Result<(), Box> { + let client = Client::new(); + client.set_endpoint("https://.cloud.appwrite.io/v1"); // Your API Endpoint + client.set_project(""); // Your project ID + client.set_session(""); // The user session to authenticate with + + let apps = Apps::new(&client); + + let result = apps.list_installation_scopes().await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/1.9.x/server-rust/examples/apps/list-installations.md b/examples/1.9.x/server-rust/examples/apps/list-installations.md new file mode 100644 index 000000000..935e6a5ef --- /dev/null +++ b/examples/1.9.x/server-rust/examples/apps/list-installations.md @@ -0,0 +1,24 @@ +```rust +use appwrite::Client; +use appwrite::services::Apps; + +#[tokio::main] +async fn main() -> Result<(), Box> { + let client = Client::new(); + client.set_endpoint("https://.cloud.appwrite.io/v1"); // Your API Endpoint + client.set_project(""); // Your project ID + client.set_key(""); // Your secret API key + + let apps = Apps::new(&client); + + let result = apps.list_installations( + "", + Some(vec![]), // optional + Some(false) // optional + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/1.9.x/server-rust/examples/apps/list-keys.md b/examples/1.9.x/server-rust/examples/apps/list-keys.md new file mode 100644 index 000000000..e7a308d24 --- /dev/null +++ b/examples/1.9.x/server-rust/examples/apps/list-keys.md @@ -0,0 +1,24 @@ +```rust +use appwrite::Client; +use appwrite::services::Apps; + +#[tokio::main] +async fn main() -> Result<(), Box> { + let client = Client::new(); + client.set_endpoint("https://.cloud.appwrite.io/v1"); // Your API Endpoint + client.set_project(""); // Your project ID + client.set_session(""); // The user session to authenticate with + + let apps = Apps::new(&client); + + let result = apps.list_keys( + "", + Some(vec![]), // optional + Some(false) // optional + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/1.9.x/server-rust/examples/apps/list-o-auth-2-scopes.md b/examples/1.9.x/server-rust/examples/apps/list-o-auth-2-scopes.md new file mode 100644 index 000000000..450ffe9cd --- /dev/null +++ b/examples/1.9.x/server-rust/examples/apps/list-o-auth-2-scopes.md @@ -0,0 +1,20 @@ +```rust +use appwrite::Client; +use appwrite::services::Apps; + +#[tokio::main] +async fn main() -> Result<(), Box> { + let client = Client::new(); + client.set_endpoint("https://.cloud.appwrite.io/v1"); // Your API Endpoint + client.set_project(""); // Your project ID + client.set_session(""); // The user session to authenticate with + + let apps = Apps::new(&client); + + let result = apps.list_o_auth2_scopes().await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/1.9.x/server-rust/examples/apps/list-secrets.md b/examples/1.9.x/server-rust/examples/apps/list-secrets.md new file mode 100644 index 000000000..11e698463 --- /dev/null +++ b/examples/1.9.x/server-rust/examples/apps/list-secrets.md @@ -0,0 +1,24 @@ +```rust +use appwrite::Client; +use appwrite::services::Apps; + +#[tokio::main] +async fn main() -> Result<(), Box> { + let client = Client::new(); + client.set_endpoint("https://.cloud.appwrite.io/v1"); // Your API Endpoint + client.set_project(""); // Your project ID + client.set_session(""); // The user session to authenticate with + + let apps = Apps::new(&client); + + let result = apps.list_secrets( + "", + Some(vec![]), // optional + Some(false) // optional + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/1.9.x/server-rust/examples/apps/list.md b/examples/1.9.x/server-rust/examples/apps/list.md new file mode 100644 index 000000000..f02743a2a --- /dev/null +++ b/examples/1.9.x/server-rust/examples/apps/list.md @@ -0,0 +1,23 @@ +```rust +use appwrite::Client; +use appwrite::services::Apps; + +#[tokio::main] +async fn main() -> Result<(), Box> { + let client = Client::new(); + client.set_endpoint("https://.cloud.appwrite.io/v1"); // Your API Endpoint + client.set_project(""); // Your project ID + client.set_session(""); // The user session to authenticate with + + let apps = Apps::new(&client); + + let result = apps.list( + Some(vec![]), // optional + Some(false) // optional + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/1.9.x/server-rust/examples/apps/update-labels.md b/examples/1.9.x/server-rust/examples/apps/update-labels.md new file mode 100644 index 000000000..fd4365810 --- /dev/null +++ b/examples/1.9.x/server-rust/examples/apps/update-labels.md @@ -0,0 +1,23 @@ +```rust +use appwrite::Client; +use appwrite::services::Apps; + +#[tokio::main] +async fn main() -> Result<(), Box> { + let client = Client::new(); + client.set_endpoint("https://.cloud.appwrite.io/v1"); // Your API Endpoint + client.set_project(""); // Your project ID + client.set_key(""); // Your secret API key + + let apps = Apps::new(&client); + + let result = apps.update_labels( + "", + vec![] + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/1.9.x/server-rust/examples/apps/update-team.md b/examples/1.9.x/server-rust/examples/apps/update-team.md new file mode 100644 index 000000000..6d639e094 --- /dev/null +++ b/examples/1.9.x/server-rust/examples/apps/update-team.md @@ -0,0 +1,23 @@ +```rust +use appwrite::Client; +use appwrite::services::Apps; + +#[tokio::main] +async fn main() -> Result<(), Box> { + let client = Client::new(); + client.set_endpoint("https://.cloud.appwrite.io/v1"); // Your API Endpoint + client.set_project(""); // Your project ID + client.set_session(""); // The user session to authenticate with + + let apps = Apps::new(&client); + + let result = apps.update_team( + "", + "" + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/1.9.x/server-rust/examples/apps/update.md b/examples/1.9.x/server-rust/examples/apps/update.md new file mode 100644 index 000000000..a55b13781 --- /dev/null +++ b/examples/1.9.x/server-rust/examples/apps/update.md @@ -0,0 +1,41 @@ +```rust +use appwrite::Client; +use appwrite::services::Apps; + +#[tokio::main] +async fn main() -> Result<(), Box> { + let client = Client::new(); + client.set_endpoint("https://.cloud.appwrite.io/v1"); // Your API Endpoint + client.set_project(""); // Your project ID + client.set_session(""); // The user session to authenticate with + + let apps = Apps::new(&client); + + let result = apps.update( + "", + "", + Some(""), // optional + Some("https://example.com"), // optional + Some("https://example.com"), // optional + Some("https://example.com"), // optional + Some("https://example.com"), // optional + Some(vec![]), // optional + Some(""), // optional + Some(vec![]), // optional + Some(vec![]), // optional + Some("https://example.com"), // optional + Some("https://example.com"), // optional + Some(false), // optional + Some(vec![]), // optional + Some(vec![]), // optional + Some("public"), // optional + Some(false), // optional + Some(vec![]), // optional + Some("https://example.com") // optional + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/1.9.x/server-rust/examples/documentsdb/create-collection.md b/examples/1.9.x/server-rust/examples/documentsdb/create-collection.md new file mode 100644 index 000000000..8e7eb00c5 --- /dev/null +++ b/examples/1.9.x/server-rust/examples/documentsdb/create-collection.md @@ -0,0 +1,31 @@ +```rust +use appwrite::Client; +use appwrite::services::DocumentsDB; +use appwrite::permission::Permission; +use appwrite::role::Role; + +#[tokio::main] +async fn main() -> Result<(), Box> { + let client = Client::new(); + client.set_endpoint("https://.cloud.appwrite.io/v1"); // Your API Endpoint + client.set_project(""); // Your project ID + client.set_key(""); // Your secret API key + + let documents_db = DocumentsDB::new(&client); + + let result = documents_db.create_collection( + "", + "", + "", + Some(vec![Permission::read(Role::any()).to_string()]), // optional + Some(false), // optional + Some(false), // optional + Some(vec![]), // optional + Some(vec![]) // optional + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/1.9.x/server-rust/examples/documentsdb/create-document.md b/examples/1.9.x/server-rust/examples/documentsdb/create-document.md new file mode 100644 index 000000000..4e3438248 --- /dev/null +++ b/examples/1.9.x/server-rust/examples/documentsdb/create-document.md @@ -0,0 +1,28 @@ +```rust +use appwrite::Client; +use appwrite::services::DocumentsDB; +use appwrite::permission::Permission; +use appwrite::role::Role; + +#[tokio::main] +async fn main() -> Result<(), Box> { + let client = Client::new(); + client.set_endpoint("https://.cloud.appwrite.io/v1"); // Your API Endpoint + client.set_project(""); // Your project ID + client.set_session(""); // The user session to authenticate with + + let documents_db = DocumentsDB::new(&client); + + let result = documents_db.create_document( + "", + "", + "", + serde_json::json!({}), + Some(vec![Permission::read(Role::any()).to_string()]) // optional + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/1.9.x/server-rust/examples/documentsdb/create-documents.md b/examples/1.9.x/server-rust/examples/documentsdb/create-documents.md new file mode 100644 index 000000000..b1a2d1ec6 --- /dev/null +++ b/examples/1.9.x/server-rust/examples/documentsdb/create-documents.md @@ -0,0 +1,24 @@ +```rust +use appwrite::Client; +use appwrite::services::DocumentsDB; + +#[tokio::main] +async fn main() -> Result<(), Box> { + let client = Client::new(); + client.set_endpoint("https://.cloud.appwrite.io/v1"); // Your API Endpoint + client.set_project(""); // Your project ID + client.set_session(""); // The user session to authenticate with + + let documents_db = DocumentsDB::new(&client); + + let result = documents_db.create_documents( + "", + "", + vec![] + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/1.9.x/server-rust/examples/documentsdb/create-index.md b/examples/1.9.x/server-rust/examples/documentsdb/create-index.md new file mode 100644 index 000000000..e16d0a6ad --- /dev/null +++ b/examples/1.9.x/server-rust/examples/documentsdb/create-index.md @@ -0,0 +1,28 @@ +```rust +use appwrite::Client; +use appwrite::services::DocumentsDB; + +#[tokio::main] +async fn main() -> Result<(), Box> { + let client = Client::new(); + client.set_endpoint("https://.cloud.appwrite.io/v1"); // Your API Endpoint + client.set_project(""); // Your project ID + client.set_key(""); // Your secret API key + + let documents_db = DocumentsDB::new(&client); + + let result = documents_db.create_index( + "", + "", + "", + appwrite::enums::DocumentsDBIndexType::Key, + vec![], + Some(vec![appwrite::enums::OrderBy::Asc]), // optional + Some(vec![]) // optional + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/1.9.x/server-rust/examples/documentsdb/create-operations.md b/examples/1.9.x/server-rust/examples/documentsdb/create-operations.md new file mode 100644 index 000000000..4288bfb1d --- /dev/null +++ b/examples/1.9.x/server-rust/examples/documentsdb/create-operations.md @@ -0,0 +1,23 @@ +```rust +use appwrite::Client; +use appwrite::services::DocumentsDB; + +#[tokio::main] +async fn main() -> Result<(), Box> { + let client = Client::new(); + client.set_endpoint("https://.cloud.appwrite.io/v1"); // Your API Endpoint + client.set_project(""); // Your project ID + client.set_key(""); // Your secret API key + + let documents_db = DocumentsDB::new(&client); + + let result = documents_db.create_operations( + "", + Some(vec![serde_json::json!({"action":"create","databaseId":"","collectionId":"","documentId":"","data":{"name":"Walter O'Brien"}})]) // optional + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/1.9.x/server-rust/examples/documentsdb/create-transaction.md b/examples/1.9.x/server-rust/examples/documentsdb/create-transaction.md new file mode 100644 index 000000000..46ba2c1b9 --- /dev/null +++ b/examples/1.9.x/server-rust/examples/documentsdb/create-transaction.md @@ -0,0 +1,22 @@ +```rust +use appwrite::Client; +use appwrite::services::DocumentsDB; + +#[tokio::main] +async fn main() -> Result<(), Box> { + let client = Client::new(); + client.set_endpoint("https://.cloud.appwrite.io/v1"); // Your API Endpoint + client.set_project(""); // Your project ID + client.set_key(""); // Your secret API key + + let documents_db = DocumentsDB::new(&client); + + let result = documents_db.create_transaction( + Some(60) // optional + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/1.9.x/server-rust/examples/documentsdb/create.md b/examples/1.9.x/server-rust/examples/documentsdb/create.md new file mode 100644 index 000000000..cb0a88acd --- /dev/null +++ b/examples/1.9.x/server-rust/examples/documentsdb/create.md @@ -0,0 +1,24 @@ +```rust +use appwrite::Client; +use appwrite::services::DocumentsDB; + +#[tokio::main] +async fn main() -> Result<(), Box> { + let client = Client::new(); + client.set_endpoint("https://.cloud.appwrite.io/v1"); // Your API Endpoint + client.set_project(""); // Your project ID + client.set_key(""); // Your secret API key + + let documents_db = DocumentsDB::new(&client); + + let result = documents_db.create( + "", + "", + Some(false) // optional + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/1.9.x/server-rust/examples/documentsdb/decrement-document-attribute.md b/examples/1.9.x/server-rust/examples/documentsdb/decrement-document-attribute.md new file mode 100644 index 000000000..a229d485d --- /dev/null +++ b/examples/1.9.x/server-rust/examples/documentsdb/decrement-document-attribute.md @@ -0,0 +1,28 @@ +```rust +use appwrite::Client; +use appwrite::services::DocumentsDB; + +#[tokio::main] +async fn main() -> Result<(), Box> { + let client = Client::new(); + client.set_endpoint("https://.cloud.appwrite.io/v1"); // Your API Endpoint + client.set_project(""); // Your project ID + client.set_session(""); // The user session to authenticate with + + let documents_db = DocumentsDB::new(&client); + + let result = documents_db.decrement_document_attribute( + "", + "", + "", + "", + Some(0), // optional + Some(0), // optional + Some("") // optional + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/1.9.x/server-rust/examples/documentsdb/delete-collection.md b/examples/1.9.x/server-rust/examples/documentsdb/delete-collection.md new file mode 100644 index 000000000..777bc9f47 --- /dev/null +++ b/examples/1.9.x/server-rust/examples/documentsdb/delete-collection.md @@ -0,0 +1,21 @@ +```rust +use appwrite::Client; +use appwrite::services::DocumentsDB; + +#[tokio::main] +async fn main() -> Result<(), Box> { + let client = Client::new(); + client.set_endpoint("https://.cloud.appwrite.io/v1"); // Your API Endpoint + client.set_project(""); // Your project ID + client.set_key(""); // Your secret API key + + let documents_db = DocumentsDB::new(&client); + + documents_db.delete_collection( + "", + "" + ).await?; + + Ok(()) +} +``` diff --git a/examples/1.9.x/server-rust/examples/documentsdb/delete-document.md b/examples/1.9.x/server-rust/examples/documentsdb/delete-document.md new file mode 100644 index 000000000..aaf1c97fb --- /dev/null +++ b/examples/1.9.x/server-rust/examples/documentsdb/delete-document.md @@ -0,0 +1,23 @@ +```rust +use appwrite::Client; +use appwrite::services::DocumentsDB; + +#[tokio::main] +async fn main() -> Result<(), Box> { + let client = Client::new(); + client.set_endpoint("https://.cloud.appwrite.io/v1"); // Your API Endpoint + client.set_project(""); // Your project ID + client.set_session(""); // The user session to authenticate with + + let documents_db = DocumentsDB::new(&client); + + documents_db.delete_document( + "", + "", + "", + Some("") // optional + ).await?; + + Ok(()) +} +``` diff --git a/examples/1.9.x/server-rust/examples/documentsdb/delete-documents.md b/examples/1.9.x/server-rust/examples/documentsdb/delete-documents.md new file mode 100644 index 000000000..be2ad02d6 --- /dev/null +++ b/examples/1.9.x/server-rust/examples/documentsdb/delete-documents.md @@ -0,0 +1,25 @@ +```rust +use appwrite::Client; +use appwrite::services::DocumentsDB; + +#[tokio::main] +async fn main() -> Result<(), Box> { + let client = Client::new(); + client.set_endpoint("https://.cloud.appwrite.io/v1"); // Your API Endpoint + client.set_project(""); // Your project ID + client.set_key(""); // Your secret API key + + let documents_db = DocumentsDB::new(&client); + + let result = documents_db.delete_documents( + "", + "", + Some(vec![]), // optional + Some("") // optional + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/1.9.x/server-rust/examples/documentsdb/delete-index.md b/examples/1.9.x/server-rust/examples/documentsdb/delete-index.md new file mode 100644 index 000000000..a651dc675 --- /dev/null +++ b/examples/1.9.x/server-rust/examples/documentsdb/delete-index.md @@ -0,0 +1,22 @@ +```rust +use appwrite::Client; +use appwrite::services::DocumentsDB; + +#[tokio::main] +async fn main() -> Result<(), Box> { + let client = Client::new(); + client.set_endpoint("https://.cloud.appwrite.io/v1"); // Your API Endpoint + client.set_project(""); // Your project ID + client.set_key(""); // Your secret API key + + let documents_db = DocumentsDB::new(&client); + + documents_db.delete_index( + "", + "", + "" + ).await?; + + Ok(()) +} +``` diff --git a/examples/1.9.x/server-rust/examples/documentsdb/delete-transaction.md b/examples/1.9.x/server-rust/examples/documentsdb/delete-transaction.md new file mode 100644 index 000000000..86a7d3dd0 --- /dev/null +++ b/examples/1.9.x/server-rust/examples/documentsdb/delete-transaction.md @@ -0,0 +1,20 @@ +```rust +use appwrite::Client; +use appwrite::services::DocumentsDB; + +#[tokio::main] +async fn main() -> Result<(), Box> { + let client = Client::new(); + client.set_endpoint("https://.cloud.appwrite.io/v1"); // Your API Endpoint + client.set_project(""); // Your project ID + client.set_key(""); // Your secret API key + + let documents_db = DocumentsDB::new(&client); + + documents_db.delete_transaction( + "" + ).await?; + + Ok(()) +} +``` diff --git a/examples/1.9.x/server-rust/examples/documentsdb/delete.md b/examples/1.9.x/server-rust/examples/documentsdb/delete.md new file mode 100644 index 000000000..f0254c301 --- /dev/null +++ b/examples/1.9.x/server-rust/examples/documentsdb/delete.md @@ -0,0 +1,20 @@ +```rust +use appwrite::Client; +use appwrite::services::DocumentsDB; + +#[tokio::main] +async fn main() -> Result<(), Box> { + let client = Client::new(); + client.set_endpoint("https://.cloud.appwrite.io/v1"); // Your API Endpoint + client.set_project(""); // Your project ID + client.set_key(""); // Your secret API key + + let documents_db = DocumentsDB::new(&client); + + documents_db.delete( + "" + ).await?; + + Ok(()) +} +``` diff --git a/examples/1.9.x/server-rust/examples/documentsdb/get-collection.md b/examples/1.9.x/server-rust/examples/documentsdb/get-collection.md new file mode 100644 index 000000000..742ada715 --- /dev/null +++ b/examples/1.9.x/server-rust/examples/documentsdb/get-collection.md @@ -0,0 +1,23 @@ +```rust +use appwrite::Client; +use appwrite::services::DocumentsDB; + +#[tokio::main] +async fn main() -> Result<(), Box> { + let client = Client::new(); + client.set_endpoint("https://.cloud.appwrite.io/v1"); // Your API Endpoint + client.set_project(""); // Your project ID + client.set_key(""); // Your secret API key + + let documents_db = DocumentsDB::new(&client); + + let result = documents_db.get_collection( + "", + "" + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/1.9.x/server-rust/examples/documentsdb/get-document.md b/examples/1.9.x/server-rust/examples/documentsdb/get-document.md new file mode 100644 index 000000000..b2c1ca59a --- /dev/null +++ b/examples/1.9.x/server-rust/examples/documentsdb/get-document.md @@ -0,0 +1,26 @@ +```rust +use appwrite::Client; +use appwrite::services::DocumentsDB; + +#[tokio::main] +async fn main() -> Result<(), Box> { + let client = Client::new(); + client.set_endpoint("https://.cloud.appwrite.io/v1"); // Your API Endpoint + client.set_project(""); // Your project ID + client.set_session(""); // The user session to authenticate with + + let documents_db = DocumentsDB::new(&client); + + let result = documents_db.get_document( + "", + "", + "", + Some(vec![]), // optional + Some("") // optional + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/1.9.x/server-rust/examples/documentsdb/get-index.md b/examples/1.9.x/server-rust/examples/documentsdb/get-index.md new file mode 100644 index 000000000..7c2421c99 --- /dev/null +++ b/examples/1.9.x/server-rust/examples/documentsdb/get-index.md @@ -0,0 +1,24 @@ +```rust +use appwrite::Client; +use appwrite::services::DocumentsDB; + +#[tokio::main] +async fn main() -> Result<(), Box> { + let client = Client::new(); + client.set_endpoint("https://.cloud.appwrite.io/v1"); // Your API Endpoint + client.set_project(""); // Your project ID + client.set_key(""); // Your secret API key + + let documents_db = DocumentsDB::new(&client); + + let result = documents_db.get_index( + "", + "", + "" + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/1.9.x/server-rust/examples/documentsdb/get-transaction.md b/examples/1.9.x/server-rust/examples/documentsdb/get-transaction.md new file mode 100644 index 000000000..2a7ade60a --- /dev/null +++ b/examples/1.9.x/server-rust/examples/documentsdb/get-transaction.md @@ -0,0 +1,22 @@ +```rust +use appwrite::Client; +use appwrite::services::DocumentsDB; + +#[tokio::main] +async fn main() -> Result<(), Box> { + let client = Client::new(); + client.set_endpoint("https://.cloud.appwrite.io/v1"); // Your API Endpoint + client.set_project(""); // Your project ID + client.set_key(""); // Your secret API key + + let documents_db = DocumentsDB::new(&client); + + let result = documents_db.get_transaction( + "" + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/1.9.x/server-rust/examples/documentsdb/get.md b/examples/1.9.x/server-rust/examples/documentsdb/get.md new file mode 100644 index 000000000..e60770cfe --- /dev/null +++ b/examples/1.9.x/server-rust/examples/documentsdb/get.md @@ -0,0 +1,22 @@ +```rust +use appwrite::Client; +use appwrite::services::DocumentsDB; + +#[tokio::main] +async fn main() -> Result<(), Box> { + let client = Client::new(); + client.set_endpoint("https://.cloud.appwrite.io/v1"); // Your API Endpoint + client.set_project(""); // Your project ID + client.set_key(""); // Your secret API key + + let documents_db = DocumentsDB::new(&client); + + let result = documents_db.get( + "" + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/1.9.x/server-rust/examples/documentsdb/increment-document-attribute.md b/examples/1.9.x/server-rust/examples/documentsdb/increment-document-attribute.md new file mode 100644 index 000000000..824637bd6 --- /dev/null +++ b/examples/1.9.x/server-rust/examples/documentsdb/increment-document-attribute.md @@ -0,0 +1,28 @@ +```rust +use appwrite::Client; +use appwrite::services::DocumentsDB; + +#[tokio::main] +async fn main() -> Result<(), Box> { + let client = Client::new(); + client.set_endpoint("https://.cloud.appwrite.io/v1"); // Your API Endpoint + client.set_project(""); // Your project ID + client.set_session(""); // The user session to authenticate with + + let documents_db = DocumentsDB::new(&client); + + let result = documents_db.increment_document_attribute( + "", + "", + "", + "", + Some(0), // optional + Some(0), // optional + Some("") // optional + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/1.9.x/server-rust/examples/documentsdb/list-collections.md b/examples/1.9.x/server-rust/examples/documentsdb/list-collections.md new file mode 100644 index 000000000..2266a7314 --- /dev/null +++ b/examples/1.9.x/server-rust/examples/documentsdb/list-collections.md @@ -0,0 +1,25 @@ +```rust +use appwrite::Client; +use appwrite::services::DocumentsDB; + +#[tokio::main] +async fn main() -> Result<(), Box> { + let client = Client::new(); + client.set_endpoint("https://.cloud.appwrite.io/v1"); // Your API Endpoint + client.set_project(""); // Your project ID + client.set_key(""); // Your secret API key + + let documents_db = DocumentsDB::new(&client); + + let result = documents_db.list_collections( + "", + Some(vec![]), // optional + Some(""), // optional + Some(false) // optional + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/1.9.x/server-rust/examples/documentsdb/list-documents.md b/examples/1.9.x/server-rust/examples/documentsdb/list-documents.md new file mode 100644 index 000000000..b99a9fdb3 --- /dev/null +++ b/examples/1.9.x/server-rust/examples/documentsdb/list-documents.md @@ -0,0 +1,27 @@ +```rust +use appwrite::Client; +use appwrite::services::DocumentsDB; + +#[tokio::main] +async fn main() -> Result<(), Box> { + let client = Client::new(); + client.set_endpoint("https://.cloud.appwrite.io/v1"); // Your API Endpoint + client.set_project(""); // Your project ID + client.set_session(""); // The user session to authenticate with + + let documents_db = DocumentsDB::new(&client); + + let result = documents_db.list_documents( + "", + "", + Some(vec![]), // optional + Some(""), // optional + Some(false), // optional + Some(0) // optional + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/1.9.x/server-rust/examples/documentsdb/list-indexes.md b/examples/1.9.x/server-rust/examples/documentsdb/list-indexes.md new file mode 100644 index 000000000..0db1c7a55 --- /dev/null +++ b/examples/1.9.x/server-rust/examples/documentsdb/list-indexes.md @@ -0,0 +1,25 @@ +```rust +use appwrite::Client; +use appwrite::services::DocumentsDB; + +#[tokio::main] +async fn main() -> Result<(), Box> { + let client = Client::new(); + client.set_endpoint("https://.cloud.appwrite.io/v1"); // Your API Endpoint + client.set_project(""); // Your project ID + client.set_key(""); // Your secret API key + + let documents_db = DocumentsDB::new(&client); + + let result = documents_db.list_indexes( + "", + "", + Some(vec![]), // optional + Some(false) // optional + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/1.9.x/server-rust/examples/documentsdb/list-transactions.md b/examples/1.9.x/server-rust/examples/documentsdb/list-transactions.md new file mode 100644 index 000000000..9f387f633 --- /dev/null +++ b/examples/1.9.x/server-rust/examples/documentsdb/list-transactions.md @@ -0,0 +1,22 @@ +```rust +use appwrite::Client; +use appwrite::services::DocumentsDB; + +#[tokio::main] +async fn main() -> Result<(), Box> { + let client = Client::new(); + client.set_endpoint("https://.cloud.appwrite.io/v1"); // Your API Endpoint + client.set_project(""); // Your project ID + client.set_key(""); // Your secret API key + + let documents_db = DocumentsDB::new(&client); + + let result = documents_db.list_transactions( + Some(vec![]) // optional + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/1.9.x/server-rust/examples/documentsdb/list.md b/examples/1.9.x/server-rust/examples/documentsdb/list.md new file mode 100644 index 000000000..5034622a3 --- /dev/null +++ b/examples/1.9.x/server-rust/examples/documentsdb/list.md @@ -0,0 +1,24 @@ +```rust +use appwrite::Client; +use appwrite::services::DocumentsDB; + +#[tokio::main] +async fn main() -> Result<(), Box> { + let client = Client::new(); + client.set_endpoint("https://.cloud.appwrite.io/v1"); // Your API Endpoint + client.set_project(""); // Your project ID + client.set_key(""); // Your secret API key + + let documents_db = DocumentsDB::new(&client); + + let result = documents_db.list( + Some(vec![]), // optional + Some(""), // optional + Some(false) // optional + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/1.9.x/server-rust/examples/documentsdb/update-collection.md b/examples/1.9.x/server-rust/examples/documentsdb/update-collection.md new file mode 100644 index 000000000..895461693 --- /dev/null +++ b/examples/1.9.x/server-rust/examples/documentsdb/update-collection.md @@ -0,0 +1,30 @@ +```rust +use appwrite::Client; +use appwrite::services::DocumentsDB; +use appwrite::permission::Permission; +use appwrite::role::Role; + +#[tokio::main] +async fn main() -> Result<(), Box> { + let client = Client::new(); + client.set_endpoint("https://.cloud.appwrite.io/v1"); // Your API Endpoint + client.set_project(""); // Your project ID + client.set_key(""); // Your secret API key + + let documents_db = DocumentsDB::new(&client); + + let result = documents_db.update_collection( + "", + "", + "", + Some(vec![Permission::read(Role::any()).to_string()]), // optional + Some(false), // optional + Some(false), // optional + Some(false) // optional + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/1.9.x/server-rust/examples/documentsdb/update-document.md b/examples/1.9.x/server-rust/examples/documentsdb/update-document.md new file mode 100644 index 000000000..6faab5b42 --- /dev/null +++ b/examples/1.9.x/server-rust/examples/documentsdb/update-document.md @@ -0,0 +1,29 @@ +```rust +use appwrite::Client; +use appwrite::services::DocumentsDB; +use appwrite::permission::Permission; +use appwrite::role::Role; + +#[tokio::main] +async fn main() -> Result<(), Box> { + let client = Client::new(); + client.set_endpoint("https://.cloud.appwrite.io/v1"); // Your API Endpoint + client.set_project(""); // Your project ID + client.set_session(""); // The user session to authenticate with + + let documents_db = DocumentsDB::new(&client); + + let result = documents_db.update_document( + "", + "", + "", + Some(serde_json::json!({})), // optional + Some(vec![Permission::read(Role::any()).to_string()]), // optional + Some("") // optional + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/1.9.x/server-rust/examples/documentsdb/update-documents.md b/examples/1.9.x/server-rust/examples/documentsdb/update-documents.md new file mode 100644 index 000000000..a85039201 --- /dev/null +++ b/examples/1.9.x/server-rust/examples/documentsdb/update-documents.md @@ -0,0 +1,26 @@ +```rust +use appwrite::Client; +use appwrite::services::DocumentsDB; + +#[tokio::main] +async fn main() -> Result<(), Box> { + let client = Client::new(); + client.set_endpoint("https://.cloud.appwrite.io/v1"); // Your API Endpoint + client.set_project(""); // Your project ID + client.set_key(""); // Your secret API key + + let documents_db = DocumentsDB::new(&client); + + let result = documents_db.update_documents( + "", + "", + Some(serde_json::json!({})), // optional + Some(vec![]), // optional + Some("") // optional + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/1.9.x/server-rust/examples/documentsdb/update-transaction.md b/examples/1.9.x/server-rust/examples/documentsdb/update-transaction.md new file mode 100644 index 000000000..449d18783 --- /dev/null +++ b/examples/1.9.x/server-rust/examples/documentsdb/update-transaction.md @@ -0,0 +1,24 @@ +```rust +use appwrite::Client; +use appwrite::services::DocumentsDB; + +#[tokio::main] +async fn main() -> Result<(), Box> { + let client = Client::new(); + client.set_endpoint("https://.cloud.appwrite.io/v1"); // Your API Endpoint + client.set_project(""); // Your project ID + client.set_key(""); // Your secret API key + + let documents_db = DocumentsDB::new(&client); + + let result = documents_db.update_transaction( + "", + Some(false), // optional + Some(false) // optional + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/1.9.x/server-rust/examples/documentsdb/update.md b/examples/1.9.x/server-rust/examples/documentsdb/update.md new file mode 100644 index 000000000..07ec7089e --- /dev/null +++ b/examples/1.9.x/server-rust/examples/documentsdb/update.md @@ -0,0 +1,24 @@ +```rust +use appwrite::Client; +use appwrite::services::DocumentsDB; + +#[tokio::main] +async fn main() -> Result<(), Box> { + let client = Client::new(); + client.set_endpoint("https://.cloud.appwrite.io/v1"); // Your API Endpoint + client.set_project(""); // Your project ID + client.set_key(""); // Your secret API key + + let documents_db = DocumentsDB::new(&client); + + let result = documents_db.update( + "", + "", + Some(false) // optional + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/1.9.x/server-rust/examples/documentsdb/upsert-document.md b/examples/1.9.x/server-rust/examples/documentsdb/upsert-document.md new file mode 100644 index 000000000..29e6d534c --- /dev/null +++ b/examples/1.9.x/server-rust/examples/documentsdb/upsert-document.md @@ -0,0 +1,29 @@ +```rust +use appwrite::Client; +use appwrite::services::DocumentsDB; +use appwrite::permission::Permission; +use appwrite::role::Role; + +#[tokio::main] +async fn main() -> Result<(), Box> { + let client = Client::new(); + client.set_endpoint("https://.cloud.appwrite.io/v1"); // Your API Endpoint + client.set_project(""); // Your project ID + client.set_session(""); // The user session to authenticate with + + let documents_db = DocumentsDB::new(&client); + + let result = documents_db.upsert_document( + "", + "", + "", + Some(serde_json::json!({})), // optional + Some(vec![Permission::read(Role::any()).to_string()]), // optional + Some("") // optional + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/1.9.x/server-rust/examples/documentsdb/upsert-documents.md b/examples/1.9.x/server-rust/examples/documentsdb/upsert-documents.md new file mode 100644 index 000000000..d6ba16543 --- /dev/null +++ b/examples/1.9.x/server-rust/examples/documentsdb/upsert-documents.md @@ -0,0 +1,25 @@ +```rust +use appwrite::Client; +use appwrite::services::DocumentsDB; + +#[tokio::main] +async fn main() -> Result<(), Box> { + let client = Client::new(); + client.set_endpoint("https://.cloud.appwrite.io/v1"); // Your API Endpoint + client.set_project(""); // Your project ID + client.set_key(""); // Your secret API key + + let documents_db = DocumentsDB::new(&client); + + let result = documents_db.upsert_documents( + "", + "", + vec![], + Some("") // optional + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/1.9.x/server-rust/examples/oauth2/approve.md b/examples/1.9.x/server-rust/examples/oauth2/approve.md new file mode 100644 index 000000000..ff39bf6d9 --- /dev/null +++ b/examples/1.9.x/server-rust/examples/oauth2/approve.md @@ -0,0 +1,24 @@ +```rust +use appwrite::Client; +use appwrite::services::Oauth2; + +#[tokio::main] +async fn main() -> Result<(), Box> { + let client = Client::new(); + client.set_endpoint("https://.cloud.appwrite.io/v1"); // Your API Endpoint + client.set_session(""); // The user session to authenticate with + client.set_project(""); // Your project ID + + let oauth2 = Oauth2::new(&client); + + let result = oauth2.approve( + "", + Some(""), // optional + Some("") // optional + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/1.9.x/server-rust/examples/oauth2/authorize-post.md b/examples/1.9.x/server-rust/examples/oauth2/authorize-post.md new file mode 100644 index 000000000..2593e9b2d --- /dev/null +++ b/examples/1.9.x/server-rust/examples/oauth2/authorize-post.md @@ -0,0 +1,35 @@ +```rust +use appwrite::Client; +use appwrite::services::Oauth2; + +#[tokio::main] +async fn main() -> Result<(), Box> { + let client = Client::new(); + client.set_endpoint("https://.cloud.appwrite.io/v1"); // Your API Endpoint + client.set_session(""); // The user session to authenticate with + client.set_project(""); // Your project ID + + let oauth2 = Oauth2::new(&client); + + let result = oauth2.authorize_post( + Some(""), // optional + Some("https://example.com"), // optional + Some(""), // optional + Some(""), // optional + Some(""), // optional + Some(""), // optional + Some(""), // optional + Some("s256"), // optional + Some(""), // optional + Some(0), // optional + Some(""), // optional + Some(""), // optional + Some(""), // optional + Some("") // optional + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/1.9.x/server-rust/examples/oauth2/authorize.md b/examples/1.9.x/server-rust/examples/oauth2/authorize.md new file mode 100644 index 000000000..db2c8750a --- /dev/null +++ b/examples/1.9.x/server-rust/examples/oauth2/authorize.md @@ -0,0 +1,35 @@ +```rust +use appwrite::Client; +use appwrite::services::Oauth2; + +#[tokio::main] +async fn main() -> Result<(), Box> { + let client = Client::new(); + client.set_endpoint("https://.cloud.appwrite.io/v1"); // Your API Endpoint + client.set_session(""); // The user session to authenticate with + client.set_project(""); // Your project ID + + let oauth2 = Oauth2::new(&client); + + let result = oauth2.authorize( + Some(""), // optional + Some("https://example.com"), // optional + Some(""), // optional + Some(""), // optional + Some(""), // optional + Some(""), // optional + Some(""), // optional + Some("s256"), // optional + Some(""), // optional + Some(0), // optional + Some(""), // optional + Some(""), // optional + Some(""), // optional + Some("") // optional + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/1.9.x/server-rust/examples/oauth2/create-device-authorization.md b/examples/1.9.x/server-rust/examples/oauth2/create-device-authorization.md new file mode 100644 index 000000000..c8943725c --- /dev/null +++ b/examples/1.9.x/server-rust/examples/oauth2/create-device-authorization.md @@ -0,0 +1,26 @@ +```rust +use appwrite::Client; +use appwrite::services::Oauth2; + +#[tokio::main] +async fn main() -> Result<(), Box> { + let client = Client::new(); + client.set_endpoint("https://.cloud.appwrite.io/v1"); // Your API Endpoint + client.set_session(""); // The user session to authenticate with + client.set_project(""); // Your project ID + + let oauth2 = Oauth2::new(&client); + + let result = oauth2.create_device_authorization( + Some(""), // optional + Some(""), // optional + Some(""), // optional + Some(""), // optional + Some("") // optional + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/1.9.x/server-rust/examples/oauth2/create-grant.md b/examples/1.9.x/server-rust/examples/oauth2/create-grant.md new file mode 100644 index 000000000..a20828955 --- /dev/null +++ b/examples/1.9.x/server-rust/examples/oauth2/create-grant.md @@ -0,0 +1,22 @@ +```rust +use appwrite::Client; +use appwrite::services::Oauth2; + +#[tokio::main] +async fn main() -> Result<(), Box> { + let client = Client::new(); + client.set_endpoint("https://.cloud.appwrite.io/v1"); // Your API Endpoint + client.set_session(""); // The user session to authenticate with + client.set_project(""); // Your project ID + + let oauth2 = Oauth2::new(&client); + + let result = oauth2.create_grant( + "" + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/1.9.x/server-rust/examples/oauth2/create-par.md b/examples/1.9.x/server-rust/examples/oauth2/create-par.md new file mode 100644 index 000000000..3e344a216 --- /dev/null +++ b/examples/1.9.x/server-rust/examples/oauth2/create-par.md @@ -0,0 +1,34 @@ +```rust +use appwrite::Client; +use appwrite::services::Oauth2; + +#[tokio::main] +async fn main() -> Result<(), Box> { + let client = Client::new(); + client.set_endpoint("https://.cloud.appwrite.io/v1"); // Your API Endpoint + client.set_session(""); // The user session to authenticate with + client.set_project(""); // Your project ID + + let oauth2 = Oauth2::new(&client); + + let result = oauth2.create_par( + "", + "https://example.com", + "code", + Some(""), // optional + Some(""), // optional + Some(""), // optional + Some(""), // optional + Some("s256"), // optional + Some(""), // optional + Some(0), // optional + Some(""), // optional + Some(""), // optional + Some("") // optional + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/1.9.x/server-rust/examples/oauth2/create-token.md b/examples/1.9.x/server-rust/examples/oauth2/create-token.md new file mode 100644 index 000000000..eecf973d6 --- /dev/null +++ b/examples/1.9.x/server-rust/examples/oauth2/create-token.md @@ -0,0 +1,31 @@ +```rust +use appwrite::Client; +use appwrite::services::Oauth2; + +#[tokio::main] +async fn main() -> Result<(), Box> { + let client = Client::new(); + client.set_endpoint("https://.cloud.appwrite.io/v1"); // Your API Endpoint + client.set_session(""); // The user session to authenticate with + client.set_project(""); // Your project ID + + let oauth2 = Oauth2::new(&client); + + let result = oauth2.create_token( + "", + Some(""), // optional + Some(""), // optional + Some(""), // optional + Some(""), // optional + Some(""), // optional + Some(""), // optional + Some("https://example.com"), // optional + Some(""), // optional + Some("") // optional + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/1.9.x/server-rust/examples/oauth2/get-grant.md b/examples/1.9.x/server-rust/examples/oauth2/get-grant.md new file mode 100644 index 000000000..fbd475df5 --- /dev/null +++ b/examples/1.9.x/server-rust/examples/oauth2/get-grant.md @@ -0,0 +1,22 @@ +```rust +use appwrite::Client; +use appwrite::services::Oauth2; + +#[tokio::main] +async fn main() -> Result<(), Box> { + let client = Client::new(); + client.set_endpoint("https://.cloud.appwrite.io/v1"); // Your API Endpoint + client.set_session(""); // The user session to authenticate with + client.set_project(""); // Your project ID + + let oauth2 = Oauth2::new(&client); + + let result = oauth2.get_grant( + "" + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/1.9.x/server-rust/examples/oauth2/list-organizations.md b/examples/1.9.x/server-rust/examples/oauth2/list-organizations.md new file mode 100644 index 000000000..c440370eb --- /dev/null +++ b/examples/1.9.x/server-rust/examples/oauth2/list-organizations.md @@ -0,0 +1,24 @@ +```rust +use appwrite::Client; +use appwrite::services::Oauth2; + +#[tokio::main] +async fn main() -> Result<(), Box> { + let client = Client::new(); + client.set_endpoint("https://.cloud.appwrite.io/v1"); // Your API Endpoint + client.set_session(""); // The user session to authenticate with + client.set_project(""); // Your project ID + + let oauth2 = Oauth2::new(&client); + + let result = oauth2.list_organizations( + Some(1), // optional + Some(0), // optional + Some("") // optional + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/1.9.x/server-rust/examples/oauth2/list-projects.md b/examples/1.9.x/server-rust/examples/oauth2/list-projects.md new file mode 100644 index 000000000..30c6e9fb1 --- /dev/null +++ b/examples/1.9.x/server-rust/examples/oauth2/list-projects.md @@ -0,0 +1,24 @@ +```rust +use appwrite::Client; +use appwrite::services::Oauth2; + +#[tokio::main] +async fn main() -> Result<(), Box> { + let client = Client::new(); + client.set_endpoint("https://.cloud.appwrite.io/v1"); // Your API Endpoint + client.set_session(""); // The user session to authenticate with + client.set_project(""); // Your project ID + + let oauth2 = Oauth2::new(&client); + + let result = oauth2.list_projects( + Some(1), // optional + Some(0), // optional + Some("") // optional + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/1.9.x/server-rust/examples/oauth2/reject.md b/examples/1.9.x/server-rust/examples/oauth2/reject.md new file mode 100644 index 000000000..a30369213 --- /dev/null +++ b/examples/1.9.x/server-rust/examples/oauth2/reject.md @@ -0,0 +1,22 @@ +```rust +use appwrite::Client; +use appwrite::services::Oauth2; + +#[tokio::main] +async fn main() -> Result<(), Box> { + let client = Client::new(); + client.set_endpoint("https://.cloud.appwrite.io/v1"); // Your API Endpoint + client.set_session(""); // The user session to authenticate with + client.set_project(""); // Your project ID + + let oauth2 = Oauth2::new(&client); + + let result = oauth2.reject( + "" + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/1.9.x/server-rust/examples/oauth2/revoke.md b/examples/1.9.x/server-rust/examples/oauth2/revoke.md new file mode 100644 index 000000000..946983729 --- /dev/null +++ b/examples/1.9.x/server-rust/examples/oauth2/revoke.md @@ -0,0 +1,25 @@ +```rust +use appwrite::Client; +use appwrite::services::Oauth2; + +#[tokio::main] +async fn main() -> Result<(), Box> { + let client = Client::new(); + client.set_endpoint("https://.cloud.appwrite.io/v1"); // Your API Endpoint + client.set_session(""); // The user session to authenticate with + client.set_project(""); // Your project ID + + let oauth2 = Oauth2::new(&client); + + let result = oauth2.revoke( + "", + Some("access_token"), // optional + Some(""), // optional + Some("") // optional + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/1.9.x/server-rust/examples/organization/create-installation.md b/examples/1.9.x/server-rust/examples/organization/create-installation.md new file mode 100644 index 000000000..afdc154b8 --- /dev/null +++ b/examples/1.9.x/server-rust/examples/organization/create-installation.md @@ -0,0 +1,23 @@ +```rust +use appwrite::Client; +use appwrite::services::Organization; + +#[tokio::main] +async fn main() -> Result<(), Box> { + let client = Client::new(); + client.set_endpoint("https://.cloud.appwrite.io/v1"); // Your API Endpoint + client.set_project(""); // Your project ID + client.set_session(""); // The user session to authenticate with + + let organization = Organization::new(&client); + + let result = organization.create_installation( + "", + Some("") // optional + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/1.9.x/server-rust/examples/organization/delete-installation.md b/examples/1.9.x/server-rust/examples/organization/delete-installation.md new file mode 100644 index 000000000..d4cb99d7d --- /dev/null +++ b/examples/1.9.x/server-rust/examples/organization/delete-installation.md @@ -0,0 +1,22 @@ +```rust +use appwrite::Client; +use appwrite::services::Organization; + +#[tokio::main] +async fn main() -> Result<(), Box> { + let client = Client::new(); + client.set_endpoint("https://.cloud.appwrite.io/v1"); // Your API Endpoint + client.set_project(""); // Your project ID + client.set_session(""); // The user session to authenticate with + + let organization = Organization::new(&client); + + let result = organization.delete_installation( + "" + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/1.9.x/server-rust/examples/organization/get-installation.md b/examples/1.9.x/server-rust/examples/organization/get-installation.md new file mode 100644 index 000000000..3c8be8c84 --- /dev/null +++ b/examples/1.9.x/server-rust/examples/organization/get-installation.md @@ -0,0 +1,22 @@ +```rust +use appwrite::Client; +use appwrite::services::Organization; + +#[tokio::main] +async fn main() -> Result<(), Box> { + let client = Client::new(); + client.set_endpoint("https://.cloud.appwrite.io/v1"); // Your API Endpoint + client.set_project(""); // Your project ID + client.set_session(""); // The user session to authenticate with + + let organization = Organization::new(&client); + + let result = organization.get_installation( + "" + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/1.9.x/server-rust/examples/organization/list-installations.md b/examples/1.9.x/server-rust/examples/organization/list-installations.md new file mode 100644 index 000000000..a8a86f48f --- /dev/null +++ b/examples/1.9.x/server-rust/examples/organization/list-installations.md @@ -0,0 +1,23 @@ +```rust +use appwrite::Client; +use appwrite::services::Organization; + +#[tokio::main] +async fn main() -> Result<(), Box> { + let client = Client::new(); + client.set_endpoint("https://.cloud.appwrite.io/v1"); // Your API Endpoint + client.set_project(""); // Your project ID + client.set_session(""); // The user session to authenticate with + + let organization = Organization::new(&client); + + let result = organization.list_installations( + Some(vec![]), // optional + Some(false) // optional + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/1.9.x/server-rust/examples/organization/update-installation.md b/examples/1.9.x/server-rust/examples/organization/update-installation.md new file mode 100644 index 000000000..d76a5b9a2 --- /dev/null +++ b/examples/1.9.x/server-rust/examples/organization/update-installation.md @@ -0,0 +1,23 @@ +```rust +use appwrite::Client; +use appwrite::services::Organization; + +#[tokio::main] +async fn main() -> Result<(), Box> { + let client = Client::new(); + client.set_endpoint("https://.cloud.appwrite.io/v1"); // Your API Endpoint + client.set_project(""); // Your project ID + client.set_session(""); // The user session to authenticate with + + let organization = Organization::new(&client); + + let result = organization.update_installation( + "", + Some("") // optional + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/1.9.x/server-rust/examples/project/update-o-auth-2-server.md b/examples/1.9.x/server-rust/examples/project/update-o-auth-2-server.md index 81d9db8d7..62e4d2515 100644 --- a/examples/1.9.x/server-rust/examples/project/update-o-auth-2-server.md +++ b/examples/1.9.x/server-rust/examples/project/update-o-auth-2-server.md @@ -20,6 +20,7 @@ async fn main() -> Result<(), Box> { Some(60), // optional Some(60), // optional Some(60), // optional + Some(60), // optional Some(false), // optional Some("https://example.com"), // optional Some(6), // optional diff --git a/examples/1.9.x/server-rust/examples/teams/create-installation.md b/examples/1.9.x/server-rust/examples/teams/create-installation.md new file mode 100644 index 000000000..f735696e3 --- /dev/null +++ b/examples/1.9.x/server-rust/examples/teams/create-installation.md @@ -0,0 +1,24 @@ +```rust +use appwrite::Client; +use appwrite::services::Teams; + +#[tokio::main] +async fn main() -> Result<(), Box> { + let client = Client::new(); + client.set_endpoint("https://.cloud.appwrite.io/v1"); // Your API Endpoint + client.set_project(""); // Your project ID + client.set_session(""); // The user session to authenticate with + + let teams = Teams::new(&client); + + let result = teams.create_installation( + "", + "", + Some("") // optional + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/1.9.x/server-rust/examples/teams/delete-installation.md b/examples/1.9.x/server-rust/examples/teams/delete-installation.md new file mode 100644 index 000000000..b635b1427 --- /dev/null +++ b/examples/1.9.x/server-rust/examples/teams/delete-installation.md @@ -0,0 +1,23 @@ +```rust +use appwrite::Client; +use appwrite::services::Teams; + +#[tokio::main] +async fn main() -> Result<(), Box> { + let client = Client::new(); + client.set_endpoint("https://.cloud.appwrite.io/v1"); // Your API Endpoint + client.set_project(""); // Your project ID + client.set_session(""); // The user session to authenticate with + + let teams = Teams::new(&client); + + let result = teams.delete_installation( + "", + "" + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/1.9.x/server-rust/examples/teams/get-installation.md b/examples/1.9.x/server-rust/examples/teams/get-installation.md new file mode 100644 index 000000000..15db5b20d --- /dev/null +++ b/examples/1.9.x/server-rust/examples/teams/get-installation.md @@ -0,0 +1,23 @@ +```rust +use appwrite::Client; +use appwrite::services::Teams; + +#[tokio::main] +async fn main() -> Result<(), Box> { + let client = Client::new(); + client.set_endpoint("https://.cloud.appwrite.io/v1"); // Your API Endpoint + client.set_project(""); // Your project ID + client.set_session(""); // The user session to authenticate with + + let teams = Teams::new(&client); + + let result = teams.get_installation( + "", + "" + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/1.9.x/server-rust/examples/teams/list-installations.md b/examples/1.9.x/server-rust/examples/teams/list-installations.md new file mode 100644 index 000000000..3d66223d9 --- /dev/null +++ b/examples/1.9.x/server-rust/examples/teams/list-installations.md @@ -0,0 +1,24 @@ +```rust +use appwrite::Client; +use appwrite::services::Teams; + +#[tokio::main] +async fn main() -> Result<(), Box> { + let client = Client::new(); + client.set_endpoint("https://.cloud.appwrite.io/v1"); // Your API Endpoint + client.set_project(""); // Your project ID + client.set_session(""); // The user session to authenticate with + + let teams = Teams::new(&client); + + let result = teams.list_installations( + "", + Some(vec![]), // optional + Some(false) // optional + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/1.9.x/server-rust/examples/teams/update-installation.md b/examples/1.9.x/server-rust/examples/teams/update-installation.md new file mode 100644 index 000000000..9a49db2c6 --- /dev/null +++ b/examples/1.9.x/server-rust/examples/teams/update-installation.md @@ -0,0 +1,24 @@ +```rust +use appwrite::Client; +use appwrite::services::Teams; + +#[tokio::main] +async fn main() -> Result<(), Box> { + let client = Client::new(); + client.set_endpoint("https://.cloud.appwrite.io/v1"); // Your API Endpoint + client.set_project(""); // Your project ID + client.set_session(""); // The user session to authenticate with + + let teams = Teams::new(&client); + + let result = teams.update_installation( + "", + "", + Some("") // optional + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/1.9.x/server-rust/examples/vectorsdb/create-collection.md b/examples/1.9.x/server-rust/examples/vectorsdb/create-collection.md new file mode 100644 index 000000000..101028800 --- /dev/null +++ b/examples/1.9.x/server-rust/examples/vectorsdb/create-collection.md @@ -0,0 +1,30 @@ +```rust +use appwrite::Client; +use appwrite::services::VectorsDB; +use appwrite::permission::Permission; +use appwrite::role::Role; + +#[tokio::main] +async fn main() -> Result<(), Box> { + let client = Client::new(); + client.set_endpoint("https://.cloud.appwrite.io/v1"); // Your API Endpoint + client.set_project(""); // Your project ID + client.set_key(""); // Your secret API key + + let vectors_db = VectorsDB::new(&client); + + let result = vectors_db.create_collection( + "", + "", + "", + 1, + Some(vec![Permission::read(Role::any()).to_string()]), // optional + Some(false), // optional + Some(false) // optional + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/1.9.x/server-rust/examples/vectorsdb/create-document.md b/examples/1.9.x/server-rust/examples/vectorsdb/create-document.md new file mode 100644 index 000000000..fcbfa5cf5 --- /dev/null +++ b/examples/1.9.x/server-rust/examples/vectorsdb/create-document.md @@ -0,0 +1,28 @@ +```rust +use appwrite::Client; +use appwrite::services::VectorsDB; +use appwrite::permission::Permission; +use appwrite::role::Role; + +#[tokio::main] +async fn main() -> Result<(), Box> { + let client = Client::new(); + client.set_endpoint("https://.cloud.appwrite.io/v1"); // Your API Endpoint + client.set_project(""); // Your project ID + client.set_session(""); // The user session to authenticate with + + let vectors_db = VectorsDB::new(&client); + + let result = vectors_db.create_document( + "", + "", + "", + serde_json::json!({}), + Some(vec![Permission::read(Role::any()).to_string()]) // optional + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/1.9.x/server-rust/examples/vectorsdb/create-documents.md b/examples/1.9.x/server-rust/examples/vectorsdb/create-documents.md new file mode 100644 index 000000000..bf49c418f --- /dev/null +++ b/examples/1.9.x/server-rust/examples/vectorsdb/create-documents.md @@ -0,0 +1,24 @@ +```rust +use appwrite::Client; +use appwrite::services::VectorsDB; + +#[tokio::main] +async fn main() -> Result<(), Box> { + let client = Client::new(); + client.set_endpoint("https://.cloud.appwrite.io/v1"); // Your API Endpoint + client.set_project(""); // Your project ID + client.set_key(""); // Your secret API key + + let vectors_db = VectorsDB::new(&client); + + let result = vectors_db.create_documents( + "", + "", + vec![] + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/1.9.x/server-rust/examples/vectorsdb/create-index.md b/examples/1.9.x/server-rust/examples/vectorsdb/create-index.md new file mode 100644 index 000000000..67ba9f60b --- /dev/null +++ b/examples/1.9.x/server-rust/examples/vectorsdb/create-index.md @@ -0,0 +1,28 @@ +```rust +use appwrite::Client; +use appwrite::services::VectorsDB; + +#[tokio::main] +async fn main() -> Result<(), Box> { + let client = Client::new(); + client.set_endpoint("https://.cloud.appwrite.io/v1"); // Your API Endpoint + client.set_project(""); // Your project ID + client.set_key(""); // Your secret API key + + let vectors_db = VectorsDB::new(&client); + + let result = vectors_db.create_index( + "", + "", + "", + appwrite::enums::VectorsDBIndexType::HnswEuclidean, + vec![], + Some(vec![appwrite::enums::OrderBy::Asc]), // optional + Some(vec![]) // optional + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/1.9.x/server-rust/examples/vectorsdb/create-operations.md b/examples/1.9.x/server-rust/examples/vectorsdb/create-operations.md new file mode 100644 index 000000000..cc1aaca69 --- /dev/null +++ b/examples/1.9.x/server-rust/examples/vectorsdb/create-operations.md @@ -0,0 +1,23 @@ +```rust +use appwrite::Client; +use appwrite::services::VectorsDB; + +#[tokio::main] +async fn main() -> Result<(), Box> { + let client = Client::new(); + client.set_endpoint("https://.cloud.appwrite.io/v1"); // Your API Endpoint + client.set_project(""); // Your project ID + client.set_key(""); // Your secret API key + + let vectors_db = VectorsDB::new(&client); + + let result = vectors_db.create_operations( + "", + Some(vec![serde_json::json!({"action":"create","databaseId":"","collectionId":"","documentId":"","data":{"name":"Walter O'Brien"}})]) // optional + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/1.9.x/server-rust/examples/vectorsdb/create-query.md b/examples/1.9.x/server-rust/examples/vectorsdb/create-query.md new file mode 100644 index 000000000..72ea46b9b --- /dev/null +++ b/examples/1.9.x/server-rust/examples/vectorsdb/create-query.md @@ -0,0 +1,27 @@ +```rust +use appwrite::Client; +use appwrite::services::VectorsDB; + +#[tokio::main] +async fn main() -> Result<(), Box> { + let client = Client::new(); + client.set_endpoint("https://.cloud.appwrite.io/v1"); // Your API Endpoint + client.set_project(""); // Your project ID + client.set_session(""); // The user session to authenticate with + + let vectors_db = VectorsDB::new(&client); + + let result = vectors_db.create_query( + "", + "", + Some(vec![]), // optional + Some(""), // optional + Some(false), // optional + Some(0) // optional + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/1.9.x/server-rust/examples/vectorsdb/create-text-embeddings.md b/examples/1.9.x/server-rust/examples/vectorsdb/create-text-embeddings.md new file mode 100644 index 000000000..2ecee2c69 --- /dev/null +++ b/examples/1.9.x/server-rust/examples/vectorsdb/create-text-embeddings.md @@ -0,0 +1,23 @@ +```rust +use appwrite::Client; +use appwrite::services::VectorsDB; + +#[tokio::main] +async fn main() -> Result<(), Box> { + let client = Client::new(); + client.set_endpoint("https://.cloud.appwrite.io/v1"); // Your API Endpoint + client.set_project(""); // Your project ID + client.set_key(""); // Your secret API key + + let vectors_db = VectorsDB::new(&client); + + let result = vectors_db.create_text_embeddings( + vec![], + Some(appwrite::enums::EmbeddingModel::NomicEmbedText) // optional + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/1.9.x/server-rust/examples/vectorsdb/create-transaction.md b/examples/1.9.x/server-rust/examples/vectorsdb/create-transaction.md new file mode 100644 index 000000000..a7b1919bc --- /dev/null +++ b/examples/1.9.x/server-rust/examples/vectorsdb/create-transaction.md @@ -0,0 +1,22 @@ +```rust +use appwrite::Client; +use appwrite::services::VectorsDB; + +#[tokio::main] +async fn main() -> Result<(), Box> { + let client = Client::new(); + client.set_endpoint("https://.cloud.appwrite.io/v1"); // Your API Endpoint + client.set_project(""); // Your project ID + client.set_key(""); // Your secret API key + + let vectors_db = VectorsDB::new(&client); + + let result = vectors_db.create_transaction( + Some(60) // optional + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/1.9.x/server-rust/examples/vectorsdb/create.md b/examples/1.9.x/server-rust/examples/vectorsdb/create.md new file mode 100644 index 000000000..3911d8aca --- /dev/null +++ b/examples/1.9.x/server-rust/examples/vectorsdb/create.md @@ -0,0 +1,24 @@ +```rust +use appwrite::Client; +use appwrite::services::VectorsDB; + +#[tokio::main] +async fn main() -> Result<(), Box> { + let client = Client::new(); + client.set_endpoint("https://.cloud.appwrite.io/v1"); // Your API Endpoint + client.set_project(""); // Your project ID + client.set_key(""); // Your secret API key + + let vectors_db = VectorsDB::new(&client); + + let result = vectors_db.create( + "", + "", + Some(false) // optional + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/1.9.x/server-rust/examples/vectorsdb/delete-collection.md b/examples/1.9.x/server-rust/examples/vectorsdb/delete-collection.md new file mode 100644 index 000000000..4a500dc9b --- /dev/null +++ b/examples/1.9.x/server-rust/examples/vectorsdb/delete-collection.md @@ -0,0 +1,21 @@ +```rust +use appwrite::Client; +use appwrite::services::VectorsDB; + +#[tokio::main] +async fn main() -> Result<(), Box> { + let client = Client::new(); + client.set_endpoint("https://.cloud.appwrite.io/v1"); // Your API Endpoint + client.set_project(""); // Your project ID + client.set_key(""); // Your secret API key + + let vectors_db = VectorsDB::new(&client); + + vectors_db.delete_collection( + "", + "" + ).await?; + + Ok(()) +} +``` diff --git a/examples/1.9.x/server-rust/examples/vectorsdb/delete-document.md b/examples/1.9.x/server-rust/examples/vectorsdb/delete-document.md new file mode 100644 index 000000000..0899b84ef --- /dev/null +++ b/examples/1.9.x/server-rust/examples/vectorsdb/delete-document.md @@ -0,0 +1,23 @@ +```rust +use appwrite::Client; +use appwrite::services::VectorsDB; + +#[tokio::main] +async fn main() -> Result<(), Box> { + let client = Client::new(); + client.set_endpoint("https://.cloud.appwrite.io/v1"); // Your API Endpoint + client.set_project(""); // Your project ID + client.set_session(""); // The user session to authenticate with + + let vectors_db = VectorsDB::new(&client); + + vectors_db.delete_document( + "", + "", + "", + Some("") // optional + ).await?; + + Ok(()) +} +``` diff --git a/examples/1.9.x/server-rust/examples/vectorsdb/delete-documents.md b/examples/1.9.x/server-rust/examples/vectorsdb/delete-documents.md new file mode 100644 index 000000000..a69a6a7eb --- /dev/null +++ b/examples/1.9.x/server-rust/examples/vectorsdb/delete-documents.md @@ -0,0 +1,25 @@ +```rust +use appwrite::Client; +use appwrite::services::VectorsDB; + +#[tokio::main] +async fn main() -> Result<(), Box> { + let client = Client::new(); + client.set_endpoint("https://.cloud.appwrite.io/v1"); // Your API Endpoint + client.set_project(""); // Your project ID + client.set_key(""); // Your secret API key + + let vectors_db = VectorsDB::new(&client); + + let result = vectors_db.delete_documents( + "", + "", + Some(vec![]), // optional + Some("") // optional + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/1.9.x/server-rust/examples/vectorsdb/delete-index.md b/examples/1.9.x/server-rust/examples/vectorsdb/delete-index.md new file mode 100644 index 000000000..5c8d76384 --- /dev/null +++ b/examples/1.9.x/server-rust/examples/vectorsdb/delete-index.md @@ -0,0 +1,22 @@ +```rust +use appwrite::Client; +use appwrite::services::VectorsDB; + +#[tokio::main] +async fn main() -> Result<(), Box> { + let client = Client::new(); + client.set_endpoint("https://.cloud.appwrite.io/v1"); // Your API Endpoint + client.set_project(""); // Your project ID + client.set_key(""); // Your secret API key + + let vectors_db = VectorsDB::new(&client); + + vectors_db.delete_index( + "", + "", + "" + ).await?; + + Ok(()) +} +``` diff --git a/examples/1.9.x/server-rust/examples/vectorsdb/delete-transaction.md b/examples/1.9.x/server-rust/examples/vectorsdb/delete-transaction.md new file mode 100644 index 000000000..1e2be2be7 --- /dev/null +++ b/examples/1.9.x/server-rust/examples/vectorsdb/delete-transaction.md @@ -0,0 +1,20 @@ +```rust +use appwrite::Client; +use appwrite::services::VectorsDB; + +#[tokio::main] +async fn main() -> Result<(), Box> { + let client = Client::new(); + client.set_endpoint("https://.cloud.appwrite.io/v1"); // Your API Endpoint + client.set_project(""); // Your project ID + client.set_key(""); // Your secret API key + + let vectors_db = VectorsDB::new(&client); + + vectors_db.delete_transaction( + "" + ).await?; + + Ok(()) +} +``` diff --git a/examples/1.9.x/server-rust/examples/vectorsdb/delete.md b/examples/1.9.x/server-rust/examples/vectorsdb/delete.md new file mode 100644 index 000000000..daea46232 --- /dev/null +++ b/examples/1.9.x/server-rust/examples/vectorsdb/delete.md @@ -0,0 +1,20 @@ +```rust +use appwrite::Client; +use appwrite::services::VectorsDB; + +#[tokio::main] +async fn main() -> Result<(), Box> { + let client = Client::new(); + client.set_endpoint("https://.cloud.appwrite.io/v1"); // Your API Endpoint + client.set_project(""); // Your project ID + client.set_key(""); // Your secret API key + + let vectors_db = VectorsDB::new(&client); + + vectors_db.delete( + "" + ).await?; + + Ok(()) +} +``` diff --git a/examples/1.9.x/server-rust/examples/vectorsdb/get-collection.md b/examples/1.9.x/server-rust/examples/vectorsdb/get-collection.md new file mode 100644 index 000000000..2aa56e75c --- /dev/null +++ b/examples/1.9.x/server-rust/examples/vectorsdb/get-collection.md @@ -0,0 +1,23 @@ +```rust +use appwrite::Client; +use appwrite::services::VectorsDB; + +#[tokio::main] +async fn main() -> Result<(), Box> { + let client = Client::new(); + client.set_endpoint("https://.cloud.appwrite.io/v1"); // Your API Endpoint + client.set_project(""); // Your project ID + client.set_key(""); // Your secret API key + + let vectors_db = VectorsDB::new(&client); + + let result = vectors_db.get_collection( + "", + "" + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/1.9.x/server-rust/examples/vectorsdb/get-document.md b/examples/1.9.x/server-rust/examples/vectorsdb/get-document.md new file mode 100644 index 000000000..382353105 --- /dev/null +++ b/examples/1.9.x/server-rust/examples/vectorsdb/get-document.md @@ -0,0 +1,26 @@ +```rust +use appwrite::Client; +use appwrite::services::VectorsDB; + +#[tokio::main] +async fn main() -> Result<(), Box> { + let client = Client::new(); + client.set_endpoint("https://.cloud.appwrite.io/v1"); // Your API Endpoint + client.set_project(""); // Your project ID + client.set_session(""); // The user session to authenticate with + + let vectors_db = VectorsDB::new(&client); + + let result = vectors_db.get_document( + "", + "", + "", + Some(vec![]), // optional + Some("") // optional + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/1.9.x/server-rust/examples/vectorsdb/get-index.md b/examples/1.9.x/server-rust/examples/vectorsdb/get-index.md new file mode 100644 index 000000000..c89c6e901 --- /dev/null +++ b/examples/1.9.x/server-rust/examples/vectorsdb/get-index.md @@ -0,0 +1,24 @@ +```rust +use appwrite::Client; +use appwrite::services::VectorsDB; + +#[tokio::main] +async fn main() -> Result<(), Box> { + let client = Client::new(); + client.set_endpoint("https://.cloud.appwrite.io/v1"); // Your API Endpoint + client.set_project(""); // Your project ID + client.set_key(""); // Your secret API key + + let vectors_db = VectorsDB::new(&client); + + let result = vectors_db.get_index( + "", + "", + "" + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/1.9.x/server-rust/examples/vectorsdb/get-transaction.md b/examples/1.9.x/server-rust/examples/vectorsdb/get-transaction.md new file mode 100644 index 000000000..d3ddeaedc --- /dev/null +++ b/examples/1.9.x/server-rust/examples/vectorsdb/get-transaction.md @@ -0,0 +1,22 @@ +```rust +use appwrite::Client; +use appwrite::services::VectorsDB; + +#[tokio::main] +async fn main() -> Result<(), Box> { + let client = Client::new(); + client.set_endpoint("https://.cloud.appwrite.io/v1"); // Your API Endpoint + client.set_project(""); // Your project ID + client.set_key(""); // Your secret API key + + let vectors_db = VectorsDB::new(&client); + + let result = vectors_db.get_transaction( + "" + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/1.9.x/server-rust/examples/vectorsdb/get.md b/examples/1.9.x/server-rust/examples/vectorsdb/get.md new file mode 100644 index 000000000..4009249d1 --- /dev/null +++ b/examples/1.9.x/server-rust/examples/vectorsdb/get.md @@ -0,0 +1,22 @@ +```rust +use appwrite::Client; +use appwrite::services::VectorsDB; + +#[tokio::main] +async fn main() -> Result<(), Box> { + let client = Client::new(); + client.set_endpoint("https://.cloud.appwrite.io/v1"); // Your API Endpoint + client.set_project(""); // Your project ID + client.set_key(""); // Your secret API key + + let vectors_db = VectorsDB::new(&client); + + let result = vectors_db.get( + "" + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/1.9.x/server-rust/examples/vectorsdb/list-collections.md b/examples/1.9.x/server-rust/examples/vectorsdb/list-collections.md new file mode 100644 index 000000000..900820c09 --- /dev/null +++ b/examples/1.9.x/server-rust/examples/vectorsdb/list-collections.md @@ -0,0 +1,25 @@ +```rust +use appwrite::Client; +use appwrite::services::VectorsDB; + +#[tokio::main] +async fn main() -> Result<(), Box> { + let client = Client::new(); + client.set_endpoint("https://.cloud.appwrite.io/v1"); // Your API Endpoint + client.set_project(""); // Your project ID + client.set_key(""); // Your secret API key + + let vectors_db = VectorsDB::new(&client); + + let result = vectors_db.list_collections( + "", + Some(vec![]), // optional + Some(""), // optional + Some(false) // optional + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/1.9.x/server-rust/examples/vectorsdb/list-documents.md b/examples/1.9.x/server-rust/examples/vectorsdb/list-documents.md new file mode 100644 index 000000000..bea7001a6 --- /dev/null +++ b/examples/1.9.x/server-rust/examples/vectorsdb/list-documents.md @@ -0,0 +1,27 @@ +```rust +use appwrite::Client; +use appwrite::services::VectorsDB; + +#[tokio::main] +async fn main() -> Result<(), Box> { + let client = Client::new(); + client.set_endpoint("https://.cloud.appwrite.io/v1"); // Your API Endpoint + client.set_project(""); // Your project ID + client.set_session(""); // The user session to authenticate with + + let vectors_db = VectorsDB::new(&client); + + let result = vectors_db.list_documents( + "", + "", + Some(vec![]), // optional + Some(""), // optional + Some(false), // optional + Some(0) // optional + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/1.9.x/server-rust/examples/vectorsdb/list-indexes.md b/examples/1.9.x/server-rust/examples/vectorsdb/list-indexes.md new file mode 100644 index 000000000..0a28c93f0 --- /dev/null +++ b/examples/1.9.x/server-rust/examples/vectorsdb/list-indexes.md @@ -0,0 +1,25 @@ +```rust +use appwrite::Client; +use appwrite::services::VectorsDB; + +#[tokio::main] +async fn main() -> Result<(), Box> { + let client = Client::new(); + client.set_endpoint("https://.cloud.appwrite.io/v1"); // Your API Endpoint + client.set_project(""); // Your project ID + client.set_key(""); // Your secret API key + + let vectors_db = VectorsDB::new(&client); + + let result = vectors_db.list_indexes( + "", + "", + Some(vec![]), // optional + Some(false) // optional + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/1.9.x/server-rust/examples/vectorsdb/list-transactions.md b/examples/1.9.x/server-rust/examples/vectorsdb/list-transactions.md new file mode 100644 index 000000000..214670d44 --- /dev/null +++ b/examples/1.9.x/server-rust/examples/vectorsdb/list-transactions.md @@ -0,0 +1,22 @@ +```rust +use appwrite::Client; +use appwrite::services::VectorsDB; + +#[tokio::main] +async fn main() -> Result<(), Box> { + let client = Client::new(); + client.set_endpoint("https://.cloud.appwrite.io/v1"); // Your API Endpoint + client.set_project(""); // Your project ID + client.set_key(""); // Your secret API key + + let vectors_db = VectorsDB::new(&client); + + let result = vectors_db.list_transactions( + Some(vec![]) // optional + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/1.9.x/server-rust/examples/vectorsdb/list.md b/examples/1.9.x/server-rust/examples/vectorsdb/list.md new file mode 100644 index 000000000..1cca57c54 --- /dev/null +++ b/examples/1.9.x/server-rust/examples/vectorsdb/list.md @@ -0,0 +1,24 @@ +```rust +use appwrite::Client; +use appwrite::services::VectorsDB; + +#[tokio::main] +async fn main() -> Result<(), Box> { + let client = Client::new(); + client.set_endpoint("https://.cloud.appwrite.io/v1"); // Your API Endpoint + client.set_project(""); // Your project ID + client.set_key(""); // Your secret API key + + let vectors_db = VectorsDB::new(&client); + + let result = vectors_db.list( + Some(vec![]), // optional + Some(""), // optional + Some(false) // optional + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/1.9.x/server-rust/examples/vectorsdb/update-collection.md b/examples/1.9.x/server-rust/examples/vectorsdb/update-collection.md new file mode 100644 index 000000000..86309ba68 --- /dev/null +++ b/examples/1.9.x/server-rust/examples/vectorsdb/update-collection.md @@ -0,0 +1,30 @@ +```rust +use appwrite::Client; +use appwrite::services::VectorsDB; +use appwrite::permission::Permission; +use appwrite::role::Role; + +#[tokio::main] +async fn main() -> Result<(), Box> { + let client = Client::new(); + client.set_endpoint("https://.cloud.appwrite.io/v1"); // Your API Endpoint + client.set_project(""); // Your project ID + client.set_key(""); // Your secret API key + + let vectors_db = VectorsDB::new(&client); + + let result = vectors_db.update_collection( + "", + "", + "", + Some(1), // optional + Some(vec![Permission::read(Role::any()).to_string()]), // optional + Some(false), // optional + Some(false) // optional + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/1.9.x/server-rust/examples/vectorsdb/update-document.md b/examples/1.9.x/server-rust/examples/vectorsdb/update-document.md new file mode 100644 index 000000000..738c3c0ad --- /dev/null +++ b/examples/1.9.x/server-rust/examples/vectorsdb/update-document.md @@ -0,0 +1,29 @@ +```rust +use appwrite::Client; +use appwrite::services::VectorsDB; +use appwrite::permission::Permission; +use appwrite::role::Role; + +#[tokio::main] +async fn main() -> Result<(), Box> { + let client = Client::new(); + client.set_endpoint("https://.cloud.appwrite.io/v1"); // Your API Endpoint + client.set_project(""); // Your project ID + client.set_session(""); // The user session to authenticate with + + let vectors_db = VectorsDB::new(&client); + + let result = vectors_db.update_document( + "", + "", + "", + Some(serde_json::json!({})), // optional + Some(vec![Permission::read(Role::any()).to_string()]), // optional + Some("") // optional + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/1.9.x/server-rust/examples/vectorsdb/update-documents.md b/examples/1.9.x/server-rust/examples/vectorsdb/update-documents.md new file mode 100644 index 000000000..d616e7305 --- /dev/null +++ b/examples/1.9.x/server-rust/examples/vectorsdb/update-documents.md @@ -0,0 +1,26 @@ +```rust +use appwrite::Client; +use appwrite::services::VectorsDB; + +#[tokio::main] +async fn main() -> Result<(), Box> { + let client = Client::new(); + client.set_endpoint("https://.cloud.appwrite.io/v1"); // Your API Endpoint + client.set_project(""); // Your project ID + client.set_key(""); // Your secret API key + + let vectors_db = VectorsDB::new(&client); + + let result = vectors_db.update_documents( + "", + "", + Some(serde_json::json!({})), // optional + Some(vec![]), // optional + Some("") // optional + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/1.9.x/server-rust/examples/vectorsdb/update-transaction.md b/examples/1.9.x/server-rust/examples/vectorsdb/update-transaction.md new file mode 100644 index 000000000..75f9534c3 --- /dev/null +++ b/examples/1.9.x/server-rust/examples/vectorsdb/update-transaction.md @@ -0,0 +1,24 @@ +```rust +use appwrite::Client; +use appwrite::services::VectorsDB; + +#[tokio::main] +async fn main() -> Result<(), Box> { + let client = Client::new(); + client.set_endpoint("https://.cloud.appwrite.io/v1"); // Your API Endpoint + client.set_project(""); // Your project ID + client.set_key(""); // Your secret API key + + let vectors_db = VectorsDB::new(&client); + + let result = vectors_db.update_transaction( + "", + Some(false), // optional + Some(false) // optional + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/1.9.x/server-rust/examples/vectorsdb/update.md b/examples/1.9.x/server-rust/examples/vectorsdb/update.md new file mode 100644 index 000000000..0e5905ac2 --- /dev/null +++ b/examples/1.9.x/server-rust/examples/vectorsdb/update.md @@ -0,0 +1,24 @@ +```rust +use appwrite::Client; +use appwrite::services::VectorsDB; + +#[tokio::main] +async fn main() -> Result<(), Box> { + let client = Client::new(); + client.set_endpoint("https://.cloud.appwrite.io/v1"); // Your API Endpoint + client.set_project(""); // Your project ID + client.set_key(""); // Your secret API key + + let vectors_db = VectorsDB::new(&client); + + let result = vectors_db.update( + "", + "", + Some(false) // optional + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/1.9.x/server-rust/examples/vectorsdb/upsert-document.md b/examples/1.9.x/server-rust/examples/vectorsdb/upsert-document.md new file mode 100644 index 000000000..3bc89cca7 --- /dev/null +++ b/examples/1.9.x/server-rust/examples/vectorsdb/upsert-document.md @@ -0,0 +1,29 @@ +```rust +use appwrite::Client; +use appwrite::services::VectorsDB; +use appwrite::permission::Permission; +use appwrite::role::Role; + +#[tokio::main] +async fn main() -> Result<(), Box> { + let client = Client::new(); + client.set_endpoint("https://.cloud.appwrite.io/v1"); // Your API Endpoint + client.set_project(""); // Your project ID + client.set_session(""); // The user session to authenticate with + + let vectors_db = VectorsDB::new(&client); + + let result = vectors_db.upsert_document( + "", + "", + "", + Some(serde_json::json!({})), // optional + Some(vec![Permission::read(Role::any()).to_string()]), // optional + Some("") // optional + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/1.9.x/server-rust/examples/vectorsdb/upsert-documents.md b/examples/1.9.x/server-rust/examples/vectorsdb/upsert-documents.md new file mode 100644 index 000000000..c55611852 --- /dev/null +++ b/examples/1.9.x/server-rust/examples/vectorsdb/upsert-documents.md @@ -0,0 +1,25 @@ +```rust +use appwrite::Client; +use appwrite::services::VectorsDB; + +#[tokio::main] +async fn main() -> Result<(), Box> { + let client = Client::new(); + client.set_endpoint("https://.cloud.appwrite.io/v1"); // Your API Endpoint + client.set_project(""); // Your project ID + client.set_key(""); // Your secret API key + + let vectors_db = VectorsDB::new(&client); + + let result = vectors_db.upsert_documents( + "", + "", + vec![], + Some("") // optional + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/1.9.x/server-swift/examples/apps/create-installation-token.md b/examples/1.9.x/server-swift/examples/apps/create-installation-token.md new file mode 100644 index 000000000..a81b0923c --- /dev/null +++ b/examples/1.9.x/server-swift/examples/apps/create-installation-token.md @@ -0,0 +1,16 @@ +```swift +import Appwrite + +let client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + .setKey("") // Your secret API key + +let apps = Apps(client) + +let oauth2Token = try await apps.createInstallationToken( + appId: "", + installationId: "" +) + +``` diff --git a/examples/1.9.x/server-swift/examples/apps/create-key.md b/examples/1.9.x/server-swift/examples/apps/create-key.md new file mode 100644 index 000000000..2ad8a38b5 --- /dev/null +++ b/examples/1.9.x/server-swift/examples/apps/create-key.md @@ -0,0 +1,15 @@ +```swift +import Appwrite + +let client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + .setSession("") // The user session to authenticate with + +let apps = Apps(client) + +let appKey = try await apps.createKey( + appId: "" +) + +``` diff --git a/examples/1.9.x/server-swift/examples/apps/create-secret.md b/examples/1.9.x/server-swift/examples/apps/create-secret.md new file mode 100644 index 000000000..e6f07a23c --- /dev/null +++ b/examples/1.9.x/server-swift/examples/apps/create-secret.md @@ -0,0 +1,15 @@ +```swift +import Appwrite + +let client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + .setSession("") // The user session to authenticate with + +let apps = Apps(client) + +let appSecretPlaintext = try await apps.createSecret( + appId: "" +) + +``` diff --git a/examples/1.9.x/server-swift/examples/apps/create.md b/examples/1.9.x/server-swift/examples/apps/create.md new file mode 100644 index 000000000..cb13e99ef --- /dev/null +++ b/examples/1.9.x/server-swift/examples/apps/create.md @@ -0,0 +1,33 @@ +```swift +import Appwrite + +let client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + .setSession("") // The user session to authenticate with + +let apps = Apps(client) + +let app = try await apps.create( + appId: "", + name: "", + redirectUris: [], + description: "", // optional + clientUri: "https://example.com", // optional + logoUri: "https://example.com", // optional + privacyPolicyUrl: "https://example.com", // optional + termsUrl: "https://example.com", // optional + contacts: [], // optional + tagline: "", // optional + tags: [], // optional + images: [], // optional + supportUrl: "https://example.com", // optional + dataDeletionUrl: "https://example.com", // optional + postLogoutRedirectUris: [], // optional + enabled: false, // optional + type: "public", // optional + deviceFlow: false, // optional + teamId: "" // optional +) + +``` diff --git a/examples/1.9.x/server-swift/examples/apps/delete-key.md b/examples/1.9.x/server-swift/examples/apps/delete-key.md new file mode 100644 index 000000000..90c76a344 --- /dev/null +++ b/examples/1.9.x/server-swift/examples/apps/delete-key.md @@ -0,0 +1,16 @@ +```swift +import Appwrite + +let client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + .setSession("") // The user session to authenticate with + +let apps = Apps(client) + +let result = try await apps.deleteKey( + appId: "", + keyId: "" +) + +``` diff --git a/examples/1.9.x/server-swift/examples/apps/delete-secret.md b/examples/1.9.x/server-swift/examples/apps/delete-secret.md new file mode 100644 index 000000000..c797d76ce --- /dev/null +++ b/examples/1.9.x/server-swift/examples/apps/delete-secret.md @@ -0,0 +1,16 @@ +```swift +import Appwrite + +let client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + .setSession("") // The user session to authenticate with + +let apps = Apps(client) + +let result = try await apps.deleteSecret( + appId: "", + secretId: "" +) + +``` diff --git a/examples/1.9.x/server-swift/examples/apps/delete-tokens.md b/examples/1.9.x/server-swift/examples/apps/delete-tokens.md new file mode 100644 index 000000000..6495eda9b --- /dev/null +++ b/examples/1.9.x/server-swift/examples/apps/delete-tokens.md @@ -0,0 +1,15 @@ +```swift +import Appwrite + +let client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + .setSession("") // The user session to authenticate with + +let apps = Apps(client) + +let result = try await apps.deleteTokens( + appId: "" +) + +``` diff --git a/examples/1.9.x/server-swift/examples/apps/delete.md b/examples/1.9.x/server-swift/examples/apps/delete.md new file mode 100644 index 000000000..eec807732 --- /dev/null +++ b/examples/1.9.x/server-swift/examples/apps/delete.md @@ -0,0 +1,15 @@ +```swift +import Appwrite + +let client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + .setSession("") // The user session to authenticate with + +let apps = Apps(client) + +let result = try await apps.delete( + appId: "" +) + +``` diff --git a/examples/1.9.x/server-swift/examples/apps/get-installation.md b/examples/1.9.x/server-swift/examples/apps/get-installation.md new file mode 100644 index 000000000..a9a366f81 --- /dev/null +++ b/examples/1.9.x/server-swift/examples/apps/get-installation.md @@ -0,0 +1,16 @@ +```swift +import Appwrite + +let client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + .setKey("") // Your secret API key + +let apps = Apps(client) + +let appInstallation = try await apps.getInstallation( + appId: "", + installationId: "" +) + +``` diff --git a/examples/1.9.x/server-swift/examples/apps/get-key.md b/examples/1.9.x/server-swift/examples/apps/get-key.md new file mode 100644 index 000000000..2afb01e28 --- /dev/null +++ b/examples/1.9.x/server-swift/examples/apps/get-key.md @@ -0,0 +1,16 @@ +```swift +import Appwrite + +let client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + .setSession("") // The user session to authenticate with + +let apps = Apps(client) + +let appKey = try await apps.getKey( + appId: "", + keyId: "" +) + +``` diff --git a/examples/1.9.x/server-swift/examples/apps/get-secret.md b/examples/1.9.x/server-swift/examples/apps/get-secret.md new file mode 100644 index 000000000..b00854e78 --- /dev/null +++ b/examples/1.9.x/server-swift/examples/apps/get-secret.md @@ -0,0 +1,16 @@ +```swift +import Appwrite + +let client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + .setSession("") // The user session to authenticate with + +let apps = Apps(client) + +let appSecret = try await apps.getSecret( + appId: "", + secretId: "" +) + +``` diff --git a/examples/1.9.x/server-swift/examples/apps/get.md b/examples/1.9.x/server-swift/examples/apps/get.md new file mode 100644 index 000000000..97df280f1 --- /dev/null +++ b/examples/1.9.x/server-swift/examples/apps/get.md @@ -0,0 +1,15 @@ +```swift +import Appwrite + +let client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + .setSession("") // The user session to authenticate with + +let apps = Apps(client) + +let app = try await apps.get( + appId: "" +) + +``` diff --git a/examples/1.9.x/server-swift/examples/apps/list-installation-scopes.md b/examples/1.9.x/server-swift/examples/apps/list-installation-scopes.md new file mode 100644 index 000000000..b19112a29 --- /dev/null +++ b/examples/1.9.x/server-swift/examples/apps/list-installation-scopes.md @@ -0,0 +1,13 @@ +```swift +import Appwrite + +let client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + .setSession("") // The user session to authenticate with + +let apps = Apps(client) + +let appScopeList = try await apps.listInstallationScopes() + +``` diff --git a/examples/1.9.x/server-swift/examples/apps/list-installations.md b/examples/1.9.x/server-swift/examples/apps/list-installations.md new file mode 100644 index 000000000..83e98bc7b --- /dev/null +++ b/examples/1.9.x/server-swift/examples/apps/list-installations.md @@ -0,0 +1,17 @@ +```swift +import Appwrite + +let client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + .setKey("") // Your secret API key + +let apps = Apps(client) + +let appInstallationList = try await apps.listInstallations( + appId: "", + queries: [], // optional + total: false // optional +) + +``` diff --git a/examples/1.9.x/server-swift/examples/apps/list-keys.md b/examples/1.9.x/server-swift/examples/apps/list-keys.md new file mode 100644 index 000000000..7f0938cdb --- /dev/null +++ b/examples/1.9.x/server-swift/examples/apps/list-keys.md @@ -0,0 +1,17 @@ +```swift +import Appwrite + +let client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + .setSession("") // The user session to authenticate with + +let apps = Apps(client) + +let appKeyList = try await apps.listKeys( + appId: "", + queries: [], // optional + total: false // optional +) + +``` diff --git a/examples/1.9.x/server-swift/examples/apps/list-o-auth-2-scopes.md b/examples/1.9.x/server-swift/examples/apps/list-o-auth-2-scopes.md new file mode 100644 index 000000000..834730e8e --- /dev/null +++ b/examples/1.9.x/server-swift/examples/apps/list-o-auth-2-scopes.md @@ -0,0 +1,13 @@ +```swift +import Appwrite + +let client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + .setSession("") // The user session to authenticate with + +let apps = Apps(client) + +let appScopeList = try await apps.listOAuth2Scopes() + +``` diff --git a/examples/1.9.x/server-swift/examples/apps/list-secrets.md b/examples/1.9.x/server-swift/examples/apps/list-secrets.md new file mode 100644 index 000000000..2f7c4f22f --- /dev/null +++ b/examples/1.9.x/server-swift/examples/apps/list-secrets.md @@ -0,0 +1,17 @@ +```swift +import Appwrite + +let client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + .setSession("") // The user session to authenticate with + +let apps = Apps(client) + +let appSecretList = try await apps.listSecrets( + appId: "", + queries: [], // optional + total: false // optional +) + +``` diff --git a/examples/1.9.x/server-swift/examples/apps/list.md b/examples/1.9.x/server-swift/examples/apps/list.md new file mode 100644 index 000000000..6cdff191d --- /dev/null +++ b/examples/1.9.x/server-swift/examples/apps/list.md @@ -0,0 +1,16 @@ +```swift +import Appwrite + +let client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + .setSession("") // The user session to authenticate with + +let apps = Apps(client) + +let appsList = try await apps.list( + queries: [], // optional + total: false // optional +) + +``` diff --git a/examples/1.9.x/server-swift/examples/apps/update-labels.md b/examples/1.9.x/server-swift/examples/apps/update-labels.md new file mode 100644 index 000000000..39d670fc8 --- /dev/null +++ b/examples/1.9.x/server-swift/examples/apps/update-labels.md @@ -0,0 +1,16 @@ +```swift +import Appwrite + +let client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + .setKey("") // Your secret API key + +let apps = Apps(client) + +let app = try await apps.updateLabels( + appId: "", + labels: [] +) + +``` diff --git a/examples/1.9.x/server-swift/examples/apps/update-team.md b/examples/1.9.x/server-swift/examples/apps/update-team.md new file mode 100644 index 000000000..d848ef4e8 --- /dev/null +++ b/examples/1.9.x/server-swift/examples/apps/update-team.md @@ -0,0 +1,16 @@ +```swift +import Appwrite + +let client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + .setSession("") // The user session to authenticate with + +let apps = Apps(client) + +let app = try await apps.updateTeam( + appId: "", + teamId: "" +) + +``` diff --git a/examples/1.9.x/server-swift/examples/apps/update.md b/examples/1.9.x/server-swift/examples/apps/update.md new file mode 100644 index 000000000..e6a115d0b --- /dev/null +++ b/examples/1.9.x/server-swift/examples/apps/update.md @@ -0,0 +1,34 @@ +```swift +import Appwrite + +let client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + .setSession("") // The user session to authenticate with + +let apps = Apps(client) + +let app = try await apps.update( + appId: "", + name: "", + description: "", // optional + clientUri: "https://example.com", // optional + logoUri: "https://example.com", // optional + privacyPolicyUrl: "https://example.com", // optional + termsUrl: "https://example.com", // optional + contacts: [], // optional + tagline: "", // optional + tags: [], // optional + images: [], // optional + supportUrl: "https://example.com", // optional + dataDeletionUrl: "https://example.com", // optional + enabled: false, // optional + redirectUris: [], // optional + postLogoutRedirectUris: [], // optional + type: "public", // optional + deviceFlow: false, // optional + installationScopes: [], // optional + installationRedirectUrl: "https://example.com" // optional +) + +``` diff --git a/examples/1.9.x/server-swift/examples/documentsdb/create-collection.md b/examples/1.9.x/server-swift/examples/documentsdb/create-collection.md new file mode 100644 index 000000000..fc6bb0447 --- /dev/null +++ b/examples/1.9.x/server-swift/examples/documentsdb/create-collection.md @@ -0,0 +1,22 @@ +```swift +import Appwrite + +let client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + .setKey("") // Your secret API key + +let documentsDB = DocumentsDB(client) + +let collection = try await documentsDB.createCollection( + databaseId: "", + collectionId: "", + name: "", + permissions: [Permission.read(Role.any())], // optional + documentSecurity: false, // optional + enabled: false, // optional + attributes: [], // optional + indexes: [] // optional +) + +``` diff --git a/examples/1.9.x/server-swift/examples/documentsdb/create-document.md b/examples/1.9.x/server-swift/examples/documentsdb/create-document.md new file mode 100644 index 000000000..509c48853 --- /dev/null +++ b/examples/1.9.x/server-swift/examples/documentsdb/create-document.md @@ -0,0 +1,25 @@ +```swift +import Appwrite + +let client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + .setSession("") // The user session to authenticate with + +let documentsDB = DocumentsDB(client) + +let document = try await documentsDB.createDocument( + databaseId: "", + collectionId: "", + documentId: "", + data: [ + "username": "walter.obrien", + "email": "walter.obrien@example.com", + "fullName": "Walter O'Brien", + "age": 30, + "isAdmin": false + ], + permissions: [Permission.read(Role.any())] // optional +) + +``` diff --git a/examples/1.9.x/server-swift/examples/documentsdb/create-documents.md b/examples/1.9.x/server-swift/examples/documentsdb/create-documents.md new file mode 100644 index 000000000..bbdfdf043 --- /dev/null +++ b/examples/1.9.x/server-swift/examples/documentsdb/create-documents.md @@ -0,0 +1,17 @@ +```swift +import Appwrite + +let client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + .setSession("") // The user session to authenticate with + +let documentsDB = DocumentsDB(client) + +let documentList = try await documentsDB.createDocuments( + databaseId: "", + collectionId: "", + documents: [] +) + +``` diff --git a/examples/1.9.x/server-swift/examples/documentsdb/create-index.md b/examples/1.9.x/server-swift/examples/documentsdb/create-index.md new file mode 100644 index 000000000..41bb1b8de --- /dev/null +++ b/examples/1.9.x/server-swift/examples/documentsdb/create-index.md @@ -0,0 +1,22 @@ +```swift +import Appwrite +import AppwriteEnums + +let client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + .setKey("") // Your secret API key + +let documentsDB = DocumentsDB(client) + +let index = try await documentsDB.createIndex( + databaseId: "", + collectionId: "", + key: "", + type: .key, + attributes: [], + orders: [.asc], // optional + lengths: [] // optional +) + +``` diff --git a/examples/1.9.x/server-swift/examples/documentsdb/create-operations.md b/examples/1.9.x/server-swift/examples/documentsdb/create-operations.md new file mode 100644 index 000000000..2e256c685 --- /dev/null +++ b/examples/1.9.x/server-swift/examples/documentsdb/create-operations.md @@ -0,0 +1,26 @@ +```swift +import Appwrite + +let client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + .setKey("") // Your secret API key + +let documentsDB = DocumentsDB(client) + +let transaction = try await documentsDB.createOperations( + transactionId: "", + operations: [ + { + "action": "create", + "databaseId": "", + "collectionId": "", + "documentId": "", + "data": { + "name": "Walter O'Brien" + } + } + ] // optional +) + +``` diff --git a/examples/1.9.x/server-swift/examples/documentsdb/create-transaction.md b/examples/1.9.x/server-swift/examples/documentsdb/create-transaction.md new file mode 100644 index 000000000..9c31bf1b7 --- /dev/null +++ b/examples/1.9.x/server-swift/examples/documentsdb/create-transaction.md @@ -0,0 +1,15 @@ +```swift +import Appwrite + +let client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + .setKey("") // Your secret API key + +let documentsDB = DocumentsDB(client) + +let transaction = try await documentsDB.createTransaction( + ttl: 60 // optional +) + +``` diff --git a/examples/1.9.x/server-swift/examples/documentsdb/create.md b/examples/1.9.x/server-swift/examples/documentsdb/create.md new file mode 100644 index 000000000..142efee6f --- /dev/null +++ b/examples/1.9.x/server-swift/examples/documentsdb/create.md @@ -0,0 +1,17 @@ +```swift +import Appwrite + +let client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + .setKey("") // Your secret API key + +let documentsDB = DocumentsDB(client) + +let database = try await documentsDB.create( + databaseId: "", + name: "", + enabled: false // optional +) + +``` diff --git a/examples/1.9.x/server-swift/examples/documentsdb/decrement-document-attribute.md b/examples/1.9.x/server-swift/examples/documentsdb/decrement-document-attribute.md new file mode 100644 index 000000000..29338a59c --- /dev/null +++ b/examples/1.9.x/server-swift/examples/documentsdb/decrement-document-attribute.md @@ -0,0 +1,21 @@ +```swift +import Appwrite + +let client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + .setSession("") // The user session to authenticate with + +let documentsDB = DocumentsDB(client) + +let document = try await documentsDB.decrementDocumentAttribute( + databaseId: "", + collectionId: "", + documentId: "", + attribute: "", + value: 0, // optional + min: 0, // optional + transactionId: "" // optional +) + +``` diff --git a/examples/1.9.x/server-swift/examples/documentsdb/delete-collection.md b/examples/1.9.x/server-swift/examples/documentsdb/delete-collection.md new file mode 100644 index 000000000..a1c703437 --- /dev/null +++ b/examples/1.9.x/server-swift/examples/documentsdb/delete-collection.md @@ -0,0 +1,16 @@ +```swift +import Appwrite + +let client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + .setKey("") // Your secret API key + +let documentsDB = DocumentsDB(client) + +let result = try await documentsDB.deleteCollection( + databaseId: "", + collectionId: "" +) + +``` diff --git a/examples/1.9.x/server-swift/examples/documentsdb/delete-document.md b/examples/1.9.x/server-swift/examples/documentsdb/delete-document.md new file mode 100644 index 000000000..a596a9baf --- /dev/null +++ b/examples/1.9.x/server-swift/examples/documentsdb/delete-document.md @@ -0,0 +1,18 @@ +```swift +import Appwrite + +let client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + .setSession("") // The user session to authenticate with + +let documentsDB = DocumentsDB(client) + +let result = try await documentsDB.deleteDocument( + databaseId: "", + collectionId: "", + documentId: "", + transactionId: "" // optional +) + +``` diff --git a/examples/1.9.x/server-swift/examples/documentsdb/delete-documents.md b/examples/1.9.x/server-swift/examples/documentsdb/delete-documents.md new file mode 100644 index 000000000..9c6e9c6ff --- /dev/null +++ b/examples/1.9.x/server-swift/examples/documentsdb/delete-documents.md @@ -0,0 +1,18 @@ +```swift +import Appwrite + +let client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + .setKey("") // Your secret API key + +let documentsDB = DocumentsDB(client) + +let documentList = try await documentsDB.deleteDocuments( + databaseId: "", + collectionId: "", + queries: [], // optional + transactionId: "" // optional +) + +``` diff --git a/examples/1.9.x/server-swift/examples/documentsdb/delete-index.md b/examples/1.9.x/server-swift/examples/documentsdb/delete-index.md new file mode 100644 index 000000000..44e886700 --- /dev/null +++ b/examples/1.9.x/server-swift/examples/documentsdb/delete-index.md @@ -0,0 +1,17 @@ +```swift +import Appwrite + +let client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + .setKey("") // Your secret API key + +let documentsDB = DocumentsDB(client) + +let result = try await documentsDB.deleteIndex( + databaseId: "", + collectionId: "", + key: "" +) + +``` diff --git a/examples/1.9.x/server-swift/examples/documentsdb/delete-transaction.md b/examples/1.9.x/server-swift/examples/documentsdb/delete-transaction.md new file mode 100644 index 000000000..8f9f12ad2 --- /dev/null +++ b/examples/1.9.x/server-swift/examples/documentsdb/delete-transaction.md @@ -0,0 +1,15 @@ +```swift +import Appwrite + +let client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + .setKey("") // Your secret API key + +let documentsDB = DocumentsDB(client) + +let result = try await documentsDB.deleteTransaction( + transactionId: "" +) + +``` diff --git a/examples/1.9.x/server-swift/examples/documentsdb/delete.md b/examples/1.9.x/server-swift/examples/documentsdb/delete.md new file mode 100644 index 000000000..7c34c3de9 --- /dev/null +++ b/examples/1.9.x/server-swift/examples/documentsdb/delete.md @@ -0,0 +1,15 @@ +```swift +import Appwrite + +let client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + .setKey("") // Your secret API key + +let documentsDB = DocumentsDB(client) + +let result = try await documentsDB.delete( + databaseId: "" +) + +``` diff --git a/examples/1.9.x/server-swift/examples/documentsdb/get-collection.md b/examples/1.9.x/server-swift/examples/documentsdb/get-collection.md new file mode 100644 index 000000000..177ff7430 --- /dev/null +++ b/examples/1.9.x/server-swift/examples/documentsdb/get-collection.md @@ -0,0 +1,16 @@ +```swift +import Appwrite + +let client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + .setKey("") // Your secret API key + +let documentsDB = DocumentsDB(client) + +let collection = try await documentsDB.getCollection( + databaseId: "", + collectionId: "" +) + +``` diff --git a/examples/1.9.x/server-swift/examples/documentsdb/get-document.md b/examples/1.9.x/server-swift/examples/documentsdb/get-document.md new file mode 100644 index 000000000..ec0ed9035 --- /dev/null +++ b/examples/1.9.x/server-swift/examples/documentsdb/get-document.md @@ -0,0 +1,19 @@ +```swift +import Appwrite + +let client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + .setSession("") // The user session to authenticate with + +let documentsDB = DocumentsDB(client) + +let document = try await documentsDB.getDocument( + databaseId: "", + collectionId: "", + documentId: "", + queries: [], // optional + transactionId: "" // optional +) + +``` diff --git a/examples/1.9.x/server-swift/examples/documentsdb/get-index.md b/examples/1.9.x/server-swift/examples/documentsdb/get-index.md new file mode 100644 index 000000000..237124b59 --- /dev/null +++ b/examples/1.9.x/server-swift/examples/documentsdb/get-index.md @@ -0,0 +1,17 @@ +```swift +import Appwrite + +let client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + .setKey("") // Your secret API key + +let documentsDB = DocumentsDB(client) + +let index = try await documentsDB.getIndex( + databaseId: "", + collectionId: "", + key: "" +) + +``` diff --git a/examples/1.9.x/server-swift/examples/documentsdb/get-transaction.md b/examples/1.9.x/server-swift/examples/documentsdb/get-transaction.md new file mode 100644 index 000000000..90ca83f84 --- /dev/null +++ b/examples/1.9.x/server-swift/examples/documentsdb/get-transaction.md @@ -0,0 +1,15 @@ +```swift +import Appwrite + +let client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + .setKey("") // Your secret API key + +let documentsDB = DocumentsDB(client) + +let transaction = try await documentsDB.getTransaction( + transactionId: "" +) + +``` diff --git a/examples/1.9.x/server-swift/examples/documentsdb/get.md b/examples/1.9.x/server-swift/examples/documentsdb/get.md new file mode 100644 index 000000000..87646fbbf --- /dev/null +++ b/examples/1.9.x/server-swift/examples/documentsdb/get.md @@ -0,0 +1,15 @@ +```swift +import Appwrite + +let client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + .setKey("") // Your secret API key + +let documentsDB = DocumentsDB(client) + +let database = try await documentsDB.get( + databaseId: "" +) + +``` diff --git a/examples/1.9.x/server-swift/examples/documentsdb/increment-document-attribute.md b/examples/1.9.x/server-swift/examples/documentsdb/increment-document-attribute.md new file mode 100644 index 000000000..2ccd7ecf9 --- /dev/null +++ b/examples/1.9.x/server-swift/examples/documentsdb/increment-document-attribute.md @@ -0,0 +1,21 @@ +```swift +import Appwrite + +let client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + .setSession("") // The user session to authenticate with + +let documentsDB = DocumentsDB(client) + +let document = try await documentsDB.incrementDocumentAttribute( + databaseId: "", + collectionId: "", + documentId: "", + attribute: "", + value: 0, // optional + max: 0, // optional + transactionId: "" // optional +) + +``` diff --git a/examples/1.9.x/server-swift/examples/documentsdb/list-collections.md b/examples/1.9.x/server-swift/examples/documentsdb/list-collections.md new file mode 100644 index 000000000..42f4384e1 --- /dev/null +++ b/examples/1.9.x/server-swift/examples/documentsdb/list-collections.md @@ -0,0 +1,18 @@ +```swift +import Appwrite + +let client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + .setKey("") // Your secret API key + +let documentsDB = DocumentsDB(client) + +let collectionList = try await documentsDB.listCollections( + databaseId: "", + queries: [], // optional + search: "", // optional + total: false // optional +) + +``` diff --git a/examples/1.9.x/server-swift/examples/documentsdb/list-documents.md b/examples/1.9.x/server-swift/examples/documentsdb/list-documents.md new file mode 100644 index 000000000..72b84c013 --- /dev/null +++ b/examples/1.9.x/server-swift/examples/documentsdb/list-documents.md @@ -0,0 +1,20 @@ +```swift +import Appwrite + +let client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + .setSession("") // The user session to authenticate with + +let documentsDB = DocumentsDB(client) + +let documentList = try await documentsDB.listDocuments( + databaseId: "", + collectionId: "", + queries: [], // optional + transactionId: "", // optional + total: false, // optional + ttl: 0 // optional +) + +``` diff --git a/examples/1.9.x/server-swift/examples/documentsdb/list-indexes.md b/examples/1.9.x/server-swift/examples/documentsdb/list-indexes.md new file mode 100644 index 000000000..9140f3c67 --- /dev/null +++ b/examples/1.9.x/server-swift/examples/documentsdb/list-indexes.md @@ -0,0 +1,18 @@ +```swift +import Appwrite + +let client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + .setKey("") // Your secret API key + +let documentsDB = DocumentsDB(client) + +let indexList = try await documentsDB.listIndexes( + databaseId: "", + collectionId: "", + queries: [], // optional + total: false // optional +) + +``` diff --git a/examples/1.9.x/server-swift/examples/documentsdb/list-transactions.md b/examples/1.9.x/server-swift/examples/documentsdb/list-transactions.md new file mode 100644 index 000000000..f6eec7146 --- /dev/null +++ b/examples/1.9.x/server-swift/examples/documentsdb/list-transactions.md @@ -0,0 +1,15 @@ +```swift +import Appwrite + +let client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + .setKey("") // Your secret API key + +let documentsDB = DocumentsDB(client) + +let transactionList = try await documentsDB.listTransactions( + queries: [] // optional +) + +``` diff --git a/examples/1.9.x/server-swift/examples/documentsdb/list.md b/examples/1.9.x/server-swift/examples/documentsdb/list.md new file mode 100644 index 000000000..b6a036cbf --- /dev/null +++ b/examples/1.9.x/server-swift/examples/documentsdb/list.md @@ -0,0 +1,17 @@ +```swift +import Appwrite + +let client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + .setKey("") // Your secret API key + +let documentsDB = DocumentsDB(client) + +let databaseList = try await documentsDB.list( + queries: [], // optional + search: "", // optional + total: false // optional +) + +``` diff --git a/examples/1.9.x/server-swift/examples/documentsdb/update-collection.md b/examples/1.9.x/server-swift/examples/documentsdb/update-collection.md new file mode 100644 index 000000000..1e7df8c71 --- /dev/null +++ b/examples/1.9.x/server-swift/examples/documentsdb/update-collection.md @@ -0,0 +1,21 @@ +```swift +import Appwrite + +let client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + .setKey("") // Your secret API key + +let documentsDB = DocumentsDB(client) + +let collection = try await documentsDB.updateCollection( + databaseId: "", + collectionId: "", + name: "", + permissions: [Permission.read(Role.any())], // optional + documentSecurity: false, // optional + enabled: false, // optional + purge: false // optional +) + +``` diff --git a/examples/1.9.x/server-swift/examples/documentsdb/update-document.md b/examples/1.9.x/server-swift/examples/documentsdb/update-document.md new file mode 100644 index 000000000..e74e305a0 --- /dev/null +++ b/examples/1.9.x/server-swift/examples/documentsdb/update-document.md @@ -0,0 +1,20 @@ +```swift +import Appwrite + +let client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + .setSession("") // The user session to authenticate with + +let documentsDB = DocumentsDB(client) + +let document = try await documentsDB.updateDocument( + databaseId: "", + collectionId: "", + documentId: "", + data: [:], // optional + permissions: [Permission.read(Role.any())], // optional + transactionId: "" // optional +) + +``` diff --git a/examples/1.9.x/server-swift/examples/documentsdb/update-documents.md b/examples/1.9.x/server-swift/examples/documentsdb/update-documents.md new file mode 100644 index 000000000..8931c91d0 --- /dev/null +++ b/examples/1.9.x/server-swift/examples/documentsdb/update-documents.md @@ -0,0 +1,19 @@ +```swift +import Appwrite + +let client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + .setKey("") // Your secret API key + +let documentsDB = DocumentsDB(client) + +let documentList = try await documentsDB.updateDocuments( + databaseId: "", + collectionId: "", + data: [:], // optional + queries: [], // optional + transactionId: "" // optional +) + +``` diff --git a/examples/1.9.x/server-swift/examples/documentsdb/update-transaction.md b/examples/1.9.x/server-swift/examples/documentsdb/update-transaction.md new file mode 100644 index 000000000..77ec18ea8 --- /dev/null +++ b/examples/1.9.x/server-swift/examples/documentsdb/update-transaction.md @@ -0,0 +1,17 @@ +```swift +import Appwrite + +let client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + .setKey("") // Your secret API key + +let documentsDB = DocumentsDB(client) + +let transaction = try await documentsDB.updateTransaction( + transactionId: "", + commit: false, // optional + rollback: false // optional +) + +``` diff --git a/examples/1.9.x/server-swift/examples/documentsdb/update.md b/examples/1.9.x/server-swift/examples/documentsdb/update.md new file mode 100644 index 000000000..663dd99d2 --- /dev/null +++ b/examples/1.9.x/server-swift/examples/documentsdb/update.md @@ -0,0 +1,17 @@ +```swift +import Appwrite + +let client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + .setKey("") // Your secret API key + +let documentsDB = DocumentsDB(client) + +let database = try await documentsDB.update( + databaseId: "", + name: "", + enabled: false // optional +) + +``` diff --git a/examples/1.9.x/server-swift/examples/documentsdb/upsert-document.md b/examples/1.9.x/server-swift/examples/documentsdb/upsert-document.md new file mode 100644 index 000000000..c3b603089 --- /dev/null +++ b/examples/1.9.x/server-swift/examples/documentsdb/upsert-document.md @@ -0,0 +1,20 @@ +```swift +import Appwrite + +let client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + .setSession("") // The user session to authenticate with + +let documentsDB = DocumentsDB(client) + +let document = try await documentsDB.upsertDocument( + databaseId: "", + collectionId: "", + documentId: "", + data: [:], // optional + permissions: [Permission.read(Role.any())], // optional + transactionId: "" // optional +) + +``` diff --git a/examples/1.9.x/server-swift/examples/documentsdb/upsert-documents.md b/examples/1.9.x/server-swift/examples/documentsdb/upsert-documents.md new file mode 100644 index 000000000..6e6ad9ea9 --- /dev/null +++ b/examples/1.9.x/server-swift/examples/documentsdb/upsert-documents.md @@ -0,0 +1,18 @@ +```swift +import Appwrite + +let client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + .setKey("") // Your secret API key + +let documentsDB = DocumentsDB(client) + +let documentList = try await documentsDB.upsertDocuments( + databaseId: "", + collectionId: "", + documents: [], + transactionId: "" // optional +) + +``` diff --git a/examples/1.9.x/server-swift/examples/oauth2/approve.md b/examples/1.9.x/server-swift/examples/oauth2/approve.md new file mode 100644 index 000000000..a19da0441 --- /dev/null +++ b/examples/1.9.x/server-swift/examples/oauth2/approve.md @@ -0,0 +1,17 @@ +```swift +import Appwrite + +let client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setSession("") // The user session to authenticate with + .setProject("") // Your project ID + +let oauth2 = Oauth2(client) + +let oauth2Approve = try await oauth2.approve( + grant_id: "", + authorization_details: "", // optional + scope: "" // optional +) + +``` diff --git a/examples/1.9.x/server-swift/examples/oauth2/authorize-post.md b/examples/1.9.x/server-swift/examples/oauth2/authorize-post.md new file mode 100644 index 000000000..af2dbbf35 --- /dev/null +++ b/examples/1.9.x/server-swift/examples/oauth2/authorize-post.md @@ -0,0 +1,28 @@ +```swift +import Appwrite + +let client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setSession("") // The user session to authenticate with + .setProject("") // Your project ID + +let oauth2 = Oauth2(client) + +let oauth2Authorize = try await oauth2.authorizePost( + client_id: "", // optional + redirect_uri: "https://example.com", // optional + response_type: "", // optional + scope: "", // optional + state: "", // optional + nonce: "", // optional + code_challenge: "", // optional + code_challenge_method: "s256", // optional + prompt: "", // optional + max_age: 0, // optional + authorization_details: "", // optional + resource: "", // optional + audience: "", // optional + request_uri: "" // optional +) + +``` diff --git a/examples/1.9.x/server-swift/examples/oauth2/authorize.md b/examples/1.9.x/server-swift/examples/oauth2/authorize.md new file mode 100644 index 000000000..90448c734 --- /dev/null +++ b/examples/1.9.x/server-swift/examples/oauth2/authorize.md @@ -0,0 +1,28 @@ +```swift +import Appwrite + +let client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setSession("") // The user session to authenticate with + .setProject("") // Your project ID + +let oauth2 = Oauth2(client) + +let oauth2Authorize = try await oauth2.authorize( + client_id: "", // optional + redirect_uri: "https://example.com", // optional + response_type: "", // optional + scope: "", // optional + state: "", // optional + nonce: "", // optional + code_challenge: "", // optional + code_challenge_method: "s256", // optional + prompt: "", // optional + max_age: 0, // optional + authorization_details: "", // optional + resource: "", // optional + audience: "", // optional + request_uri: "" // optional +) + +``` diff --git a/examples/1.9.x/server-swift/examples/oauth2/create-device-authorization.md b/examples/1.9.x/server-swift/examples/oauth2/create-device-authorization.md new file mode 100644 index 000000000..d4b15f9a6 --- /dev/null +++ b/examples/1.9.x/server-swift/examples/oauth2/create-device-authorization.md @@ -0,0 +1,19 @@ +```swift +import Appwrite + +let client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setSession("") // The user session to authenticate with + .setProject("") // Your project ID + +let oauth2 = Oauth2(client) + +let oauth2DeviceAuthorization = try await oauth2.createDeviceAuthorization( + client_id: "", // optional + scope: "", // optional + authorization_details: "", // optional + resource: "", // optional + audience: "" // optional +) + +``` diff --git a/examples/1.9.x/server-swift/examples/oauth2/create-grant.md b/examples/1.9.x/server-swift/examples/oauth2/create-grant.md new file mode 100644 index 000000000..c01c696ed --- /dev/null +++ b/examples/1.9.x/server-swift/examples/oauth2/create-grant.md @@ -0,0 +1,15 @@ +```swift +import Appwrite + +let client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setSession("") // The user session to authenticate with + .setProject("") // Your project ID + +let oauth2 = Oauth2(client) + +let oauth2Grant = try await oauth2.createGrant( + user_code: "" +) + +``` diff --git a/examples/1.9.x/server-swift/examples/oauth2/create-par.md b/examples/1.9.x/server-swift/examples/oauth2/create-par.md new file mode 100644 index 000000000..e0ad97e0d --- /dev/null +++ b/examples/1.9.x/server-swift/examples/oauth2/create-par.md @@ -0,0 +1,27 @@ +```swift +import Appwrite + +let client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setSession("") // The user session to authenticate with + .setProject("") // Your project ID + +let oauth2 = Oauth2(client) + +let oauth2PAR = try await oauth2.createPAR( + client_id: "", + redirect_uri: "https://example.com", + response_type: "code", + scope: "", // optional + state: "", // optional + nonce: "", // optional + code_challenge: "", // optional + code_challenge_method: "s256", // optional + prompt: "", // optional + max_age: 0, // optional + authorization_details: "", // optional + resource: "", // optional + audience: "" // optional +) + +``` diff --git a/examples/1.9.x/server-swift/examples/oauth2/create-token.md b/examples/1.9.x/server-swift/examples/oauth2/create-token.md new file mode 100644 index 000000000..eeba70107 --- /dev/null +++ b/examples/1.9.x/server-swift/examples/oauth2/create-token.md @@ -0,0 +1,24 @@ +```swift +import Appwrite + +let client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setSession("") // The user session to authenticate with + .setProject("") // Your project ID + +let oauth2 = Oauth2(client) + +let oauth2Token = try await oauth2.createToken( + grant_type: "", + code: "", // optional + refresh_token: "", // optional + device_code: "", // optional + client_id: "", // optional + client_secret: "", // optional + code_verifier: "", // optional + redirect_uri: "https://example.com", // optional + resource: "", // optional + audience: "" // optional +) + +``` diff --git a/examples/1.9.x/server-swift/examples/oauth2/get-grant.md b/examples/1.9.x/server-swift/examples/oauth2/get-grant.md new file mode 100644 index 000000000..8ddcd42b8 --- /dev/null +++ b/examples/1.9.x/server-swift/examples/oauth2/get-grant.md @@ -0,0 +1,15 @@ +```swift +import Appwrite + +let client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setSession("") // The user session to authenticate with + .setProject("") // Your project ID + +let oauth2 = Oauth2(client) + +let oauth2Grant = try await oauth2.getGrant( + grant_id: "" +) + +``` diff --git a/examples/1.9.x/server-swift/examples/oauth2/list-organizations.md b/examples/1.9.x/server-swift/examples/oauth2/list-organizations.md new file mode 100644 index 000000000..1c3d70322 --- /dev/null +++ b/examples/1.9.x/server-swift/examples/oauth2/list-organizations.md @@ -0,0 +1,17 @@ +```swift +import Appwrite + +let client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setSession("") // The user session to authenticate with + .setProject("") // Your project ID + +let oauth2 = Oauth2(client) + +let oauth2OrganizationList = try await oauth2.listOrganizations( + limit: 1, // optional + offset: 0, // optional + search: "" // optional +) + +``` diff --git a/examples/1.9.x/server-swift/examples/oauth2/list-projects.md b/examples/1.9.x/server-swift/examples/oauth2/list-projects.md new file mode 100644 index 000000000..7e3a05d98 --- /dev/null +++ b/examples/1.9.x/server-swift/examples/oauth2/list-projects.md @@ -0,0 +1,17 @@ +```swift +import Appwrite + +let client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setSession("") // The user session to authenticate with + .setProject("") // Your project ID + +let oauth2 = Oauth2(client) + +let oauth2ProjectList = try await oauth2.listProjects( + limit: 1, // optional + offset: 0, // optional + search: "" // optional +) + +``` diff --git a/examples/1.9.x/server-swift/examples/oauth2/reject.md b/examples/1.9.x/server-swift/examples/oauth2/reject.md new file mode 100644 index 000000000..23a47033b --- /dev/null +++ b/examples/1.9.x/server-swift/examples/oauth2/reject.md @@ -0,0 +1,15 @@ +```swift +import Appwrite + +let client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setSession("") // The user session to authenticate with + .setProject("") // Your project ID + +let oauth2 = Oauth2(client) + +let oauth2Reject = try await oauth2.reject( + grant_id: "" +) + +``` diff --git a/examples/1.9.x/server-swift/examples/oauth2/revoke.md b/examples/1.9.x/server-swift/examples/oauth2/revoke.md new file mode 100644 index 000000000..44c3af4a2 --- /dev/null +++ b/examples/1.9.x/server-swift/examples/oauth2/revoke.md @@ -0,0 +1,18 @@ +```swift +import Appwrite + +let client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setSession("") // The user session to authenticate with + .setProject("") // Your project ID + +let oauth2 = Oauth2(client) + +let result = try await oauth2.revoke( + token: "", + token_type_hint: "access_token", // optional + client_id: "", // optional + client_secret: "" // optional +) + +``` diff --git a/examples/1.9.x/server-swift/examples/organization/create-installation.md b/examples/1.9.x/server-swift/examples/organization/create-installation.md new file mode 100644 index 000000000..6a5652113 --- /dev/null +++ b/examples/1.9.x/server-swift/examples/organization/create-installation.md @@ -0,0 +1,16 @@ +```swift +import Appwrite + +let client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + .setSession("") // The user session to authenticate with + +let organization = Organization(client) + +let appInstallation = try await organization.createInstallation( + appId: "", + authorizationDetails: "" // optional +) + +``` diff --git a/examples/1.9.x/server-swift/examples/organization/delete-installation.md b/examples/1.9.x/server-swift/examples/organization/delete-installation.md new file mode 100644 index 000000000..151a86f23 --- /dev/null +++ b/examples/1.9.x/server-swift/examples/organization/delete-installation.md @@ -0,0 +1,15 @@ +```swift +import Appwrite + +let client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + .setSession("") // The user session to authenticate with + +let organization = Organization(client) + +let result = try await organization.deleteInstallation( + installationId: "" +) + +``` diff --git a/examples/1.9.x/server-swift/examples/organization/get-installation.md b/examples/1.9.x/server-swift/examples/organization/get-installation.md new file mode 100644 index 000000000..cc6ee9c02 --- /dev/null +++ b/examples/1.9.x/server-swift/examples/organization/get-installation.md @@ -0,0 +1,15 @@ +```swift +import Appwrite + +let client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + .setSession("") // The user session to authenticate with + +let organization = Organization(client) + +let appInstallation = try await organization.getInstallation( + installationId: "" +) + +``` diff --git a/examples/1.9.x/server-swift/examples/organization/list-installations.md b/examples/1.9.x/server-swift/examples/organization/list-installations.md new file mode 100644 index 000000000..ba8ae0a6a --- /dev/null +++ b/examples/1.9.x/server-swift/examples/organization/list-installations.md @@ -0,0 +1,16 @@ +```swift +import Appwrite + +let client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + .setSession("") // The user session to authenticate with + +let organization = Organization(client) + +let appInstallationList = try await organization.listInstallations( + queries: [], // optional + total: false // optional +) + +``` diff --git a/examples/1.9.x/server-swift/examples/organization/update-installation.md b/examples/1.9.x/server-swift/examples/organization/update-installation.md new file mode 100644 index 000000000..49071f89c --- /dev/null +++ b/examples/1.9.x/server-swift/examples/organization/update-installation.md @@ -0,0 +1,16 @@ +```swift +import Appwrite + +let client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + .setSession("") // The user session to authenticate with + +let organization = Organization(client) + +let appInstallation = try await organization.updateInstallation( + installationId: "", + authorizationDetails: "" // optional +) + +``` diff --git a/examples/1.9.x/server-swift/examples/project/update-o-auth-2-server.md b/examples/1.9.x/server-swift/examples/project/update-o-auth-2-server.md index f30d89f43..00146f1e0 100644 --- a/examples/1.9.x/server-swift/examples/project/update-o-auth-2-server.md +++ b/examples/1.9.x/server-swift/examples/project/update-o-auth-2-server.md @@ -17,6 +17,7 @@ let project = try await project.updateOAuth2Server( refreshTokenDuration: 60, // optional publicAccessTokenDuration: 60, // optional publicRefreshTokenDuration: 60, // optional + installationAccessTokenDuration: 60, // optional confidentialPkce: false, // optional verificationUrl: "https://example.com", // optional userCodeLength: 6, // optional diff --git a/examples/1.9.x/server-swift/examples/teams/create-installation.md b/examples/1.9.x/server-swift/examples/teams/create-installation.md new file mode 100644 index 000000000..05139e436 --- /dev/null +++ b/examples/1.9.x/server-swift/examples/teams/create-installation.md @@ -0,0 +1,17 @@ +```swift +import Appwrite + +let client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + .setSession("") // The user session to authenticate with + +let teams = Teams(client) + +let appInstallation = try await teams.createInstallation( + teamId: "", + appId: "", + authorizationDetails: "" // optional +) + +``` diff --git a/examples/1.9.x/server-swift/examples/teams/delete-installation.md b/examples/1.9.x/server-swift/examples/teams/delete-installation.md new file mode 100644 index 000000000..c478164c0 --- /dev/null +++ b/examples/1.9.x/server-swift/examples/teams/delete-installation.md @@ -0,0 +1,16 @@ +```swift +import Appwrite + +let client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + .setSession("") // The user session to authenticate with + +let teams = Teams(client) + +let result = try await teams.deleteInstallation( + teamId: "", + installationId: "" +) + +``` diff --git a/examples/1.9.x/server-swift/examples/teams/get-installation.md b/examples/1.9.x/server-swift/examples/teams/get-installation.md new file mode 100644 index 000000000..7b133b858 --- /dev/null +++ b/examples/1.9.x/server-swift/examples/teams/get-installation.md @@ -0,0 +1,16 @@ +```swift +import Appwrite + +let client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + .setSession("") // The user session to authenticate with + +let teams = Teams(client) + +let appInstallation = try await teams.getInstallation( + teamId: "", + installationId: "" +) + +``` diff --git a/examples/1.9.x/server-swift/examples/teams/list-installations.md b/examples/1.9.x/server-swift/examples/teams/list-installations.md new file mode 100644 index 000000000..cce51c35e --- /dev/null +++ b/examples/1.9.x/server-swift/examples/teams/list-installations.md @@ -0,0 +1,17 @@ +```swift +import Appwrite + +let client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + .setSession("") // The user session to authenticate with + +let teams = Teams(client) + +let appInstallationList = try await teams.listInstallations( + teamId: "", + queries: [], // optional + total: false // optional +) + +``` diff --git a/examples/1.9.x/server-swift/examples/teams/update-installation.md b/examples/1.9.x/server-swift/examples/teams/update-installation.md new file mode 100644 index 000000000..19e18d487 --- /dev/null +++ b/examples/1.9.x/server-swift/examples/teams/update-installation.md @@ -0,0 +1,17 @@ +```swift +import Appwrite + +let client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + .setSession("") // The user session to authenticate with + +let teams = Teams(client) + +let appInstallation = try await teams.updateInstallation( + teamId: "", + installationId: "", + authorizationDetails: "" // optional +) + +``` diff --git a/examples/1.9.x/server-swift/examples/vectorsdb/create-collection.md b/examples/1.9.x/server-swift/examples/vectorsdb/create-collection.md new file mode 100644 index 000000000..27682380d --- /dev/null +++ b/examples/1.9.x/server-swift/examples/vectorsdb/create-collection.md @@ -0,0 +1,21 @@ +```swift +import Appwrite + +let client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + .setKey("") // Your secret API key + +let vectorsDB = VectorsDB(client) + +let vectorsdbCollection = try await vectorsDB.createCollection( + databaseId: "", + collectionId: "", + name: "", + dimension: 1, + permissions: [Permission.read(Role.any())], // optional + documentSecurity: false, // optional + enabled: false // optional +) + +``` diff --git a/examples/1.9.x/server-swift/examples/vectorsdb/create-document.md b/examples/1.9.x/server-swift/examples/vectorsdb/create-document.md new file mode 100644 index 000000000..b1e7b065c --- /dev/null +++ b/examples/1.9.x/server-swift/examples/vectorsdb/create-document.md @@ -0,0 +1,29 @@ +```swift +import Appwrite + +let client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + .setSession("") // The user session to authenticate with + +let vectorsDB = VectorsDB(client) + +let document = try await vectorsDB.createDocument( + databaseId: "", + collectionId: "", + documentId: "", + data: [ + "embeddings": [ + "0": 0.12, + "1": -0.55, + "2": 0.88, + "3": 1.02 + ], + "metadata": [ + "key": "value" + ] + ], + permissions: [Permission.read(Role.any())] // optional +) + +``` diff --git a/examples/1.9.x/server-swift/examples/vectorsdb/create-documents.md b/examples/1.9.x/server-swift/examples/vectorsdb/create-documents.md new file mode 100644 index 000000000..3ffd56550 --- /dev/null +++ b/examples/1.9.x/server-swift/examples/vectorsdb/create-documents.md @@ -0,0 +1,17 @@ +```swift +import Appwrite + +let client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + .setKey("") // Your secret API key + +let vectorsDB = VectorsDB(client) + +let documentList = try await vectorsDB.createDocuments( + databaseId: "", + collectionId: "", + documents: [] +) + +``` diff --git a/examples/1.9.x/server-swift/examples/vectorsdb/create-index.md b/examples/1.9.x/server-swift/examples/vectorsdb/create-index.md new file mode 100644 index 000000000..84284c1c1 --- /dev/null +++ b/examples/1.9.x/server-swift/examples/vectorsdb/create-index.md @@ -0,0 +1,22 @@ +```swift +import Appwrite +import AppwriteEnums + +let client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + .setKey("") // Your secret API key + +let vectorsDB = VectorsDB(client) + +let index = try await vectorsDB.createIndex( + databaseId: "", + collectionId: "", + key: "", + type: .hnswEuclidean, + attributes: [], + orders: [.asc], // optional + lengths: [] // optional +) + +``` diff --git a/examples/1.9.x/server-swift/examples/vectorsdb/create-operations.md b/examples/1.9.x/server-swift/examples/vectorsdb/create-operations.md new file mode 100644 index 000000000..9f2870646 --- /dev/null +++ b/examples/1.9.x/server-swift/examples/vectorsdb/create-operations.md @@ -0,0 +1,26 @@ +```swift +import Appwrite + +let client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + .setKey("") // Your secret API key + +let vectorsDB = VectorsDB(client) + +let transaction = try await vectorsDB.createOperations( + transactionId: "", + operations: [ + { + "action": "create", + "databaseId": "", + "collectionId": "", + "documentId": "", + "data": { + "name": "Walter O'Brien" + } + } + ] // optional +) + +``` diff --git a/examples/1.9.x/server-swift/examples/vectorsdb/create-query.md b/examples/1.9.x/server-swift/examples/vectorsdb/create-query.md new file mode 100644 index 000000000..7191e8718 --- /dev/null +++ b/examples/1.9.x/server-swift/examples/vectorsdb/create-query.md @@ -0,0 +1,20 @@ +```swift +import Appwrite + +let client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + .setSession("") // The user session to authenticate with + +let vectorsDB = VectorsDB(client) + +let documentList = try await vectorsDB.createQuery( + databaseId: "", + collectionId: "", + queries: [], // optional + transactionId: "", // optional + total: false, // optional + ttl: 0 // optional +) + +``` diff --git a/examples/1.9.x/server-swift/examples/vectorsdb/create-text-embeddings.md b/examples/1.9.x/server-swift/examples/vectorsdb/create-text-embeddings.md new file mode 100644 index 000000000..188e36c5a --- /dev/null +++ b/examples/1.9.x/server-swift/examples/vectorsdb/create-text-embeddings.md @@ -0,0 +1,17 @@ +```swift +import Appwrite +import AppwriteEnums + +let client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + .setKey("") // Your secret API key + +let vectorsDB = VectorsDB(client) + +let embeddingList = try await vectorsDB.createTextEmbeddings( + texts: [], + model: .nomicEmbedText // optional +) + +``` diff --git a/examples/1.9.x/server-swift/examples/vectorsdb/create-transaction.md b/examples/1.9.x/server-swift/examples/vectorsdb/create-transaction.md new file mode 100644 index 000000000..981b1946a --- /dev/null +++ b/examples/1.9.x/server-swift/examples/vectorsdb/create-transaction.md @@ -0,0 +1,15 @@ +```swift +import Appwrite + +let client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + .setKey("") // Your secret API key + +let vectorsDB = VectorsDB(client) + +let transaction = try await vectorsDB.createTransaction( + ttl: 60 // optional +) + +``` diff --git a/examples/1.9.x/server-swift/examples/vectorsdb/create.md b/examples/1.9.x/server-swift/examples/vectorsdb/create.md new file mode 100644 index 000000000..6d5f9b137 --- /dev/null +++ b/examples/1.9.x/server-swift/examples/vectorsdb/create.md @@ -0,0 +1,17 @@ +```swift +import Appwrite + +let client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + .setKey("") // Your secret API key + +let vectorsDB = VectorsDB(client) + +let database = try await vectorsDB.create( + databaseId: "", + name: "", + enabled: false // optional +) + +``` diff --git a/examples/1.9.x/server-swift/examples/vectorsdb/delete-collection.md b/examples/1.9.x/server-swift/examples/vectorsdb/delete-collection.md new file mode 100644 index 000000000..1cd184c69 --- /dev/null +++ b/examples/1.9.x/server-swift/examples/vectorsdb/delete-collection.md @@ -0,0 +1,16 @@ +```swift +import Appwrite + +let client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + .setKey("") // Your secret API key + +let vectorsDB = VectorsDB(client) + +let result = try await vectorsDB.deleteCollection( + databaseId: "", + collectionId: "" +) + +``` diff --git a/examples/1.9.x/server-swift/examples/vectorsdb/delete-document.md b/examples/1.9.x/server-swift/examples/vectorsdb/delete-document.md new file mode 100644 index 000000000..0bd2dd424 --- /dev/null +++ b/examples/1.9.x/server-swift/examples/vectorsdb/delete-document.md @@ -0,0 +1,18 @@ +```swift +import Appwrite + +let client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + .setSession("") // The user session to authenticate with + +let vectorsDB = VectorsDB(client) + +let result = try await vectorsDB.deleteDocument( + databaseId: "", + collectionId: "", + documentId: "", + transactionId: "" // optional +) + +``` diff --git a/examples/1.9.x/server-swift/examples/vectorsdb/delete-documents.md b/examples/1.9.x/server-swift/examples/vectorsdb/delete-documents.md new file mode 100644 index 000000000..54211abdc --- /dev/null +++ b/examples/1.9.x/server-swift/examples/vectorsdb/delete-documents.md @@ -0,0 +1,18 @@ +```swift +import Appwrite + +let client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + .setKey("") // Your secret API key + +let vectorsDB = VectorsDB(client) + +let documentList = try await vectorsDB.deleteDocuments( + databaseId: "", + collectionId: "", + queries: [], // optional + transactionId: "" // optional +) + +``` diff --git a/examples/1.9.x/server-swift/examples/vectorsdb/delete-index.md b/examples/1.9.x/server-swift/examples/vectorsdb/delete-index.md new file mode 100644 index 000000000..3ae0d3ef3 --- /dev/null +++ b/examples/1.9.x/server-swift/examples/vectorsdb/delete-index.md @@ -0,0 +1,17 @@ +```swift +import Appwrite + +let client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + .setKey("") // Your secret API key + +let vectorsDB = VectorsDB(client) + +let result = try await vectorsDB.deleteIndex( + databaseId: "", + collectionId: "", + key: "" +) + +``` diff --git a/examples/1.9.x/server-swift/examples/vectorsdb/delete-transaction.md b/examples/1.9.x/server-swift/examples/vectorsdb/delete-transaction.md new file mode 100644 index 000000000..9f7c88ff7 --- /dev/null +++ b/examples/1.9.x/server-swift/examples/vectorsdb/delete-transaction.md @@ -0,0 +1,15 @@ +```swift +import Appwrite + +let client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + .setKey("") // Your secret API key + +let vectorsDB = VectorsDB(client) + +let result = try await vectorsDB.deleteTransaction( + transactionId: "" +) + +``` diff --git a/examples/1.9.x/server-swift/examples/vectorsdb/delete.md b/examples/1.9.x/server-swift/examples/vectorsdb/delete.md new file mode 100644 index 000000000..eb1383f47 --- /dev/null +++ b/examples/1.9.x/server-swift/examples/vectorsdb/delete.md @@ -0,0 +1,15 @@ +```swift +import Appwrite + +let client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + .setKey("") // Your secret API key + +let vectorsDB = VectorsDB(client) + +let result = try await vectorsDB.delete( + databaseId: "" +) + +``` diff --git a/examples/1.9.x/server-swift/examples/vectorsdb/get-collection.md b/examples/1.9.x/server-swift/examples/vectorsdb/get-collection.md new file mode 100644 index 000000000..7be38081c --- /dev/null +++ b/examples/1.9.x/server-swift/examples/vectorsdb/get-collection.md @@ -0,0 +1,16 @@ +```swift +import Appwrite + +let client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + .setKey("") // Your secret API key + +let vectorsDB = VectorsDB(client) + +let vectorsdbCollection = try await vectorsDB.getCollection( + databaseId: "", + collectionId: "" +) + +``` diff --git a/examples/1.9.x/server-swift/examples/vectorsdb/get-document.md b/examples/1.9.x/server-swift/examples/vectorsdb/get-document.md new file mode 100644 index 000000000..7f8d004f7 --- /dev/null +++ b/examples/1.9.x/server-swift/examples/vectorsdb/get-document.md @@ -0,0 +1,19 @@ +```swift +import Appwrite + +let client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + .setSession("") // The user session to authenticate with + +let vectorsDB = VectorsDB(client) + +let document = try await vectorsDB.getDocument( + databaseId: "", + collectionId: "", + documentId: "", + queries: [], // optional + transactionId: "" // optional +) + +``` diff --git a/examples/1.9.x/server-swift/examples/vectorsdb/get-index.md b/examples/1.9.x/server-swift/examples/vectorsdb/get-index.md new file mode 100644 index 000000000..a146b459b --- /dev/null +++ b/examples/1.9.x/server-swift/examples/vectorsdb/get-index.md @@ -0,0 +1,17 @@ +```swift +import Appwrite + +let client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + .setKey("") // Your secret API key + +let vectorsDB = VectorsDB(client) + +let index = try await vectorsDB.getIndex( + databaseId: "", + collectionId: "", + key: "" +) + +``` diff --git a/examples/1.9.x/server-swift/examples/vectorsdb/get-transaction.md b/examples/1.9.x/server-swift/examples/vectorsdb/get-transaction.md new file mode 100644 index 000000000..83908c55d --- /dev/null +++ b/examples/1.9.x/server-swift/examples/vectorsdb/get-transaction.md @@ -0,0 +1,15 @@ +```swift +import Appwrite + +let client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + .setKey("") // Your secret API key + +let vectorsDB = VectorsDB(client) + +let transaction = try await vectorsDB.getTransaction( + transactionId: "" +) + +``` diff --git a/examples/1.9.x/server-swift/examples/vectorsdb/get.md b/examples/1.9.x/server-swift/examples/vectorsdb/get.md new file mode 100644 index 000000000..18ef8466d --- /dev/null +++ b/examples/1.9.x/server-swift/examples/vectorsdb/get.md @@ -0,0 +1,15 @@ +```swift +import Appwrite + +let client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + .setKey("") // Your secret API key + +let vectorsDB = VectorsDB(client) + +let database = try await vectorsDB.get( + databaseId: "" +) + +``` diff --git a/examples/1.9.x/server-swift/examples/vectorsdb/list-collections.md b/examples/1.9.x/server-swift/examples/vectorsdb/list-collections.md new file mode 100644 index 000000000..0c002b62c --- /dev/null +++ b/examples/1.9.x/server-swift/examples/vectorsdb/list-collections.md @@ -0,0 +1,18 @@ +```swift +import Appwrite + +let client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + .setKey("") // Your secret API key + +let vectorsDB = VectorsDB(client) + +let vectorsdbCollectionList = try await vectorsDB.listCollections( + databaseId: "", + queries: [], // optional + search: "", // optional + total: false // optional +) + +``` diff --git a/examples/1.9.x/server-swift/examples/vectorsdb/list-documents.md b/examples/1.9.x/server-swift/examples/vectorsdb/list-documents.md new file mode 100644 index 000000000..f09c4d06d --- /dev/null +++ b/examples/1.9.x/server-swift/examples/vectorsdb/list-documents.md @@ -0,0 +1,20 @@ +```swift +import Appwrite + +let client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + .setSession("") // The user session to authenticate with + +let vectorsDB = VectorsDB(client) + +let documentList = try await vectorsDB.listDocuments( + databaseId: "", + collectionId: "", + queries: [], // optional + transactionId: "", // optional + total: false, // optional + ttl: 0 // optional +) + +``` diff --git a/examples/1.9.x/server-swift/examples/vectorsdb/list-indexes.md b/examples/1.9.x/server-swift/examples/vectorsdb/list-indexes.md new file mode 100644 index 000000000..bafc8eaa9 --- /dev/null +++ b/examples/1.9.x/server-swift/examples/vectorsdb/list-indexes.md @@ -0,0 +1,18 @@ +```swift +import Appwrite + +let client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + .setKey("") // Your secret API key + +let vectorsDB = VectorsDB(client) + +let indexList = try await vectorsDB.listIndexes( + databaseId: "", + collectionId: "", + queries: [], // optional + total: false // optional +) + +``` diff --git a/examples/1.9.x/server-swift/examples/vectorsdb/list-transactions.md b/examples/1.9.x/server-swift/examples/vectorsdb/list-transactions.md new file mode 100644 index 000000000..5a4f5e63d --- /dev/null +++ b/examples/1.9.x/server-swift/examples/vectorsdb/list-transactions.md @@ -0,0 +1,15 @@ +```swift +import Appwrite + +let client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + .setKey("") // Your secret API key + +let vectorsDB = VectorsDB(client) + +let transactionList = try await vectorsDB.listTransactions( + queries: [] // optional +) + +``` diff --git a/examples/1.9.x/server-swift/examples/vectorsdb/list.md b/examples/1.9.x/server-swift/examples/vectorsdb/list.md new file mode 100644 index 000000000..669eeeb5f --- /dev/null +++ b/examples/1.9.x/server-swift/examples/vectorsdb/list.md @@ -0,0 +1,17 @@ +```swift +import Appwrite + +let client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + .setKey("") // Your secret API key + +let vectorsDB = VectorsDB(client) + +let databaseList = try await vectorsDB.list( + queries: [], // optional + search: "", // optional + total: false // optional +) + +``` diff --git a/examples/1.9.x/server-swift/examples/vectorsdb/update-collection.md b/examples/1.9.x/server-swift/examples/vectorsdb/update-collection.md new file mode 100644 index 000000000..0abc0fc0b --- /dev/null +++ b/examples/1.9.x/server-swift/examples/vectorsdb/update-collection.md @@ -0,0 +1,21 @@ +```swift +import Appwrite + +let client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + .setKey("") // Your secret API key + +let vectorsDB = VectorsDB(client) + +let vectorsdbCollection = try await vectorsDB.updateCollection( + databaseId: "", + collectionId: "", + name: "", + dimension: 1, // optional + permissions: [Permission.read(Role.any())], // optional + documentSecurity: false, // optional + enabled: false // optional +) + +``` diff --git a/examples/1.9.x/server-swift/examples/vectorsdb/update-document.md b/examples/1.9.x/server-swift/examples/vectorsdb/update-document.md new file mode 100644 index 000000000..b60a0edee --- /dev/null +++ b/examples/1.9.x/server-swift/examples/vectorsdb/update-document.md @@ -0,0 +1,20 @@ +```swift +import Appwrite + +let client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + .setSession("") // The user session to authenticate with + +let vectorsDB = VectorsDB(client) + +let document = try await vectorsDB.updateDocument( + databaseId: "", + collectionId: "", + documentId: "", + data: [:], // optional + permissions: [Permission.read(Role.any())], // optional + transactionId: "" // optional +) + +``` diff --git a/examples/1.9.x/server-swift/examples/vectorsdb/update-documents.md b/examples/1.9.x/server-swift/examples/vectorsdb/update-documents.md new file mode 100644 index 000000000..c89d78e93 --- /dev/null +++ b/examples/1.9.x/server-swift/examples/vectorsdb/update-documents.md @@ -0,0 +1,19 @@ +```swift +import Appwrite + +let client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + .setKey("") // Your secret API key + +let vectorsDB = VectorsDB(client) + +let documentList = try await vectorsDB.updateDocuments( + databaseId: "", + collectionId: "", + data: [:], // optional + queries: [], // optional + transactionId: "" // optional +) + +``` diff --git a/examples/1.9.x/server-swift/examples/vectorsdb/update-transaction.md b/examples/1.9.x/server-swift/examples/vectorsdb/update-transaction.md new file mode 100644 index 000000000..17d502901 --- /dev/null +++ b/examples/1.9.x/server-swift/examples/vectorsdb/update-transaction.md @@ -0,0 +1,17 @@ +```swift +import Appwrite + +let client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + .setKey("") // Your secret API key + +let vectorsDB = VectorsDB(client) + +let transaction = try await vectorsDB.updateTransaction( + transactionId: "", + commit: false, // optional + rollback: false // optional +) + +``` diff --git a/examples/1.9.x/server-swift/examples/vectorsdb/update.md b/examples/1.9.x/server-swift/examples/vectorsdb/update.md new file mode 100644 index 000000000..25b98feb7 --- /dev/null +++ b/examples/1.9.x/server-swift/examples/vectorsdb/update.md @@ -0,0 +1,17 @@ +```swift +import Appwrite + +let client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + .setKey("") // Your secret API key + +let vectorsDB = VectorsDB(client) + +let database = try await vectorsDB.update( + databaseId: "", + name: "", + enabled: false // optional +) + +``` diff --git a/examples/1.9.x/server-swift/examples/vectorsdb/upsert-document.md b/examples/1.9.x/server-swift/examples/vectorsdb/upsert-document.md new file mode 100644 index 000000000..c91a48004 --- /dev/null +++ b/examples/1.9.x/server-swift/examples/vectorsdb/upsert-document.md @@ -0,0 +1,20 @@ +```swift +import Appwrite + +let client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + .setSession("") // The user session to authenticate with + +let vectorsDB = VectorsDB(client) + +let document = try await vectorsDB.upsertDocument( + databaseId: "", + collectionId: "", + documentId: "", + data: [:], // optional + permissions: [Permission.read(Role.any())], // optional + transactionId: "" // optional +) + +``` diff --git a/examples/1.9.x/server-swift/examples/vectorsdb/upsert-documents.md b/examples/1.9.x/server-swift/examples/vectorsdb/upsert-documents.md new file mode 100644 index 000000000..32d773bce --- /dev/null +++ b/examples/1.9.x/server-swift/examples/vectorsdb/upsert-documents.md @@ -0,0 +1,18 @@ +```swift +import Appwrite + +let client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + .setKey("") // Your secret API key + +let vectorsDB = VectorsDB(client) + +let documentList = try await vectorsDB.upsertDocuments( + databaseId: "", + collectionId: "", + documents: [], + transactionId: "" // optional +) + +``` diff --git a/specs/1.9.x/open-api3-1.9.x-client.json b/specs/1.9.x/open-api3-1.9.x-client.json index 1787befed..874d4abb5 100644 --- a/specs/1.9.x/open-api3-1.9.x-client.json +++ b/specs/1.9.x/open-api3-1.9.x-client.json @@ -4858,6 +4858,57 @@ } } }, + "\/apps\/scopes\/installations": { + "get": { + "summary": "List Installation Scopes", + "operationId": "appsListInstallationScopes", + "tags": [ + "apps" + ], + "description": "List scopes an application can request when installed on a team.", + "responses": { + "200": { + "description": "App scopes list", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/appScopeList" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "listInstallationScopes", + "group": "scopes", + "cookies": false, + "type": "", + "demo": "apps\/list-installation-scopes.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},userId:{userId}", + "scope": "apps.read", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ] + } + }, "\/apps\/scopes\/oauth2": { "get": { "summary": "List OAuth2 Scopes", @@ -5158,6 +5209,22 @@ "description": "Allow this client to use the OAuth2 Device Authorization Grant (RFC 8628) for input-constrained devices such as TVs and CLIs. Defaults to false.", "default": false, "x-example": false + }, + "installationScopes": { + "type": "array", + "description": "Scopes the application requests when installed on a team. Organization-level and project-level scopes only; use the list scopes endpoint with `type=installation` to discover available values. Maximum of 100 scopes are allowed.", + "default": [], + "x-example": null, + "items": { + "type": "string" + } + }, + "installationRedirectUrl": { + "type": "string", + "description": "URL users are redirected to after creating or updating an installation of this application. Must be an https URL, an http loopback URL (localhost, 127.0.0.1, [::1]), or a private-use scheme URI, and must not contain a fragment. Leave empty for no redirect.", + "default": "", + "x-example": "https:\/\/example.com", + "format": "url" } }, "required": [ @@ -5226,21 +5293,21 @@ ] } }, - "\/apps\/{appId}\/secrets": { + "\/apps\/{appId}\/keys": { "get": { - "summary": "List Secrets", - "operationId": "appsListSecrets", + "summary": "List App Keys", + "operationId": "appsListKeys", "tags": [ "apps" ], - "description": "List client secrets for an application.", + "description": "List app keys for an application.", "responses": { "200": { - "description": "App secrets list", + "description": "App keys list", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/appSecretList" + "$ref": "#\/components\/schemas\/appKeyList" } } } @@ -5248,11 +5315,11 @@ }, "deprecated": false, "x-appwrite": { - "method": "listSecrets", - "group": "secrets", + "method": "listKeys", + "group": "keys", "cookies": false, "type": "", - "demo": "apps\/list-secrets.md", + "demo": "apps\/list-keys.md", "rate-limit": 120, "rate-time": 60, "rate-key": "ip:{ip},userId:{userId}", @@ -5313,19 +5380,19 @@ ] }, "post": { - "summary": "Create Secret", - "operationId": "appsCreateSecret", + "summary": "Create App Key", + "operationId": "appsCreateKey", "tags": [ "apps" ], - "description": "Create a new client secret for an application.", + "description": "Create a new app key for an application. App keys carry no scopes; send one in the `X-Appwrite-Key` header alongside the `X-Appwrite-App` header to list the application's installations and create installation access tokens.", "responses": { "201": { - "description": "AppSecretPlaintext", + "description": "AppKey", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/appSecretPlaintext" + "$ref": "#\/components\/schemas\/appKey" } } } @@ -5333,11 +5400,11 @@ }, "deprecated": false, "x-appwrite": { - "method": "createSecret", - "group": "secrets", + "method": "createKey", + "group": "keys", "cookies": false, "type": "", - "demo": "apps\/create-secret.md", + "demo": "apps\/create-key.md", "rate-limit": 60, "rate-time": 60, "rate-key": "ip:{ip},userId:{userId}", @@ -5374,21 +5441,21 @@ ] } }, - "\/apps\/{appId}\/secrets\/{secretId}": { + "\/apps\/{appId}\/keys\/{keyId}": { "get": { - "summary": "Get Secret", - "operationId": "appsGetSecret", + "summary": "Get App Key", + "operationId": "appsGetKey", "tags": [ "apps" ], - "description": "Get an application client secret by its unique ID.", + "description": "Get an app key by its unique ID.", "responses": { "200": { - "description": "AppSecret", + "description": "AppKey", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/appSecret" + "$ref": "#\/components\/schemas\/appKey" } } } @@ -5396,11 +5463,11 @@ }, "deprecated": false, "x-appwrite": { - "method": "getSecret", - "group": "secrets", + "method": "getKey", + "group": "keys", "cookies": false, "type": "", - "demo": "apps\/get-secret.md", + "demo": "apps\/get-key.md", "rate-limit": 120, "rate-time": 60, "rate-key": "ip:{ip},userId:{userId}", @@ -5435,24 +5502,24 @@ "in": "path" }, { - "name": "secretId", - "description": "Secret unique ID.", + "name": "keyId", + "description": "App key unique ID.", "required": true, "schema": { "type": "string", - "x-example": "" + "x-example": "" }, "in": "path" } ] }, "delete": { - "summary": "Delete Secret", - "operationId": "appsDeleteSecret", + "summary": "Delete App Key", + "operationId": "appsDeleteKey", "tags": [ "apps" ], - "description": "Delete an application client secret by its unique ID.", + "description": "Delete an app key by its unique ID.", "responses": { "204": { "description": "No content" @@ -5460,11 +5527,11 @@ }, "deprecated": false, "x-appwrite": { - "method": "deleteSecret", - "group": "secrets", + "method": "deleteKey", + "group": "keys", "cookies": false, "type": "", - "demo": "apps\/delete-secret.md", + "demo": "apps\/delete-key.md", "rate-limit": 60, "rate-time": 60, "rate-key": "ip:{ip},userId:{userId}", @@ -5502,33 +5569,33 @@ "in": "path" }, { - "name": "secretId", - "description": "Secret unique ID.", + "name": "keyId", + "description": "App key unique ID.", "required": true, "schema": { "type": "string", - "x-example": "" + "x-example": "" }, "in": "path" } ] } }, - "\/apps\/{appId}\/team": { - "patch": { - "summary": "Update Team", - "operationId": "appsUpdateTeam", + "\/apps\/{appId}\/secrets": { + "get": { + "summary": "List Secrets", + "operationId": "appsListSecrets", "tags": [ "apps" ], - "description": "Transfer an application to another team by its unique ID.", + "description": "List client secrets for an application.", "responses": { "200": { - "description": "App", + "description": "App secrets list", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/app" + "$ref": "#\/components\/schemas\/appSecretList" } } } @@ -5536,15 +5603,15 @@ }, "deprecated": false, "x-appwrite": { - "method": "updateTeam", - "group": "apps", + "method": "listSecrets", + "group": "secrets", "cookies": false, "type": "", - "demo": "apps\/update-team.md", - "rate-limit": 60, + "demo": "apps\/list-secrets.md", + "rate-limit": 120, "rate-time": 60, "rate-key": "ip:{ip},userId:{userId}", - "scope": "apps.write", + "scope": "apps.read", "platforms": [ "console", "client", @@ -5573,49 +5640,59 @@ "x-example": "" }, "in": "path" + }, + { + "name": "queries", + "description": "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.", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + }, + "default": [] + }, + "in": "query" + }, + { + "name": "total", + "description": "When set to false, the total count returned will be 0 and will not be calculated.", + "required": false, + "schema": { + "type": "boolean", + "x-example": false, + "default": true + }, + "in": "query" } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "teamId": { - "type": "string", - "description": "Team ID of the team to transfer application to.", - "x-example": "" - } - }, - "required": [ - "teamId" - ] - } - } - } - } - } - }, - "\/apps\/{appId}\/tokens": { - "delete": { - "summary": "Delete Tokens", - "operationId": "appsDeleteTokens", + ] + }, + "post": { + "summary": "Create Secret", + "operationId": "appsCreateSecret", "tags": [ "apps" ], - "description": "Revoke all tokens for an application by its unique ID.", + "description": "Create a new client secret for an application.", "responses": { - "204": { - "description": "No content" + "201": { + "description": "AppSecretPlaintext", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/appSecretPlaintext" + } + } + } } }, "deprecated": false, "x-appwrite": { - "method": "deleteTokens", - "group": "apps", + "method": "createSecret", + "group": "secrets", "cookies": false, "type": "", - "demo": "apps\/delete-tokens.md", + "demo": "apps\/create-secret.md", "rate-limit": 60, "rate-time": 60, "rate-key": "ip:{ip},userId:{userId}", @@ -5627,9 +5704,6 @@ ], "packaging": false, "public": true, - "produces": [ - "application\/json" - ], "auth": { "Project": [] } @@ -5655,22 +5729,21 @@ ] } }, - "\/avatars\/browsers\/{code}": { + "\/apps\/{appId}\/secrets\/{secretId}": { "get": { - "summary": "Get browser icon", - "operationId": "avatarsGetBrowser", + "summary": "Get Secret", + "operationId": "appsGetSecret", "tags": [ - "avatars" + "apps" ], - "description": "You can use this endpoint to show different browser icons to your users. The code argument receives the browser code as it appears in your user [GET \/account\/sessions](https:\/\/appwrite.io\/docs\/references\/cloud\/client-web\/account#getSessions) endpoint. Use width, height and quality arguments to change the output settings.\n\nWhen one dimension is specified and the other is 0, the image is scaled with preserved aspect ratio. If both dimensions are 0, the API provides an image at source quality. If dimensions are not specified, the default size of image returned is 100x100px.", + "description": "Get an application client secret by its unique ID.", "responses": { "200": { - "description": "Image", + "description": "AppSecret", "content": { - "image\/png": { + "application\/json": { "schema": { - "type": "string", - "format": "binary" + "$ref": "#\/components\/schemas\/appSecret" } } } @@ -5678,15 +5751,15 @@ }, "deprecated": false, "x-appwrite": { - "method": "getBrowser", - "group": null, + "method": "getSecret", + "group": "secrets", "cookies": false, - "type": "location", - "demo": "avatars\/get-browser.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "avatars.read", + "type": "", + "demo": "apps\/get-secret.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},userId:{userId}", + "scope": "apps.read", "platforms": [ "console", "client", @@ -5694,43 +5767,325 @@ ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-browser.md", "auth": { - "Project": [], - "ImpersonateUserId": [] + "Project": [] } }, "security": [ { "Project": [], "Session": [], - "JWT": [], - "ImpersonateUserId": [] + "JWT": [] } ], "parameters": [ { - "name": "code", - "description": "Browser Code.", + "name": "appId", + "description": "Application unique ID.", "required": true, "schema": { "type": "string", - "x-example": "aa", - "enum": [ - "aa", - "an", - "ch", - "ci", - "cm", - "cr", - "ff", - "sf", - "mf", - "ps", - "oi", - "om", - "op", - "on" + "x-example": "" + }, + "in": "path" + }, + { + "name": "secretId", + "description": "Secret unique ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + } + ] + }, + "delete": { + "summary": "Delete Secret", + "operationId": "appsDeleteSecret", + "tags": [ + "apps" + ], + "description": "Delete an application client secret by its unique ID.", + "responses": { + "204": { + "description": "No content" + } + }, + "deprecated": false, + "x-appwrite": { + "method": "deleteSecret", + "group": "secrets", + "cookies": false, + "type": "", + "demo": "apps\/delete-secret.md", + "rate-limit": 60, + "rate-time": 60, + "rate-key": "ip:{ip},userId:{userId}", + "scope": "apps.write", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "produces": [ + "application\/json" + ], + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "appId", + "description": "Application unique ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "secretId", + "description": "Secret unique ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + } + ] + } + }, + "\/apps\/{appId}\/team": { + "patch": { + "summary": "Update Team", + "operationId": "appsUpdateTeam", + "tags": [ + "apps" + ], + "description": "Transfer an application to another team by its unique ID.", + "responses": { + "200": { + "description": "App", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/app" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateTeam", + "group": "apps", + "cookies": false, + "type": "", + "demo": "apps\/update-team.md", + "rate-limit": 60, + "rate-time": 60, + "rate-key": "ip:{ip},userId:{userId}", + "scope": "apps.write", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "appId", + "description": "Application unique ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "teamId": { + "type": "string", + "description": "Team ID of the team to transfer application to.", + "x-example": "" + } + }, + "required": [ + "teamId" + ] + } + } + } + } + } + }, + "\/apps\/{appId}\/tokens": { + "delete": { + "summary": "Delete Tokens", + "operationId": "appsDeleteTokens", + "tags": [ + "apps" + ], + "description": "Revoke all tokens for an application by its unique ID.", + "responses": { + "204": { + "description": "No content" + } + }, + "deprecated": false, + "x-appwrite": { + "method": "deleteTokens", + "group": "apps", + "cookies": false, + "type": "", + "demo": "apps\/delete-tokens.md", + "rate-limit": 60, + "rate-time": 60, + "rate-key": "ip:{ip},userId:{userId}", + "scope": "apps.write", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "produces": [ + "application\/json" + ], + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "appId", + "description": "Application unique ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + } + ] + } + }, + "\/avatars\/browsers\/{code}": { + "get": { + "summary": "Get browser icon", + "operationId": "avatarsGetBrowser", + "tags": [ + "avatars" + ], + "description": "You can use this endpoint to show different browser icons to your users. The code argument receives the browser code as it appears in your user [GET \/account\/sessions](https:\/\/appwrite.io\/docs\/references\/cloud\/client-web\/account#getSessions) endpoint. Use width, height and quality arguments to change the output settings.\n\nWhen one dimension is specified and the other is 0, the image is scaled with preserved aspect ratio. If both dimensions are 0, the API provides an image at source quality. If dimensions are not specified, the default size of image returned is 100x100px.", + "responses": { + "200": { + "description": "Image", + "content": { + "image\/png": { + "schema": { + "type": "string", + "format": "binary" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "getBrowser", + "group": null, + "cookies": false, + "type": "location", + "demo": "avatars\/get-browser.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "avatars.read", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/avatars\/get-browser.md", + "auth": { + "Project": [], + "ImpersonateUserId": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [], + "ImpersonateUserId": [] + } + ], + "parameters": [ + { + "name": "code", + "description": "Browser Code.", + "required": true, + "schema": { + "type": "string", + "x-example": "aa", + "enum": [ + "aa", + "an", + "ch", + "ci", + "cm", + "cr", + "ff", + "sf", + "mf", + "ps", + "oi", + "om", + "op", + "on" ], "x-enum-name": "Browser", "x-enum-keys": [ @@ -13522,7 +13877,356 @@ } } } - } + } + } + }, + "\/organization\/installations": { + "get": { + "summary": "List Installations", + "operationId": "organizationListInstallations", + "tags": [ + "organization" + ], + "description": "List app installations on the organization. Any organization member can read installations.", + "responses": { + "200": { + "description": "App installations list", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/appInstallationList" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "listInstallations", + "group": "installations", + "cookies": false, + "type": "", + "demo": "organization\/list-installations.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},userId:{userId}", + "scope": "organization.installations.read", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "queries", + "description": "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.", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + }, + "default": [] + }, + "in": "query" + }, + { + "name": "total", + "description": "When set to false, the total count returned will be 0 and will not be calculated.", + "required": false, + "schema": { + "type": "boolean", + "x-example": false, + "default": true + }, + "in": "query" + } + ] + }, + "post": { + "summary": "Create Installation", + "operationId": "organizationCreateInstallation", + "tags": [ + "organization" + ], + "description": "Install an app on the organization. Only organization members with the owner role can install apps. The installation is granted the scopes the app currently requests.", + "responses": { + "201": { + "description": "AppInstallation", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/appInstallation" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createInstallation", + "group": "installations", + "cookies": false, + "type": "", + "demo": "organization\/create-installation.md", + "rate-limit": 60, + "rate-time": 60, + "rate-key": "ip:{ip},userId:{userId}", + "scope": "organization.installations.write", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "appId": { + "type": "string", + "description": "Application unique ID.", + "x-example": "" + }, + "authorizationDetails": { + "type": "string", + "description": "Authorization details granted to the installation as a JSON array of objects, each with a `type` and app-defined fields. The Appwrite Console stores authorized project IDs here.", + "default": "", + "x-example": "" + } + }, + "required": [ + "appId" + ] + } + } + } + } + } + }, + "\/organization\/installations\/{installationId}": { + "get": { + "summary": "Get Installation", + "operationId": "organizationGetInstallation", + "tags": [ + "organization" + ], + "description": "Get an app installation on the organization by its unique ID. Any organization member can read installations.", + "responses": { + "200": { + "description": "AppInstallation", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/appInstallation" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "getInstallation", + "group": "installations", + "cookies": false, + "type": "", + "demo": "organization\/get-installation.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},userId:{userId}", + "scope": "organization.installations.read", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "installationId", + "description": "Installation unique ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + } + ] + }, + "put": { + "summary": "Update Installation", + "operationId": "organizationUpdateInstallation", + "tags": [ + "organization" + ], + "description": "Update an app installation on the organization. Only organization members with the owner role can update installations. The installation's granted scopes are refreshed to the scopes the app currently requests; previously issued installation access tokens are revoked.", + "responses": { + "200": { + "description": "AppInstallation", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/appInstallation" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateInstallation", + "group": "installations", + "cookies": false, + "type": "", + "demo": "organization\/update-installation.md", + "rate-limit": 60, + "rate-time": 60, + "rate-key": "ip:{ip},userId:{userId}", + "scope": "organization.installations.write", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "installationId", + "description": "Installation unique ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "authorizationDetails": { + "type": "string", + "description": "Authorization details granted to the installation as a JSON array of objects, each with a `type` and app-defined fields. Omit to keep the current value.", + "x-example": "", + "x-nullable": true + } + } + } + } + } + } + }, + "delete": { + "summary": "Delete Installation", + "operationId": "organizationDeleteInstallation", + "tags": [ + "organization" + ], + "description": "Uninstall an app from the organization by its installation ID. Only organization members with the owner role can remove installations. Previously issued installation access tokens are revoked.", + "responses": { + "204": { + "description": "No content" + } + }, + "deprecated": false, + "x-appwrite": { + "method": "deleteInstallation", + "group": "installations", + "cookies": false, + "type": "", + "demo": "organization\/delete-installation.md", + "rate-limit": 60, + "rate-time": 60, + "rate-key": "ip:{ip},userId:{userId}", + "scope": "organization.installations.write", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "produces": [ + "application\/json" + ], + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "installationId", + "description": "Installation unique ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + } + ] } }, "\/ping": { @@ -15316,9 +16020,250 @@ "server", "client" ], - "packaging": false, - "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/create-operations.md", + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/create-operations.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "transactionId", + "description": "Transaction ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "operations": { + "type": "array", + "description": "Array of staged operations.", + "default": [], + "x-example": "[\n\t {\n\t \"action\": \"create\",\n\t \"databaseId\": \"\",\n\t \"tableId\": \"\",\n\t \"rowId\": \"\",\n\t \"data\": {\n\t \"name\": \"Walter O'Brien\"\n\t }\n\t }\n\t]", + "items": { + "type": "object" + } + } + } + } + } + } + } + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/rows": { + "get": { + "summary": "List rows", + "operationId": "tablesDBListRows", + "tags": [ + "tablesDB" + ], + "description": "Get a list of all the user's rows in a given table. You can use the query params to filter your results.", + "responses": { + "200": { + "description": "Rows List", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/rowList" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "listRows", + "group": "rows", + "cookies": false, + "type": "", + "demo": "tablesdb\/list-rows.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "rows.read", + "documents.read" + ], + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/list-rows.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID. You can create a new table using the TablesDB service [server integration](https:\/\/appwrite.io\/docs\/products\/databases\/tables#create-table).", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "queries", + "description": "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.", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + }, + "default": [] + }, + "in": "query" + }, + { + "name": "transactionId", + "description": "Transaction ID to read uncommitted changes within the transaction.", + "required": false, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "query" + }, + { + "name": "total", + "description": "When set to false, the total count returned will be 0 and will not be calculated.", + "required": false, + "schema": { + "type": "boolean", + "x-example": false, + "default": true + }, + "in": "query" + }, + { + "name": "ttl", + "description": "TTL (seconds) for caching list responses. Responses are stored in an in-memory key-value cache, keyed per project, table, schema version (columns and indexes), caller authorization roles, and the exact query \u2014 so users with different permissions never share cached entries. Schema changes invalidate cached entries automatically; row writes do not, so choose a TTL you are comfortable serving as stale data. Set to 0 to disable caching. Must be between 0 and 86400 (24 hours).", + "required": false, + "schema": { + "type": "integer", + "format": "int32", + "x-example": 0, + "default": 0 + }, + "in": "query" + } + ] + }, + "post": { + "summary": "Create row", + "operationId": "tablesDBCreateRow", + "tags": [ + "tablesDB" + ], + "description": "Create a new Row. Before using this route, you should create a new table resource using either a [server integration](https:\/\/appwrite.io\/docs\/references\/cloud\/server-dart\/tablesDB#createTable) API or directly from your database console.", + "responses": { + "201": { + "description": "Row", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/row" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createRow", + "group": "rows", + "cookies": false, + "type": "", + "demo": "tablesdb\/create-row.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": [ + "rows.write", + "documents.write" + ], + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/create-row.md", + "methods": [ + { + "name": "createRow", + "namespace": "tablesDB", + "desc": "Create row", + "auth": { + "Project": [] + }, + "parameters": [ + "databaseId", + "tableId", + "rowId", + "data", + "permissions", + "transactionId" + ], + "required": [ + "databaseId", + "tableId", + "rowId", + "data" + ], + "responses": [ + { + "code": 201, + "model": "#\/components\/schemas\/row" + } + ], + "description": "Create a new Row. Before using this route, you should create a new table resource using either a [server integration](https:\/\/appwrite.io\/docs\/references\/cloud\/server-dart\/tablesDB#createTable) API or directly from your database console.", + "demo": "tablesdb\/create-row.md", + "public": true + } + ], "auth": { "Project": [] } @@ -15332,12 +16277,22 @@ ], "parameters": [ { - "name": "transactionId", - "description": "Transaction ID.", + "name": "databaseId", + "description": "Database ID.", "required": true, "schema": { "type": "string", - "x-example": "" + "x-example": "" + }, + "in": "path" + }, + { + "name": "tableId", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/references\/cloud\/server-dart\/tablesDB#createTable). Make sure to define columns before creating rows.", + "required": true, + "schema": { + "type": "string", + "x-example": "" }, "in": "path" } @@ -15348,37 +16303,70 @@ "schema": { "type": "object", "properties": { - "operations": { + "rowId": { + "type": "string", + "description": "Row ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", + "x-example": "", + "x-appwrite": { + "idGenerator": "ID.unique" + } + }, + "data": { + "type": "object", + "description": "Row data as JSON object.", + "default": {}, + "x-example": "{\"username\":\"walter.obrien\",\"email\":\"walter.obrien@example.com\",\"fullName\":\"Walter O'Brien\",\"age\":30,\"isAdmin\":false}" + }, + "permissions": { "type": "array", - "description": "Array of staged operations.", + "description": "An array of permissions strings. By default, only the current user is granted all permissions. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "x-example": "[\"read(\"any\")\"]", + "items": { + "type": "string" + }, + "x-nullable": true + }, + "rows": { + "type": "array", + "description": "Array of rows data as JSON objects.", "default": [], - "x-example": "[\n\t {\n\t \"action\": \"create\",\n\t \"databaseId\": \"\",\n\t \"tableId\": \"\",\n\t \"rowId\": \"\",\n\t \"data\": {\n\t \"name\": \"Walter O'Brien\"\n\t }\n\t }\n\t]", + "x-example": null, "items": { "type": "object" } + }, + "transactionId": { + "type": "string", + "description": "Transaction ID for staging the operation.", + "x-example": "", + "x-nullable": true } - } + }, + "required": [ + "rowId", + "data" + ] } } } } } }, - "\/tablesdb\/{databaseId}\/tables\/{tableId}\/rows": { + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/rows\/{rowId}": { "get": { - "summary": "List rows", - "operationId": "tablesDBListRows", + "summary": "Get row", + "operationId": "tablesDBGetRow", "tags": [ "tablesDB" ], - "description": "Get a list of all the user's rows in a given table. You can use the query params to filter your results.", + "description": "Get a row by its unique ID. This endpoint response returns a JSON object with the row data.", "responses": { "200": { - "description": "Rows List", + "description": "Row", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/rowList" + "$ref": "#\/components\/schemas\/row" } } } @@ -15386,11 +16374,11 @@ }, "deprecated": false, "x-appwrite": { - "method": "listRows", + "method": "getRow", "group": "rows", "cookies": false, "type": "", - "demo": "tablesdb\/list-rows.md", + "demo": "tablesdb\/get-row.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -15405,7 +16393,7 @@ ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/list-rows.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/get-row.md", "auth": { "Project": [] } @@ -15430,7 +16418,7 @@ }, { "name": "tableId", - "description": "Table ID. You can create a new table using the TablesDB service [server integration](https:\/\/appwrite.io\/docs\/products\/databases\/tables#create-table).", + "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/references\/cloud\/server-dart\/tablesDB#createTable).", "required": true, "schema": { "type": "string", @@ -15438,6 +16426,16 @@ }, "in": "path" }, + { + "name": "rowId", + "description": "Row ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, { "name": "queries", "description": "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.", @@ -15460,41 +16458,167 @@ "x-example": "" }, "in": "query" + } + ] + }, + "put": { + "summary": "Upsert a row", + "operationId": "tablesDBUpsertRow", + "tags": [ + "tablesDB" + ], + "description": "Create or update a Row. Before using this route, you should create a new table resource using either a [server integration](https:\/\/appwrite.io\/docs\/references\/cloud\/server-dart\/tablesDB#createTable) API or directly from your database console.", + "responses": { + "201": { + "description": "Row", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/row" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "upsertRow", + "group": "rows", + "cookies": false, + "type": "", + "demo": "tablesdb\/upsert-row.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": [ + "rows.write", + "documents.write" + ], + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/upsert-row.md", + "methods": [ + { + "name": "upsertRow", + "namespace": "tablesDB", + "desc": "", + "auth": { + "Project": [] + }, + "parameters": [ + "databaseId", + "tableId", + "rowId", + "data", + "permissions", + "transactionId" + ], + "required": [ + "databaseId", + "tableId", + "rowId" + ], + "responses": [ + { + "code": 201, + "model": "#\/components\/schemas\/row" + } + ], + "description": "Create or update a Row. Before using this route, you should create a new table resource using either a [server integration](https:\/\/appwrite.io\/docs\/references\/cloud\/server-dart\/tablesDB#createTable) API or directly from your database console.", + "demo": "tablesdb\/upsert-row.md", + "public": true + } + ], + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" }, { - "name": "total", - "description": "When set to false, the total count returned will be 0 and will not be calculated.", - "required": false, + "name": "tableId", + "description": "Table ID.", + "required": true, "schema": { - "type": "boolean", - "x-example": false, - "default": true + "type": "string", + "x-example": "" }, - "in": "query" + "in": "path" }, { - "name": "ttl", - "description": "TTL (seconds) for caching list responses. Responses are stored in an in-memory key-value cache, keyed per project, table, schema version (columns and indexes), caller authorization roles, and the exact query \u2014 so users with different permissions never share cached entries. Schema changes invalidate cached entries automatically; row writes do not, so choose a TTL you are comfortable serving as stale data. Set to 0 to disable caching. Must be between 0 and 86400 (24 hours).", - "required": false, + "name": "rowId", + "description": "Row ID.", + "required": true, "schema": { - "type": "integer", - "format": "int32", - "x-example": 0, - "default": 0 + "type": "string", + "x-example": "" }, - "in": "query" + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "data": { + "type": "object", + "description": "Row data as JSON object. Include all required columns of the row to be created or updated.", + "default": [], + "x-example": "{\"username\":\"walter.obrien\",\"email\":\"walter.obrien@example.com\",\"fullName\":\"Walter O'Brien\",\"age\":33,\"isAdmin\":false}" + }, + "permissions": { + "type": "array", + "description": "An array of permissions strings. By default, the current permissions are inherited. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "x-example": "[\"read(\"any\")\"]", + "items": { + "type": "string" + }, + "x-nullable": true + }, + "transactionId": { + "type": "string", + "description": "Transaction ID for staging the operation.", + "x-example": "", + "x-nullable": true + } + } + } + } } - ] + } }, - "post": { - "summary": "Create row", - "operationId": "tablesDBCreateRow", + "patch": { + "summary": "Update row", + "operationId": "tablesDBUpdateRow", "tags": [ "tablesDB" ], - "description": "Create a new Row. Before using this route, you should create a new table resource using either a [server integration](https:\/\/appwrite.io\/docs\/references\/cloud\/server-dart\/tablesDB#createTable) API or directly from your database console.", + "description": "Update a row by its unique ID. Using the patch method you can pass only specific fields that will get updated.", "responses": { - "201": { + "200": { "description": "Row", "content": { "application\/json": { @@ -15507,11 +16631,11 @@ }, "deprecated": false, "x-appwrite": { - "method": "createRow", + "method": "updateRow", "group": "rows", "cookies": false, "type": "", - "demo": "tablesdb\/create-row.md", + "demo": "tablesdb\/update-row.md", "rate-limit": 120, "rate-time": 60, "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", @@ -15526,40 +16650,7 @@ ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/create-row.md", - "methods": [ - { - "name": "createRow", - "namespace": "tablesDB", - "desc": "Create row", - "auth": { - "Project": [] - }, - "parameters": [ - "databaseId", - "tableId", - "rowId", - "data", - "permissions", - "transactionId" - ], - "required": [ - "databaseId", - "tableId", - "rowId", - "data" - ], - "responses": [ - { - "code": 201, - "model": "#\/components\/schemas\/row" - } - ], - "description": "Create a new Row. Before using this route, you should create a new table resource using either a [server integration](https:\/\/appwrite.io\/docs\/references\/cloud\/server-dart\/tablesDB#createTable) API or directly from your database console.", - "demo": "tablesdb\/create-row.md", - "public": true - } - ], + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/update-row.md", "auth": { "Project": [] } @@ -15584,13 +16675,23 @@ }, { "name": "tableId", - "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/references\/cloud\/server-dart\/tablesDB#createTable). Make sure to define columns before creating rows.", + "description": "Table ID.", "required": true, "schema": { "type": "string", "x-example": "" }, "in": "path" + }, + { + "name": "rowId", + "description": "Row ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" } ], "requestBody": { @@ -15599,88 +16700,58 @@ "schema": { "type": "object", "properties": { - "rowId": { - "type": "string", - "description": "Row ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", - "x-example": "", - "x-appwrite": { - "idGenerator": "ID.unique" - } - }, "data": { "type": "object", - "description": "Row data as JSON object.", - "default": {}, - "x-example": "{\"username\":\"walter.obrien\",\"email\":\"walter.obrien@example.com\",\"fullName\":\"Walter O'Brien\",\"age\":30,\"isAdmin\":false}" + "description": "Row data as JSON object. Include only columns and value pairs to be updated.", + "default": [], + "x-example": "{\"username\":\"walter.obrien\",\"email\":\"walter.obrien@example.com\",\"fullName\":\"Walter O'Brien\",\"age\":33,\"isAdmin\":false}" }, "permissions": { "type": "array", - "description": "An array of permissions strings. By default, only the current user is granted all permissions. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "description": "An array of permissions strings. By default, the current permissions are inherited. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", "x-example": "[\"read(\"any\")\"]", "items": { "type": "string" }, "x-nullable": true }, - "rows": { - "type": "array", - "description": "Array of rows data as JSON objects.", - "default": [], - "x-example": null, - "items": { - "type": "object" - } - }, "transactionId": { "type": "string", "description": "Transaction ID for staging the operation.", "x-example": "", "x-nullable": true } - }, - "required": [ - "rowId", - "data" - ] + } } } } } - } - }, - "\/tablesdb\/{databaseId}\/tables\/{tableId}\/rows\/{rowId}": { - "get": { - "summary": "Get row", - "operationId": "tablesDBGetRow", + }, + "delete": { + "summary": "Delete row", + "operationId": "tablesDBDeleteRow", "tags": [ "tablesDB" ], - "description": "Get a row by its unique ID. This endpoint response returns a JSON object with the row data.", + "description": "Delete a row by its unique ID.", "responses": { - "200": { - "description": "Row", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/row" - } - } - } + "204": { + "description": "No content" } }, "deprecated": false, "x-appwrite": { - "method": "getRow", + "method": "deleteRow", "group": "rows", "cookies": false, "type": "", - "demo": "tablesdb\/get-row.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", + "demo": "tablesdb\/delete-row.md", + "rate-limit": 60, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", "scope": [ - "rows.read", - "documents.read" + "rows.write", + "documents.write" ], "platforms": [ "console", @@ -15689,7 +16760,7 @@ ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/get-row.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/delete-row.md", "auth": { "Project": [] } @@ -15732,22 +16803,9 @@ }, "in": "path" }, - { - "name": "queries", - "description": "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.", - "required": false, - "schema": { - "type": "array", - "items": { - "type": "string" - }, - "default": [] - }, - "in": "query" - }, { "name": "transactionId", - "description": "Transaction ID to read uncommitted changes within the transaction.", + "description": "Transaction ID for staging the operation.", "required": false, "schema": { "type": "string", @@ -15756,16 +16814,18 @@ "in": "query" } ] - }, - "put": { - "summary": "Upsert a row", - "operationId": "tablesDBUpsertRow", + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/rows\/{rowId}\/{column}\/decrement": { + "patch": { + "summary": "Decrement row column", + "operationId": "tablesDBDecrementRowColumn", "tags": [ "tablesDB" ], - "description": "Create or update a Row. Before using this route, you should create a new table resource using either a [server integration](https:\/\/appwrite.io\/docs\/references\/cloud\/server-dart\/tablesDB#createTable) API or directly from your database console.", + "description": "Decrement a specific column of a row by a given value.", "responses": { - "201": { + "200": { "description": "Row", "content": { "application\/json": { @@ -15778,11 +16838,11 @@ }, "deprecated": false, "x-appwrite": { - "method": "upsertRow", + "method": "decrementRowColumn", "group": "rows", "cookies": false, "type": "", - "demo": "tablesdb\/upsert-row.md", + "demo": "tablesdb\/decrement-row-column.md", "rate-limit": 120, "rate-time": 60, "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", @@ -15791,45 +16851,13 @@ "documents.write" ], "platforms": [ - "console", "client", - "server" + "server", + "console" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/upsert-row.md", - "methods": [ - { - "name": "upsertRow", - "namespace": "tablesDB", - "desc": "", - "auth": { - "Project": [] - }, - "parameters": [ - "databaseId", - "tableId", - "rowId", - "data", - "permissions", - "transactionId" - ], - "required": [ - "databaseId", - "tableId", - "rowId" - ], - "responses": [ - { - "code": 201, - "model": "#\/components\/schemas\/row" - } - ], - "description": "Create or update a Row. Before using this route, you should create a new table resource using either a [server integration](https:\/\/appwrite.io\/docs\/references\/cloud\/server-dart\/tablesDB#createTable) API or directly from your database console.", - "demo": "tablesdb\/upsert-row.md", - "public": true - } - ], + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/decrement-row-column.md", "auth": { "Project": [] } @@ -15871,6 +16899,15 @@ "x-example": "" }, "in": "path" + }, + { + "name": "column", + "description": "Column key.", + "required": true, + "schema": { + "type": "string" + }, + "in": "path" } ], "requestBody": { @@ -15879,19 +16916,18 @@ "schema": { "type": "object", "properties": { - "data": { - "type": "object", - "description": "Row data as JSON object. Include all required columns of the row to be created or updated.", - "default": [], - "x-example": "{\"username\":\"walter.obrien\",\"email\":\"walter.obrien@example.com\",\"fullName\":\"Walter O'Brien\",\"age\":33,\"isAdmin\":false}" + "value": { + "type": "number", + "description": "Value to increment the column by. The value must be a number.", + "default": 1, + "x-example": null, + "format": "float" }, - "permissions": { - "type": "array", - "description": "An array of permissions strings. By default, the current permissions are inherited. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", - "x-example": "[\"read(\"any\")\"]", - "items": { - "type": "string" - }, + "min": { + "type": "number", + "description": "Minimum value for the column. If the current value is lesser than this value, an exception will be thrown.", + "x-example": null, + "format": "float", "x-nullable": true }, "transactionId": { @@ -15905,14 +16941,16 @@ } } } - }, + } + }, + "\/tablesdb\/{databaseId}\/tables\/{tableId}\/rows\/{rowId}\/{column}\/increment": { "patch": { - "summary": "Update row", - "operationId": "tablesDBUpdateRow", + "summary": "Increment row column", + "operationId": "tablesDBIncrementRowColumn", "tags": [ "tablesDB" ], - "description": "Update a row by its unique ID. Using the patch method you can pass only specific fields that will get updated.", + "description": "Increment a specific column of a row by a given value.", "responses": { "200": { "description": "Row", @@ -15927,11 +16965,11 @@ }, "deprecated": false, "x-appwrite": { - "method": "updateRow", + "method": "incrementRowColumn", "group": "rows", "cookies": false, "type": "", - "demo": "tablesdb\/update-row.md", + "demo": "tablesdb\/increment-row-column.md", "rate-limit": 120, "rate-time": 60, "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", @@ -15940,13 +16978,13 @@ "documents.write" ], "platforms": [ - "console", "client", - "server" + "server", + "console" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/update-row.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/increment-row-column.md", "auth": { "Project": [] } @@ -15988,6 +17026,15 @@ "x-example": "" }, "in": "path" + }, + { + "name": "column", + "description": "Column key.", + "required": true, + "schema": { + "type": "string" + }, + "in": "path" } ], "requestBody": { @@ -15996,19 +17043,18 @@ "schema": { "type": "object", "properties": { - "data": { - "type": "object", - "description": "Row data as JSON object. Include only columns and value pairs to be updated.", - "default": [], - "x-example": "{\"username\":\"walter.obrien\",\"email\":\"walter.obrien@example.com\",\"fullName\":\"Walter O'Brien\",\"age\":33,\"isAdmin\":false}" + "value": { + "type": "number", + "description": "Value to increment the column by. The value must be a number.", + "default": 1, + "x-example": null, + "format": "float" }, - "permissions": { - "type": "array", - "description": "An array of permissions strings. By default, the current permissions are inherited. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", - "x-example": "[\"read(\"any\")\"]", - "items": { - "type": "string" - }, + "max": { + "type": "number", + "description": "Maximum value for the column. If the current value is greater than this value, an error will be thrown.", + "x-example": null, + "format": "float", "x-nullable": true }, "transactionId": { @@ -16022,33 +17068,39 @@ } } } - }, - "delete": { - "summary": "Delete row", - "operationId": "tablesDBDeleteRow", + } + }, + "\/teams": { + "get": { + "summary": "List teams", + "operationId": "teamsList", "tags": [ - "tablesDB" + "teams" ], - "description": "Delete a row by its unique ID.", + "description": "Get a list of all the teams in which the current user is a member. You can use the parameters to filter your results.", "responses": { - "204": { - "description": "No content" + "200": { + "description": "Teams List", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/teamList" + } + } + } } }, "deprecated": false, "x-appwrite": { - "method": "deleteRow", - "group": "rows", + "method": "list", + "group": "teams", "cookies": false, "type": "", - "demo": "tablesdb\/delete-row.md", - "rate-limit": 60, - "rate-time": 60, - "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": [ - "rows.write", - "documents.write" - ], + "demo": "teams\/list.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "teams.read", "platforms": [ "console", "client", @@ -16056,7 +17108,7 @@ ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/delete-row.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/list-teams.md", "auth": { "Project": [] } @@ -16070,63 +17122,209 @@ ], "parameters": [ { - "name": "databaseId", - "description": "Database ID.", - "required": true, + "name": "queries", + "description": "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: name, total, billingPlan", + "required": false, "schema": { - "type": "string", - "x-example": "" + "type": "array", + "items": { + "type": "string" + }, + "default": [] }, - "in": "path" + "in": "query" }, { - "name": "tableId", - "description": "Table ID. You can create a new table using the Database service [server integration](https:\/\/appwrite.io\/docs\/references\/cloud\/server-dart\/tablesDB#createTable).", - "required": true, + "name": "search", + "description": "Search term to filter your list results. Max length: 256 chars.", + "required": false, "schema": { "type": "string", - "x-example": "" + "x-example": "", + "default": "" }, - "in": "path" + "in": "query" }, { - "name": "rowId", - "description": "Row ID.", + "name": "total", + "description": "When set to false, the total count returned will be 0 and will not be calculated.", + "required": false, + "schema": { + "type": "boolean", + "x-example": false, + "default": true + }, + "in": "query" + } + ] + }, + "post": { + "summary": "Create team", + "operationId": "teamsCreate", + "tags": [ + "teams" + ], + "description": "Create a new team. The user who creates the team will automatically be assigned as the owner of the team. Only the users with the owner role can invite new members, add new owners and delete or update the team.", + "responses": { + "201": { + "description": "Team", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/team" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "create", + "group": "teams", + "cookies": false, + "type": "", + "demo": "teams\/create.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "teams.write", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/create-team.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "teamId": { + "type": "string", + "description": "Team ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", + "x-example": "", + "x-appwrite": { + "idGenerator": "ID.unique" + } + }, + "name": { + "type": "string", + "description": "Team name. Max length: 128 chars.", + "x-example": "" + }, + "roles": { + "type": "array", + "description": "Array of strings. Use this param to set the roles in the team for the user who created it. The default role is **owner**. A role can be any string. Learn more about [roles and permissions](https:\/\/appwrite.io\/docs\/permissions). Maximum of 100 roles are allowed, each 32 characters long.", + "default": [ + "owner" + ], + "x-example": null, + "items": { + "type": "string" + } + } + }, + "required": [ + "teamId", + "name" + ] + } + } + } + } + } + }, + "\/teams\/{teamId}": { + "get": { + "summary": "Get team", + "operationId": "teamsGet", + "tags": [ + "teams" + ], + "description": "Get a team by its ID. All team members have read access for this resource.", + "responses": { + "200": { + "description": "Team", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/team" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "get", + "group": "teams", + "cookies": false, + "type": "", + "demo": "teams\/get.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "teams.read", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/get-team.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "teamId", + "description": "Team ID.", "required": true, "schema": { "type": "string", - "x-example": "" + "x-example": "" }, "in": "path" - }, - { - "name": "transactionId", - "description": "Transaction ID for staging the operation.", - "required": false, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "query" } ] - } - }, - "\/tablesdb\/{databaseId}\/tables\/{tableId}\/rows\/{rowId}\/{column}\/decrement": { - "patch": { - "summary": "Decrement row column", - "operationId": "tablesDBDecrementRowColumn", + }, + "put": { + "summary": "Update name", + "operationId": "teamsUpdateName", "tags": [ - "tablesDB" + "teams" ], - "description": "Decrement a specific column of a row by a given value.", + "description": "Update the team's name by its unique ID.", "responses": { "200": { - "description": "Row", + "description": "Team", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/row" + "$ref": "#\/components\/schemas\/team" } } } @@ -16134,26 +17332,23 @@ }, "deprecated": false, "x-appwrite": { - "method": "decrementRowColumn", - "group": "rows", + "method": "updateName", + "group": "teams", "cookies": false, "type": "", - "demo": "tablesdb\/decrement-row-column.md", - "rate-limit": 120, - "rate-time": 60, - "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": [ - "rows.write", - "documents.write" - ], + "demo": "teams\/update-name.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "teams.write", "platforms": [ + "console", "client", - "server", - "console" + "server" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/decrement-row-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/update-team-name.md", "auth": { "Project": [] } @@ -16167,41 +17362,12 @@ ], "parameters": [ { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" - }, - { - "name": "rowId", - "description": "Row ID.", + "name": "teamId", + "description": "Team ID.", "required": true, "schema": { "type": "string", - "x-example": "" - }, - "in": "path" - }, - { - "name": "column", - "description": "Column key.", - "required": true, - "schema": { - "type": "string" + "x-example": "" }, "in": "path" } @@ -16212,75 +17378,51 @@ "schema": { "type": "object", "properties": { - "value": { - "type": "number", - "description": "Value to increment the column by. The value must be a number.", - "default": 1, - "x-example": null, - "format": "float" - }, - "min": { - "type": "number", - "description": "Minimum value for the column. If the current value is lesser than this value, an exception will be thrown.", - "x-example": null, - "format": "float", - "x-nullable": true - }, - "transactionId": { + "name": { "type": "string", - "description": "Transaction ID for staging the operation.", - "x-example": "", - "x-nullable": true + "description": "New team name. Max length: 128 chars.", + "x-example": "" } - } + }, + "required": [ + "name" + ] } } } } - } - }, - "\/tablesdb\/{databaseId}\/tables\/{tableId}\/rows\/{rowId}\/{column}\/increment": { - "patch": { - "summary": "Increment row column", - "operationId": "tablesDBIncrementRowColumn", + }, + "delete": { + "summary": "Delete team", + "operationId": "teamsDelete", "tags": [ - "tablesDB" + "teams" ], - "description": "Increment a specific column of a row by a given value.", + "description": "Delete a team using its ID. Only team members with the owner role can delete the team.", "responses": { - "200": { - "description": "Row", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/row" - } - } - } + "204": { + "description": "No content" } }, "deprecated": false, "x-appwrite": { - "method": "incrementRowColumn", - "group": "rows", + "method": "delete", + "group": "teams", "cookies": false, "type": "", - "demo": "tablesdb\/increment-row-column.md", - "rate-limit": 120, - "rate-time": 60, - "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": [ - "rows.write", - "documents.write" - ], + "demo": "teams\/delete.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "teams.write", "platforms": [ + "console", "client", - "server", - "console" + "server" ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/tablesdb\/increment-row-column.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/delete-team.md", "auth": { "Project": [] } @@ -16294,93 +17436,33 @@ ], "parameters": [ { - "name": "databaseId", - "description": "Database ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" - }, - { - "name": "tableId", - "description": "Table ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" - }, - { - "name": "rowId", - "description": "Row ID.", + "name": "teamId", + "description": "Team ID.", "required": true, "schema": { "type": "string", - "x-example": "" - }, - "in": "path" - }, - { - "name": "column", - "description": "Column key.", - "required": true, - "schema": { - "type": "string" + "x-example": "" }, "in": "path" } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "value": { - "type": "number", - "description": "Value to increment the column by. The value must be a number.", - "default": 1, - "x-example": null, - "format": "float" - }, - "max": { - "type": "number", - "description": "Maximum value for the column. If the current value is greater than this value, an error will be thrown.", - "x-example": null, - "format": "float", - "x-nullable": true - }, - "transactionId": { - "type": "string", - "description": "Transaction ID for staging the operation.", - "x-example": "", - "x-nullable": true - } - } - } - } - } - } + ] } }, - "\/teams": { + "\/teams\/{teamId}\/installations": { "get": { - "summary": "List teams", - "operationId": "teamsList", + "summary": "List Installations", + "operationId": "teamsListInstallations", "tags": [ "teams" ], - "description": "Get a list of all the teams in which the current user is a member. You can use the parameters to filter your results.", + "description": "List app installations on a team. Any team member can read installations.", "responses": { "200": { - "description": "Teams List", + "description": "App installations list", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/teamList" + "$ref": "#\/components\/schemas\/appInstallationList" } } } @@ -16388,14 +17470,14 @@ }, "deprecated": false, "x-appwrite": { - "method": "list", - "group": "teams", + "method": "listInstallations", + "group": null, "cookies": false, - "type": "", - "demo": "teams\/list.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", + "type": "", + "demo": "teams\/list-installations.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},userId:{userId}", "scope": "teams.read", "platforms": [ "console", @@ -16404,7 +17486,6 @@ ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/list-teams.md", "auth": { "Project": [] } @@ -16417,9 +17498,19 @@ } ], "parameters": [ + { + "name": "teamId", + "description": "Team ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, { "name": "queries", - "description": "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: name, total, billingPlan", + "description": "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.", "required": false, "schema": { "type": "array", @@ -16430,17 +17521,6 @@ }, "in": "query" }, - { - "name": "search", - "description": "Search term to filter your list results. Max length: 256 chars.", - "required": false, - "schema": { - "type": "string", - "x-example": "", - "default": "" - }, - "in": "query" - }, { "name": "total", "description": "When set to false, the total count returned will be 0 and will not be calculated.", @@ -16455,19 +17535,19 @@ ] }, "post": { - "summary": "Create team", - "operationId": "teamsCreate", + "summary": "Create Installation", + "operationId": "teamsCreateInstallation", "tags": [ "teams" ], - "description": "Create a new team. The user who creates the team will automatically be assigned as the owner of the team. Only the users with the owner role can invite new members, add new owners and delete or update the team.", + "description": "Install an app on a team. When authenticated as a user, only team members with the owner role can install apps. Requests using an API key or in admin mode can install apps on any team. The installation is granted the scopes the app currently requests.", "responses": { "201": { - "description": "Team", + "description": "AppInstallation", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/team" + "$ref": "#\/components\/schemas\/appInstallation" } } } @@ -16475,14 +17555,14 @@ }, "deprecated": false, "x-appwrite": { - "method": "create", - "group": "teams", + "method": "createInstallation", + "group": null, "cookies": false, "type": "", - "demo": "teams\/create.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", + "demo": "teams\/create-installation.md", + "rate-limit": 60, + "rate-time": 60, + "rate-key": "ip:{ip},userId:{userId}", "scope": "teams.write", "platforms": [ "console", @@ -16491,7 +17571,6 @@ ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/create-team.md", "auth": { "Project": [] } @@ -16503,40 +17582,38 @@ "JWT": [] } ], + "parameters": [ + { + "name": "teamId", + "description": "Team ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + } + ], "requestBody": { "content": { "application\/json": { "schema": { "type": "object", "properties": { - "teamId": { + "appId": { "type": "string", - "description": "Team ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", - "x-example": "", - "x-appwrite": { - "idGenerator": "ID.unique" - } + "description": "Application unique ID.", + "x-example": "" }, - "name": { + "authorizationDetails": { "type": "string", - "description": "Team name. Max length: 128 chars.", - "x-example": "" - }, - "roles": { - "type": "array", - "description": "Array of strings. Use this param to set the roles in the team for the user who created it. The default role is **owner**. A role can be any string. Learn more about [roles and permissions](https:\/\/appwrite.io\/docs\/permissions). Maximum of 100 roles are allowed, each 32 characters long.", - "default": [ - "owner" - ], - "x-example": null, - "items": { - "type": "string" - } + "description": "Authorization details granted to the installation as a JSON array of objects, each with a `type` and app-defined fields. The Appwrite Console stores authorized project IDs here.", + "default": "", + "x-example": "" } }, "required": [ - "teamId", - "name" + "appId" ] } } @@ -16544,21 +17621,21 @@ } } }, - "\/teams\/{teamId}": { + "\/teams\/{teamId}\/installations\/{installationId}": { "get": { - "summary": "Get team", - "operationId": "teamsGet", + "summary": "Get Installation", + "operationId": "teamsGetInstallation", "tags": [ "teams" ], - "description": "Get a team by its ID. All team members have read access for this resource.", + "description": "Get an app installation on a team by its unique ID. Any team member can read installations.", "responses": { "200": { - "description": "Team", + "description": "AppInstallation", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/team" + "$ref": "#\/components\/schemas\/appInstallation" } } } @@ -16566,14 +17643,14 @@ }, "deprecated": false, "x-appwrite": { - "method": "get", - "group": "teams", + "method": "getInstallation", + "group": null, "cookies": false, "type": "", - "demo": "teams\/get.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", + "demo": "teams\/get-installation.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},userId:{userId}", "scope": "teams.read", "platforms": [ "console", @@ -16582,7 +17659,6 @@ ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/get-team.md", "auth": { "Project": [] } @@ -16604,23 +17680,33 @@ "x-example": "" }, "in": "path" + }, + { + "name": "installationId", + "description": "Installation unique ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" } ] }, "put": { - "summary": "Update name", - "operationId": "teamsUpdateName", + "summary": "Update Installation", + "operationId": "teamsUpdateInstallation", "tags": [ "teams" ], - "description": "Update the team's name by its unique ID.", + "description": "Update an app installation on a team. Only team members with the owner role can update installations. The installation's granted scopes are refreshed to the scopes the app currently requests; previously issued installation access tokens are revoked.", "responses": { "200": { - "description": "Team", + "description": "AppInstallation", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/team" + "$ref": "#\/components\/schemas\/appInstallation" } } } @@ -16628,14 +17714,14 @@ }, "deprecated": false, "x-appwrite": { - "method": "updateName", - "group": "teams", + "method": "updateInstallation", + "group": null, "cookies": false, "type": "", - "demo": "teams\/update-name.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", + "demo": "teams\/update-installation.md", + "rate-limit": 60, + "rate-time": 60, + "rate-key": "ip:{ip},userId:{userId}", "scope": "teams.write", "platforms": [ "console", @@ -16644,7 +17730,6 @@ ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/update-team-name.md", "auth": { "Project": [] } @@ -16666,6 +17751,16 @@ "x-example": "" }, "in": "path" + }, + { + "name": "installationId", + "description": "Installation unique ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" } ], "requestBody": { @@ -16674,27 +17769,25 @@ "schema": { "type": "object", "properties": { - "name": { + "authorizationDetails": { "type": "string", - "description": "New team name. Max length: 128 chars.", - "x-example": "" + "description": "Authorization details granted to the installation as a JSON array of objects, each with a `type` and app-defined fields. Omit to keep the current value.", + "x-example": "", + "x-nullable": true } - }, - "required": [ - "name" - ] + } } } } } }, "delete": { - "summary": "Delete team", - "operationId": "teamsDelete", + "summary": "Delete Installation", + "operationId": "teamsDeleteInstallation", "tags": [ "teams" ], - "description": "Delete a team using its ID. Only team members with the owner role can delete the team.", + "description": "Uninstall an app from a team by its installation ID. Only team members with the owner role can remove installations. Previously issued installation access tokens are revoked.", "responses": { "204": { "description": "No content" @@ -16702,14 +17795,14 @@ }, "deprecated": false, "x-appwrite": { - "method": "delete", - "group": "teams", + "method": "deleteInstallation", + "group": null, "cookies": false, "type": "", - "demo": "teams\/delete.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", + "demo": "teams\/delete-installation.md", + "rate-limit": 60, + "rate-time": 60, + "rate-key": "ip:{ip},userId:{userId}", "scope": "teams.write", "platforms": [ "console", @@ -16718,7 +17811,9 @@ ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/delete-team.md", + "produces": [ + "application\/json" + ], "auth": { "Project": [] } @@ -16740,6 +17835,16 @@ "x-example": "" }, "in": "path" + }, + { + "name": "installationId", + "description": "Installation unique ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" } ] } @@ -18136,6 +19241,118 @@ } } }, + "\/vectorsdb\/{databaseId}\/collections\/{collectionId}\/documents\/query": { + "post": { + "summary": "Create query", + "operationId": "vectorsDBCreateQuery", + "tags": [ + "vectorsDB" + ], + "description": "Get a list of all the user's documents in a given collection using a POST request. This behaves identically to the list documents endpoint but accepts the queries in the request body, allowing much larger `queries` arrays than can fit in a URL query string.\n", + "responses": { + "200": { + "description": "Documents List", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/documentList" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createQuery", + "group": "documents", + "cookies": false, + "type": "", + "demo": "vectorsdb\/create-query.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "documents.read", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/vectorsdb\/create-query.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "queries": { + "type": "array", + "description": "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.", + "default": [], + "x-example": null, + "items": { + "type": "string" + } + }, + "transactionId": { + "type": "string", + "description": "Transaction ID to read uncommitted changes within the transaction.", + "x-example": "" + }, + "total": { + "type": "boolean", + "description": "When set to false, the total count returned will be 0 and will not be calculated.", + "default": true, + "x-example": false + }, + "ttl": { + "type": "integer", + "description": "TTL (seconds) for cached responses when caching is enabled for select queries. Must be between 0 and 86400 (24 hours).", + "default": 0, + "x-example": 0, + "format": "int32" + } + } + } + } + } + } + } + }, "\/vectorsdb\/{databaseId}\/collections\/{collectionId}\/documents\/{documentId}": { "get": { "summary": "Get document", @@ -18589,10 +19806,18 @@ } }, "tags": [ + { + "name": "ping", + "description": "" + }, { "name": "account", "description": "The Account service allows you to authenticate and manage a user account." }, + { + "name": "locale", + "description": "The Locale service allows you to customize your app based on your users' location." + }, { "name": "avatars", "description": "The Avatars service aims to help you complete everyday tasks related to your app image, icons, and avatars." @@ -18602,28 +19827,60 @@ "description": "The Databases service allows you to create structured collections of documents, query and filter lists of documents" }, { - "name": "tablesdb", + "name": "tablesDB", "description": "The TablesDB service allows you to create structured tables of columns, query and filter lists of rows" }, { - "name": "locale", - "description": "The Locale service allows you to customize your app based on your users' location." + "name": "documentsDB", + "description": "" }, { - "name": "projects", - "description": "The Project service allows you to manage all the projects in your Appwrite server." + "name": "vectorsDB", + "description": "" }, { - "name": "project", - "description": "The Project service allows you to manage all the projects in your Appwrite server." + "name": "presences", + "description": "The Presences service allows you to track and manage real-time user presence in your project." + }, + { + "name": "teams", + "description": "The Teams service allows you to group users of your project and to enable them to share read and write access to your project resources" }, { "name": "storage", "description": "The Storage service allows you to manage your project files." }, { - "name": "teams", - "description": "The Teams service allows you to group users of your project and to enable them to share read and write access to your project resources" + "name": "functions", + "description": "The Functions Service allows you view, create and manage your Cloud Functions." + }, + { + "name": "apps", + "description": "" + }, + { + "name": "oauth2", + "description": "The OAuth2 service allows you to authorize apps and issue standards-based OAuth2 and OpenID Connect tokens." + }, + { + "name": "organization", + "description": "The Organization service allows you to manage organization-level projects." + }, + { + "name": "graphql", + "description": "The GraphQL API allows you to query and mutate your Appwrite server using GraphQL." + }, + { + "name": "messaging", + "description": "The Messaging service allows you to send messages to any provider type (SMTP, push notification, SMS, etc.)." + }, + { + "name": "projects", + "description": "The Project service allows you to manage all the projects in your Appwrite server." + }, + { + "name": "project", + "description": "The Project service allows you to manage all the projects in your Appwrite server." }, { "name": "users", @@ -18633,18 +19890,10 @@ "name": "sites", "description": "The Sites Service allows you view, create and manage your web applications." }, - { - "name": "functions", - "description": "The Functions Service allows you view, create and manage your Cloud Functions." - }, { "name": "proxy", "description": "The Proxy Service allows you to configure actions for your domains beyond DNS configuration." }, - { - "name": "graphql", - "description": "The GraphQL API allows you to query and mutate your Appwrite server using GraphQL." - }, { "name": "console", "description": "The Console service allows you to interact with console relevant information." @@ -18652,14 +19901,6 @@ { "name": "migrations", "description": "The Migrations service allows you to migrate third-party data to your Appwrite project." - }, - { - "name": "messaging", - "description": "The Messaging service allows you to send messages to any provider type (SMTP, push notification, SMS, etc.)." - }, - { - "name": "oauth2", - "description": "The OAuth2 service allows you to authorize apps and issue standards-based OAuth2 and OpenID Connect tokens." } ], "components": { @@ -21705,6 +22946,21 @@ "description": "ID of user who owns the application, if owned by user. Otherwise, team ID will be used.", "x-example": "5e5ea5c16897e" }, + "installationScopes": { + "type": "array", + "description": "Scopes the application requests when installed on a team. Organization-level and project-level scopes only.", + "items": { + "type": "string" + }, + "x-example": [ + "organization:organization.read" + ] + }, + "installationRedirectUrl": { + "type": "string", + "description": "URL users are redirected to after creating or updating an installation of this application. Empty for no redirect.", + "x-example": "https:\/\/example.com\/setup" + }, "secrets": { "type": "array", "description": "List of application secrets.", @@ -21738,6 +22994,8 @@ "deviceFlow", "teamId", "userId", + "installationScopes", + "installationRedirectUrl", "secrets" ], "example": { @@ -21777,6 +23035,10 @@ "deviceFlow": false, "teamId": "5e5ea5c16897e", "userId": "5e5ea5c16897e", + "installationScopes": [ + "organization:organization.read" + ], + "installationRedirectUrl": "https:\/\/example.com\/setup", "secrets": [] } }, @@ -21971,6 +23233,181 @@ "deprecated": false } }, + "appInstallation": { + "description": "AppInstallation", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "Installation ID.", + "x-example": "5e5ea5c16897e" + }, + "$createdAt": { + "type": "string", + "description": "Installation creation time in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Installation update time in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "appId": { + "type": "string", + "description": "ID of the installed application.", + "x-example": "5e5ea5c16897e" + }, + "teamId": { + "type": "string", + "description": "ID of the team the application is installed on.", + "x-example": "5e5ea5c16897e" + }, + "scopes": { + "type": "array", + "description": "Scopes granted to the application. Snapshot of the application's installation scopes taken when the installation was created or last updated.", + "items": { + "type": "string" + }, + "x-example": [ + "organization:organization.read" + ] + }, + "authorizationDetails": { + "type": "object", + "additionalProperties": true, + "description": "Authorization details granted to the application. Rich authorization request (RFC 9396) style entries; the Appwrite Console stores authorized project IDs here.", + "x-example": [ + { + "type": "project", + "identifiers": [ + "*" + ] + } + ] + }, + "createdById": { + "type": "string", + "description": "ID of the user who created the installation.", + "x-example": "5e5ea5c16897e" + }, + "createdByName": { + "type": "string", + "description": "Name of the user who created the installation.", + "x-example": "Walter White" + }, + "lastAccessedAt": { + "type": "string", + "description": "Time an access token was last issued for the installation in ISO 8601 format. Null if never used.", + "x-example": "2020-10-15T06:38:00.000+00:00", + "nullable": true + } + }, + "required": [ + "$id", + "$createdAt", + "$updatedAt", + "appId", + "teamId", + "scopes", + "authorizationDetails", + "createdById", + "createdByName" + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "appId": "5e5ea5c16897e", + "teamId": "5e5ea5c16897e", + "scopes": [ + "organization:organization.read" + ], + "authorizationDetails": [ + { + "type": "project", + "identifiers": [ + "*" + ] + } + ], + "createdById": "5e5ea5c16897e", + "createdByName": "Walter White", + "lastAccessedAt": "2020-10-15T06:38:00.000+00:00" + } + }, + "appKey": { + "description": "AppKey", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "App key ID.", + "x-example": "5e5ea5c16897e" + }, + "$createdAt": { + "type": "string", + "description": "App key creation time in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "App key update time in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "appId": { + "type": "string", + "description": "Application ID this app key belongs to.", + "x-example": "5e5ea5c16897e" + }, + "secret": { + "type": "string", + "description": "App key secret.", + "x-example": "5f3c8d2a1b9e4f7a6c8b2d1e9f4a7b3c5d8e1f2a9b4c7d6e3f5a8b1c4d7e2f9a" + }, + "hint": { + "type": "string", + "description": "Last few characters of the app key secret, used to help identify it.", + "x-example": "f5c6c7" + }, + "createdById": { + "type": "string", + "description": "ID of the user who created the app key.", + "x-example": "5e5ea5c16897e" + }, + "createdByName": { + "type": "string", + "description": "Name of the user who created the app key.", + "x-example": "Walter White" + }, + "lastAccessedAt": { + "type": "string", + "description": "Time the app key was last used for authentication in ISO 8601 format. Null if never used.", + "x-example": "2020-10-15T06:38:00.000+00:00", + "nullable": true + } + }, + "required": [ + "$id", + "$createdAt", + "$updatedAt", + "appId", + "secret", + "hint", + "createdById", + "createdByName" + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "appId": "5e5ea5c16897e", + "secret": "5f3c8d2a1b9e4f7a6c8b2d1e9f4a7b3c5d8e1f2a9b4c7d6e3f5a8b1c4d7e2f9a", + "hint": "f5c6c7", + "createdById": "5e5ea5c16897e", + "createdByName": "Walter White", + "lastAccessedAt": "2020-10-15T06:38:00.000+00:00" + } + }, "oauth2Authorize": { "description": "OAuth2 Authorize", "type": "object", @@ -22727,6 +24164,62 @@ "total": 5, "scopes": "" } + }, + "appInstallationList": { + "description": "App installations list", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of installations that matched your query.", + "x-example": 5, + "format": "int32" + }, + "installations": { + "type": "array", + "description": "List of installations.", + "items": { + "$ref": "#\/components\/schemas\/appInstallation" + }, + "x-example": "" + } + }, + "required": [ + "total", + "installations" + ], + "example": { + "total": 5, + "installations": "" + } + }, + "appKeyList": { + "description": "App keys list", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of keys that matched your query.", + "x-example": 5, + "format": "int32" + }, + "keys": { + "type": "array", + "description": "List of keys.", + "items": { + "$ref": "#\/components\/schemas\/appKey" + }, + "x-example": "" + } + }, + "required": [ + "total", + "keys" + ], + "example": { + "total": 5, + "keys": "" + } } }, "securitySchemes": { diff --git a/specs/1.9.x/open-api3-1.9.x-console.json b/specs/1.9.x/open-api3-1.9.x-console.json index 1799d813f..a3ee707de 100644 --- a/specs/1.9.x/open-api3-1.9.x-console.json +++ b/specs/1.9.x/open-api3-1.9.x-console.json @@ -6355,6 +6355,58 @@ } } }, + "\/apps\/scopes\/installations": { + "get": { + "summary": "List Installation Scopes", + "operationId": "appsListInstallationScopes", + "tags": [ + "apps" + ], + "description": "List scopes an application can request when installed on a team.", + "responses": { + "200": { + "description": "App scopes list", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/appScopeList" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "listInstallationScopes", + "group": "scopes", + "cookies": false, + "type": "", + "demo": "apps\/list-installation-scopes.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},userId:{userId}", + "scope": "apps.read", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "Key": [], + "JWT": [] + } + ] + } + }, "\/apps\/scopes\/oauth2": { "get": { "summary": "List OAuth2 Scopes", @@ -6658,6 +6710,22 @@ "description": "Allow this client to use the OAuth2 Device Authorization Grant (RFC 8628) for input-constrained devices such as TVs and CLIs. Defaults to false.", "default": false, "x-example": false + }, + "installationScopes": { + "type": "array", + "description": "Scopes the application requests when installed on a team. Organization-level and project-level scopes only; use the list scopes endpoint with `type=installation` to discover available values. Maximum of 100 scopes are allowed.", + "default": [], + "x-example": null, + "items": { + "type": "string" + } + }, + "installationRedirectUrl": { + "type": "string", + "description": "URL users are redirected to after creating or updating an installation of this application. Must be an https URL, an http loopback URL (localhost, 127.0.0.1, [::1]), or a private-use scheme URI, and must not contain a fragment. Leave empty for no redirect.", + "default": "", + "x-example": "https:\/\/example.com", + "format": "url" } }, "required": [ @@ -6727,104 +6795,21 @@ ] } }, - "\/apps\/{appId}\/labels": { - "put": { - "summary": "Update Application Labels", - "operationId": "appsUpdateLabels", - "tags": [ - "apps" - ], - "description": "Update the labels of an application. Labels are read-only for clients; only a server SDK using a project API key can set them. Replaces the previous labels.", - "responses": { - "200": { - "description": "App", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/app" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "updateLabels", - "group": "apps", - "cookies": false, - "type": "", - "demo": "apps\/update-labels.md", - "rate-limit": 60, - "rate-time": 60, - "rate-key": "ip:{ip},userId:{userId}", - "scope": "apps.write", - "platforms": [ - "console", - "server" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [], - "Key": [] - } - ], - "parameters": [ - { - "name": "appId", - "description": "Application unique ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "labels": { - "type": "array", - "description": "Array of application labels. Replaces the previous labels. Maximum of 1000 labels are allowed, each up to 36 alphanumeric characters long.", - "x-example": null, - "items": { - "type": "string" - } - } - }, - "required": [ - "labels" - ] - } - } - } - } - } - }, - "\/apps\/{appId}\/secrets": { + "\/apps\/{appId}\/keys": { "get": { - "summary": "List Secrets", - "operationId": "appsListSecrets", + "summary": "List App Keys", + "operationId": "appsListKeys", "tags": [ "apps" ], - "description": "List client secrets for an application.", + "description": "List app keys for an application.", "responses": { "200": { - "description": "App secrets list", + "description": "App keys list", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/appSecretList" + "$ref": "#\/components\/schemas\/appKeyList" } } } @@ -6832,11 +6817,11 @@ }, "deprecated": false, "x-appwrite": { - "method": "listSecrets", - "group": "secrets", + "method": "listKeys", + "group": "keys", "cookies": false, "type": "", - "demo": "apps\/list-secrets.md", + "demo": "apps\/list-keys.md", "rate-limit": 120, "rate-time": 60, "rate-key": "ip:{ip},userId:{userId}", @@ -6898,19 +6883,19 @@ ] }, "post": { - "summary": "Create Secret", - "operationId": "appsCreateSecret", + "summary": "Create App Key", + "operationId": "appsCreateKey", "tags": [ "apps" ], - "description": "Create a new client secret for an application.", + "description": "Create a new app key for an application. App keys carry no scopes; send one in the `X-Appwrite-Key` header alongside the `X-Appwrite-App` header to list the application's installations and create installation access tokens.", "responses": { "201": { - "description": "AppSecretPlaintext", + "description": "AppKey", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/appSecretPlaintext" + "$ref": "#\/components\/schemas\/appKey" } } } @@ -6918,11 +6903,11 @@ }, "deprecated": false, "x-appwrite": { - "method": "createSecret", - "group": "secrets", + "method": "createKey", + "group": "keys", "cookies": false, "type": "", - "demo": "apps\/create-secret.md", + "demo": "apps\/create-key.md", "rate-limit": 60, "rate-time": 60, "rate-key": "ip:{ip},userId:{userId}", @@ -6960,21 +6945,21 @@ ] } }, - "\/apps\/{appId}\/secrets\/{secretId}": { + "\/apps\/{appId}\/keys\/{keyId}": { "get": { - "summary": "Get Secret", - "operationId": "appsGetSecret", + "summary": "Get App Key", + "operationId": "appsGetKey", "tags": [ "apps" ], - "description": "Get an application client secret by its unique ID.", + "description": "Get an app key by its unique ID.", "responses": { "200": { - "description": "AppSecret", + "description": "AppKey", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/appSecret" + "$ref": "#\/components\/schemas\/appKey" } } } @@ -6982,11 +6967,11 @@ }, "deprecated": false, "x-appwrite": { - "method": "getSecret", - "group": "secrets", + "method": "getKey", + "group": "keys", "cookies": false, "type": "", - "demo": "apps\/get-secret.md", + "demo": "apps\/get-key.md", "rate-limit": 120, "rate-time": 60, "rate-key": "ip:{ip},userId:{userId}", @@ -7022,24 +7007,24 @@ "in": "path" }, { - "name": "secretId", - "description": "Secret unique ID.", + "name": "keyId", + "description": "App key unique ID.", "required": true, "schema": { "type": "string", - "x-example": "" + "x-example": "" }, "in": "path" } ] }, "delete": { - "summary": "Delete Secret", - "operationId": "appsDeleteSecret", + "summary": "Delete App Key", + "operationId": "appsDeleteKey", "tags": [ "apps" ], - "description": "Delete an application client secret by its unique ID.", + "description": "Delete an app key by its unique ID.", "responses": { "204": { "description": "No content" @@ -7047,11 +7032,11 @@ }, "deprecated": false, "x-appwrite": { - "method": "deleteSecret", - "group": "secrets", + "method": "deleteKey", + "group": "keys", "cookies": false, "type": "", - "demo": "apps\/delete-secret.md", + "demo": "apps\/delete-key.md", "rate-limit": 60, "rate-time": 60, "rate-key": "ip:{ip},userId:{userId}", @@ -7090,26 +7075,26 @@ "in": "path" }, { - "name": "secretId", - "description": "Secret unique ID.", + "name": "keyId", + "description": "App key unique ID.", "required": true, "schema": { "type": "string", - "x-example": "" + "x-example": "" }, "in": "path" } ] } }, - "\/apps\/{appId}\/team": { - "patch": { - "summary": "Update Team", - "operationId": "appsUpdateTeam", + "\/apps\/{appId}\/labels": { + "put": { + "summary": "Update Application Labels", + "operationId": "appsUpdateLabels", "tags": [ "apps" ], - "description": "Transfer an application to another team by its unique ID.", + "description": "Update the labels of an application. Labels are read-only for clients; only a server SDK using a project API key can set them. Replaces the previous labels.", "responses": { "200": { "description": "App", @@ -7124,18 +7109,17 @@ }, "deprecated": false, "x-appwrite": { - "method": "updateTeam", + "method": "updateLabels", "group": "apps", "cookies": false, "type": "", - "demo": "apps\/update-team.md", + "demo": "apps\/update-labels.md", "rate-limit": 60, "rate-time": 60, "rate-key": "ip:{ip},userId:{userId}", "scope": "apps.write", "platforms": [ "console", - "client", "server" ], "packaging": false, @@ -7147,9 +7131,7 @@ "security": [ { "Project": [], - "Session": [], - "Key": [], - "JWT": [] + "Key": [] } ], "parameters": [ @@ -7170,14 +7152,17 @@ "schema": { "type": "object", "properties": { - "teamId": { - "type": "string", - "description": "Team ID of the team to transfer application to.", - "x-example": "" + "labels": { + "type": "array", + "description": "Array of application labels. Replaces the previous labels. Maximum of 1000 labels are allowed, each up to 36 alphanumeric characters long.", + "x-example": null, + "items": { + "type": "string" + } } }, "required": [ - "teamId" + "labels" ] } } @@ -7185,30 +7170,37 @@ } } }, - "\/apps\/{appId}\/tokens": { - "delete": { - "summary": "Delete Tokens", - "operationId": "appsDeleteTokens", + "\/apps\/{appId}\/secrets": { + "get": { + "summary": "List Secrets", + "operationId": "appsListSecrets", "tags": [ "apps" ], - "description": "Revoke all tokens for an application by its unique ID.", + "description": "List client secrets for an application.", "responses": { - "204": { - "description": "No content" + "200": { + "description": "App secrets list", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/appSecretList" + } + } + } } }, "deprecated": false, "x-appwrite": { - "method": "deleteTokens", - "group": "apps", + "method": "listSecrets", + "group": "secrets", "cookies": false, "type": "", - "demo": "apps\/delete-tokens.md", - "rate-limit": 60, + "demo": "apps\/list-secrets.md", + "rate-limit": 120, "rate-time": 60, "rate-key": "ip:{ip},userId:{userId}", - "scope": "apps.write", + "scope": "apps.read", "platforms": [ "console", "client", @@ -7216,9 +7208,377 @@ ], "packaging": false, "public": true, - "produces": [ - "application\/json" - ], + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "appId", + "description": "Application unique ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "queries", + "description": "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.", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + }, + "default": [] + }, + "in": "query" + }, + { + "name": "total", + "description": "When set to false, the total count returned will be 0 and will not be calculated.", + "required": false, + "schema": { + "type": "boolean", + "x-example": false, + "default": true + }, + "in": "query" + } + ] + }, + "post": { + "summary": "Create Secret", + "operationId": "appsCreateSecret", + "tags": [ + "apps" + ], + "description": "Create a new client secret for an application.", + "responses": { + "201": { + "description": "AppSecretPlaintext", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/appSecretPlaintext" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createSecret", + "group": "secrets", + "cookies": false, + "type": "", + "demo": "apps\/create-secret.md", + "rate-limit": 60, + "rate-time": 60, + "rate-key": "ip:{ip},userId:{userId}", + "scope": "apps.write", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "appId", + "description": "Application unique ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + } + ] + } + }, + "\/apps\/{appId}\/secrets\/{secretId}": { + "get": { + "summary": "Get Secret", + "operationId": "appsGetSecret", + "tags": [ + "apps" + ], + "description": "Get an application client secret by its unique ID.", + "responses": { + "200": { + "description": "AppSecret", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/appSecret" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "getSecret", + "group": "secrets", + "cookies": false, + "type": "", + "demo": "apps\/get-secret.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},userId:{userId}", + "scope": "apps.read", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "appId", + "description": "Application unique ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "secretId", + "description": "Secret unique ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + } + ] + }, + "delete": { + "summary": "Delete Secret", + "operationId": "appsDeleteSecret", + "tags": [ + "apps" + ], + "description": "Delete an application client secret by its unique ID.", + "responses": { + "204": { + "description": "No content" + } + }, + "deprecated": false, + "x-appwrite": { + "method": "deleteSecret", + "group": "secrets", + "cookies": false, + "type": "", + "demo": "apps\/delete-secret.md", + "rate-limit": 60, + "rate-time": 60, + "rate-key": "ip:{ip},userId:{userId}", + "scope": "apps.write", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "produces": [ + "application\/json" + ], + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "appId", + "description": "Application unique ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "secretId", + "description": "Secret unique ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + } + ] + } + }, + "\/apps\/{appId}\/team": { + "patch": { + "summary": "Update Team", + "operationId": "appsUpdateTeam", + "tags": [ + "apps" + ], + "description": "Transfer an application to another team by its unique ID.", + "responses": { + "200": { + "description": "App", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/app" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateTeam", + "group": "apps", + "cookies": false, + "type": "", + "demo": "apps\/update-team.md", + "rate-limit": 60, + "rate-time": 60, + "rate-key": "ip:{ip},userId:{userId}", + "scope": "apps.write", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "appId", + "description": "Application unique ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "teamId": { + "type": "string", + "description": "Team ID of the team to transfer application to.", + "x-example": "" + } + }, + "required": [ + "teamId" + ] + } + } + } + } + } + }, + "\/apps\/{appId}\/tokens": { + "delete": { + "summary": "Delete Tokens", + "operationId": "appsDeleteTokens", + "tags": [ + "apps" + ], + "description": "Revoke all tokens for an application by its unique ID.", + "responses": { + "204": { + "description": "No content" + } + }, + "deprecated": false, + "x-appwrite": { + "method": "deleteTokens", + "group": "apps", + "cookies": false, + "type": "", + "demo": "apps\/delete-tokens.md", + "rate-limit": 60, + "rate-time": 60, + "rate-key": "ip:{ip},userId:{userId}", + "scope": "apps.write", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "produces": [ + "application\/json" + ], "auth": { "Project": [] } @@ -11805,7 +12165,8 @@ "dedicateddatabaseruntimes", "dedicateddatabaseoperations", "dedicateddatabasebackups", - "dedicateddatabaserestorations" + "dedicateddatabaserestorations", + "dedicateddatabasebranches" ], "x-enum-name": "QuerySuggestionResource", "x-enum-keys": [ @@ -11901,7 +12262,8 @@ "dedicated_database_runtimes", "dedicated_database_operations", "dedicated_database_backups", - "dedicated_database_restorations" + "dedicated_database_restorations", + "dedicated_database_branches" ] }, "in": "query" @@ -20516,7 +20878,7 @@ }, "\/documentsdb\/specifications": { "get": { - "summary": "List dedicated database specifications.", + "summary": "List specifications", "operationId": "documentsDBListSpecifications", "tags": [ "documentsDB" @@ -20537,7 +20899,7 @@ "deprecated": false, "x-appwrite": { "method": "listSpecifications", - "group": "databases", + "group": "documentsdb", "cookies": false, "type": "", "demo": "documentsdb\/list-specifications.md", @@ -23304,7 +23666,7 @@ }, "\/documentsdb\/{databaseId}\/failovers": { "post": { - "summary": "Trigger manual failover.", + "summary": "Create failover", "operationId": "documentsDBCreateFailover", "tags": [ "documentsDB" @@ -23325,7 +23687,7 @@ "deprecated": false, "x-appwrite": { "method": "createFailover", - "group": "databases", + "group": "failovers", "cookies": false, "type": "", "demo": "documentsdb\/create-failover.md", @@ -23382,7 +23744,7 @@ }, "\/documentsdb\/{databaseId}\/replicas": { "get": { - "summary": "Get replica status.", + "summary": "Get replicas", "operationId": "documentsDBGetReplicas", "tags": [ "documentsDB" @@ -23403,7 +23765,7 @@ "deprecated": false, "x-appwrite": { "method": "getReplicas", - "group": "databases", + "group": "replicas", "cookies": false, "type": "", "demo": "documentsdb\/get-replicas.md", @@ -23443,7 +23805,7 @@ }, "\/documentsdb\/{databaseId}\/status": { "get": { - "summary": "Get database status.", + "summary": "Get status", "operationId": "documentsDBGetStatus", "tags": [ "documentsDB" @@ -23464,7 +23826,7 @@ "deprecated": false, "x-appwrite": { "method": "getStatus", - "group": "databases", + "group": "documentsdb", "cookies": false, "type": "", "demo": "documentsdb\/get-status.md", @@ -39886,7 +40248,7 @@ }, "\/mongo": { "get": { - "summary": "List dedicated databases.", + "summary": "List databases", "operationId": "mongoList", "tags": [ "mongo" @@ -39907,7 +40269,7 @@ "deprecated": false, "x-appwrite": { "method": "list", - "group": "databases", + "group": "mongo", "cookies": false, "type": "", "demo": "mongo\/list.md", @@ -39948,7 +40310,7 @@ ] }, "post": { - "summary": "Create a dedicated database.", + "summary": "Create database", "operationId": "mongoCreate", "tags": [ "mongo" @@ -39969,7 +40331,7 @@ "deprecated": false, "x-appwrite": { "method": "create", - "group": "databases", + "group": "mongo", "cookies": false, "type": "", "demo": "mongo\/create.md", @@ -40117,7 +40479,7 @@ }, "\/mongo\/specifications": { "get": { - "summary": "List dedicated database specifications.", + "summary": "List specifications", "operationId": "mongoListSpecifications", "tags": [ "mongo" @@ -40138,7 +40500,7 @@ "deprecated": false, "x-appwrite": { "method": "listSpecifications", - "group": "databases", + "group": "mongo", "cookies": false, "type": "", "demo": "mongo\/list-specifications.md", @@ -40166,7 +40528,7 @@ }, "\/mongo\/{databaseId}": { "get": { - "summary": "Get dedicated database.", + "summary": "Get database", "operationId": "mongoGet", "tags": [ "mongo" @@ -40187,7 +40549,7 @@ "deprecated": false, "x-appwrite": { "method": "get", - "group": "databases", + "group": "mongo", "cookies": false, "type": "", "demo": "mongo\/get.md", @@ -40225,7 +40587,7 @@ ] }, "patch": { - "summary": "Update dedicated database.", + "summary": "Update database", "operationId": "mongoUpdate", "tags": [ "mongo" @@ -40246,7 +40608,7 @@ "deprecated": false, "x-appwrite": { "method": "update", - "group": "databases", + "group": "mongo", "cookies": false, "type": "", "demo": "mongo\/update.md", @@ -40445,7 +40807,7 @@ } }, "delete": { - "summary": "Delete dedicated database.", + "summary": "Delete database", "operationId": "mongoDelete", "tags": [ "mongo" @@ -40459,7 +40821,7 @@ "deprecated": false, "x-appwrite": { "method": "delete", - "group": "databases", + "group": "mongo", "cookies": false, "type": "", "demo": "mongo\/delete.md", @@ -40502,7 +40864,7 @@ }, "\/mongo\/{databaseId}\/backups": { "get": { - "summary": "List database backups.", + "summary": "List backups", "operationId": "mongoListBackups", "tags": [ "mongo" @@ -40523,7 +40885,7 @@ "deprecated": false, "x-appwrite": { "method": "listBackups", - "group": "databases", + "group": "backups", "cookies": false, "type": "", "demo": "mongo\/list-backups.md", @@ -40574,7 +40936,7 @@ ] }, "post": { - "summary": "Create a database backup.", + "summary": "Create backup", "operationId": "mongoCreateBackup", "tags": [ "mongo" @@ -40595,7 +40957,7 @@ "deprecated": false, "x-appwrite": { "method": "createBackup", - "group": "databases", + "group": "backups", "cookies": false, "type": "", "demo": "mongo\/create-backup.md", @@ -40652,7 +41014,7 @@ }, "\/mongo\/{databaseId}\/backups\/policies": { "get": { - "summary": "List database backup policies.", + "summary": "List backup policies", "operationId": "mongoListBackupPolicies", "tags": [ "mongo" @@ -40673,7 +41035,7 @@ "deprecated": false, "x-appwrite": { "method": "listBackupPolicies", - "group": "databases", + "group": "policies", "cookies": false, "type": "", "demo": "mongo\/list-backup-policies.md", @@ -40724,7 +41086,7 @@ ] }, "post": { - "summary": "Create a database backup policy.", + "summary": "Create backup policy", "operationId": "mongoCreateBackupPolicy", "tags": [ "mongo" @@ -40745,7 +41107,7 @@ "deprecated": false, "x-appwrite": { "method": "createBackupPolicy", - "group": "databases", + "group": "policies", "cookies": false, "type": "", "demo": "mongo\/create-backup-policy.md", @@ -40838,7 +41200,7 @@ }, "\/mongo\/{databaseId}\/backups\/policies\/{policyId}": { "get": { - "summary": "Get a database backup policy.", + "summary": "Get backup policy", "operationId": "mongoGetBackupPolicy", "tags": [ "mongo" @@ -40859,7 +41221,7 @@ "deprecated": false, "x-appwrite": { "method": "getBackupPolicy", - "group": "databases", + "group": "policies", "cookies": false, "type": "", "demo": "mongo\/get-backup-policy.md", @@ -40907,7 +41269,7 @@ ] }, "patch": { - "summary": "Update a database backup policy.", + "summary": "Update backup policy", "operationId": "mongoUpdateBackupPolicy", "tags": [ "mongo" @@ -40928,7 +41290,7 @@ "deprecated": false, "x-appwrite": { "method": "updateBackupPolicy", - "group": "databases", + "group": "policies", "cookies": false, "type": "", "demo": "mongo\/update-backup-policy.md", @@ -41011,7 +41373,7 @@ } }, "delete": { - "summary": "Delete a database backup policy.", + "summary": "Delete backup policy", "operationId": "mongoDeleteBackupPolicy", "tags": [ "mongo" @@ -41025,7 +41387,7 @@ "deprecated": false, "x-appwrite": { "method": "deleteBackupPolicy", - "group": "databases", + "group": "policies", "cookies": false, "type": "", "demo": "mongo\/delete-backup-policy.md", @@ -41078,7 +41440,7 @@ }, "\/mongo\/{databaseId}\/backups\/storage": { "put": { - "summary": "Update database backup storage.", + "summary": "Update backup storage", "operationId": "mongoUpdateBackupStorage", "tags": [ "mongo" @@ -41099,7 +41461,7 @@ "deprecated": false, "x-appwrite": { "method": "updateBackupStorage", - "group": "databases", + "group": "backups", "cookies": false, "type": "", "demo": "mongo\/update-backup-storage.md", @@ -41194,7 +41556,7 @@ }, "\/mongo\/{databaseId}\/backups\/{backupId}": { "get": { - "summary": "Get a database backup.", + "summary": "Get backup", "operationId": "mongoGetBackup", "tags": [ "mongo" @@ -41215,7 +41577,7 @@ "deprecated": false, "x-appwrite": { "method": "getBackup", - "group": "databases", + "group": "backups", "cookies": false, "type": "", "demo": "mongo\/get-backup.md", @@ -41263,7 +41625,7 @@ ] }, "delete": { - "summary": "Delete a database backup.", + "summary": "Delete backup", "operationId": "mongoDeleteBackup", "tags": [ "mongo" @@ -41277,7 +41639,7 @@ "deprecated": false, "x-appwrite": { "method": "deleteBackup", - "group": "databases", + "group": "backups", "cookies": false, "type": "", "demo": "mongo\/delete-backup.md", @@ -41330,7 +41692,7 @@ }, "\/mongo\/{databaseId}\/branches": { "get": { - "summary": "List database branches.", + "summary": "List branches", "operationId": "mongoListBranches", "tags": [ "mongo" @@ -41351,7 +41713,7 @@ "deprecated": false, "x-appwrite": { "method": "listBranches", - "group": "databases", + "group": "branches", "cookies": false, "type": "", "demo": "mongo\/list-branches.md", @@ -41389,7 +41751,7 @@ ] }, "post": { - "summary": "Create a database branch.", + "summary": "Create branch", "operationId": "mongoCreateBranch", "tags": [ "mongo" @@ -41410,7 +41772,7 @@ "deprecated": false, "x-appwrite": { "method": "createBranch", - "group": "databases", + "group": "branches", "cookies": false, "type": "", "demo": "mongo\/create-branch.md", @@ -41477,7 +41839,7 @@ }, "\/mongo\/{databaseId}\/branches\/{branchId}": { "delete": { - "summary": "Delete a database branch.", + "summary": "Delete branch", "operationId": "mongoDeleteBranch", "tags": [ "mongo" @@ -41498,7 +41860,7 @@ "deprecated": false, "x-appwrite": { "method": "deleteBranch", - "group": "databases", + "group": "branches", "cookies": false, "type": "", "demo": "mongo\/delete-branch.md", @@ -41548,7 +41910,7 @@ }, "\/mongo\/{databaseId}\/credentials": { "patch": { - "summary": "Rotate database credentials.", + "summary": "Update credentials", "operationId": "mongoUpdateCredentials", "tags": [ "mongo" @@ -41569,7 +41931,7 @@ "deprecated": false, "x-appwrite": { "method": "updateCredentials", - "group": "databases", + "group": "mongo", "cookies": false, "type": "", "demo": "mongo\/update-credentials.md", @@ -41609,7 +41971,7 @@ }, "\/mongo\/{databaseId}\/failovers": { "post": { - "summary": "Trigger manual failover.", + "summary": "Create failover", "operationId": "mongoCreateFailover", "tags": [ "mongo" @@ -41630,7 +41992,7 @@ "deprecated": false, "x-appwrite": { "method": "createFailover", - "group": "databases", + "group": "failovers", "cookies": false, "type": "", "demo": "mongo\/create-failover.md", @@ -41687,7 +42049,7 @@ }, "\/mongo\/{databaseId}\/maintenance": { "patch": { - "summary": "Update database maintenance window.", + "summary": "Update maintenance", "operationId": "mongoUpdateMaintenance", "tags": [ "mongo" @@ -41708,7 +42070,7 @@ "deprecated": false, "x-appwrite": { "method": "updateMaintenance", - "group": "databases", + "group": "mongo", "cookies": false, "type": "", "demo": "mongo\/update-maintenance.md", @@ -41774,7 +42136,7 @@ }, "\/mongo\/{databaseId}\/migrations": { "post": { - "summary": "Migrate database between shared and dedicated.", + "summary": "Create migration", "operationId": "mongoCreateMigration", "tags": [ "mongo" @@ -41795,7 +42157,7 @@ "deprecated": false, "x-appwrite": { "method": "createMigration", - "group": "databases", + "group": "migrations", "cookies": false, "type": "", "demo": "mongo\/create-migration.md", @@ -41860,7 +42222,7 @@ }, "\/mongo\/{databaseId}\/pitr": { "get": { - "summary": "Get PITR recovery windows.", + "summary": "Get PITR", "operationId": "mongoGetPitr", "tags": [ "mongo" @@ -41881,7 +42243,7 @@ "deprecated": false, "x-appwrite": { "method": "getPitr", - "group": "databases", + "group": "pitr", "cookies": false, "type": "", "demo": "mongo\/get-pitr.md", @@ -41921,7 +42283,7 @@ }, "\/mongo\/{databaseId}\/replicas": { "get": { - "summary": "Get replica status.", + "summary": "Get replicas", "operationId": "mongoGetReplicas", "tags": [ "mongo" @@ -41942,7 +42304,7 @@ "deprecated": false, "x-appwrite": { "method": "getReplicas", - "group": "databases", + "group": "replicas", "cookies": false, "type": "", "demo": "mongo\/get-replicas.md", @@ -41982,7 +42344,7 @@ }, "\/mongo\/{databaseId}\/restorations": { "get": { - "summary": "List database restorations.", + "summary": "List restorations", "operationId": "mongoListRestorations", "tags": [ "mongo" @@ -42003,7 +42365,7 @@ "deprecated": false, "x-appwrite": { "method": "listRestorations", - "group": "databases", + "group": "restorations", "cookies": false, "type": "", "demo": "mongo\/list-restorations.md", @@ -42085,7 +42447,7 @@ ] }, "post": { - "summary": "Create a database restoration.", + "summary": "Create restoration", "operationId": "mongoCreateRestoration", "tags": [ "mongo" @@ -42106,7 +42468,7 @@ "deprecated": false, "x-appwrite": { "method": "createRestoration", - "group": "databases", + "group": "restorations", "cookies": false, "type": "", "demo": "mongo\/create-restoration.md", @@ -42176,7 +42538,7 @@ }, "\/mongo\/{databaseId}\/restorations\/{restorationId}": { "get": { - "summary": "Get a database restoration.", + "summary": "Get restoration", "operationId": "mongoGetRestoration", "tags": [ "mongo" @@ -42197,7 +42559,7 @@ "deprecated": false, "x-appwrite": { "method": "getRestoration", - "group": "databases", + "group": "restorations", "cookies": false, "type": "", "demo": "mongo\/get-restoration.md", @@ -42247,7 +42609,7 @@ }, "\/mongo\/{databaseId}\/status": { "get": { - "summary": "Get database status.", + "summary": "Get status", "operationId": "mongoGetStatus", "tags": [ "mongo" @@ -42268,7 +42630,7 @@ "deprecated": false, "x-appwrite": { "method": "getStatus", - "group": "databases", + "group": "mongo", "cookies": false, "type": "", "demo": "mongo\/get-status.md", @@ -42308,7 +42670,7 @@ }, "\/mongo\/{databaseId}\/upgrades": { "post": { - "summary": "Upgrade database version.", + "summary": "Create upgrade", "operationId": "mongoCreateUpgrade", "tags": [ "mongo" @@ -42329,7 +42691,7 @@ "deprecated": false, "x-appwrite": { "method": "createUpgrade", - "group": "databases", + "group": "mongo", "cookies": false, "type": "", "demo": "mongo\/create-upgrade.md", @@ -42388,7 +42750,7 @@ }, "\/mysql": { "get": { - "summary": "List dedicated databases.", + "summary": "List databases", "operationId": "mysqlList", "tags": [ "mysql" @@ -42409,7 +42771,7 @@ "deprecated": false, "x-appwrite": { "method": "list", - "group": "databases", + "group": "mysql", "cookies": false, "type": "", "demo": "mysql\/list.md", @@ -42450,7 +42812,7 @@ ] }, "post": { - "summary": "Create a dedicated database.", + "summary": "Create database", "operationId": "mysqlCreate", "tags": [ "mysql" @@ -42471,7 +42833,7 @@ "deprecated": false, "x-appwrite": { "method": "create", - "group": "databases", + "group": "mysql", "cookies": false, "type": "", "demo": "mysql\/create.md", @@ -42619,7 +42981,7 @@ }, "\/mysql\/specifications": { "get": { - "summary": "List dedicated database specifications.", + "summary": "List specifications", "operationId": "mysqlListSpecifications", "tags": [ "mysql" @@ -42640,7 +43002,7 @@ "deprecated": false, "x-appwrite": { "method": "listSpecifications", - "group": "databases", + "group": "mysql", "cookies": false, "type": "", "demo": "mysql\/list-specifications.md", @@ -42668,7 +43030,7 @@ }, "\/mysql\/{databaseId}": { "get": { - "summary": "Get dedicated database.", + "summary": "Get database", "operationId": "mysqlGet", "tags": [ "mysql" @@ -42689,7 +43051,7 @@ "deprecated": false, "x-appwrite": { "method": "get", - "group": "databases", + "group": "mysql", "cookies": false, "type": "", "demo": "mysql\/get.md", @@ -42727,7 +43089,7 @@ ] }, "patch": { - "summary": "Update dedicated database.", + "summary": "Update database", "operationId": "mysqlUpdate", "tags": [ "mysql" @@ -42748,7 +43110,7 @@ "deprecated": false, "x-appwrite": { "method": "update", - "group": "databases", + "group": "mysql", "cookies": false, "type": "", "demo": "mysql\/update.md", @@ -42947,7 +43309,7 @@ } }, "delete": { - "summary": "Delete dedicated database.", + "summary": "Delete database", "operationId": "mysqlDelete", "tags": [ "mysql" @@ -42961,7 +43323,7 @@ "deprecated": false, "x-appwrite": { "method": "delete", - "group": "databases", + "group": "mysql", "cookies": false, "type": "", "demo": "mysql\/delete.md", @@ -43004,7 +43366,7 @@ }, "\/mysql\/{databaseId}\/backups": { "get": { - "summary": "List database backups.", + "summary": "List backups", "operationId": "mysqlListBackups", "tags": [ "mysql" @@ -43025,7 +43387,7 @@ "deprecated": false, "x-appwrite": { "method": "listBackups", - "group": "databases", + "group": "backups", "cookies": false, "type": "", "demo": "mysql\/list-backups.md", @@ -43076,7 +43438,7 @@ ] }, "post": { - "summary": "Create a database backup.", + "summary": "Create backup", "operationId": "mysqlCreateBackup", "tags": [ "mysql" @@ -43097,7 +43459,7 @@ "deprecated": false, "x-appwrite": { "method": "createBackup", - "group": "databases", + "group": "backups", "cookies": false, "type": "", "demo": "mysql\/create-backup.md", @@ -43154,7 +43516,7 @@ }, "\/mysql\/{databaseId}\/backups\/policies": { "get": { - "summary": "List database backup policies.", + "summary": "List backup policies", "operationId": "mysqlListBackupPolicies", "tags": [ "mysql" @@ -43175,7 +43537,7 @@ "deprecated": false, "x-appwrite": { "method": "listBackupPolicies", - "group": "databases", + "group": "policies", "cookies": false, "type": "", "demo": "mysql\/list-backup-policies.md", @@ -43226,7 +43588,7 @@ ] }, "post": { - "summary": "Create a database backup policy.", + "summary": "Create backup policy", "operationId": "mysqlCreateBackupPolicy", "tags": [ "mysql" @@ -43247,7 +43609,7 @@ "deprecated": false, "x-appwrite": { "method": "createBackupPolicy", - "group": "databases", + "group": "policies", "cookies": false, "type": "", "demo": "mysql\/create-backup-policy.md", @@ -43340,7 +43702,7 @@ }, "\/mysql\/{databaseId}\/backups\/policies\/{policyId}": { "get": { - "summary": "Get a database backup policy.", + "summary": "Get backup policy", "operationId": "mysqlGetBackupPolicy", "tags": [ "mysql" @@ -43361,7 +43723,7 @@ "deprecated": false, "x-appwrite": { "method": "getBackupPolicy", - "group": "databases", + "group": "policies", "cookies": false, "type": "", "demo": "mysql\/get-backup-policy.md", @@ -43409,7 +43771,7 @@ ] }, "patch": { - "summary": "Update a database backup policy.", + "summary": "Update backup policy", "operationId": "mysqlUpdateBackupPolicy", "tags": [ "mysql" @@ -43430,7 +43792,7 @@ "deprecated": false, "x-appwrite": { "method": "updateBackupPolicy", - "group": "databases", + "group": "policies", "cookies": false, "type": "", "demo": "mysql\/update-backup-policy.md", @@ -43513,7 +43875,7 @@ } }, "delete": { - "summary": "Delete a database backup policy.", + "summary": "Delete backup policy", "operationId": "mysqlDeleteBackupPolicy", "tags": [ "mysql" @@ -43527,7 +43889,7 @@ "deprecated": false, "x-appwrite": { "method": "deleteBackupPolicy", - "group": "databases", + "group": "policies", "cookies": false, "type": "", "demo": "mysql\/delete-backup-policy.md", @@ -43580,7 +43942,7 @@ }, "\/mysql\/{databaseId}\/backups\/storage": { "put": { - "summary": "Update database backup storage.", + "summary": "Update backup storage", "operationId": "mysqlUpdateBackupStorage", "tags": [ "mysql" @@ -43601,7 +43963,7 @@ "deprecated": false, "x-appwrite": { "method": "updateBackupStorage", - "group": "databases", + "group": "backups", "cookies": false, "type": "", "demo": "mysql\/update-backup-storage.md", @@ -43696,7 +44058,7 @@ }, "\/mysql\/{databaseId}\/backups\/{backupId}": { "get": { - "summary": "Get a database backup.", + "summary": "Get backup", "operationId": "mysqlGetBackup", "tags": [ "mysql" @@ -43717,7 +44079,7 @@ "deprecated": false, "x-appwrite": { "method": "getBackup", - "group": "databases", + "group": "backups", "cookies": false, "type": "", "demo": "mysql\/get-backup.md", @@ -43765,7 +44127,7 @@ ] }, "delete": { - "summary": "Delete a database backup.", + "summary": "Delete backup", "operationId": "mysqlDeleteBackup", "tags": [ "mysql" @@ -43779,7 +44141,7 @@ "deprecated": false, "x-appwrite": { "method": "deleteBackup", - "group": "databases", + "group": "backups", "cookies": false, "type": "", "demo": "mysql\/delete-backup.md", @@ -43832,7 +44194,7 @@ }, "\/mysql\/{databaseId}\/branches": { "get": { - "summary": "List database branches.", + "summary": "List branches", "operationId": "mysqlListBranches", "tags": [ "mysql" @@ -43853,7 +44215,7 @@ "deprecated": false, "x-appwrite": { "method": "listBranches", - "group": "databases", + "group": "branches", "cookies": false, "type": "", "demo": "mysql\/list-branches.md", @@ -43891,7 +44253,7 @@ ] }, "post": { - "summary": "Create a database branch.", + "summary": "Create branch", "operationId": "mysqlCreateBranch", "tags": [ "mysql" @@ -43912,7 +44274,7 @@ "deprecated": false, "x-appwrite": { "method": "createBranch", - "group": "databases", + "group": "branches", "cookies": false, "type": "", "demo": "mysql\/create-branch.md", @@ -43979,7 +44341,7 @@ }, "\/mysql\/{databaseId}\/branches\/{branchId}": { "delete": { - "summary": "Delete a database branch.", + "summary": "Delete branch", "operationId": "mysqlDeleteBranch", "tags": [ "mysql" @@ -44000,7 +44362,7 @@ "deprecated": false, "x-appwrite": { "method": "deleteBranch", - "group": "databases", + "group": "branches", "cookies": false, "type": "", "demo": "mysql\/delete-branch.md", @@ -44050,7 +44412,7 @@ }, "\/mysql\/{databaseId}\/credentials": { "patch": { - "summary": "Rotate database credentials.", + "summary": "Update credentials", "operationId": "mysqlUpdateCredentials", "tags": [ "mysql" @@ -44071,7 +44433,7 @@ "deprecated": false, "x-appwrite": { "method": "updateCredentials", - "group": "databases", + "group": "mysql", "cookies": false, "type": "", "demo": "mysql\/update-credentials.md", @@ -44111,7 +44473,7 @@ }, "\/mysql\/{databaseId}\/executions": { "post": { - "summary": "Execute a SQL statement against a dedicated database.", + "summary": "Create execution", "operationId": "mysqlCreateExecution", "tags": [ "mysql" @@ -44132,7 +44494,7 @@ "deprecated": false, "x-appwrite": { "method": "createExecution", - "group": "databases", + "group": "executions", "cookies": false, "type": "", "demo": "mysql\/create-execution.md", @@ -44205,7 +44567,7 @@ }, "\/mysql\/{databaseId}\/failovers": { "post": { - "summary": "Trigger manual failover.", + "summary": "Create failover", "operationId": "mysqlCreateFailover", "tags": [ "mysql" @@ -44226,7 +44588,7 @@ "deprecated": false, "x-appwrite": { "method": "createFailover", - "group": "databases", + "group": "failovers", "cookies": false, "type": "", "demo": "mysql\/create-failover.md", @@ -44283,7 +44645,7 @@ }, "\/mysql\/{databaseId}\/maintenance": { "patch": { - "summary": "Update database maintenance window.", + "summary": "Update maintenance", "operationId": "mysqlUpdateMaintenance", "tags": [ "mysql" @@ -44304,7 +44666,7 @@ "deprecated": false, "x-appwrite": { "method": "updateMaintenance", - "group": "databases", + "group": "mysql", "cookies": false, "type": "", "demo": "mysql\/update-maintenance.md", @@ -44370,7 +44732,7 @@ }, "\/mysql\/{databaseId}\/migrations": { "post": { - "summary": "Migrate database between shared and dedicated.", + "summary": "Create migration", "operationId": "mysqlCreateMigration", "tags": [ "mysql" @@ -44391,7 +44753,7 @@ "deprecated": false, "x-appwrite": { "method": "createMigration", - "group": "databases", + "group": "migrations", "cookies": false, "type": "", "demo": "mysql\/create-migration.md", @@ -44456,7 +44818,7 @@ }, "\/mysql\/{databaseId}\/pitr": { "get": { - "summary": "Get PITR recovery windows.", + "summary": "Get PITR", "operationId": "mysqlGetPitr", "tags": [ "mysql" @@ -44477,7 +44839,7 @@ "deprecated": false, "x-appwrite": { "method": "getPitr", - "group": "databases", + "group": "pitr", "cookies": false, "type": "", "demo": "mysql\/get-pitr.md", @@ -44517,7 +44879,7 @@ }, "\/mysql\/{databaseId}\/pooler": { "get": { - "summary": "Get connection pooler configuration.", + "summary": "Get pooler", "operationId": "mysqlGetPooler", "tags": [ "mysql" @@ -44538,7 +44900,7 @@ "deprecated": false, "x-appwrite": { "method": "getPooler", - "group": "databases", + "group": "pooler", "cookies": false, "type": "", "demo": "mysql\/get-pooler.md", @@ -44576,7 +44938,7 @@ ] }, "patch": { - "summary": "Update connection pooler configuration.", + "summary": "Update pooler", "operationId": "mysqlUpdatePooler", "tags": [ "mysql" @@ -44597,7 +44959,7 @@ "deprecated": false, "x-appwrite": { "method": "updatePooler", - "group": "databases", + "group": "pooler", "cookies": false, "type": "", "demo": "mysql\/update-pooler.md", @@ -44698,7 +45060,7 @@ }, "\/mysql\/{databaseId}\/replicas": { "get": { - "summary": "Get replica status.", + "summary": "Get replicas", "operationId": "mysqlGetReplicas", "tags": [ "mysql" @@ -44719,7 +45081,7 @@ "deprecated": false, "x-appwrite": { "method": "getReplicas", - "group": "databases", + "group": "replicas", "cookies": false, "type": "", "demo": "mysql\/get-replicas.md", @@ -44759,7 +45121,7 @@ }, "\/mysql\/{databaseId}\/restorations": { "get": { - "summary": "List database restorations.", + "summary": "List restorations", "operationId": "mysqlListRestorations", "tags": [ "mysql" @@ -44780,7 +45142,7 @@ "deprecated": false, "x-appwrite": { "method": "listRestorations", - "group": "databases", + "group": "restorations", "cookies": false, "type": "", "demo": "mysql\/list-restorations.md", @@ -44862,7 +45224,7 @@ ] }, "post": { - "summary": "Create a database restoration.", + "summary": "Create restoration", "operationId": "mysqlCreateRestoration", "tags": [ "mysql" @@ -44883,7 +45245,7 @@ "deprecated": false, "x-appwrite": { "method": "createRestoration", - "group": "databases", + "group": "restorations", "cookies": false, "type": "", "demo": "mysql\/create-restoration.md", @@ -44953,7 +45315,7 @@ }, "\/mysql\/{databaseId}\/restorations\/{restorationId}": { "get": { - "summary": "Get a database restoration.", + "summary": "Get restoration", "operationId": "mysqlGetRestoration", "tags": [ "mysql" @@ -44974,7 +45336,7 @@ "deprecated": false, "x-appwrite": { "method": "getRestoration", - "group": "databases", + "group": "restorations", "cookies": false, "type": "", "demo": "mysql\/get-restoration.md", @@ -45024,7 +45386,7 @@ }, "\/mysql\/{databaseId}\/status": { "get": { - "summary": "Get database status.", + "summary": "Get status", "operationId": "mysqlGetStatus", "tags": [ "mysql" @@ -45045,7 +45407,7 @@ "deprecated": false, "x-appwrite": { "method": "getStatus", - "group": "databases", + "group": "mysql", "cookies": false, "type": "", "demo": "mysql\/get-status.md", @@ -45085,7 +45447,7 @@ }, "\/mysql\/{databaseId}\/upgrades": { "post": { - "summary": "Upgrade database version.", + "summary": "Create upgrade", "operationId": "mysqlCreateUpgrade", "tags": [ "mysql" @@ -45106,7 +45468,7 @@ "deprecated": false, "x-appwrite": { "method": "createUpgrade", - "group": "databases", + "group": "mysql", "cookies": false, "type": "", "demo": "mysql\/create-upgrade.md", @@ -47094,6 +47456,360 @@ ] } }, + "\/organization\/installations": { + "get": { + "summary": "List Installations", + "operationId": "organizationListInstallations", + "tags": [ + "organization" + ], + "description": "List app installations on the organization. Any organization member can read installations.", + "responses": { + "200": { + "description": "App installations list", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/appInstallationList" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "listInstallations", + "group": "installations", + "cookies": false, + "type": "", + "demo": "organization\/list-installations.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},userId:{userId}", + "scope": "organization.installations.read", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "queries", + "description": "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.", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + }, + "default": [] + }, + "in": "query" + }, + { + "name": "total", + "description": "When set to false, the total count returned will be 0 and will not be calculated.", + "required": false, + "schema": { + "type": "boolean", + "x-example": false, + "default": true + }, + "in": "query" + } + ] + }, + "post": { + "summary": "Create Installation", + "operationId": "organizationCreateInstallation", + "tags": [ + "organization" + ], + "description": "Install an app on the organization. Only organization members with the owner role can install apps. The installation is granted the scopes the app currently requests.", + "responses": { + "201": { + "description": "AppInstallation", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/appInstallation" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createInstallation", + "group": "installations", + "cookies": false, + "type": "", + "demo": "organization\/create-installation.md", + "rate-limit": 60, + "rate-time": 60, + "rate-key": "ip:{ip},userId:{userId}", + "scope": "organization.installations.write", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "Key": [], + "JWT": [] + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "appId": { + "type": "string", + "description": "Application unique ID.", + "x-example": "" + }, + "authorizationDetails": { + "type": "string", + "description": "Authorization details granted to the installation as a JSON array of objects, each with a `type` and app-defined fields. The Appwrite Console stores authorized project IDs here.", + "default": "", + "x-example": "" + } + }, + "required": [ + "appId" + ] + } + } + } + } + } + }, + "\/organization\/installations\/{installationId}": { + "get": { + "summary": "Get Installation", + "operationId": "organizationGetInstallation", + "tags": [ + "organization" + ], + "description": "Get an app installation on the organization by its unique ID. Any organization member can read installations.", + "responses": { + "200": { + "description": "AppInstallation", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/appInstallation" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "getInstallation", + "group": "installations", + "cookies": false, + "type": "", + "demo": "organization\/get-installation.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},userId:{userId}", + "scope": "organization.installations.read", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "installationId", + "description": "Installation unique ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + } + ] + }, + "put": { + "summary": "Update Installation", + "operationId": "organizationUpdateInstallation", + "tags": [ + "organization" + ], + "description": "Update an app installation on the organization. Only organization members with the owner role can update installations. The installation's granted scopes are refreshed to the scopes the app currently requests; previously issued installation access tokens are revoked.", + "responses": { + "200": { + "description": "AppInstallation", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/appInstallation" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateInstallation", + "group": "installations", + "cookies": false, + "type": "", + "demo": "organization\/update-installation.md", + "rate-limit": 60, + "rate-time": 60, + "rate-key": "ip:{ip},userId:{userId}", + "scope": "organization.installations.write", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "installationId", + "description": "Installation unique ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "authorizationDetails": { + "type": "string", + "description": "Authorization details granted to the installation as a JSON array of objects, each with a `type` and app-defined fields. Omit to keep the current value.", + "x-example": "", + "x-nullable": true + } + } + } + } + } + } + }, + "delete": { + "summary": "Delete Installation", + "operationId": "organizationDeleteInstallation", + "tags": [ + "organization" + ], + "description": "Uninstall an app from the organization by its installation ID. Only organization members with the owner role can remove installations. Previously issued installation access tokens are revoked.", + "responses": { + "204": { + "description": "No content" + } + }, + "deprecated": false, + "x-appwrite": { + "method": "deleteInstallation", + "group": "installations", + "cookies": false, + "type": "", + "demo": "organization\/delete-installation.md", + "rate-limit": 60, + "rate-time": 60, + "rate-key": "ip:{ip},userId:{userId}", + "scope": "organization.installations.write", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "produces": [ + "application\/json" + ], + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "installationId", + "description": "Installation unique ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + } + ] + } + }, "\/organization\/keys": { "get": { "summary": "List organization keys", @@ -47246,6 +47962,8 @@ "devKeys.write", "organization.keys.read", "organization.keys.write", + "organization.installations.read", + "organization.installations.write", "organization.memberships.read", "organization.memberships.write", "organization.read", @@ -47263,6 +47981,8 @@ "devKeys.write", "organization.keys.read", "organization.keys.write", + "organization.installations.read", + "organization.installations.write", "organization.memberships.read", "organization.memberships.write", "organization.read", @@ -47435,6 +48155,8 @@ "devKeys.write", "organization.keys.read", "organization.keys.write", + "organization.installations.read", + "organization.installations.write", "organization.memberships.read", "organization.memberships.write", "organization.read", @@ -47452,6 +48174,8 @@ "devKeys.write", "organization.keys.read", "organization.keys.write", + "organization.installations.read", + "organization.installations.write", "organization.memberships.read", "organization.memberships.write", "organization.read", @@ -51749,7 +52473,7 @@ }, "\/postgresql": { "get": { - "summary": "List dedicated databases.", + "summary": "List databases", "operationId": "postgresqlList", "tags": [ "postgresql" @@ -51770,7 +52494,7 @@ "deprecated": false, "x-appwrite": { "method": "list", - "group": "databases", + "group": "postgresql", "cookies": false, "type": "", "demo": "postgresql\/list.md", @@ -51811,7 +52535,7 @@ ] }, "post": { - "summary": "Create a dedicated database.", + "summary": "Create database", "operationId": "postgresqlCreate", "tags": [ "postgresql" @@ -51832,7 +52556,7 @@ "deprecated": false, "x-appwrite": { "method": "create", - "group": "databases", + "group": "postgresql", "cookies": false, "type": "", "demo": "postgresql\/create.md", @@ -51980,7 +52704,7 @@ }, "\/postgresql\/specifications": { "get": { - "summary": "List dedicated database specifications.", + "summary": "List specifications", "operationId": "postgresqlListSpecifications", "tags": [ "postgresql" @@ -52001,7 +52725,7 @@ "deprecated": false, "x-appwrite": { "method": "listSpecifications", - "group": "databases", + "group": "postgresql", "cookies": false, "type": "", "demo": "postgresql\/list-specifications.md", @@ -52029,7 +52753,7 @@ }, "\/postgresql\/{databaseId}": { "get": { - "summary": "Get dedicated database.", + "summary": "Get database", "operationId": "postgresqlGet", "tags": [ "postgresql" @@ -52050,7 +52774,7 @@ "deprecated": false, "x-appwrite": { "method": "get", - "group": "databases", + "group": "postgresql", "cookies": false, "type": "", "demo": "postgresql\/get.md", @@ -52088,7 +52812,7 @@ ] }, "patch": { - "summary": "Update dedicated database.", + "summary": "Update database", "operationId": "postgresqlUpdate", "tags": [ "postgresql" @@ -52109,7 +52833,7 @@ "deprecated": false, "x-appwrite": { "method": "update", - "group": "databases", + "group": "postgresql", "cookies": false, "type": "", "demo": "postgresql\/update.md", @@ -52308,7 +53032,7 @@ } }, "delete": { - "summary": "Delete dedicated database.", + "summary": "Delete database", "operationId": "postgresqlDelete", "tags": [ "postgresql" @@ -52322,7 +53046,7 @@ "deprecated": false, "x-appwrite": { "method": "delete", - "group": "databases", + "group": "postgresql", "cookies": false, "type": "", "demo": "postgresql\/delete.md", @@ -52365,7 +53089,7 @@ }, "\/postgresql\/{databaseId}\/backups": { "get": { - "summary": "List database backups.", + "summary": "List backups", "operationId": "postgresqlListBackups", "tags": [ "postgresql" @@ -52386,7 +53110,7 @@ "deprecated": false, "x-appwrite": { "method": "listBackups", - "group": "databases", + "group": "backups", "cookies": false, "type": "", "demo": "postgresql\/list-backups.md", @@ -52437,7 +53161,7 @@ ] }, "post": { - "summary": "Create a database backup.", + "summary": "Create backup", "operationId": "postgresqlCreateBackup", "tags": [ "postgresql" @@ -52458,7 +53182,7 @@ "deprecated": false, "x-appwrite": { "method": "createBackup", - "group": "databases", + "group": "backups", "cookies": false, "type": "", "demo": "postgresql\/create-backup.md", @@ -52515,7 +53239,7 @@ }, "\/postgresql\/{databaseId}\/backups\/policies": { "get": { - "summary": "List database backup policies.", + "summary": "List backup policies", "operationId": "postgresqlListBackupPolicies", "tags": [ "postgresql" @@ -52536,7 +53260,7 @@ "deprecated": false, "x-appwrite": { "method": "listBackupPolicies", - "group": "databases", + "group": "policies", "cookies": false, "type": "", "demo": "postgresql\/list-backup-policies.md", @@ -52587,7 +53311,7 @@ ] }, "post": { - "summary": "Create a database backup policy.", + "summary": "Create backup policy", "operationId": "postgresqlCreateBackupPolicy", "tags": [ "postgresql" @@ -52608,7 +53332,7 @@ "deprecated": false, "x-appwrite": { "method": "createBackupPolicy", - "group": "databases", + "group": "policies", "cookies": false, "type": "", "demo": "postgresql\/create-backup-policy.md", @@ -52701,7 +53425,7 @@ }, "\/postgresql\/{databaseId}\/backups\/policies\/{policyId}": { "get": { - "summary": "Get a database backup policy.", + "summary": "Get backup policy", "operationId": "postgresqlGetBackupPolicy", "tags": [ "postgresql" @@ -52722,7 +53446,7 @@ "deprecated": false, "x-appwrite": { "method": "getBackupPolicy", - "group": "databases", + "group": "policies", "cookies": false, "type": "", "demo": "postgresql\/get-backup-policy.md", @@ -52770,7 +53494,7 @@ ] }, "patch": { - "summary": "Update a database backup policy.", + "summary": "Update backup policy", "operationId": "postgresqlUpdateBackupPolicy", "tags": [ "postgresql" @@ -52791,7 +53515,7 @@ "deprecated": false, "x-appwrite": { "method": "updateBackupPolicy", - "group": "databases", + "group": "policies", "cookies": false, "type": "", "demo": "postgresql\/update-backup-policy.md", @@ -52874,7 +53598,7 @@ } }, "delete": { - "summary": "Delete a database backup policy.", + "summary": "Delete backup policy", "operationId": "postgresqlDeleteBackupPolicy", "tags": [ "postgresql" @@ -52888,7 +53612,7 @@ "deprecated": false, "x-appwrite": { "method": "deleteBackupPolicy", - "group": "databases", + "group": "policies", "cookies": false, "type": "", "demo": "postgresql\/delete-backup-policy.md", @@ -52941,7 +53665,7 @@ }, "\/postgresql\/{databaseId}\/backups\/storage": { "put": { - "summary": "Update database backup storage.", + "summary": "Update backup storage", "operationId": "postgresqlUpdateBackupStorage", "tags": [ "postgresql" @@ -52962,7 +53686,7 @@ "deprecated": false, "x-appwrite": { "method": "updateBackupStorage", - "group": "databases", + "group": "backups", "cookies": false, "type": "", "demo": "postgresql\/update-backup-storage.md", @@ -53057,7 +53781,7 @@ }, "\/postgresql\/{databaseId}\/backups\/{backupId}": { "get": { - "summary": "Get a database backup.", + "summary": "Get backup", "operationId": "postgresqlGetBackup", "tags": [ "postgresql" @@ -53078,7 +53802,7 @@ "deprecated": false, "x-appwrite": { "method": "getBackup", - "group": "databases", + "group": "backups", "cookies": false, "type": "", "demo": "postgresql\/get-backup.md", @@ -53126,7 +53850,7 @@ ] }, "delete": { - "summary": "Delete a database backup.", + "summary": "Delete backup", "operationId": "postgresqlDeleteBackup", "tags": [ "postgresql" @@ -53140,7 +53864,7 @@ "deprecated": false, "x-appwrite": { "method": "deleteBackup", - "group": "databases", + "group": "backups", "cookies": false, "type": "", "demo": "postgresql\/delete-backup.md", @@ -53193,7 +53917,7 @@ }, "\/postgresql\/{databaseId}\/branches": { "get": { - "summary": "List database branches.", + "summary": "List branches", "operationId": "postgresqlListBranches", "tags": [ "postgresql" @@ -53214,7 +53938,7 @@ "deprecated": false, "x-appwrite": { "method": "listBranches", - "group": "databases", + "group": "branches", "cookies": false, "type": "", "demo": "postgresql\/list-branches.md", @@ -53252,7 +53976,7 @@ ] }, "post": { - "summary": "Create a database branch.", + "summary": "Create branch", "operationId": "postgresqlCreateBranch", "tags": [ "postgresql" @@ -53273,7 +53997,7 @@ "deprecated": false, "x-appwrite": { "method": "createBranch", - "group": "databases", + "group": "branches", "cookies": false, "type": "", "demo": "postgresql\/create-branch.md", @@ -53340,7 +54064,7 @@ }, "\/postgresql\/{databaseId}\/branches\/{branchId}": { "delete": { - "summary": "Delete a database branch.", + "summary": "Delete branch", "operationId": "postgresqlDeleteBranch", "tags": [ "postgresql" @@ -53361,7 +54085,7 @@ "deprecated": false, "x-appwrite": { "method": "deleteBranch", - "group": "databases", + "group": "branches", "cookies": false, "type": "", "demo": "postgresql\/delete-branch.md", @@ -53411,7 +54135,7 @@ }, "\/postgresql\/{databaseId}\/credentials": { "patch": { - "summary": "Rotate database credentials.", + "summary": "Update credentials", "operationId": "postgresqlUpdateCredentials", "tags": [ "postgresql" @@ -53432,7 +54156,7 @@ "deprecated": false, "x-appwrite": { "method": "updateCredentials", - "group": "databases", + "group": "postgresql", "cookies": false, "type": "", "demo": "postgresql\/update-credentials.md", @@ -53472,7 +54196,7 @@ }, "\/postgresql\/{databaseId}\/executions": { "post": { - "summary": "Execute a SQL statement against a dedicated database.", + "summary": "Create execution", "operationId": "postgresqlCreateExecution", "tags": [ "postgresql" @@ -53493,7 +54217,7 @@ "deprecated": false, "x-appwrite": { "method": "createExecution", - "group": "databases", + "group": "executions", "cookies": false, "type": "", "demo": "postgresql\/create-execution.md", @@ -53566,7 +54290,7 @@ }, "\/postgresql\/{databaseId}\/extensions": { "get": { - "summary": "List database extensions.", + "summary": "List extensions", "operationId": "postgresqlListExtensions", "tags": [ "postgresql" @@ -53587,7 +54311,7 @@ "deprecated": false, "x-appwrite": { "method": "listExtensions", - "group": "databases", + "group": "extensions", "cookies": false, "type": "", "demo": "postgresql\/list-extensions.md", @@ -53625,7 +54349,7 @@ ] }, "post": { - "summary": "Install a database extension.", + "summary": "Create extension", "operationId": "postgresqlCreateExtension", "tags": [ "postgresql" @@ -53646,7 +54370,7 @@ "deprecated": false, "x-appwrite": { "method": "createExtension", - "group": "databases", + "group": "extensions", "cookies": false, "type": "", "demo": "postgresql\/create-extension.md", @@ -53705,7 +54429,7 @@ }, "\/postgresql\/{databaseId}\/extensions\/{extensionName}": { "delete": { - "summary": "Uninstall a database extension.", + "summary": "Delete extension", "operationId": "postgresqlDeleteExtension", "tags": [ "postgresql" @@ -53726,7 +54450,7 @@ "deprecated": false, "x-appwrite": { "method": "deleteExtension", - "group": "databases", + "group": "extensions", "cookies": false, "type": "", "demo": "postgresql\/delete-extension.md", @@ -53776,7 +54500,7 @@ }, "\/postgresql\/{databaseId}\/failovers": { "post": { - "summary": "Trigger manual failover.", + "summary": "Create failover", "operationId": "postgresqlCreateFailover", "tags": [ "postgresql" @@ -53797,7 +54521,7 @@ "deprecated": false, "x-appwrite": { "method": "createFailover", - "group": "databases", + "group": "failovers", "cookies": false, "type": "", "demo": "postgresql\/create-failover.md", @@ -53854,7 +54578,7 @@ }, "\/postgresql\/{databaseId}\/maintenance": { "patch": { - "summary": "Update database maintenance window.", + "summary": "Update maintenance", "operationId": "postgresqlUpdateMaintenance", "tags": [ "postgresql" @@ -53875,7 +54599,7 @@ "deprecated": false, "x-appwrite": { "method": "updateMaintenance", - "group": "databases", + "group": "postgresql", "cookies": false, "type": "", "demo": "postgresql\/update-maintenance.md", @@ -53941,7 +54665,7 @@ }, "\/postgresql\/{databaseId}\/migrations": { "post": { - "summary": "Migrate database between shared and dedicated.", + "summary": "Create migration", "operationId": "postgresqlCreateMigration", "tags": [ "postgresql" @@ -53962,7 +54686,7 @@ "deprecated": false, "x-appwrite": { "method": "createMigration", - "group": "databases", + "group": "migrations", "cookies": false, "type": "", "demo": "postgresql\/create-migration.md", @@ -54027,7 +54751,7 @@ }, "\/postgresql\/{databaseId}\/pitr": { "get": { - "summary": "Get PITR recovery windows.", + "summary": "Get PITR", "operationId": "postgresqlGetPitr", "tags": [ "postgresql" @@ -54048,7 +54772,7 @@ "deprecated": false, "x-appwrite": { "method": "getPitr", - "group": "databases", + "group": "pitr", "cookies": false, "type": "", "demo": "postgresql\/get-pitr.md", @@ -54088,7 +54812,7 @@ }, "\/postgresql\/{databaseId}\/pooler": { "get": { - "summary": "Get connection pooler configuration.", + "summary": "Get pooler", "operationId": "postgresqlGetPooler", "tags": [ "postgresql" @@ -54109,7 +54833,7 @@ "deprecated": false, "x-appwrite": { "method": "getPooler", - "group": "databases", + "group": "pooler", "cookies": false, "type": "", "demo": "postgresql\/get-pooler.md", @@ -54147,7 +54871,7 @@ ] }, "patch": { - "summary": "Update connection pooler configuration.", + "summary": "Update pooler", "operationId": "postgresqlUpdatePooler", "tags": [ "postgresql" @@ -54168,7 +54892,7 @@ "deprecated": false, "x-appwrite": { "method": "updatePooler", - "group": "databases", + "group": "pooler", "cookies": false, "type": "", "demo": "postgresql\/update-pooler.md", @@ -54269,7 +54993,7 @@ }, "\/postgresql\/{databaseId}\/replicas": { "get": { - "summary": "Get replica status.", + "summary": "Get replicas", "operationId": "postgresqlGetReplicas", "tags": [ "postgresql" @@ -54290,7 +55014,7 @@ "deprecated": false, "x-appwrite": { "method": "getReplicas", - "group": "databases", + "group": "replicas", "cookies": false, "type": "", "demo": "postgresql\/get-replicas.md", @@ -54330,7 +55054,7 @@ }, "\/postgresql\/{databaseId}\/restorations": { "get": { - "summary": "List database restorations.", + "summary": "List restorations", "operationId": "postgresqlListRestorations", "tags": [ "postgresql" @@ -54351,7 +55075,7 @@ "deprecated": false, "x-appwrite": { "method": "listRestorations", - "group": "databases", + "group": "restorations", "cookies": false, "type": "", "demo": "postgresql\/list-restorations.md", @@ -54433,7 +55157,7 @@ ] }, "post": { - "summary": "Create a database restoration.", + "summary": "Create restoration", "operationId": "postgresqlCreateRestoration", "tags": [ "postgresql" @@ -54454,7 +55178,7 @@ "deprecated": false, "x-appwrite": { "method": "createRestoration", - "group": "databases", + "group": "restorations", "cookies": false, "type": "", "demo": "postgresql\/create-restoration.md", @@ -54524,7 +55248,7 @@ }, "\/postgresql\/{databaseId}\/restorations\/{restorationId}": { "get": { - "summary": "Get a database restoration.", + "summary": "Get restoration", "operationId": "postgresqlGetRestoration", "tags": [ "postgresql" @@ -54545,7 +55269,7 @@ "deprecated": false, "x-appwrite": { "method": "getRestoration", - "group": "databases", + "group": "restorations", "cookies": false, "type": "", "demo": "postgresql\/get-restoration.md", @@ -54595,7 +55319,7 @@ }, "\/postgresql\/{databaseId}\/status": { "get": { - "summary": "Get database status.", + "summary": "Get status", "operationId": "postgresqlGetStatus", "tags": [ "postgresql" @@ -54616,7 +55340,7 @@ "deprecated": false, "x-appwrite": { "method": "getStatus", - "group": "databases", + "group": "postgresql", "cookies": false, "type": "", "demo": "postgresql\/get-status.md", @@ -54656,7 +55380,7 @@ }, "\/postgresql\/{databaseId}\/upgrades": { "post": { - "summary": "Upgrade database version.", + "summary": "Create upgrade", "operationId": "postgresqlCreateUpgrade", "tags": [ "postgresql" @@ -54677,7 +55401,7 @@ "deprecated": false, "x-appwrite": { "method": "createUpgrade", - "group": "databases", + "group": "postgresql", "cookies": false, "type": "", "demo": "postgresql\/create-upgrade.md", @@ -57165,6 +57889,13 @@ "format": "int32", "x-nullable": true }, + "installationAccessTokenDuration": { + "type": "integer", + "description": "Access token duration in seconds for app installation access tokens. Leave empty to use default 1 hour.", + "x-example": 60, + "format": "int32", + "x-nullable": true + }, "confidentialPkce": { "type": "boolean", "description": "When enabled, PKCE is required for confidential clients (server-side flows using client_secret). PKCE is always required for public clients regardless of this setting.", @@ -65573,104 +66304,21 @@ "x-example": "" }, "in": "path" - }, - { - "name": "queries", - "description": "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: accessedAt, expire", - "required": false, - "schema": { - "type": "array", - "items": { - "type": "string" - }, - "default": [] - }, - "in": "query" - } - ] - }, - "post": { - "summary": "Create dev key", - "operationId": "projectsCreateDevKey", - "tags": [ - "projects" - ], - "description": "Create a new project dev key. Dev keys are project specific and allow you to bypass rate limits and get better error logging during development. Strictly meant for development purposes only.", - "responses": { - "201": { - "description": "DevKey", - "content": { - "application\/json": { - "schema": { - "$ref": "#\/components\/schemas\/devKey" - } - } - } - } - }, - "deprecated": false, - "x-appwrite": { - "method": "createDevKey", - "group": "devKeys", - "cookies": false, - "type": "", - "demo": "projects\/create-dev-key.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", - "scope": "devKeys.write", - "platforms": [ - "console" - ], - "packaging": false, - "public": true, - "auth": { - "Project": [] - } - }, - "security": [ - { - "Project": [] - } - ], - "parameters": [ - { - "name": "projectId", - "description": "Project unique ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "in": "path" - } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "name": { - "type": "string", - "description": "Key name. Max length: 128 chars.", - "x-example": "" - }, - "expire": { - "type": "string", - "description": "Expiration time in [ISO 8601](https:\/\/www.iso.org\/iso-8601-date-and-time-format.html) format.", - "x-example": "2020-10-15T06:38:00.000+00:00", - "format": "datetime" - } - }, - "required": [ - "name", - "expire" - ] - } - } + }, + { + "name": "queries", + "description": "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: accessedAt, expire", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + }, + "default": [] + }, + "in": "query" } - } + ] } }, "\/projects\/{projectId}\/dev-keys\/{keyId}": { @@ -71910,7 +72558,7 @@ }, "\/tablesdb\/specifications": { "get": { - "summary": "List dedicated database specifications.", + "summary": "List specifications", "operationId": "tablesDBListSpecifications", "tags": [ "tablesDB" @@ -71931,7 +72579,7 @@ "deprecated": false, "x-appwrite": { "method": "listSpecifications", - "group": "databases", + "group": "tablesdb", "cookies": false, "type": "", "demo": "tablesdb\/list-specifications.md", @@ -72610,7 +73258,7 @@ }, "\/tablesdb\/{databaseId}\/failovers": { "post": { - "summary": "Trigger manual failover.", + "summary": "Create failover", "operationId": "tablesDBCreateFailover", "tags": [ "tablesDB" @@ -72631,7 +73279,7 @@ "deprecated": false, "x-appwrite": { "method": "createFailover", - "group": "databases", + "group": "failovers", "cookies": false, "type": "", "demo": "tablesdb\/create-failover.md", @@ -72688,7 +73336,7 @@ }, "\/tablesdb\/{databaseId}\/migrations": { "get": { - "summary": "List TablesDB dedicated migrations.", + "summary": "List migrations", "operationId": "tablesDBListMigrations", "tags": [ "tablesDB" @@ -72709,7 +73357,7 @@ "deprecated": false, "x-appwrite": { "method": "listMigrations", - "group": "databases", + "group": "migrations", "cookies": false, "type": "", "demo": "tablesdb\/list-migrations.md", @@ -72745,7 +73393,7 @@ ] }, "post": { - "summary": "Start a TablesDB dedicated migration.", + "summary": "Create migration", "operationId": "tablesDBCreateMigration", "tags": [ "tablesDB" @@ -72766,7 +73414,7 @@ "deprecated": false, "x-appwrite": { "method": "createMigration", - "group": "databases", + "group": "migrations", "cookies": false, "type": "", "demo": "tablesdb\/create-migration.md", @@ -72823,7 +73471,7 @@ }, "\/tablesdb\/{databaseId}\/migrations\/{migrationId}": { "get": { - "summary": "Get a TablesDB dedicated migration.", + "summary": "Get migration", "operationId": "tablesDBGetMigration", "tags": [ "tablesDB" @@ -72844,7 +73492,7 @@ "deprecated": false, "x-appwrite": { "method": "getMigration", - "group": "databases", + "group": "migrations", "cookies": false, "type": "", "demo": "tablesdb\/get-migration.md", @@ -72890,7 +73538,7 @@ ] }, "delete": { - "summary": "Abort a TablesDB dedicated migration.", + "summary": "Delete migration", "operationId": "tablesDBDeleteMigration", "tags": [ "tablesDB" @@ -72904,7 +73552,7 @@ "deprecated": false, "x-appwrite": { "method": "deleteMigration", - "group": "databases", + "group": "migrations", "cookies": false, "type": "", "demo": "tablesdb\/delete-migration.md", @@ -72955,7 +73603,7 @@ }, "\/tablesdb\/{databaseId}\/replicas": { "get": { - "summary": "Get replica status.", + "summary": "Get replicas", "operationId": "tablesDBGetReplicas", "tags": [ "tablesDB" @@ -72976,7 +73624,7 @@ "deprecated": false, "x-appwrite": { "method": "getReplicas", - "group": "databases", + "group": "replicas", "cookies": false, "type": "", "demo": "tablesdb\/get-replicas.md", @@ -73016,7 +73664,7 @@ }, "\/tablesdb\/{databaseId}\/status": { "get": { - "summary": "Get database status.", + "summary": "Get status", "operationId": "tablesDBGetStatus", "tags": [ "tablesDB" @@ -73037,7 +73685,7 @@ "deprecated": false, "x-appwrite": { "method": "getStatus", - "group": "databases", + "group": "tablesdb", "cookies": false, "type": "", "demo": "tablesdb\/get-status.md", @@ -80414,27 +81062,421 @@ "schema": { "type": "object", "properties": { - "name": { + "name": { + "type": "string", + "description": "New team name. Max length: 128 chars.", + "x-example": "" + } + }, + "required": [ + "name" + ] + } + } + } + } + }, + "delete": { + "summary": "Delete team", + "operationId": "teamsDelete", + "tags": [ + "teams" + ], + "description": "Delete a team using its ID. Only team members with the owner role can delete the team.", + "responses": { + "204": { + "description": "No content" + } + }, + "deprecated": false, + "x-appwrite": { + "method": "delete", + "group": "teams", + "cookies": false, + "type": "", + "demo": "teams\/delete.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "teams.write", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/delete-team.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "teamId", + "description": "Team ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + } + ] + } + }, + "\/teams\/{teamId}\/installations": { + "get": { + "summary": "List Installations", + "operationId": "teamsListInstallations", + "tags": [ + "teams" + ], + "description": "List app installations on a team. Any team member can read installations.", + "responses": { + "200": { + "description": "App installations list", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/appInstallationList" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "listInstallations", + "group": null, + "cookies": false, + "type": "", + "demo": "teams\/list-installations.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},userId:{userId}", + "scope": "teams.read", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "teamId", + "description": "Team ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "queries", + "description": "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.", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + }, + "default": [] + }, + "in": "query" + }, + { + "name": "total", + "description": "When set to false, the total count returned will be 0 and will not be calculated.", + "required": false, + "schema": { + "type": "boolean", + "x-example": false, + "default": true + }, + "in": "query" + } + ] + }, + "post": { + "summary": "Create Installation", + "operationId": "teamsCreateInstallation", + "tags": [ + "teams" + ], + "description": "Install an app on a team. When authenticated as a user, only team members with the owner role can install apps. Requests using an API key or in admin mode can install apps on any team. The installation is granted the scopes the app currently requests.", + "responses": { + "201": { + "description": "AppInstallation", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/appInstallation" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createInstallation", + "group": null, + "cookies": false, + "type": "", + "demo": "teams\/create-installation.md", + "rate-limit": 60, + "rate-time": 60, + "rate-key": "ip:{ip},userId:{userId}", + "scope": "teams.write", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "teamId", + "description": "Team ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "appId": { "type": "string", - "description": "New team name. Max length: 128 chars.", - "x-example": "" + "description": "Application unique ID.", + "x-example": "" + }, + "authorizationDetails": { + "type": "string", + "description": "Authorization details granted to the installation as a JSON array of objects, each with a `type` and app-defined fields. The Appwrite Console stores authorized project IDs here.", + "default": "", + "x-example": "" } }, "required": [ - "name" + "appId" ] } } } } + } + }, + "\/teams\/{teamId}\/installations\/{installationId}": { + "get": { + "summary": "Get Installation", + "operationId": "teamsGetInstallation", + "tags": [ + "teams" + ], + "description": "Get an app installation on a team by its unique ID. Any team member can read installations.", + "responses": { + "200": { + "description": "AppInstallation", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/appInstallation" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "getInstallation", + "group": null, + "cookies": false, + "type": "", + "demo": "teams\/get-installation.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},userId:{userId}", + "scope": "teams.read", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "teamId", + "description": "Team ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "installationId", + "description": "Installation unique ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + } + ] + }, + "put": { + "summary": "Update Installation", + "operationId": "teamsUpdateInstallation", + "tags": [ + "teams" + ], + "description": "Update an app installation on a team. Only team members with the owner role can update installations. The installation's granted scopes are refreshed to the scopes the app currently requests; previously issued installation access tokens are revoked.", + "responses": { + "200": { + "description": "AppInstallation", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/appInstallation" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateInstallation", + "group": null, + "cookies": false, + "type": "", + "demo": "teams\/update-installation.md", + "rate-limit": 60, + "rate-time": 60, + "rate-key": "ip:{ip},userId:{userId}", + "scope": "teams.write", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "teamId", + "description": "Team ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "installationId", + "description": "Installation unique ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "authorizationDetails": { + "type": "string", + "description": "Authorization details granted to the installation as a JSON array of objects, each with a `type` and app-defined fields. Omit to keep the current value.", + "x-example": "", + "x-nullable": true + } + } + } + } + } + } }, "delete": { - "summary": "Delete team", - "operationId": "teamsDelete", + "summary": "Delete Installation", + "operationId": "teamsDeleteInstallation", "tags": [ "teams" ], - "description": "Delete a team using its ID. Only team members with the owner role can delete the team.", + "description": "Uninstall an app from a team by its installation ID. Only team members with the owner role can remove installations. Previously issued installation access tokens are revoked.", "responses": { "204": { "description": "No content" @@ -80442,14 +81484,14 @@ }, "deprecated": false, "x-appwrite": { - "method": "delete", - "group": "teams", + "method": "deleteInstallation", + "group": null, "cookies": false, "type": "", - "demo": "teams\/delete.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", + "demo": "teams\/delete-installation.md", + "rate-limit": 60, + "rate-time": 60, + "rate-key": "ip:{ip},userId:{userId}", "scope": "teams.write", "platforms": [ "console", @@ -80458,7 +81500,9 @@ ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/delete-team.md", + "produces": [ + "application\/json" + ], "auth": { "Project": [] } @@ -80481,6 +81525,16 @@ "x-example": "" }, "in": "path" + }, + { + "name": "installationId", + "description": "Installation unique ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" } ] } @@ -87036,7 +88090,7 @@ }, "\/vectorsdb\/specifications": { "get": { - "summary": "List dedicated database specifications.", + "summary": "List specifications", "operationId": "vectorsDBListSpecifications", "tags": [ "vectorsDB" @@ -87057,7 +88111,7 @@ "deprecated": false, "x-appwrite": { "method": "listSpecifications", - "group": "databases", + "group": "vectorsdb", "cookies": false, "type": "", "demo": "vectorsdb\/list-specifications.md", @@ -88806,6 +89860,119 @@ ] } }, + "\/vectorsdb\/{databaseId}\/collections\/{collectionId}\/documents\/query": { + "post": { + "summary": "Create query", + "operationId": "vectorsDBCreateQuery", + "tags": [ + "vectorsDB" + ], + "description": "Get a list of all the user's documents in a given collection using a POST request. This behaves identically to the list documents endpoint but accepts the queries in the request body, allowing much larger `queries` arrays than can fit in a URL query string.\n", + "responses": { + "200": { + "description": "Documents List", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/documentList" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createQuery", + "group": "documents", + "cookies": false, + "type": "", + "demo": "vectorsdb\/create-query.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "documents.read", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/vectorsdb\/create-query.md", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "queries": { + "type": "array", + "description": "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.", + "default": [], + "x-example": null, + "items": { + "type": "string" + } + }, + "transactionId": { + "type": "string", + "description": "Transaction ID to read uncommitted changes within the transaction.", + "x-example": "" + }, + "total": { + "type": "boolean", + "description": "When set to false, the total count returned will be 0 and will not be calculated.", + "default": true, + "x-example": false + }, + "ttl": { + "type": "integer", + "description": "TTL (seconds) for cached responses when caching is enabled for select queries. Must be between 0 and 86400 (24 hours).", + "default": 0, + "x-example": 0, + "format": "int32" + } + } + } + } + } + } + } + }, "\/vectorsdb\/{databaseId}\/collections\/{collectionId}\/documents\/{documentId}": { "get": { "summary": "Get document", @@ -89660,7 +90827,7 @@ }, "\/vectorsdb\/{databaseId}\/failovers": { "post": { - "summary": "Trigger manual failover.", + "summary": "Create failover", "operationId": "vectorsDBCreateFailover", "tags": [ "vectorsDB" @@ -89681,7 +90848,7 @@ "deprecated": false, "x-appwrite": { "method": "createFailover", - "group": "databases", + "group": "failovers", "cookies": false, "type": "", "demo": "vectorsdb\/create-failover.md", @@ -89738,7 +90905,7 @@ }, "\/vectorsdb\/{databaseId}\/replicas": { "get": { - "summary": "Get replica status.", + "summary": "Get replicas", "operationId": "vectorsDBGetReplicas", "tags": [ "vectorsDB" @@ -89759,7 +90926,7 @@ "deprecated": false, "x-appwrite": { "method": "getReplicas", - "group": "databases", + "group": "replicas", "cookies": false, "type": "", "demo": "vectorsdb\/get-replicas.md", @@ -89799,7 +90966,7 @@ }, "\/vectorsdb\/{databaseId}\/status": { "get": { - "summary": "Get database status.", + "summary": "Get status", "operationId": "vectorsDBGetStatus", "tags": [ "vectorsDB" @@ -89820,7 +90987,7 @@ "deprecated": false, "x-appwrite": { "method": "getStatus", - "group": "databases", + "group": "vectorsdb", "cookies": false, "type": "", "demo": "vectorsdb\/get-status.md", @@ -91548,10 +92715,26 @@ } }, "tags": [ + { + "name": "ping", + "description": "" + }, { "name": "account", "description": "The Account service allows you to authenticate and manage a user account." }, + { + "name": "locale", + "description": "The Locale service allows you to customize your app based on your users' location." + }, + { + "name": "users", + "description": "The Users service allows you to manage your project users." + }, + { + "name": "messaging", + "description": "The Messaging service allows you to send messages to any provider type (SMTP, push notification, SMS, etc.)." + }, { "name": "avatars", "description": "The Avatars service aims to help you complete everyday tasks related to your app image, icons, and avatars." @@ -91561,76 +92744,136 @@ "description": "The Databases service allows you to create structured collections of documents, query and filter lists of documents" }, { - "name": "tablesdb", + "name": "tablesDB", "description": "The TablesDB service allows you to create structured tables of columns, query and filter lists of rows" }, { - "name": "locale", - "description": "The Locale service allows you to customize your app based on your users' location." + "name": "documentsDB", + "description": "" }, { - "name": "projects", - "description": "The Project service allows you to manage all the projects in your Appwrite server." + "name": "vectorsDB", + "description": "" }, { - "name": "project", + "name": "projects", "description": "The Project service allows you to manage all the projects in your Appwrite server." }, { - "name": "storage", - "description": "The Storage service allows you to manage your project files." + "name": "presences", + "description": "The Presences service allows you to track and manage real-time user presence in your project." }, { - "name": "teams", - "description": "The Teams service allows you to group users of your project and to enable them to share read and write access to your project resources" + "name": "functions", + "description": "The Functions Service allows you view, create and manage your Cloud Functions." }, { - "name": "users", - "description": "The Users service allows you to manage your project users." + "name": "notifications", + "description": "The Notifications service allows you to read and manage your Appwrite Console notifications." }, { "name": "sites", "description": "The Sites Service allows you view, create and manage your web applications." }, { - "name": "functions", - "description": "The Functions Service allows you view, create and manage your Cloud Functions." + "name": "console", + "description": "The Console service allows you to interact with console relevant information." }, { "name": "proxy", "description": "The Proxy Service allows you to configure actions for your domains beyond DNS configuration." }, { - "name": "graphql", - "description": "The GraphQL API allows you to query and mutate your Appwrite server using GraphQL." + "name": "teams", + "description": "The Teams service allows you to group users of your project and to enable them to share read and write access to your project resources" }, { - "name": "console", - "description": "The Console service allows you to interact with console relevant information." + "name": "tokens", + "description": "The Tokens service allows you to create and manage resource tokens for secure file access." }, { - "name": "organization", - "description": "The Organization service allows you to manage organization-level projects." + "name": "storage", + "description": "The Storage service allows you to manage your project files." + }, + { + "name": "vcs", + "description": "The VCS service allows you to interact with providers like GitHub, GitLab etc." + }, + { + "name": "webhooks", + "description": "The Webhooks service allows you to manage your project webhooks." }, { "name": "migrations", "description": "The Migrations service allows you to migrate third-party data to your Appwrite project." }, { - "name": "messaging", - "description": "The Messaging service allows you to send messages to any provider type (SMTP, push notification, SMS, etc.)." + "name": "organization", + "description": "The Organization service allows you to manage organization-level projects." }, { - "name": "notifications", - "description": "The Notifications service allows you to read and manage your Appwrite Console notifications." + "name": "project", + "description": "The Project service allows you to manage all the projects in your Appwrite server." }, { "name": "advisor", "description": "The Advisor service surfaces actionable reports about your project resources, with CTA descriptors for one-click remediation in the console." }, + { + "name": "mysql", + "description": "" + }, + { + "name": "postgresql", + "description": "" + }, + { + "name": "mongo", + "description": "" + }, + { + "name": "apps", + "description": "" + }, { "name": "oauth2", "description": "The OAuth2 service allows you to authorize apps and issue standards-based OAuth2 and OpenID Connect tokens." + }, + { + "name": "domains", + "description": "" + }, + { + "name": "manager", + "description": "" + }, + { + "name": "organizations", + "description": "The Organizations service allows you to manage organization billing, plans, invoices, and add-ons." + }, + { + "name": "backups", + "description": "The Backups service allows you to manage backup policies, archives, and restorations for your project." + }, + { + "name": "activities", + "description": "The Activities service allows you to list and inspect project activity events." + }, + { + "name": "usage", + "description": "" + }, + { + "name": "waf", + "description": "" + }, + { + "name": "graphql", + "description": "The GraphQL API allows you to query and mutate your Appwrite server using GraphQL." + }, + { + "name": "assistant", + "description": "" } ], "components": { @@ -102630,6 +103873,13 @@ "format": "int32", "nullable": true }, + "oAuth2ServerInstallationAccessTokenDuration": { + "type": "integer", + "description": "OAuth2 server access token duration in seconds for app installation access tokens", + "x-example": 3600, + "format": "int32", + "nullable": true + }, "oAuth2ServerConfidentialPkce": { "type": "boolean", "description": "When enabled, PKCE is required for confidential clients (server-side flows using client_secret). PKCE is always required for public clients regardless of this setting.", @@ -102747,6 +103997,7 @@ "oAuth2ServerRefreshTokenDuration": 86400, "oAuth2ServerPublicAccessTokenDuration": 3600, "oAuth2ServerPublicRefreshTokenDuration": 2592000, + "oAuth2ServerInstallationAccessTokenDuration": 3600, "oAuth2ServerConfidentialPkce": false, "oAuth2ServerVerificationUrl": "https:\/\/cloud.appwrite.io\/device", "oAuth2ServerUserCodeLength": 8, @@ -116263,6 +117514,21 @@ "description": "ID of user who owns the application, if owned by user. Otherwise, team ID will be used.", "x-example": "5e5ea5c16897e" }, + "installationScopes": { + "type": "array", + "description": "Scopes the application requests when installed on a team. Organization-level and project-level scopes only.", + "items": { + "type": "string" + }, + "x-example": [ + "organization:organization.read" + ] + }, + "installationRedirectUrl": { + "type": "string", + "description": "URL users are redirected to after creating or updating an installation of this application. Empty for no redirect.", + "x-example": "https:\/\/example.com\/setup" + }, "secrets": { "type": "array", "description": "List of application secrets.", @@ -116296,6 +117562,8 @@ "deviceFlow", "teamId", "userId", + "installationScopes", + "installationRedirectUrl", "secrets" ], "example": { @@ -116335,6 +117603,10 @@ "deviceFlow": false, "teamId": "5e5ea5c16897e", "userId": "5e5ea5c16897e", + "installationScopes": [ + "organization:organization.read" + ], + "installationRedirectUrl": "https:\/\/example.com\/setup", "secrets": [] } }, @@ -116529,6 +117801,181 @@ "deprecated": false } }, + "appInstallation": { + "description": "AppInstallation", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "Installation ID.", + "x-example": "5e5ea5c16897e" + }, + "$createdAt": { + "type": "string", + "description": "Installation creation time in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Installation update time in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "appId": { + "type": "string", + "description": "ID of the installed application.", + "x-example": "5e5ea5c16897e" + }, + "teamId": { + "type": "string", + "description": "ID of the team the application is installed on.", + "x-example": "5e5ea5c16897e" + }, + "scopes": { + "type": "array", + "description": "Scopes granted to the application. Snapshot of the application's installation scopes taken when the installation was created or last updated.", + "items": { + "type": "string" + }, + "x-example": [ + "organization:organization.read" + ] + }, + "authorizationDetails": { + "type": "object", + "additionalProperties": true, + "description": "Authorization details granted to the application. Rich authorization request (RFC 9396) style entries; the Appwrite Console stores authorized project IDs here.", + "x-example": [ + { + "type": "project", + "identifiers": [ + "*" + ] + } + ] + }, + "createdById": { + "type": "string", + "description": "ID of the user who created the installation.", + "x-example": "5e5ea5c16897e" + }, + "createdByName": { + "type": "string", + "description": "Name of the user who created the installation.", + "x-example": "Walter White" + }, + "lastAccessedAt": { + "type": "string", + "description": "Time an access token was last issued for the installation in ISO 8601 format. Null if never used.", + "x-example": "2020-10-15T06:38:00.000+00:00", + "nullable": true + } + }, + "required": [ + "$id", + "$createdAt", + "$updatedAt", + "appId", + "teamId", + "scopes", + "authorizationDetails", + "createdById", + "createdByName" + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "appId": "5e5ea5c16897e", + "teamId": "5e5ea5c16897e", + "scopes": [ + "organization:organization.read" + ], + "authorizationDetails": [ + { + "type": "project", + "identifiers": [ + "*" + ] + } + ], + "createdById": "5e5ea5c16897e", + "createdByName": "Walter White", + "lastAccessedAt": "2020-10-15T06:38:00.000+00:00" + } + }, + "appKey": { + "description": "AppKey", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "App key ID.", + "x-example": "5e5ea5c16897e" + }, + "$createdAt": { + "type": "string", + "description": "App key creation time in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "App key update time in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "appId": { + "type": "string", + "description": "Application ID this app key belongs to.", + "x-example": "5e5ea5c16897e" + }, + "secret": { + "type": "string", + "description": "App key secret.", + "x-example": "5f3c8d2a1b9e4f7a6c8b2d1e9f4a7b3c5d8e1f2a9b4c7d6e3f5a8b1c4d7e2f9a" + }, + "hint": { + "type": "string", + "description": "Last few characters of the app key secret, used to help identify it.", + "x-example": "f5c6c7" + }, + "createdById": { + "type": "string", + "description": "ID of the user who created the app key.", + "x-example": "5e5ea5c16897e" + }, + "createdByName": { + "type": "string", + "description": "Name of the user who created the app key.", + "x-example": "Walter White" + }, + "lastAccessedAt": { + "type": "string", + "description": "Time the app key was last used for authentication in ISO 8601 format. Null if never used.", + "x-example": "2020-10-15T06:38:00.000+00:00", + "nullable": true + } + }, + "required": [ + "$id", + "$createdAt", + "$updatedAt", + "appId", + "secret", + "hint", + "createdById", + "createdByName" + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "appId": "5e5ea5c16897e", + "secret": "5f3c8d2a1b9e4f7a6c8b2d1e9f4a7b3c5d8e1f2a9b4c7d6e3f5a8b1c4d7e2f9a", + "hint": "f5c6c7", + "createdById": "5e5ea5c16897e", + "createdByName": "Walter White", + "lastAccessedAt": "2020-10-15T06:38:00.000+00:00" + } + }, "oauth2Authorize": { "description": "OAuth2 Authorize", "type": "object", @@ -118551,6 +119998,62 @@ "total": 5, "scopes": "" } + }, + "appInstallationList": { + "description": "App installations list", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of installations that matched your query.", + "x-example": 5, + "format": "int32" + }, + "installations": { + "type": "array", + "description": "List of installations.", + "items": { + "$ref": "#\/components\/schemas\/appInstallation" + }, + "x-example": "" + } + }, + "required": [ + "total", + "installations" + ], + "example": { + "total": 5, + "installations": "" + } + }, + "appKeyList": { + "description": "App keys list", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of keys that matched your query.", + "x-example": 5, + "format": "int32" + }, + "keys": { + "type": "array", + "description": "List of keys.", + "items": { + "$ref": "#\/components\/schemas\/appKey" + }, + "x-example": "" + } + }, + "required": [ + "total", + "keys" + ], + "example": { + "total": 5, + "keys": "" + } } }, "securitySchemes": { diff --git a/specs/1.9.x/open-api3-1.9.x-server.json b/specs/1.9.x/open-api3-1.9.x-server.json index 69f98d839..9b9a747e2 100644 --- a/specs/1.9.x/open-api3-1.9.x-server.json +++ b/specs/1.9.x/open-api3-1.9.x-server.json @@ -4646,6 +4646,59 @@ } } }, + "\/apps\/scopes\/installations": { + "get": { + "summary": "List Installation Scopes", + "operationId": "appsListInstallationScopes", + "tags": [ + "apps" + ], + "description": "List scopes an application can request when installed on a team.", + "responses": { + "200": { + "description": "App scopes list", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/appScopeList" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "listInstallationScopes", + "group": "scopes", + "cookies": false, + "type": "", + "demo": "apps\/list-installation-scopes.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},userId:{userId}", + "scope": "apps.read", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [], + "Session": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "Key": [], + "JWT": [] + } + ] + } + }, "\/apps\/scopes\/oauth2": { "get": { "summary": "List OAuth2 Scopes", @@ -4952,6 +5005,22 @@ "description": "Allow this client to use the OAuth2 Device Authorization Grant (RFC 8628) for input-constrained devices such as TVs and CLIs. Defaults to false.", "default": false, "x-example": false + }, + "installationScopes": { + "type": "array", + "description": "Scopes the application requests when installed on a team. Organization-level and project-level scopes only; use the list scopes endpoint with `type=installation` to discover available values. Maximum of 100 scopes are allowed.", + "default": [], + "x-example": null, + "items": { + "type": "string" + } + }, + "installationRedirectUrl": { + "type": "string", + "description": "URL users are redirected to after creating or updating an installation of this application. Must be an https URL, an http loopback URL (localhost, 127.0.0.1, [::1]), or a private-use scheme URI, and must not contain a fragment. Leave empty for no redirect.", + "default": "", + "x-example": "https:\/\/example.com", + "format": "url" } }, "required": [ @@ -5022,21 +5091,21 @@ ] } }, - "\/apps\/{appId}\/labels": { - "put": { - "summary": "Update Application Labels", - "operationId": "appsUpdateLabels", + "\/apps\/{appId}\/installations": { + "get": { + "summary": "List Installations", + "operationId": "appsListInstallations", "tags": [ "apps" ], - "description": "Update the labels of an application. Labels are read-only for clients; only a server SDK using a project API key can set them. Replaces the previous labels.", + "description": "List installations of an application. Requires an app key sent in the `X-Appwrite-Key` header alongside the `X-Appwrite-App` header.", "responses": { "200": { - "description": "App", + "description": "App installations list", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/app" + "$ref": "#\/components\/schemas\/appInstallationList" } } } @@ -5044,17 +5113,16 @@ }, "deprecated": false, "x-appwrite": { - "method": "updateLabels", - "group": "apps", + "method": "listInstallations", + "group": "installations", "cookies": false, "type": "", - "demo": "apps\/update-labels.md", - "rate-limit": 60, + "demo": "apps\/list-installations.md", + "rate-limit": 120, "rate-time": 60, - "rate-key": "ip:{ip},userId:{userId}", - "scope": "apps.write", + "rate-key": "ip:{ip}", + "scope": "apps.installations.read", "platforms": [ - "console", "server" ], "packaging": false, @@ -5080,47 +5148,49 @@ "x-example": "" }, "in": "path" + }, + { + "name": "queries", + "description": "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.", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + }, + "default": [] + }, + "in": "query" + }, + { + "name": "total", + "description": "When set to false, the total count returned will be 0 and will not be calculated.", + "required": false, + "schema": { + "type": "boolean", + "x-example": false, + "default": true + }, + "in": "query" } - ], - "requestBody": { - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "labels": { - "type": "array", - "description": "Array of application labels. Replaces the previous labels. Maximum of 1000 labels are allowed, each up to 36 alphanumeric characters long.", - "x-example": null, - "items": { - "type": "string" - } - } - }, - "required": [ - "labels" - ] - } - } - } - } + ] } }, - "\/apps\/{appId}\/secrets": { + "\/apps\/{appId}\/installations\/{installationId}": { "get": { - "summary": "List Secrets", - "operationId": "appsListSecrets", + "summary": "Get Installation", + "operationId": "appsGetInstallation", "tags": [ "apps" ], - "description": "List client secrets for an application.", + "description": "Get an installation of an application by its unique ID. Requires an app key sent in the `X-Appwrite-Key` header alongside the `X-Appwrite-App` header.", "responses": { "200": { - "description": "App secrets list", + "description": "AppInstallation", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/appSecretList" + "$ref": "#\/components\/schemas\/appInstallation" } } } @@ -5128,33 +5198,29 @@ }, "deprecated": false, "x-appwrite": { - "method": "listSecrets", - "group": "secrets", + "method": "getInstallation", + "group": "installations", "cookies": false, "type": "", - "demo": "apps\/list-secrets.md", + "demo": "apps\/get-installation.md", "rate-limit": 120, "rate-time": 60, - "rate-key": "ip:{ip},userId:{userId}", - "scope": "apps.read", + "rate-key": "ip:{ip}", + "scope": "apps.installations.read", "platforms": [ - "console", - "client", "server" ], "packaging": false, "public": true, "auth": { "Project": [], - "Session": [] + "Key": [] } }, "security": [ { "Project": [], - "Session": [], - "Key": [], - "JWT": [] + "Key": [] } ], "parameters": [ @@ -5169,45 +5235,33 @@ "in": "path" }, { - "name": "queries", - "description": "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.", - "required": false, - "schema": { - "type": "array", - "items": { - "type": "string" - }, - "default": [] - }, - "in": "query" - }, - { - "name": "total", - "description": "When set to false, the total count returned will be 0 and will not be calculated.", - "required": false, + "name": "installationId", + "description": "Installation unique ID.", + "required": true, "schema": { - "type": "boolean", - "x-example": false, - "default": true + "type": "string", + "x-example": "" }, - "in": "query" + "in": "path" } ] - }, + } + }, + "\/apps\/{appId}\/installations\/{installationId}\/tokens": { "post": { - "summary": "Create Secret", - "operationId": "appsCreateSecret", + "summary": "Create Installation Token", + "operationId": "appsCreateInstallationToken", "tags": [ "apps" ], - "description": "Create a new client secret for an application.", + "description": "Create a token for an installation of an application. Requires an app key sent in the `X-Appwrite-Key` header alongside the `X-Appwrite-App` header. The returned token carries the scopes and authorization details granted to the installation, and can be used as an `Authorization: Bearer` header everywhere OAuth2 access tokens are accepted. Multiple tokens can be active for the same installation at once; each token stays valid until it expires or the installation is updated or deleted.", "responses": { "201": { - "description": "AppSecretPlaintext", + "description": "OAuth2 Token", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/appSecretPlaintext" + "$ref": "#\/components\/schemas\/oauth2Token" } } } @@ -5215,33 +5269,29 @@ }, "deprecated": false, "x-appwrite": { - "method": "createSecret", - "group": "secrets", + "method": "createInstallationToken", + "group": "installations", "cookies": false, "type": "", - "demo": "apps\/create-secret.md", + "demo": "apps\/create-installation-token.md", "rate-limit": 60, "rate-time": 60, - "rate-key": "ip:{ip},userId:{userId}", - "scope": "apps.write", + "rate-key": "ip:{ip}", + "scope": "apps.tokens.write", "platforms": [ - "console", - "client", "server" ], "packaging": false, "public": true, "auth": { "Project": [], - "Session": [] + "Key": [] } }, "security": [ { "Project": [], - "Session": [], - "Key": [], - "JWT": [] + "Key": [] } ], "parameters": [ @@ -5254,25 +5304,35 @@ "x-example": "" }, "in": "path" + }, + { + "name": "installationId", + "description": "Installation unique ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" } ] } }, - "\/apps\/{appId}\/secrets\/{secretId}": { + "\/apps\/{appId}\/keys": { "get": { - "summary": "Get Secret", - "operationId": "appsGetSecret", + "summary": "List App Keys", + "operationId": "appsListKeys", "tags": [ "apps" ], - "description": "Get an application client secret by its unique ID.", + "description": "List app keys for an application.", "responses": { "200": { - "description": "AppSecret", + "description": "App keys list", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/appSecret" + "$ref": "#\/components\/schemas\/appKeyList" } } } @@ -5280,11 +5340,11 @@ }, "deprecated": false, "x-appwrite": { - "method": "getSecret", - "group": "secrets", + "method": "listKeys", + "group": "keys", "cookies": false, "type": "", - "demo": "apps\/get-secret.md", + "demo": "apps\/list-keys.md", "rate-limit": 120, "rate-time": 60, "rate-key": "ip:{ip},userId:{userId}", @@ -5321,36 +5381,57 @@ "in": "path" }, { - "name": "secretId", - "description": "Secret unique ID.", - "required": true, + "name": "queries", + "description": "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.", + "required": false, "schema": { - "type": "string", - "x-example": "" + "type": "array", + "items": { + "type": "string" + }, + "default": [] }, - "in": "path" + "in": "query" + }, + { + "name": "total", + "description": "When set to false, the total count returned will be 0 and will not be calculated.", + "required": false, + "schema": { + "type": "boolean", + "x-example": false, + "default": true + }, + "in": "query" } ] }, - "delete": { - "summary": "Delete Secret", - "operationId": "appsDeleteSecret", + "post": { + "summary": "Create App Key", + "operationId": "appsCreateKey", "tags": [ "apps" ], - "description": "Delete an application client secret by its unique ID.", + "description": "Create a new app key for an application. App keys carry no scopes; send one in the `X-Appwrite-Key` header alongside the `X-Appwrite-App` header to list the application's installations and create installation access tokens.", "responses": { - "204": { - "description": "No content" + "201": { + "description": "AppKey", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/appKey" + } + } + } } }, "deprecated": false, "x-appwrite": { - "method": "deleteSecret", - "group": "secrets", + "method": "createKey", + "group": "keys", "cookies": false, "type": "", - "demo": "apps\/delete-secret.md", + "demo": "apps\/create-key.md", "rate-limit": 60, "rate-time": 60, "rate-key": "ip:{ip},userId:{userId}", @@ -5362,9 +5443,520 @@ ], "packaging": false, "public": true, - "produces": [ - "application\/json" - ], + "auth": { + "Project": [], + "Session": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "appId", + "description": "Application unique ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + } + ] + } + }, + "\/apps\/{appId}\/keys\/{keyId}": { + "get": { + "summary": "Get App Key", + "operationId": "appsGetKey", + "tags": [ + "apps" + ], + "description": "Get an app key by its unique ID.", + "responses": { + "200": { + "description": "AppKey", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/appKey" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "getKey", + "group": "keys", + "cookies": false, + "type": "", + "demo": "apps\/get-key.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},userId:{userId}", + "scope": "apps.read", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [], + "Session": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "appId", + "description": "Application unique ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "keyId", + "description": "App key unique ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + } + ] + }, + "delete": { + "summary": "Delete App Key", + "operationId": "appsDeleteKey", + "tags": [ + "apps" + ], + "description": "Delete an app key by its unique ID.", + "responses": { + "204": { + "description": "No content" + } + }, + "deprecated": false, + "x-appwrite": { + "method": "deleteKey", + "group": "keys", + "cookies": false, + "type": "", + "demo": "apps\/delete-key.md", + "rate-limit": 60, + "rate-time": 60, + "rate-key": "ip:{ip},userId:{userId}", + "scope": "apps.write", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "produces": [ + "application\/json" + ], + "auth": { + "Project": [], + "Session": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "appId", + "description": "Application unique ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "keyId", + "description": "App key unique ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + } + ] + } + }, + "\/apps\/{appId}\/labels": { + "put": { + "summary": "Update Application Labels", + "operationId": "appsUpdateLabels", + "tags": [ + "apps" + ], + "description": "Update the labels of an application. Labels are read-only for clients; only a server SDK using a project API key can set them. Replaces the previous labels.", + "responses": { + "200": { + "description": "App", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/app" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateLabels", + "group": "apps", + "cookies": false, + "type": "", + "demo": "apps\/update-labels.md", + "rate-limit": 60, + "rate-time": 60, + "rate-key": "ip:{ip},userId:{userId}", + "scope": "apps.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "appId", + "description": "Application unique ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "labels": { + "type": "array", + "description": "Array of application labels. Replaces the previous labels. Maximum of 1000 labels are allowed, each up to 36 alphanumeric characters long.", + "x-example": null, + "items": { + "type": "string" + } + } + }, + "required": [ + "labels" + ] + } + } + } + } + } + }, + "\/apps\/{appId}\/secrets": { + "get": { + "summary": "List Secrets", + "operationId": "appsListSecrets", + "tags": [ + "apps" + ], + "description": "List client secrets for an application.", + "responses": { + "200": { + "description": "App secrets list", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/appSecretList" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "listSecrets", + "group": "secrets", + "cookies": false, + "type": "", + "demo": "apps\/list-secrets.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},userId:{userId}", + "scope": "apps.read", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [], + "Session": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "appId", + "description": "Application unique ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "queries", + "description": "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.", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + }, + "default": [] + }, + "in": "query" + }, + { + "name": "total", + "description": "When set to false, the total count returned will be 0 and will not be calculated.", + "required": false, + "schema": { + "type": "boolean", + "x-example": false, + "default": true + }, + "in": "query" + } + ] + }, + "post": { + "summary": "Create Secret", + "operationId": "appsCreateSecret", + "tags": [ + "apps" + ], + "description": "Create a new client secret for an application.", + "responses": { + "201": { + "description": "AppSecretPlaintext", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/appSecretPlaintext" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createSecret", + "group": "secrets", + "cookies": false, + "type": "", + "demo": "apps\/create-secret.md", + "rate-limit": 60, + "rate-time": 60, + "rate-key": "ip:{ip},userId:{userId}", + "scope": "apps.write", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [], + "Session": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "appId", + "description": "Application unique ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + } + ] + } + }, + "\/apps\/{appId}\/secrets\/{secretId}": { + "get": { + "summary": "Get Secret", + "operationId": "appsGetSecret", + "tags": [ + "apps" + ], + "description": "Get an application client secret by its unique ID.", + "responses": { + "200": { + "description": "AppSecret", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/appSecret" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "getSecret", + "group": "secrets", + "cookies": false, + "type": "", + "demo": "apps\/get-secret.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},userId:{userId}", + "scope": "apps.read", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [], + "Session": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "appId", + "description": "Application unique ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "secretId", + "description": "Secret unique ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + } + ] + }, + "delete": { + "summary": "Delete Secret", + "operationId": "appsDeleteSecret", + "tags": [ + "apps" + ], + "description": "Delete an application client secret by its unique ID.", + "responses": { + "204": { + "description": "No content" + } + }, + "deprecated": false, + "x-appwrite": { + "method": "deleteSecret", + "group": "secrets", + "cookies": false, + "type": "", + "demo": "apps\/delete-secret.md", + "rate-limit": 60, + "rate-time": 60, + "rate-key": "ip:{ip},userId:{userId}", + "scope": "apps.write", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "produces": [ + "application\/json" + ], "auth": { "Project": [], "Session": [] @@ -17120,7 +17712,7 @@ }, "\/documentsdb\/specifications": { "get": { - "summary": "List dedicated database specifications.", + "summary": "List specifications", "operationId": "documentsDBListSpecifications", "tags": [ "documentsDB" @@ -17141,7 +17733,7 @@ "deprecated": false, "x-appwrite": { "method": "listSpecifications", - "group": "databases", + "group": "documentsdb", "cookies": false, "type": "", "demo": "documentsdb\/list-specifications.md", @@ -20026,7 +20618,7 @@ }, "\/documentsdb\/{databaseId}\/failovers": { "post": { - "summary": "Trigger manual failover.", + "summary": "Create failover", "operationId": "documentsDBCreateFailover", "tags": [ "documentsDB" @@ -20047,7 +20639,7 @@ "deprecated": false, "x-appwrite": { "method": "createFailover", - "group": "databases", + "group": "failovers", "cookies": false, "type": "", "demo": "documentsdb\/create-failover.md", @@ -20105,7 +20697,7 @@ }, "\/documentsdb\/{databaseId}\/replicas": { "get": { - "summary": "Get replica status.", + "summary": "Get replicas", "operationId": "documentsDBGetReplicas", "tags": [ "documentsDB" @@ -20126,7 +20718,7 @@ "deprecated": false, "x-appwrite": { "method": "getReplicas", - "group": "databases", + "group": "replicas", "cookies": false, "type": "", "demo": "documentsdb\/get-replicas.md", @@ -20167,7 +20759,7 @@ }, "\/documentsdb\/{databaseId}\/status": { "get": { - "summary": "Get database status.", + "summary": "Get status", "operationId": "documentsDBGetStatus", "tags": [ "documentsDB" @@ -20188,7 +20780,7 @@ "deprecated": false, "x-appwrite": { "method": "getStatus", - "group": "databases", + "group": "documentsdb", "cookies": false, "type": "", "demo": "documentsdb\/get-status.md", @@ -29571,7 +30163,7 @@ }, "\/mongo": { "get": { - "summary": "List dedicated databases.", + "summary": "List databases", "operationId": "mongoList", "tags": [ "mongo" @@ -29592,7 +30184,7 @@ "deprecated": false, "x-appwrite": { "method": "list", - "group": "databases", + "group": "mongo", "cookies": false, "type": "", "demo": "mongo\/list.md", @@ -29634,7 +30226,7 @@ ] }, "post": { - "summary": "Create a dedicated database.", + "summary": "Create database", "operationId": "mongoCreate", "tags": [ "mongo" @@ -29655,7 +30247,7 @@ "deprecated": false, "x-appwrite": { "method": "create", - "group": "databases", + "group": "mongo", "cookies": false, "type": "", "demo": "mongo\/create.md", @@ -29804,7 +30396,7 @@ }, "\/mongo\/specifications": { "get": { - "summary": "List dedicated database specifications.", + "summary": "List specifications", "operationId": "mongoListSpecifications", "tags": [ "mongo" @@ -29825,7 +30417,7 @@ "deprecated": false, "x-appwrite": { "method": "listSpecifications", - "group": "databases", + "group": "mongo", "cookies": false, "type": "", "demo": "mongo\/list-specifications.md", @@ -29854,7 +30446,7 @@ }, "\/mongo\/{databaseId}": { "get": { - "summary": "Get dedicated database.", + "summary": "Get database", "operationId": "mongoGet", "tags": [ "mongo" @@ -29875,7 +30467,7 @@ "deprecated": false, "x-appwrite": { "method": "get", - "group": "databases", + "group": "mongo", "cookies": false, "type": "", "demo": "mongo\/get.md", @@ -29914,7 +30506,7 @@ ] }, "patch": { - "summary": "Update dedicated database.", + "summary": "Update database", "operationId": "mongoUpdate", "tags": [ "mongo" @@ -29935,7 +30527,7 @@ "deprecated": false, "x-appwrite": { "method": "update", - "group": "databases", + "group": "mongo", "cookies": false, "type": "", "demo": "mongo\/update.md", @@ -30135,7 +30727,7 @@ } }, "delete": { - "summary": "Delete dedicated database.", + "summary": "Delete database", "operationId": "mongoDelete", "tags": [ "mongo" @@ -30149,7 +30741,7 @@ "deprecated": false, "x-appwrite": { "method": "delete", - "group": "databases", + "group": "mongo", "cookies": false, "type": "", "demo": "mongo\/delete.md", @@ -30193,7 +30785,7 @@ }, "\/mongo\/{databaseId}\/backups": { "get": { - "summary": "List database backups.", + "summary": "List backups", "operationId": "mongoListBackups", "tags": [ "mongo" @@ -30214,7 +30806,7 @@ "deprecated": false, "x-appwrite": { "method": "listBackups", - "group": "databases", + "group": "backups", "cookies": false, "type": "", "demo": "mongo\/list-backups.md", @@ -30266,7 +30858,7 @@ ] }, "post": { - "summary": "Create a database backup.", + "summary": "Create backup", "operationId": "mongoCreateBackup", "tags": [ "mongo" @@ -30287,7 +30879,7 @@ "deprecated": false, "x-appwrite": { "method": "createBackup", - "group": "databases", + "group": "backups", "cookies": false, "type": "", "demo": "mongo\/create-backup.md", @@ -30345,7 +30937,7 @@ }, "\/mongo\/{databaseId}\/backups\/policies": { "get": { - "summary": "List database backup policies.", + "summary": "List backup policies", "operationId": "mongoListBackupPolicies", "tags": [ "mongo" @@ -30366,7 +30958,7 @@ "deprecated": false, "x-appwrite": { "method": "listBackupPolicies", - "group": "databases", + "group": "policies", "cookies": false, "type": "", "demo": "mongo\/list-backup-policies.md", @@ -30418,7 +31010,7 @@ ] }, "post": { - "summary": "Create a database backup policy.", + "summary": "Create backup policy", "operationId": "mongoCreateBackupPolicy", "tags": [ "mongo" @@ -30439,7 +31031,7 @@ "deprecated": false, "x-appwrite": { "method": "createBackupPolicy", - "group": "databases", + "group": "policies", "cookies": false, "type": "", "demo": "mongo\/create-backup-policy.md", @@ -30533,7 +31125,7 @@ }, "\/mongo\/{databaseId}\/backups\/policies\/{policyId}": { "get": { - "summary": "Get a database backup policy.", + "summary": "Get backup policy", "operationId": "mongoGetBackupPolicy", "tags": [ "mongo" @@ -30554,7 +31146,7 @@ "deprecated": false, "x-appwrite": { "method": "getBackupPolicy", - "group": "databases", + "group": "policies", "cookies": false, "type": "", "demo": "mongo\/get-backup-policy.md", @@ -30603,7 +31195,7 @@ ] }, "patch": { - "summary": "Update a database backup policy.", + "summary": "Update backup policy", "operationId": "mongoUpdateBackupPolicy", "tags": [ "mongo" @@ -30624,7 +31216,7 @@ "deprecated": false, "x-appwrite": { "method": "updateBackupPolicy", - "group": "databases", + "group": "policies", "cookies": false, "type": "", "demo": "mongo\/update-backup-policy.md", @@ -30708,7 +31300,7 @@ } }, "delete": { - "summary": "Delete a database backup policy.", + "summary": "Delete backup policy", "operationId": "mongoDeleteBackupPolicy", "tags": [ "mongo" @@ -30722,7 +31314,7 @@ "deprecated": false, "x-appwrite": { "method": "deleteBackupPolicy", - "group": "databases", + "group": "policies", "cookies": false, "type": "", "demo": "mongo\/delete-backup-policy.md", @@ -30776,7 +31368,7 @@ }, "\/mongo\/{databaseId}\/backups\/storage": { "put": { - "summary": "Update database backup storage.", + "summary": "Update backup storage", "operationId": "mongoUpdateBackupStorage", "tags": [ "mongo" @@ -30797,7 +31389,7 @@ "deprecated": false, "x-appwrite": { "method": "updateBackupStorage", - "group": "databases", + "group": "backups", "cookies": false, "type": "", "demo": "mongo\/update-backup-storage.md", @@ -30893,7 +31485,7 @@ }, "\/mongo\/{databaseId}\/backups\/{backupId}": { "get": { - "summary": "Get a database backup.", + "summary": "Get backup", "operationId": "mongoGetBackup", "tags": [ "mongo" @@ -30914,7 +31506,7 @@ "deprecated": false, "x-appwrite": { "method": "getBackup", - "group": "databases", + "group": "backups", "cookies": false, "type": "", "demo": "mongo\/get-backup.md", @@ -30963,7 +31555,7 @@ ] }, "delete": { - "summary": "Delete a database backup.", + "summary": "Delete backup", "operationId": "mongoDeleteBackup", "tags": [ "mongo" @@ -30977,7 +31569,7 @@ "deprecated": false, "x-appwrite": { "method": "deleteBackup", - "group": "databases", + "group": "backups", "cookies": false, "type": "", "demo": "mongo\/delete-backup.md", @@ -31031,7 +31623,7 @@ }, "\/mongo\/{databaseId}\/branches": { "get": { - "summary": "List database branches.", + "summary": "List branches", "operationId": "mongoListBranches", "tags": [ "mongo" @@ -31052,7 +31644,7 @@ "deprecated": false, "x-appwrite": { "method": "listBranches", - "group": "databases", + "group": "branches", "cookies": false, "type": "", "demo": "mongo\/list-branches.md", @@ -31091,7 +31683,7 @@ ] }, "post": { - "summary": "Create a database branch.", + "summary": "Create branch", "operationId": "mongoCreateBranch", "tags": [ "mongo" @@ -31112,7 +31704,7 @@ "deprecated": false, "x-appwrite": { "method": "createBranch", - "group": "databases", + "group": "branches", "cookies": false, "type": "", "demo": "mongo\/create-branch.md", @@ -31180,7 +31772,7 @@ }, "\/mongo\/{databaseId}\/branches\/{branchId}": { "delete": { - "summary": "Delete a database branch.", + "summary": "Delete branch", "operationId": "mongoDeleteBranch", "tags": [ "mongo" @@ -31201,7 +31793,7 @@ "deprecated": false, "x-appwrite": { "method": "deleteBranch", - "group": "databases", + "group": "branches", "cookies": false, "type": "", "demo": "mongo\/delete-branch.md", @@ -31252,7 +31844,7 @@ }, "\/mongo\/{databaseId}\/credentials": { "patch": { - "summary": "Rotate database credentials.", + "summary": "Update credentials", "operationId": "mongoUpdateCredentials", "tags": [ "mongo" @@ -31273,7 +31865,7 @@ "deprecated": false, "x-appwrite": { "method": "updateCredentials", - "group": "databases", + "group": "mongo", "cookies": false, "type": "", "demo": "mongo\/update-credentials.md", @@ -31314,7 +31906,7 @@ }, "\/mongo\/{databaseId}\/failovers": { "post": { - "summary": "Trigger manual failover.", + "summary": "Create failover", "operationId": "mongoCreateFailover", "tags": [ "mongo" @@ -31335,7 +31927,7 @@ "deprecated": false, "x-appwrite": { "method": "createFailover", - "group": "databases", + "group": "failovers", "cookies": false, "type": "", "demo": "mongo\/create-failover.md", @@ -31393,7 +31985,7 @@ }, "\/mongo\/{databaseId}\/maintenance": { "patch": { - "summary": "Update database maintenance window.", + "summary": "Update maintenance", "operationId": "mongoUpdateMaintenance", "tags": [ "mongo" @@ -31414,7 +32006,7 @@ "deprecated": false, "x-appwrite": { "method": "updateMaintenance", - "group": "databases", + "group": "mongo", "cookies": false, "type": "", "demo": "mongo\/update-maintenance.md", @@ -31481,7 +32073,7 @@ }, "\/mongo\/{databaseId}\/migrations": { "post": { - "summary": "Migrate database between shared and dedicated.", + "summary": "Create migration", "operationId": "mongoCreateMigration", "tags": [ "mongo" @@ -31502,7 +32094,7 @@ "deprecated": false, "x-appwrite": { "method": "createMigration", - "group": "databases", + "group": "migrations", "cookies": false, "type": "", "demo": "mongo\/create-migration.md", @@ -31568,7 +32160,7 @@ }, "\/mongo\/{databaseId}\/pitr": { "get": { - "summary": "Get PITR recovery windows.", + "summary": "Get PITR", "operationId": "mongoGetPitr", "tags": [ "mongo" @@ -31589,7 +32181,7 @@ "deprecated": false, "x-appwrite": { "method": "getPitr", - "group": "databases", + "group": "pitr", "cookies": false, "type": "", "demo": "mongo\/get-pitr.md", @@ -31630,7 +32222,7 @@ }, "\/mongo\/{databaseId}\/replicas": { "get": { - "summary": "Get replica status.", + "summary": "Get replicas", "operationId": "mongoGetReplicas", "tags": [ "mongo" @@ -31651,7 +32243,7 @@ "deprecated": false, "x-appwrite": { "method": "getReplicas", - "group": "databases", + "group": "replicas", "cookies": false, "type": "", "demo": "mongo\/get-replicas.md", @@ -31692,7 +32284,7 @@ }, "\/mongo\/{databaseId}\/restorations": { "get": { - "summary": "List database restorations.", + "summary": "List restorations", "operationId": "mongoListRestorations", "tags": [ "mongo" @@ -31713,7 +32305,7 @@ "deprecated": false, "x-appwrite": { "method": "listRestorations", - "group": "databases", + "group": "restorations", "cookies": false, "type": "", "demo": "mongo\/list-restorations.md", @@ -31796,7 +32388,7 @@ ] }, "post": { - "summary": "Create a database restoration.", + "summary": "Create restoration", "operationId": "mongoCreateRestoration", "tags": [ "mongo" @@ -31817,7 +32409,7 @@ "deprecated": false, "x-appwrite": { "method": "createRestoration", - "group": "databases", + "group": "restorations", "cookies": false, "type": "", "demo": "mongo\/create-restoration.md", @@ -31888,7 +32480,7 @@ }, "\/mongo\/{databaseId}\/restorations\/{restorationId}": { "get": { - "summary": "Get a database restoration.", + "summary": "Get restoration", "operationId": "mongoGetRestoration", "tags": [ "mongo" @@ -31909,7 +32501,7 @@ "deprecated": false, "x-appwrite": { "method": "getRestoration", - "group": "databases", + "group": "restorations", "cookies": false, "type": "", "demo": "mongo\/get-restoration.md", @@ -31960,7 +32552,7 @@ }, "\/mongo\/{databaseId}\/status": { "get": { - "summary": "Get database status.", + "summary": "Get status", "operationId": "mongoGetStatus", "tags": [ "mongo" @@ -31981,7 +32573,7 @@ "deprecated": false, "x-appwrite": { "method": "getStatus", - "group": "databases", + "group": "mongo", "cookies": false, "type": "", "demo": "mongo\/get-status.md", @@ -32022,7 +32614,7 @@ }, "\/mongo\/{databaseId}\/upgrades": { "post": { - "summary": "Upgrade database version.", + "summary": "Create upgrade", "operationId": "mongoCreateUpgrade", "tags": [ "mongo" @@ -32043,7 +32635,7 @@ "deprecated": false, "x-appwrite": { "method": "createUpgrade", - "group": "databases", + "group": "mongo", "cookies": false, "type": "", "demo": "mongo\/create-upgrade.md", @@ -32103,7 +32695,7 @@ }, "\/mysql": { "get": { - "summary": "List dedicated databases.", + "summary": "List databases", "operationId": "mysqlList", "tags": [ "mysql" @@ -32124,7 +32716,7 @@ "deprecated": false, "x-appwrite": { "method": "list", - "group": "databases", + "group": "mysql", "cookies": false, "type": "", "demo": "mysql\/list.md", @@ -32166,7 +32758,7 @@ ] }, "post": { - "summary": "Create a dedicated database.", + "summary": "Create database", "operationId": "mysqlCreate", "tags": [ "mysql" @@ -32187,7 +32779,7 @@ "deprecated": false, "x-appwrite": { "method": "create", - "group": "databases", + "group": "mysql", "cookies": false, "type": "", "demo": "mysql\/create.md", @@ -32336,7 +32928,7 @@ }, "\/mysql\/specifications": { "get": { - "summary": "List dedicated database specifications.", + "summary": "List specifications", "operationId": "mysqlListSpecifications", "tags": [ "mysql" @@ -32357,7 +32949,7 @@ "deprecated": false, "x-appwrite": { "method": "listSpecifications", - "group": "databases", + "group": "mysql", "cookies": false, "type": "", "demo": "mysql\/list-specifications.md", @@ -32386,7 +32978,7 @@ }, "\/mysql\/{databaseId}": { "get": { - "summary": "Get dedicated database.", + "summary": "Get database", "operationId": "mysqlGet", "tags": [ "mysql" @@ -32407,7 +32999,7 @@ "deprecated": false, "x-appwrite": { "method": "get", - "group": "databases", + "group": "mysql", "cookies": false, "type": "", "demo": "mysql\/get.md", @@ -32446,7 +33038,7 @@ ] }, "patch": { - "summary": "Update dedicated database.", + "summary": "Update database", "operationId": "mysqlUpdate", "tags": [ "mysql" @@ -32467,7 +33059,7 @@ "deprecated": false, "x-appwrite": { "method": "update", - "group": "databases", + "group": "mysql", "cookies": false, "type": "", "demo": "mysql\/update.md", @@ -32667,7 +33259,7 @@ } }, "delete": { - "summary": "Delete dedicated database.", + "summary": "Delete database", "operationId": "mysqlDelete", "tags": [ "mysql" @@ -32681,7 +33273,7 @@ "deprecated": false, "x-appwrite": { "method": "delete", - "group": "databases", + "group": "mysql", "cookies": false, "type": "", "demo": "mysql\/delete.md", @@ -32725,7 +33317,7 @@ }, "\/mysql\/{databaseId}\/backups": { "get": { - "summary": "List database backups.", + "summary": "List backups", "operationId": "mysqlListBackups", "tags": [ "mysql" @@ -32746,7 +33338,7 @@ "deprecated": false, "x-appwrite": { "method": "listBackups", - "group": "databases", + "group": "backups", "cookies": false, "type": "", "demo": "mysql\/list-backups.md", @@ -32798,7 +33390,7 @@ ] }, "post": { - "summary": "Create a database backup.", + "summary": "Create backup", "operationId": "mysqlCreateBackup", "tags": [ "mysql" @@ -32819,7 +33411,7 @@ "deprecated": false, "x-appwrite": { "method": "createBackup", - "group": "databases", + "group": "backups", "cookies": false, "type": "", "demo": "mysql\/create-backup.md", @@ -32877,7 +33469,7 @@ }, "\/mysql\/{databaseId}\/backups\/policies": { "get": { - "summary": "List database backup policies.", + "summary": "List backup policies", "operationId": "mysqlListBackupPolicies", "tags": [ "mysql" @@ -32898,7 +33490,7 @@ "deprecated": false, "x-appwrite": { "method": "listBackupPolicies", - "group": "databases", + "group": "policies", "cookies": false, "type": "", "demo": "mysql\/list-backup-policies.md", @@ -32950,7 +33542,7 @@ ] }, "post": { - "summary": "Create a database backup policy.", + "summary": "Create backup policy", "operationId": "mysqlCreateBackupPolicy", "tags": [ "mysql" @@ -32971,7 +33563,7 @@ "deprecated": false, "x-appwrite": { "method": "createBackupPolicy", - "group": "databases", + "group": "policies", "cookies": false, "type": "", "demo": "mysql\/create-backup-policy.md", @@ -33065,7 +33657,7 @@ }, "\/mysql\/{databaseId}\/backups\/policies\/{policyId}": { "get": { - "summary": "Get a database backup policy.", + "summary": "Get backup policy", "operationId": "mysqlGetBackupPolicy", "tags": [ "mysql" @@ -33086,7 +33678,7 @@ "deprecated": false, "x-appwrite": { "method": "getBackupPolicy", - "group": "databases", + "group": "policies", "cookies": false, "type": "", "demo": "mysql\/get-backup-policy.md", @@ -33135,7 +33727,7 @@ ] }, "patch": { - "summary": "Update a database backup policy.", + "summary": "Update backup policy", "operationId": "mysqlUpdateBackupPolicy", "tags": [ "mysql" @@ -33156,7 +33748,7 @@ "deprecated": false, "x-appwrite": { "method": "updateBackupPolicy", - "group": "databases", + "group": "policies", "cookies": false, "type": "", "demo": "mysql\/update-backup-policy.md", @@ -33240,7 +33832,7 @@ } }, "delete": { - "summary": "Delete a database backup policy.", + "summary": "Delete backup policy", "operationId": "mysqlDeleteBackupPolicy", "tags": [ "mysql" @@ -33254,7 +33846,7 @@ "deprecated": false, "x-appwrite": { "method": "deleteBackupPolicy", - "group": "databases", + "group": "policies", "cookies": false, "type": "", "demo": "mysql\/delete-backup-policy.md", @@ -33308,7 +33900,7 @@ }, "\/mysql\/{databaseId}\/backups\/storage": { "put": { - "summary": "Update database backup storage.", + "summary": "Update backup storage", "operationId": "mysqlUpdateBackupStorage", "tags": [ "mysql" @@ -33329,7 +33921,7 @@ "deprecated": false, "x-appwrite": { "method": "updateBackupStorage", - "group": "databases", + "group": "backups", "cookies": false, "type": "", "demo": "mysql\/update-backup-storage.md", @@ -33425,7 +34017,7 @@ }, "\/mysql\/{databaseId}\/backups\/{backupId}": { "get": { - "summary": "Get a database backup.", + "summary": "Get backup", "operationId": "mysqlGetBackup", "tags": [ "mysql" @@ -33446,7 +34038,7 @@ "deprecated": false, "x-appwrite": { "method": "getBackup", - "group": "databases", + "group": "backups", "cookies": false, "type": "", "demo": "mysql\/get-backup.md", @@ -33495,7 +34087,7 @@ ] }, "delete": { - "summary": "Delete a database backup.", + "summary": "Delete backup", "operationId": "mysqlDeleteBackup", "tags": [ "mysql" @@ -33509,7 +34101,7 @@ "deprecated": false, "x-appwrite": { "method": "deleteBackup", - "group": "databases", + "group": "backups", "cookies": false, "type": "", "demo": "mysql\/delete-backup.md", @@ -33563,7 +34155,7 @@ }, "\/mysql\/{databaseId}\/branches": { "get": { - "summary": "List database branches.", + "summary": "List branches", "operationId": "mysqlListBranches", "tags": [ "mysql" @@ -33584,7 +34176,7 @@ "deprecated": false, "x-appwrite": { "method": "listBranches", - "group": "databases", + "group": "branches", "cookies": false, "type": "", "demo": "mysql\/list-branches.md", @@ -33623,7 +34215,7 @@ ] }, "post": { - "summary": "Create a database branch.", + "summary": "Create branch", "operationId": "mysqlCreateBranch", "tags": [ "mysql" @@ -33644,7 +34236,7 @@ "deprecated": false, "x-appwrite": { "method": "createBranch", - "group": "databases", + "group": "branches", "cookies": false, "type": "", "demo": "mysql\/create-branch.md", @@ -33712,7 +34304,7 @@ }, "\/mysql\/{databaseId}\/branches\/{branchId}": { "delete": { - "summary": "Delete a database branch.", + "summary": "Delete branch", "operationId": "mysqlDeleteBranch", "tags": [ "mysql" @@ -33733,7 +34325,7 @@ "deprecated": false, "x-appwrite": { "method": "deleteBranch", - "group": "databases", + "group": "branches", "cookies": false, "type": "", "demo": "mysql\/delete-branch.md", @@ -33784,7 +34376,7 @@ }, "\/mysql\/{databaseId}\/credentials": { "patch": { - "summary": "Rotate database credentials.", + "summary": "Update credentials", "operationId": "mysqlUpdateCredentials", "tags": [ "mysql" @@ -33805,7 +34397,7 @@ "deprecated": false, "x-appwrite": { "method": "updateCredentials", - "group": "databases", + "group": "mysql", "cookies": false, "type": "", "demo": "mysql\/update-credentials.md", @@ -33846,7 +34438,7 @@ }, "\/mysql\/{databaseId}\/executions": { "post": { - "summary": "Execute a SQL statement against a dedicated database.", + "summary": "Create execution", "operationId": "mysqlCreateExecution", "tags": [ "mysql" @@ -33867,7 +34459,7 @@ "deprecated": false, "x-appwrite": { "method": "createExecution", - "group": "databases", + "group": "executions", "cookies": false, "type": "", "demo": "mysql\/create-execution.md", @@ -33941,7 +34533,7 @@ }, "\/mysql\/{databaseId}\/failovers": { "post": { - "summary": "Trigger manual failover.", + "summary": "Create failover", "operationId": "mysqlCreateFailover", "tags": [ "mysql" @@ -33962,7 +34554,7 @@ "deprecated": false, "x-appwrite": { "method": "createFailover", - "group": "databases", + "group": "failovers", "cookies": false, "type": "", "demo": "mysql\/create-failover.md", @@ -34020,7 +34612,7 @@ }, "\/mysql\/{databaseId}\/maintenance": { "patch": { - "summary": "Update database maintenance window.", + "summary": "Update maintenance", "operationId": "mysqlUpdateMaintenance", "tags": [ "mysql" @@ -34041,7 +34633,7 @@ "deprecated": false, "x-appwrite": { "method": "updateMaintenance", - "group": "databases", + "group": "mysql", "cookies": false, "type": "", "demo": "mysql\/update-maintenance.md", @@ -34108,7 +34700,7 @@ }, "\/mysql\/{databaseId}\/migrations": { "post": { - "summary": "Migrate database between shared and dedicated.", + "summary": "Create migration", "operationId": "mysqlCreateMigration", "tags": [ "mysql" @@ -34129,7 +34721,7 @@ "deprecated": false, "x-appwrite": { "method": "createMigration", - "group": "databases", + "group": "migrations", "cookies": false, "type": "", "demo": "mysql\/create-migration.md", @@ -34195,7 +34787,7 @@ }, "\/mysql\/{databaseId}\/pitr": { "get": { - "summary": "Get PITR recovery windows.", + "summary": "Get PITR", "operationId": "mysqlGetPitr", "tags": [ "mysql" @@ -34216,7 +34808,7 @@ "deprecated": false, "x-appwrite": { "method": "getPitr", - "group": "databases", + "group": "pitr", "cookies": false, "type": "", "demo": "mysql\/get-pitr.md", @@ -34257,7 +34849,7 @@ }, "\/mysql\/{databaseId}\/pooler": { "get": { - "summary": "Get connection pooler configuration.", + "summary": "Get pooler", "operationId": "mysqlGetPooler", "tags": [ "mysql" @@ -34278,7 +34870,7 @@ "deprecated": false, "x-appwrite": { "method": "getPooler", - "group": "databases", + "group": "pooler", "cookies": false, "type": "", "demo": "mysql\/get-pooler.md", @@ -34317,7 +34909,7 @@ ] }, "patch": { - "summary": "Update connection pooler configuration.", + "summary": "Update pooler", "operationId": "mysqlUpdatePooler", "tags": [ "mysql" @@ -34338,7 +34930,7 @@ "deprecated": false, "x-appwrite": { "method": "updatePooler", - "group": "databases", + "group": "pooler", "cookies": false, "type": "", "demo": "mysql\/update-pooler.md", @@ -34440,7 +35032,7 @@ }, "\/mysql\/{databaseId}\/replicas": { "get": { - "summary": "Get replica status.", + "summary": "Get replicas", "operationId": "mysqlGetReplicas", "tags": [ "mysql" @@ -34461,7 +35053,7 @@ "deprecated": false, "x-appwrite": { "method": "getReplicas", - "group": "databases", + "group": "replicas", "cookies": false, "type": "", "demo": "mysql\/get-replicas.md", @@ -34502,7 +35094,7 @@ }, "\/mysql\/{databaseId}\/restorations": { "get": { - "summary": "List database restorations.", + "summary": "List restorations", "operationId": "mysqlListRestorations", "tags": [ "mysql" @@ -34523,7 +35115,7 @@ "deprecated": false, "x-appwrite": { "method": "listRestorations", - "group": "databases", + "group": "restorations", "cookies": false, "type": "", "demo": "mysql\/list-restorations.md", @@ -34606,7 +35198,7 @@ ] }, "post": { - "summary": "Create a database restoration.", + "summary": "Create restoration", "operationId": "mysqlCreateRestoration", "tags": [ "mysql" @@ -34627,7 +35219,7 @@ "deprecated": false, "x-appwrite": { "method": "createRestoration", - "group": "databases", + "group": "restorations", "cookies": false, "type": "", "demo": "mysql\/create-restoration.md", @@ -34698,7 +35290,7 @@ }, "\/mysql\/{databaseId}\/restorations\/{restorationId}": { "get": { - "summary": "Get a database restoration.", + "summary": "Get restoration", "operationId": "mysqlGetRestoration", "tags": [ "mysql" @@ -34719,7 +35311,7 @@ "deprecated": false, "x-appwrite": { "method": "getRestoration", - "group": "databases", + "group": "restorations", "cookies": false, "type": "", "demo": "mysql\/get-restoration.md", @@ -34770,7 +35362,7 @@ }, "\/mysql\/{databaseId}\/status": { "get": { - "summary": "Get database status.", + "summary": "Get status", "operationId": "mysqlGetStatus", "tags": [ "mysql" @@ -34791,7 +35383,7 @@ "deprecated": false, "x-appwrite": { "method": "getStatus", - "group": "databases", + "group": "mysql", "cookies": false, "type": "", "demo": "mysql\/get-status.md", @@ -34832,7 +35424,7 @@ }, "\/mysql\/{databaseId}\/upgrades": { "post": { - "summary": "Upgrade database version.", + "summary": "Create upgrade", "operationId": "mysqlCreateUpgrade", "tags": [ "mysql" @@ -34853,7 +35445,7 @@ "deprecated": false, "x-appwrite": { "method": "createUpgrade", - "group": "databases", + "group": "mysql", "cookies": false, "type": "", "demo": "mysql\/create-upgrade.md", @@ -36488,6 +37080,365 @@ ] } }, + "\/organization\/installations": { + "get": { + "summary": "List Installations", + "operationId": "organizationListInstallations", + "tags": [ + "organization" + ], + "description": "List app installations on the organization. Any organization member can read installations.", + "responses": { + "200": { + "description": "App installations list", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/appInstallationList" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "listInstallations", + "group": "installations", + "cookies": false, + "type": "", + "demo": "organization\/list-installations.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},userId:{userId}", + "scope": "organization.installations.read", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [], + "Session": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "queries", + "description": "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.", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + }, + "default": [] + }, + "in": "query" + }, + { + "name": "total", + "description": "When set to false, the total count returned will be 0 and will not be calculated.", + "required": false, + "schema": { + "type": "boolean", + "x-example": false, + "default": true + }, + "in": "query" + } + ] + }, + "post": { + "summary": "Create Installation", + "operationId": "organizationCreateInstallation", + "tags": [ + "organization" + ], + "description": "Install an app on the organization. Only organization members with the owner role can install apps. The installation is granted the scopes the app currently requests.", + "responses": { + "201": { + "description": "AppInstallation", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/appInstallation" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createInstallation", + "group": "installations", + "cookies": false, + "type": "", + "demo": "organization\/create-installation.md", + "rate-limit": 60, + "rate-time": 60, + "rate-key": "ip:{ip},userId:{userId}", + "scope": "organization.installations.write", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [], + "Session": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "Key": [], + "JWT": [] + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "appId": { + "type": "string", + "description": "Application unique ID.", + "x-example": "" + }, + "authorizationDetails": { + "type": "string", + "description": "Authorization details granted to the installation as a JSON array of objects, each with a `type` and app-defined fields. The Appwrite Console stores authorized project IDs here.", + "default": "", + "x-example": "" + } + }, + "required": [ + "appId" + ] + } + } + } + } + } + }, + "\/organization\/installations\/{installationId}": { + "get": { + "summary": "Get Installation", + "operationId": "organizationGetInstallation", + "tags": [ + "organization" + ], + "description": "Get an app installation on the organization by its unique ID. Any organization member can read installations.", + "responses": { + "200": { + "description": "AppInstallation", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/appInstallation" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "getInstallation", + "group": "installations", + "cookies": false, + "type": "", + "demo": "organization\/get-installation.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},userId:{userId}", + "scope": "organization.installations.read", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [], + "Session": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "installationId", + "description": "Installation unique ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + } + ] + }, + "put": { + "summary": "Update Installation", + "operationId": "organizationUpdateInstallation", + "tags": [ + "organization" + ], + "description": "Update an app installation on the organization. Only organization members with the owner role can update installations. The installation's granted scopes are refreshed to the scopes the app currently requests; previously issued installation access tokens are revoked.", + "responses": { + "200": { + "description": "AppInstallation", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/appInstallation" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateInstallation", + "group": "installations", + "cookies": false, + "type": "", + "demo": "organization\/update-installation.md", + "rate-limit": 60, + "rate-time": 60, + "rate-key": "ip:{ip},userId:{userId}", + "scope": "organization.installations.write", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [], + "Session": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "installationId", + "description": "Installation unique ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "authorizationDetails": { + "type": "string", + "description": "Authorization details granted to the installation as a JSON array of objects, each with a `type` and app-defined fields. Omit to keep the current value.", + "x-example": "", + "x-nullable": true + } + } + } + } + } + } + }, + "delete": { + "summary": "Delete Installation", + "operationId": "organizationDeleteInstallation", + "tags": [ + "organization" + ], + "description": "Uninstall an app from the organization by its installation ID. Only organization members with the owner role can remove installations. Previously issued installation access tokens are revoked.", + "responses": { + "204": { + "description": "No content" + } + }, + "deprecated": false, + "x-appwrite": { + "method": "deleteInstallation", + "group": "installations", + "cookies": false, + "type": "", + "demo": "organization\/delete-installation.md", + "rate-limit": 60, + "rate-time": 60, + "rate-key": "ip:{ip},userId:{userId}", + "scope": "organization.installations.write", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "produces": [ + "application\/json" + ], + "auth": { + "Project": [], + "Session": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "installationId", + "description": "Installation unique ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + } + ] + } + }, "\/organization\/keys": { "get": { "summary": "List organization keys", @@ -36642,6 +37593,8 @@ "devKeys.write", "organization.keys.read", "organization.keys.write", + "organization.installations.read", + "organization.installations.write", "organization.memberships.read", "organization.memberships.write", "organization.read", @@ -36659,6 +37612,8 @@ "devKeys.write", "organization.keys.read", "organization.keys.write", + "organization.installations.read", + "organization.installations.write", "organization.memberships.read", "organization.memberships.write", "organization.read", @@ -36833,6 +37788,8 @@ "devKeys.write", "organization.keys.read", "organization.keys.write", + "organization.installations.read", + "organization.installations.write", "organization.memberships.read", "organization.memberships.write", "organization.read", @@ -36850,6 +37807,8 @@ "devKeys.write", "organization.keys.read", "organization.keys.write", + "organization.installations.read", + "organization.installations.write", "organization.memberships.read", "organization.memberships.write", "organization.read", @@ -37750,7 +38709,7 @@ }, "\/postgresql": { "get": { - "summary": "List dedicated databases.", + "summary": "List databases", "operationId": "postgresqlList", "tags": [ "postgresql" @@ -37771,7 +38730,7 @@ "deprecated": false, "x-appwrite": { "method": "list", - "group": "databases", + "group": "postgresql", "cookies": false, "type": "", "demo": "postgresql\/list.md", @@ -37813,7 +38772,7 @@ ] }, "post": { - "summary": "Create a dedicated database.", + "summary": "Create database", "operationId": "postgresqlCreate", "tags": [ "postgresql" @@ -37834,7 +38793,7 @@ "deprecated": false, "x-appwrite": { "method": "create", - "group": "databases", + "group": "postgresql", "cookies": false, "type": "", "demo": "postgresql\/create.md", @@ -37983,7 +38942,7 @@ }, "\/postgresql\/specifications": { "get": { - "summary": "List dedicated database specifications.", + "summary": "List specifications", "operationId": "postgresqlListSpecifications", "tags": [ "postgresql" @@ -38004,7 +38963,7 @@ "deprecated": false, "x-appwrite": { "method": "listSpecifications", - "group": "databases", + "group": "postgresql", "cookies": false, "type": "", "demo": "postgresql\/list-specifications.md", @@ -38033,7 +38992,7 @@ }, "\/postgresql\/{databaseId}": { "get": { - "summary": "Get dedicated database.", + "summary": "Get database", "operationId": "postgresqlGet", "tags": [ "postgresql" @@ -38054,7 +39013,7 @@ "deprecated": false, "x-appwrite": { "method": "get", - "group": "databases", + "group": "postgresql", "cookies": false, "type": "", "demo": "postgresql\/get.md", @@ -38093,7 +39052,7 @@ ] }, "patch": { - "summary": "Update dedicated database.", + "summary": "Update database", "operationId": "postgresqlUpdate", "tags": [ "postgresql" @@ -38114,7 +39073,7 @@ "deprecated": false, "x-appwrite": { "method": "update", - "group": "databases", + "group": "postgresql", "cookies": false, "type": "", "demo": "postgresql\/update.md", @@ -38314,7 +39273,7 @@ } }, "delete": { - "summary": "Delete dedicated database.", + "summary": "Delete database", "operationId": "postgresqlDelete", "tags": [ "postgresql" @@ -38328,7 +39287,7 @@ "deprecated": false, "x-appwrite": { "method": "delete", - "group": "databases", + "group": "postgresql", "cookies": false, "type": "", "demo": "postgresql\/delete.md", @@ -38372,7 +39331,7 @@ }, "\/postgresql\/{databaseId}\/backups": { "get": { - "summary": "List database backups.", + "summary": "List backups", "operationId": "postgresqlListBackups", "tags": [ "postgresql" @@ -38393,7 +39352,7 @@ "deprecated": false, "x-appwrite": { "method": "listBackups", - "group": "databases", + "group": "backups", "cookies": false, "type": "", "demo": "postgresql\/list-backups.md", @@ -38445,7 +39404,7 @@ ] }, "post": { - "summary": "Create a database backup.", + "summary": "Create backup", "operationId": "postgresqlCreateBackup", "tags": [ "postgresql" @@ -38466,7 +39425,7 @@ "deprecated": false, "x-appwrite": { "method": "createBackup", - "group": "databases", + "group": "backups", "cookies": false, "type": "", "demo": "postgresql\/create-backup.md", @@ -38524,7 +39483,7 @@ }, "\/postgresql\/{databaseId}\/backups\/policies": { "get": { - "summary": "List database backup policies.", + "summary": "List backup policies", "operationId": "postgresqlListBackupPolicies", "tags": [ "postgresql" @@ -38545,7 +39504,7 @@ "deprecated": false, "x-appwrite": { "method": "listBackupPolicies", - "group": "databases", + "group": "policies", "cookies": false, "type": "", "demo": "postgresql\/list-backup-policies.md", @@ -38597,7 +39556,7 @@ ] }, "post": { - "summary": "Create a database backup policy.", + "summary": "Create backup policy", "operationId": "postgresqlCreateBackupPolicy", "tags": [ "postgresql" @@ -38618,7 +39577,7 @@ "deprecated": false, "x-appwrite": { "method": "createBackupPolicy", - "group": "databases", + "group": "policies", "cookies": false, "type": "", "demo": "postgresql\/create-backup-policy.md", @@ -38712,7 +39671,7 @@ }, "\/postgresql\/{databaseId}\/backups\/policies\/{policyId}": { "get": { - "summary": "Get a database backup policy.", + "summary": "Get backup policy", "operationId": "postgresqlGetBackupPolicy", "tags": [ "postgresql" @@ -38733,7 +39692,7 @@ "deprecated": false, "x-appwrite": { "method": "getBackupPolicy", - "group": "databases", + "group": "policies", "cookies": false, "type": "", "demo": "postgresql\/get-backup-policy.md", @@ -38782,7 +39741,7 @@ ] }, "patch": { - "summary": "Update a database backup policy.", + "summary": "Update backup policy", "operationId": "postgresqlUpdateBackupPolicy", "tags": [ "postgresql" @@ -38803,7 +39762,7 @@ "deprecated": false, "x-appwrite": { "method": "updateBackupPolicy", - "group": "databases", + "group": "policies", "cookies": false, "type": "", "demo": "postgresql\/update-backup-policy.md", @@ -38887,7 +39846,7 @@ } }, "delete": { - "summary": "Delete a database backup policy.", + "summary": "Delete backup policy", "operationId": "postgresqlDeleteBackupPolicy", "tags": [ "postgresql" @@ -38901,7 +39860,7 @@ "deprecated": false, "x-appwrite": { "method": "deleteBackupPolicy", - "group": "databases", + "group": "policies", "cookies": false, "type": "", "demo": "postgresql\/delete-backup-policy.md", @@ -38955,7 +39914,7 @@ }, "\/postgresql\/{databaseId}\/backups\/storage": { "put": { - "summary": "Update database backup storage.", + "summary": "Update backup storage", "operationId": "postgresqlUpdateBackupStorage", "tags": [ "postgresql" @@ -38976,7 +39935,7 @@ "deprecated": false, "x-appwrite": { "method": "updateBackupStorage", - "group": "databases", + "group": "backups", "cookies": false, "type": "", "demo": "postgresql\/update-backup-storage.md", @@ -39072,7 +40031,7 @@ }, "\/postgresql\/{databaseId}\/backups\/{backupId}": { "get": { - "summary": "Get a database backup.", + "summary": "Get backup", "operationId": "postgresqlGetBackup", "tags": [ "postgresql" @@ -39093,7 +40052,7 @@ "deprecated": false, "x-appwrite": { "method": "getBackup", - "group": "databases", + "group": "backups", "cookies": false, "type": "", "demo": "postgresql\/get-backup.md", @@ -39142,7 +40101,7 @@ ] }, "delete": { - "summary": "Delete a database backup.", + "summary": "Delete backup", "operationId": "postgresqlDeleteBackup", "tags": [ "postgresql" @@ -39156,7 +40115,7 @@ "deprecated": false, "x-appwrite": { "method": "deleteBackup", - "group": "databases", + "group": "backups", "cookies": false, "type": "", "demo": "postgresql\/delete-backup.md", @@ -39210,7 +40169,7 @@ }, "\/postgresql\/{databaseId}\/branches": { "get": { - "summary": "List database branches.", + "summary": "List branches", "operationId": "postgresqlListBranches", "tags": [ "postgresql" @@ -39231,7 +40190,7 @@ "deprecated": false, "x-appwrite": { "method": "listBranches", - "group": "databases", + "group": "branches", "cookies": false, "type": "", "demo": "postgresql\/list-branches.md", @@ -39270,7 +40229,7 @@ ] }, "post": { - "summary": "Create a database branch.", + "summary": "Create branch", "operationId": "postgresqlCreateBranch", "tags": [ "postgresql" @@ -39291,7 +40250,7 @@ "deprecated": false, "x-appwrite": { "method": "createBranch", - "group": "databases", + "group": "branches", "cookies": false, "type": "", "demo": "postgresql\/create-branch.md", @@ -39359,7 +40318,7 @@ }, "\/postgresql\/{databaseId}\/branches\/{branchId}": { "delete": { - "summary": "Delete a database branch.", + "summary": "Delete branch", "operationId": "postgresqlDeleteBranch", "tags": [ "postgresql" @@ -39380,7 +40339,7 @@ "deprecated": false, "x-appwrite": { "method": "deleteBranch", - "group": "databases", + "group": "branches", "cookies": false, "type": "", "demo": "postgresql\/delete-branch.md", @@ -39431,7 +40390,7 @@ }, "\/postgresql\/{databaseId}\/credentials": { "patch": { - "summary": "Rotate database credentials.", + "summary": "Update credentials", "operationId": "postgresqlUpdateCredentials", "tags": [ "postgresql" @@ -39452,7 +40411,7 @@ "deprecated": false, "x-appwrite": { "method": "updateCredentials", - "group": "databases", + "group": "postgresql", "cookies": false, "type": "", "demo": "postgresql\/update-credentials.md", @@ -39493,7 +40452,7 @@ }, "\/postgresql\/{databaseId}\/executions": { "post": { - "summary": "Execute a SQL statement against a dedicated database.", + "summary": "Create execution", "operationId": "postgresqlCreateExecution", "tags": [ "postgresql" @@ -39514,7 +40473,7 @@ "deprecated": false, "x-appwrite": { "method": "createExecution", - "group": "databases", + "group": "executions", "cookies": false, "type": "", "demo": "postgresql\/create-execution.md", @@ -39588,7 +40547,7 @@ }, "\/postgresql\/{databaseId}\/extensions": { "get": { - "summary": "List database extensions.", + "summary": "List extensions", "operationId": "postgresqlListExtensions", "tags": [ "postgresql" @@ -39609,7 +40568,7 @@ "deprecated": false, "x-appwrite": { "method": "listExtensions", - "group": "databases", + "group": "extensions", "cookies": false, "type": "", "demo": "postgresql\/list-extensions.md", @@ -39648,7 +40607,7 @@ ] }, "post": { - "summary": "Install a database extension.", + "summary": "Create extension", "operationId": "postgresqlCreateExtension", "tags": [ "postgresql" @@ -39669,7 +40628,7 @@ "deprecated": false, "x-appwrite": { "method": "createExtension", - "group": "databases", + "group": "extensions", "cookies": false, "type": "", "demo": "postgresql\/create-extension.md", @@ -39729,7 +40688,7 @@ }, "\/postgresql\/{databaseId}\/extensions\/{extensionName}": { "delete": { - "summary": "Uninstall a database extension.", + "summary": "Delete extension", "operationId": "postgresqlDeleteExtension", "tags": [ "postgresql" @@ -39750,7 +40709,7 @@ "deprecated": false, "x-appwrite": { "method": "deleteExtension", - "group": "databases", + "group": "extensions", "cookies": false, "type": "", "demo": "postgresql\/delete-extension.md", @@ -39801,7 +40760,7 @@ }, "\/postgresql\/{databaseId}\/failovers": { "post": { - "summary": "Trigger manual failover.", + "summary": "Create failover", "operationId": "postgresqlCreateFailover", "tags": [ "postgresql" @@ -39822,7 +40781,7 @@ "deprecated": false, "x-appwrite": { "method": "createFailover", - "group": "databases", + "group": "failovers", "cookies": false, "type": "", "demo": "postgresql\/create-failover.md", @@ -39880,7 +40839,7 @@ }, "\/postgresql\/{databaseId}\/maintenance": { "patch": { - "summary": "Update database maintenance window.", + "summary": "Update maintenance", "operationId": "postgresqlUpdateMaintenance", "tags": [ "postgresql" @@ -39901,7 +40860,7 @@ "deprecated": false, "x-appwrite": { "method": "updateMaintenance", - "group": "databases", + "group": "postgresql", "cookies": false, "type": "", "demo": "postgresql\/update-maintenance.md", @@ -39968,7 +40927,7 @@ }, "\/postgresql\/{databaseId}\/migrations": { "post": { - "summary": "Migrate database between shared and dedicated.", + "summary": "Create migration", "operationId": "postgresqlCreateMigration", "tags": [ "postgresql" @@ -39989,7 +40948,7 @@ "deprecated": false, "x-appwrite": { "method": "createMigration", - "group": "databases", + "group": "migrations", "cookies": false, "type": "", "demo": "postgresql\/create-migration.md", @@ -40055,7 +41014,7 @@ }, "\/postgresql\/{databaseId}\/pitr": { "get": { - "summary": "Get PITR recovery windows.", + "summary": "Get PITR", "operationId": "postgresqlGetPitr", "tags": [ "postgresql" @@ -40076,7 +41035,7 @@ "deprecated": false, "x-appwrite": { "method": "getPitr", - "group": "databases", + "group": "pitr", "cookies": false, "type": "", "demo": "postgresql\/get-pitr.md", @@ -40117,7 +41076,7 @@ }, "\/postgresql\/{databaseId}\/pooler": { "get": { - "summary": "Get connection pooler configuration.", + "summary": "Get pooler", "operationId": "postgresqlGetPooler", "tags": [ "postgresql" @@ -40138,7 +41097,7 @@ "deprecated": false, "x-appwrite": { "method": "getPooler", - "group": "databases", + "group": "pooler", "cookies": false, "type": "", "demo": "postgresql\/get-pooler.md", @@ -40177,7 +41136,7 @@ ] }, "patch": { - "summary": "Update connection pooler configuration.", + "summary": "Update pooler", "operationId": "postgresqlUpdatePooler", "tags": [ "postgresql" @@ -40198,7 +41157,7 @@ "deprecated": false, "x-appwrite": { "method": "updatePooler", - "group": "databases", + "group": "pooler", "cookies": false, "type": "", "demo": "postgresql\/update-pooler.md", @@ -40300,7 +41259,7 @@ }, "\/postgresql\/{databaseId}\/replicas": { "get": { - "summary": "Get replica status.", + "summary": "Get replicas", "operationId": "postgresqlGetReplicas", "tags": [ "postgresql" @@ -40321,7 +41280,7 @@ "deprecated": false, "x-appwrite": { "method": "getReplicas", - "group": "databases", + "group": "replicas", "cookies": false, "type": "", "demo": "postgresql\/get-replicas.md", @@ -40362,7 +41321,7 @@ }, "\/postgresql\/{databaseId}\/restorations": { "get": { - "summary": "List database restorations.", + "summary": "List restorations", "operationId": "postgresqlListRestorations", "tags": [ "postgresql" @@ -40383,7 +41342,7 @@ "deprecated": false, "x-appwrite": { "method": "listRestorations", - "group": "databases", + "group": "restorations", "cookies": false, "type": "", "demo": "postgresql\/list-restorations.md", @@ -40466,7 +41425,7 @@ ] }, "post": { - "summary": "Create a database restoration.", + "summary": "Create restoration", "operationId": "postgresqlCreateRestoration", "tags": [ "postgresql" @@ -40487,7 +41446,7 @@ "deprecated": false, "x-appwrite": { "method": "createRestoration", - "group": "databases", + "group": "restorations", "cookies": false, "type": "", "demo": "postgresql\/create-restoration.md", @@ -40558,7 +41517,7 @@ }, "\/postgresql\/{databaseId}\/restorations\/{restorationId}": { "get": { - "summary": "Get a database restoration.", + "summary": "Get restoration", "operationId": "postgresqlGetRestoration", "tags": [ "postgresql" @@ -40579,7 +41538,7 @@ "deprecated": false, "x-appwrite": { "method": "getRestoration", - "group": "databases", + "group": "restorations", "cookies": false, "type": "", "demo": "postgresql\/get-restoration.md", @@ -40630,7 +41589,7 @@ }, "\/postgresql\/{databaseId}\/status": { "get": { - "summary": "Get database status.", + "summary": "Get status", "operationId": "postgresqlGetStatus", "tags": [ "postgresql" @@ -40651,7 +41610,7 @@ "deprecated": false, "x-appwrite": { "method": "getStatus", - "group": "databases", + "group": "postgresql", "cookies": false, "type": "", "demo": "postgresql\/get-status.md", @@ -40692,7 +41651,7 @@ }, "\/postgresql\/{databaseId}\/upgrades": { "post": { - "summary": "Upgrade database version.", + "summary": "Create upgrade", "operationId": "postgresqlCreateUpgrade", "tags": [ "postgresql" @@ -40713,7 +41672,7 @@ "deprecated": false, "x-appwrite": { "method": "createUpgrade", - "group": "databases", + "group": "postgresql", "cookies": false, "type": "", "demo": "postgresql\/create-upgrade.md", @@ -43158,6 +44117,13 @@ "format": "int32", "x-nullable": true }, + "installationAccessTokenDuration": { + "type": "integer", + "description": "Access token duration in seconds for app installation access tokens. Leave empty to use default 1 hour.", + "x-example": 60, + "format": "int32", + "x-nullable": true + }, "confidentialPkce": { "type": "boolean", "description": "When enabled, PKCE is required for confidential clients (server-side flows using client_secret). PKCE is always required for public clients regardless of this setting.", @@ -56330,7 +57296,7 @@ }, "\/tablesdb\/specifications": { "get": { - "summary": "List dedicated database specifications.", + "summary": "List specifications", "operationId": "tablesDBListSpecifications", "tags": [ "tablesDB" @@ -56351,7 +57317,7 @@ "deprecated": false, "x-appwrite": { "method": "listSpecifications", - "group": "databases", + "group": "tablesdb", "cookies": false, "type": "", "demo": "tablesdb\/list-specifications.md", @@ -57040,7 +58006,7 @@ }, "\/tablesdb\/{databaseId}\/failovers": { "post": { - "summary": "Trigger manual failover.", + "summary": "Create failover", "operationId": "tablesDBCreateFailover", "tags": [ "tablesDB" @@ -57061,7 +58027,7 @@ "deprecated": false, "x-appwrite": { "method": "createFailover", - "group": "databases", + "group": "failovers", "cookies": false, "type": "", "demo": "tablesdb\/create-failover.md", @@ -57119,7 +58085,7 @@ }, "\/tablesdb\/{databaseId}\/replicas": { "get": { - "summary": "Get replica status.", + "summary": "Get replicas", "operationId": "tablesDBGetReplicas", "tags": [ "tablesDB" @@ -57140,7 +58106,7 @@ "deprecated": false, "x-appwrite": { "method": "getReplicas", - "group": "databases", + "group": "replicas", "cookies": false, "type": "", "demo": "tablesdb\/get-replicas.md", @@ -57181,7 +58147,7 @@ }, "\/tablesdb\/{databaseId}\/status": { "get": { - "summary": "Get database status.", + "summary": "Get status", "operationId": "tablesDBGetStatus", "tags": [ "tablesDB" @@ -57202,7 +58168,7 @@ "deprecated": false, "x-appwrite": { "method": "getStatus", - "group": "databases", + "group": "tablesdb", "cookies": false, "type": "", "demo": "tablesdb\/get-status.md", @@ -64647,27 +65613,426 @@ "schema": { "type": "object", "properties": { - "name": { + "name": { + "type": "string", + "description": "New team name. Max length: 128 chars.", + "x-example": "" + } + }, + "required": [ + "name" + ] + } + } + } + } + }, + "delete": { + "summary": "Delete team", + "operationId": "teamsDelete", + "tags": [ + "teams" + ], + "description": "Delete a team using its ID. Only team members with the owner role can delete the team.", + "responses": { + "204": { + "description": "No content" + } + }, + "deprecated": false, + "x-appwrite": { + "method": "delete", + "group": "teams", + "cookies": false, + "type": "", + "demo": "teams\/delete.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "teams.write", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/delete-team.md", + "auth": { + "Project": [], + "Session": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "teamId", + "description": "Team ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + } + ] + } + }, + "\/teams\/{teamId}\/installations": { + "get": { + "summary": "List Installations", + "operationId": "teamsListInstallations", + "tags": [ + "teams" + ], + "description": "List app installations on a team. Any team member can read installations.", + "responses": { + "200": { + "description": "App installations list", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/appInstallationList" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "listInstallations", + "group": null, + "cookies": false, + "type": "", + "demo": "teams\/list-installations.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},userId:{userId}", + "scope": "teams.read", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [], + "Session": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "teamId", + "description": "Team ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "queries", + "description": "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.", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + }, + "default": [] + }, + "in": "query" + }, + { + "name": "total", + "description": "When set to false, the total count returned will be 0 and will not be calculated.", + "required": false, + "schema": { + "type": "boolean", + "x-example": false, + "default": true + }, + "in": "query" + } + ] + }, + "post": { + "summary": "Create Installation", + "operationId": "teamsCreateInstallation", + "tags": [ + "teams" + ], + "description": "Install an app on a team. When authenticated as a user, only team members with the owner role can install apps. Requests using an API key or in admin mode can install apps on any team. The installation is granted the scopes the app currently requests.", + "responses": { + "201": { + "description": "AppInstallation", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/appInstallation" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createInstallation", + "group": null, + "cookies": false, + "type": "", + "demo": "teams\/create-installation.md", + "rate-limit": 60, + "rate-time": 60, + "rate-key": "ip:{ip},userId:{userId}", + "scope": "teams.write", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [], + "Session": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "teamId", + "description": "Team ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "appId": { "type": "string", - "description": "New team name. Max length: 128 chars.", - "x-example": "" + "description": "Application unique ID.", + "x-example": "" + }, + "authorizationDetails": { + "type": "string", + "description": "Authorization details granted to the installation as a JSON array of objects, each with a `type` and app-defined fields. The Appwrite Console stores authorized project IDs here.", + "default": "", + "x-example": "" } }, "required": [ - "name" + "appId" ] } } } } + } + }, + "\/teams\/{teamId}\/installations\/{installationId}": { + "get": { + "summary": "Get Installation", + "operationId": "teamsGetInstallation", + "tags": [ + "teams" + ], + "description": "Get an app installation on a team by its unique ID. Any team member can read installations.", + "responses": { + "200": { + "description": "AppInstallation", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/appInstallation" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "getInstallation", + "group": null, + "cookies": false, + "type": "", + "demo": "teams\/get-installation.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},userId:{userId}", + "scope": "teams.read", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [], + "Session": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "teamId", + "description": "Team ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "installationId", + "description": "Installation unique ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + } + ] + }, + "put": { + "summary": "Update Installation", + "operationId": "teamsUpdateInstallation", + "tags": [ + "teams" + ], + "description": "Update an app installation on a team. Only team members with the owner role can update installations. The installation's granted scopes are refreshed to the scopes the app currently requests; previously issued installation access tokens are revoked.", + "responses": { + "200": { + "description": "AppInstallation", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/appInstallation" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateInstallation", + "group": null, + "cookies": false, + "type": "", + "demo": "teams\/update-installation.md", + "rate-limit": 60, + "rate-time": 60, + "rate-key": "ip:{ip},userId:{userId}", + "scope": "teams.write", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "Project": [], + "Session": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "teamId", + "description": "Team ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "installationId", + "description": "Installation unique ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "authorizationDetails": { + "type": "string", + "description": "Authorization details granted to the installation as a JSON array of objects, each with a `type` and app-defined fields. Omit to keep the current value.", + "x-example": "", + "x-nullable": true + } + } + } + } + } + } }, "delete": { - "summary": "Delete team", - "operationId": "teamsDelete", + "summary": "Delete Installation", + "operationId": "teamsDeleteInstallation", "tags": [ "teams" ], - "description": "Delete a team using its ID. Only team members with the owner role can delete the team.", + "description": "Uninstall an app from a team by its installation ID. Only team members with the owner role can remove installations. Previously issued installation access tokens are revoked.", "responses": { "204": { "description": "No content" @@ -64675,14 +66040,14 @@ }, "deprecated": false, "x-appwrite": { - "method": "delete", - "group": "teams", + "method": "deleteInstallation", + "group": null, "cookies": false, "type": "", - "demo": "teams\/delete.md", - "rate-limit": 0, - "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", + "demo": "teams\/delete-installation.md", + "rate-limit": 60, + "rate-time": 60, + "rate-key": "ip:{ip},userId:{userId}", "scope": "teams.write", "platforms": [ "console", @@ -64691,7 +66056,9 @@ ], "packaging": false, "public": true, - "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/teams\/delete-team.md", + "produces": [ + "application\/json" + ], "auth": { "Project": [], "Session": [] @@ -64715,6 +66082,16 @@ "x-example": "" }, "in": "path" + }, + { + "name": "installationId", + "description": "Installation unique ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" } ] } @@ -69997,7 +71374,7 @@ }, "\/vectorsdb\/specifications": { "get": { - "summary": "List dedicated database specifications.", + "summary": "List specifications", "operationId": "vectorsDBListSpecifications", "tags": [ "vectorsDB" @@ -70018,7 +71395,7 @@ "deprecated": false, "x-appwrite": { "method": "listSpecifications", - "group": "databases", + "group": "vectorsdb", "cookies": false, "type": "", "demo": "vectorsdb\/list-specifications.md", @@ -71790,6 +73167,120 @@ ] } }, + "\/vectorsdb\/{databaseId}\/collections\/{collectionId}\/documents\/query": { + "post": { + "summary": "Create query", + "operationId": "vectorsDBCreateQuery", + "tags": [ + "vectorsDB" + ], + "description": "Get a list of all the user's documents in a given collection using a POST request. This behaves identically to the list documents endpoint but accepts the queries in the request body, allowing much larger `queries` arrays than can fit in a URL query string.\n", + "responses": { + "200": { + "description": "Documents List", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/documentList" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createQuery", + "group": "documents", + "cookies": false, + "type": "", + "demo": "vectorsdb\/create-query.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "documents.read", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/vectorsdb\/create-query.md", + "auth": { + "Project": [], + "Session": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "queries": { + "type": "array", + "description": "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.", + "default": [], + "x-example": null, + "items": { + "type": "string" + } + }, + "transactionId": { + "type": "string", + "description": "Transaction ID to read uncommitted changes within the transaction.", + "x-example": "" + }, + "total": { + "type": "boolean", + "description": "When set to false, the total count returned will be 0 and will not be calculated.", + "default": true, + "x-example": false + }, + "ttl": { + "type": "integer", + "description": "TTL (seconds) for cached responses when caching is enabled for select queries. Must be between 0 and 86400 (24 hours).", + "default": 0, + "x-example": 0, + "format": "int32" + } + } + } + } + } + } + } + }, "\/vectorsdb\/{databaseId}\/collections\/{collectionId}\/documents\/{documentId}": { "get": { "summary": "Get document", @@ -72653,7 +74144,7 @@ }, "\/vectorsdb\/{databaseId}\/failovers": { "post": { - "summary": "Trigger manual failover.", + "summary": "Create failover", "operationId": "vectorsDBCreateFailover", "tags": [ "vectorsDB" @@ -72674,7 +74165,7 @@ "deprecated": false, "x-appwrite": { "method": "createFailover", - "group": "databases", + "group": "failovers", "cookies": false, "type": "", "demo": "vectorsdb\/create-failover.md", @@ -72732,7 +74223,7 @@ }, "\/vectorsdb\/{databaseId}\/replicas": { "get": { - "summary": "Get replica status.", + "summary": "Get replicas", "operationId": "vectorsDBGetReplicas", "tags": [ "vectorsDB" @@ -72753,7 +74244,7 @@ "deprecated": false, "x-appwrite": { "method": "getReplicas", - "group": "databases", + "group": "replicas", "cookies": false, "type": "", "demo": "vectorsdb\/get-replicas.md", @@ -72794,7 +74285,7 @@ }, "\/vectorsdb\/{databaseId}\/status": { "get": { - "summary": "Get database status.", + "summary": "Get status", "operationId": "vectorsDBGetStatus", "tags": [ "vectorsDB" @@ -72815,7 +74306,7 @@ "deprecated": false, "x-appwrite": { "method": "getStatus", - "group": "databases", + "group": "vectorsdb", "cookies": false, "type": "", "demo": "vectorsdb\/get-status.md", @@ -74561,10 +76052,26 @@ } }, "tags": [ + { + "name": "ping", + "description": "" + }, { "name": "account", "description": "The Account service allows you to authenticate and manage a user account." }, + { + "name": "locale", + "description": "The Locale service allows you to customize your app based on your users' location." + }, + { + "name": "users", + "description": "The Users service allows you to manage your project users." + }, + { + "name": "messaging", + "description": "The Messaging service allows you to send messages to any provider type (SMTP, push notification, SMS, etc.)." + }, { "name": "avatars", "description": "The Avatars service aims to help you complete everyday tasks related to your app image, icons, and avatars." @@ -74574,72 +76081,108 @@ "description": "The Databases service allows you to create structured collections of documents, query and filter lists of documents" }, { - "name": "tablesdb", + "name": "tablesDB", "description": "The TablesDB service allows you to create structured tables of columns, query and filter lists of rows" }, { - "name": "locale", - "description": "The Locale service allows you to customize your app based on your users' location." + "name": "documentsDB", + "description": "" }, { - "name": "projects", - "description": "The Project service allows you to manage all the projects in your Appwrite server." + "name": "vectorsDB", + "description": "" }, { - "name": "project", - "description": "The Project service allows you to manage all the projects in your Appwrite server." + "name": "presences", + "description": "The Presences service allows you to track and manage real-time user presence in your project." }, { - "name": "storage", - "description": "The Storage service allows you to manage your project files." + "name": "functions", + "description": "The Functions Service allows you view, create and manage your Cloud Functions." + }, + { + "name": "sites", + "description": "The Sites Service allows you view, create and manage your web applications." + }, + { + "name": "proxy", + "description": "The Proxy Service allows you to configure actions for your domains beyond DNS configuration." }, { "name": "teams", "description": "The Teams service allows you to group users of your project and to enable them to share read and write access to your project resources" }, { - "name": "users", - "description": "The Users service allows you to manage your project users." + "name": "tokens", + "description": "The Tokens service allows you to create and manage resource tokens for secure file access." }, { - "name": "sites", - "description": "The Sites Service allows you view, create and manage your web applications." + "name": "storage", + "description": "The Storage service allows you to manage your project files." }, { - "name": "functions", - "description": "The Functions Service allows you view, create and manage your Cloud Functions." + "name": "webhooks", + "description": "The Webhooks service allows you to manage your project webhooks." }, { - "name": "proxy", - "description": "The Proxy Service allows you to configure actions for your domains beyond DNS configuration." + "name": "organization", + "description": "The Organization service allows you to manage organization-level projects." }, { - "name": "graphql", - "description": "The GraphQL API allows you to query and mutate your Appwrite server using GraphQL." + "name": "project", + "description": "The Project service allows you to manage all the projects in your Appwrite server." }, { - "name": "console", - "description": "The Console service allows you to interact with console relevant information." + "name": "advisor", + "description": "The Advisor service surfaces actionable reports about your project resources, with CTA descriptors for one-click remediation in the console." }, { - "name": "organization", - "description": "The Organization service allows you to manage organization-level projects." + "name": "mysql", + "description": "" }, { - "name": "migrations", - "description": "The Migrations service allows you to migrate third-party data to your Appwrite project." + "name": "postgresql", + "description": "" }, { - "name": "messaging", - "description": "The Messaging service allows you to send messages to any provider type (SMTP, push notification, SMS, etc.)." + "name": "mongo", + "description": "" }, { - "name": "advisor", - "description": "The Advisor service surfaces actionable reports about your project resources, with CTA descriptors for one-click remediation in the console." + "name": "apps", + "description": "" }, { "name": "oauth2", "description": "The OAuth2 service allows you to authorize apps and issue standards-based OAuth2 and OpenID Connect tokens." + }, + { + "name": "backups", + "description": "The Backups service allows you to manage backup policies, archives, and restorations for your project." + }, + { + "name": "activities", + "description": "The Activities service allows you to list and inspect project activity events." + }, + { + "name": "waf", + "description": "" + }, + { + "name": "graphql", + "description": "The GraphQL API allows you to query and mutate your Appwrite server using GraphQL." + }, + { + "name": "projects", + "description": "The Project service allows you to manage all the projects in your Appwrite server." + }, + { + "name": "console", + "description": "The Console service allows you to interact with console relevant information." + }, + { + "name": "migrations", + "description": "The Migrations service allows you to migrate third-party data to your Appwrite project." } ], "components": { @@ -84232,6 +85775,13 @@ "format": "int32", "nullable": true }, + "oAuth2ServerInstallationAccessTokenDuration": { + "type": "integer", + "description": "OAuth2 server access token duration in seconds for app installation access tokens", + "x-example": 3600, + "format": "int32", + "nullable": true + }, "oAuth2ServerConfidentialPkce": { "type": "boolean", "description": "When enabled, PKCE is required for confidential clients (server-side flows using client_secret). PKCE is always required for public clients regardless of this setting.", @@ -84349,6 +85899,7 @@ "oAuth2ServerRefreshTokenDuration": 86400, "oAuth2ServerPublicAccessTokenDuration": 3600, "oAuth2ServerPublicRefreshTokenDuration": 2592000, + "oAuth2ServerInstallationAccessTokenDuration": 3600, "oAuth2ServerConfidentialPkce": false, "oAuth2ServerVerificationUrl": "https:\/\/cloud.appwrite.io\/device", "oAuth2ServerUserCodeLength": 8, @@ -92803,6 +94354,21 @@ "description": "ID of user who owns the application, if owned by user. Otherwise, team ID will be used.", "x-example": "5e5ea5c16897e" }, + "installationScopes": { + "type": "array", + "description": "Scopes the application requests when installed on a team. Organization-level and project-level scopes only.", + "items": { + "type": "string" + }, + "x-example": [ + "organization:organization.read" + ] + }, + "installationRedirectUrl": { + "type": "string", + "description": "URL users are redirected to after creating or updating an installation of this application. Empty for no redirect.", + "x-example": "https:\/\/example.com\/setup" + }, "secrets": { "type": "array", "description": "List of application secrets.", @@ -92836,6 +94402,8 @@ "deviceFlow", "teamId", "userId", + "installationScopes", + "installationRedirectUrl", "secrets" ], "example": { @@ -92875,6 +94443,10 @@ "deviceFlow": false, "teamId": "5e5ea5c16897e", "userId": "5e5ea5c16897e", + "installationScopes": [ + "organization:organization.read" + ], + "installationRedirectUrl": "https:\/\/example.com\/setup", "secrets": [] } }, @@ -93069,6 +94641,181 @@ "deprecated": false } }, + "appInstallation": { + "description": "AppInstallation", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "Installation ID.", + "x-example": "5e5ea5c16897e" + }, + "$createdAt": { + "type": "string", + "description": "Installation creation time in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Installation update time in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "appId": { + "type": "string", + "description": "ID of the installed application.", + "x-example": "5e5ea5c16897e" + }, + "teamId": { + "type": "string", + "description": "ID of the team the application is installed on.", + "x-example": "5e5ea5c16897e" + }, + "scopes": { + "type": "array", + "description": "Scopes granted to the application. Snapshot of the application's installation scopes taken when the installation was created or last updated.", + "items": { + "type": "string" + }, + "x-example": [ + "organization:organization.read" + ] + }, + "authorizationDetails": { + "type": "object", + "additionalProperties": true, + "description": "Authorization details granted to the application. Rich authorization request (RFC 9396) style entries; the Appwrite Console stores authorized project IDs here.", + "x-example": [ + { + "type": "project", + "identifiers": [ + "*" + ] + } + ] + }, + "createdById": { + "type": "string", + "description": "ID of the user who created the installation.", + "x-example": "5e5ea5c16897e" + }, + "createdByName": { + "type": "string", + "description": "Name of the user who created the installation.", + "x-example": "Walter White" + }, + "lastAccessedAt": { + "type": "string", + "description": "Time an access token was last issued for the installation in ISO 8601 format. Null if never used.", + "x-example": "2020-10-15T06:38:00.000+00:00", + "nullable": true + } + }, + "required": [ + "$id", + "$createdAt", + "$updatedAt", + "appId", + "teamId", + "scopes", + "authorizationDetails", + "createdById", + "createdByName" + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "appId": "5e5ea5c16897e", + "teamId": "5e5ea5c16897e", + "scopes": [ + "organization:organization.read" + ], + "authorizationDetails": [ + { + "type": "project", + "identifiers": [ + "*" + ] + } + ], + "createdById": "5e5ea5c16897e", + "createdByName": "Walter White", + "lastAccessedAt": "2020-10-15T06:38:00.000+00:00" + } + }, + "appKey": { + "description": "AppKey", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "App key ID.", + "x-example": "5e5ea5c16897e" + }, + "$createdAt": { + "type": "string", + "description": "App key creation time in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "App key update time in ISO 8601 format.", + "x-example": "2020-10-15T06:38:00.000+00:00" + }, + "appId": { + "type": "string", + "description": "Application ID this app key belongs to.", + "x-example": "5e5ea5c16897e" + }, + "secret": { + "type": "string", + "description": "App key secret.", + "x-example": "5f3c8d2a1b9e4f7a6c8b2d1e9f4a7b3c5d8e1f2a9b4c7d6e3f5a8b1c4d7e2f9a" + }, + "hint": { + "type": "string", + "description": "Last few characters of the app key secret, used to help identify it.", + "x-example": "f5c6c7" + }, + "createdById": { + "type": "string", + "description": "ID of the user who created the app key.", + "x-example": "5e5ea5c16897e" + }, + "createdByName": { + "type": "string", + "description": "Name of the user who created the app key.", + "x-example": "Walter White" + }, + "lastAccessedAt": { + "type": "string", + "description": "Time the app key was last used for authentication in ISO 8601 format. Null if never used.", + "x-example": "2020-10-15T06:38:00.000+00:00", + "nullable": true + } + }, + "required": [ + "$id", + "$createdAt", + "$updatedAt", + "appId", + "secret", + "hint", + "createdById", + "createdByName" + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "appId": "5e5ea5c16897e", + "secret": "5f3c8d2a1b9e4f7a6c8b2d1e9f4a7b3c5d8e1f2a9b4c7d6e3f5a8b1c4d7e2f9a", + "hint": "f5c6c7", + "createdById": "5e5ea5c16897e", + "createdByName": "Walter White", + "lastAccessedAt": "2020-10-15T06:38:00.000+00:00" + } + }, "oauth2Authorize": { "description": "OAuth2 Authorize", "type": "object", @@ -94699,6 +96446,62 @@ "total": 5, "scopes": "" } + }, + "appInstallationList": { + "description": "App installations list", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of installations that matched your query.", + "x-example": 5, + "format": "int32" + }, + "installations": { + "type": "array", + "description": "List of installations.", + "items": { + "$ref": "#\/components\/schemas\/appInstallation" + }, + "x-example": "" + } + }, + "required": [ + "total", + "installations" + ], + "example": { + "total": 5, + "installations": "" + } + }, + "appKeyList": { + "description": "App keys list", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of keys that matched your query.", + "x-example": 5, + "format": "int32" + }, + "keys": { + "type": "array", + "description": "List of keys.", + "items": { + "$ref": "#\/components\/schemas\/appKey" + }, + "x-example": "" + } + }, + "required": [ + "total", + "keys" + ], + "example": { + "total": 5, + "keys": "" + } } }, "securitySchemes": {