diff --git a/examples/2.3.x/client-android/java/account/create-email-password-session.md b/examples/2.3.x/client-android/java/account/create-email-password-session.md index fa7d25235..9e254bd25 100644 --- a/examples/2.3.x/client-android/java/account/create-email-password-session.md +++ b/examples/2.3.x/client-android/java/account/create-email-password-session.md @@ -14,6 +14,7 @@ Account account = new Account(client); account.createEmailPasswordSession( "email@example.com", // email "password", // password + 60L, // duration (optional) new CoroutineCallback<>((result, error) -> { if (error != null) { error.printStackTrace(); diff --git a/examples/2.3.x/client-android/java/account/create-id-token-session.md b/examples/2.3.x/client-android/java/account/create-id-token-session.md index 457b9fee6..b7bd83fcf 100644 --- a/examples/2.3.x/client-android/java/account/create-id-token-session.md +++ b/examples/2.3.x/client-android/java/account/create-id-token-session.md @@ -17,7 +17,7 @@ account.createIdTokenSession( "", // idToken "", // nonce (optional) "", // accessToken (optional) - 0, // accessTokenExpiry (optional) + 0L, // accessTokenExpiry (optional) "", // name (optional) new CoroutineCallback<>((result, error) -> { if (error != null) { diff --git a/examples/2.3.x/client-android/java/account/create-jwt.md b/examples/2.3.x/client-android/java/account/create-jwt.md index f405d3066..c41c57212 100644 --- a/examples/2.3.x/client-android/java/account/create-jwt.md +++ b/examples/2.3.x/client-android/java/account/create-jwt.md @@ -12,7 +12,7 @@ Client client = new Client(context) Account account = new Account(client); account.createJWT( - 0, // duration (optional) + 0L, // duration (optional) new CoroutineCallback<>((result, error) -> { if (error != null) { error.printStackTrace(); diff --git a/examples/2.3.x/client-android/java/account/delete-sessions.md b/examples/2.3.x/client-android/java/account/delete-sessions.md index 4b93d19af..e0dce6ca8 100644 --- a/examples/2.3.x/client-android/java/account/delete-sessions.md +++ b/examples/2.3.x/client-android/java/account/delete-sessions.md @@ -11,12 +11,16 @@ Client client = new Client(context) Account account = new Account(client); -account.deleteSessions(new CoroutineCallback<>((result, error) -> { - if (error != null) { - error.printStackTrace(); - return; - } +account.deleteSessions( + false, // current (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + Log.d("Appwrite", result.toString()); + }) +); - Log.d("Appwrite", result.toString()); -})); ``` diff --git a/examples/2.3.x/client-android/java/account/list-sessions.md b/examples/2.3.x/client-android/java/account/list-sessions.md index 9e52ea471..5ea506259 100644 --- a/examples/2.3.x/client-android/java/account/list-sessions.md +++ b/examples/2.3.x/client-android/java/account/list-sessions.md @@ -11,12 +11,16 @@ Client client = new Client(context) Account account = new Account(client); -account.listSessions(new CoroutineCallback<>((result, error) -> { - if (error != null) { - error.printStackTrace(); - return; - } +account.listSessions( + false, // total (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + Log.d("Appwrite", result.toString()); + }) +); - Log.d("Appwrite", result.toString()); -})); ``` diff --git a/examples/2.3.x/client-android/java/analytics/create-event.md b/examples/2.3.x/client-android/java/analytics/create-event.md new file mode 100644 index 000000000..e2b8dbe0f --- /dev/null +++ b/examples/2.3.x/client-android/java/analytics/create-event.md @@ -0,0 +1,38 @@ +```java +import android.util.Log; + +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Analytics; + +Client client = new Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject(""); // Your project ID + +Analytics analytics = new Analytics(client); + +analytics.createEvent( + "", // propertyId + "", // name + "https://example.com", // url + "", // domain (optional) + "", // referrer (optional) + 0L, // screenWidth (optional) + "", // sessionHash (optional) + 0L, // scrollDepth (optional) + 0L, // engagementTime (optional) + List.of(), // props (optional) + "", // userId (optional) + "", // ip (optional) + "", // userAgent (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + Log.d("Appwrite", result.toString()); + }) +); + +``` diff --git a/examples/2.3.x/client-android/java/apps/create-installation-token.md b/examples/2.3.x/client-android/java/apps/create-installation-token.md new file mode 100644 index 000000000..e46fc2af8 --- /dev/null +++ b/examples/2.3.x/client-android/java/apps/create-installation-token.md @@ -0,0 +1,27 @@ +```java +import android.util.Log; + +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Apps; + +Client client = new Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject(""); // Your project ID + +Apps apps = new Apps(client); + +apps.createInstallationToken( + "", // appId + "", // installationId + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + Log.d("Appwrite", result.toString()); + }) +); + +``` diff --git a/examples/2.3.x/client-android/java/apps/create-key.md b/examples/2.3.x/client-android/java/apps/create-key.md new file mode 100644 index 000000000..729c98fd2 --- /dev/null +++ b/examples/2.3.x/client-android/java/apps/create-key.md @@ -0,0 +1,26 @@ +```java +import android.util.Log; + +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Apps; + +Client client = new Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject(""); // Your project ID + +Apps apps = new Apps(client); + +apps.createKey( + "", // appId + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + Log.d("Appwrite", result.toString()); + }) +); + +``` diff --git a/examples/2.3.x/client-android/java/apps/create-secret.md b/examples/2.3.x/client-android/java/apps/create-secret.md new file mode 100644 index 000000000..8acb44ef2 --- /dev/null +++ b/examples/2.3.x/client-android/java/apps/create-secret.md @@ -0,0 +1,26 @@ +```java +import android.util.Log; + +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Apps; + +Client client = new Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject(""); // Your project ID + +Apps apps = new Apps(client); + +apps.createSecret( + "", // appId + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + Log.d("Appwrite", result.toString()); + }) +); + +``` diff --git a/examples/2.3.x/client-android/java/apps/create.md b/examples/2.3.x/client-android/java/apps/create.md new file mode 100644 index 000000000..88694a946 --- /dev/null +++ b/examples/2.3.x/client-android/java/apps/create.md @@ -0,0 +1,44 @@ +```java +import android.util.Log; + +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Apps; + +Client client = new Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject(""); // Your project ID + +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; + } + + Log.d("Appwrite", result.toString()); + }) +); + +``` diff --git a/examples/2.3.x/client-android/java/apps/delete-installation.md b/examples/2.3.x/client-android/java/apps/delete-installation.md new file mode 100644 index 000000000..559ab6544 --- /dev/null +++ b/examples/2.3.x/client-android/java/apps/delete-installation.md @@ -0,0 +1,27 @@ +```java +import android.util.Log; + +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Apps; + +Client client = new Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject(""); // Your project ID + +Apps apps = new Apps(client); + +apps.deleteInstallation( + "", // appId + "", // installationId + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + Log.d("Appwrite", result.toString()); + }) +); + +``` diff --git a/examples/2.3.x/client-android/java/apps/delete-key.md b/examples/2.3.x/client-android/java/apps/delete-key.md new file mode 100644 index 000000000..312e0be0b --- /dev/null +++ b/examples/2.3.x/client-android/java/apps/delete-key.md @@ -0,0 +1,27 @@ +```java +import android.util.Log; + +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Apps; + +Client client = new Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject(""); // Your project ID + +Apps apps = new Apps(client); + +apps.deleteKey( + "", // appId + "", // keyId + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + Log.d("Appwrite", result.toString()); + }) +); + +``` diff --git a/examples/2.3.x/client-android/java/apps/delete-secret.md b/examples/2.3.x/client-android/java/apps/delete-secret.md new file mode 100644 index 000000000..b21fc7599 --- /dev/null +++ b/examples/2.3.x/client-android/java/apps/delete-secret.md @@ -0,0 +1,27 @@ +```java +import android.util.Log; + +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Apps; + +Client client = new Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject(""); // Your project ID + +Apps apps = new Apps(client); + +apps.deleteSecret( + "", // appId + "", // secretId + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + Log.d("Appwrite", result.toString()); + }) +); + +``` diff --git a/examples/2.3.x/client-android/java/apps/delete-tokens.md b/examples/2.3.x/client-android/java/apps/delete-tokens.md new file mode 100644 index 000000000..f873873e3 --- /dev/null +++ b/examples/2.3.x/client-android/java/apps/delete-tokens.md @@ -0,0 +1,26 @@ +```java +import android.util.Log; + +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Apps; + +Client client = new Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject(""); // Your project ID + +Apps apps = new Apps(client); + +apps.deleteTokens( + "", // appId + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + Log.d("Appwrite", result.toString()); + }) +); + +``` diff --git a/examples/2.3.x/client-android/java/apps/delete.md b/examples/2.3.x/client-android/java/apps/delete.md new file mode 100644 index 000000000..0c99520cb --- /dev/null +++ b/examples/2.3.x/client-android/java/apps/delete.md @@ -0,0 +1,26 @@ +```java +import android.util.Log; + +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Apps; + +Client client = new Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject(""); // Your project ID + +Apps apps = new Apps(client); + +apps.delete( + "", // appId + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + Log.d("Appwrite", result.toString()); + }) +); + +``` diff --git a/examples/2.3.x/client-android/java/apps/get-installation.md b/examples/2.3.x/client-android/java/apps/get-installation.md new file mode 100644 index 000000000..f8cf6b568 --- /dev/null +++ b/examples/2.3.x/client-android/java/apps/get-installation.md @@ -0,0 +1,27 @@ +```java +import android.util.Log; + +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Apps; + +Client client = new Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject(""); // Your project ID + +Apps apps = new Apps(client); + +apps.getInstallation( + "", // appId + "", // installationId + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + Log.d("Appwrite", result.toString()); + }) +); + +``` diff --git a/examples/2.3.x/client-android/java/apps/get-key.md b/examples/2.3.x/client-android/java/apps/get-key.md new file mode 100644 index 000000000..729ccfa6b --- /dev/null +++ b/examples/2.3.x/client-android/java/apps/get-key.md @@ -0,0 +1,27 @@ +```java +import android.util.Log; + +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Apps; + +Client client = new Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject(""); // Your project ID + +Apps apps = new Apps(client); + +apps.getKey( + "", // appId + "", // keyId + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + Log.d("Appwrite", result.toString()); + }) +); + +``` diff --git a/examples/2.3.x/client-android/java/apps/get-secret.md b/examples/2.3.x/client-android/java/apps/get-secret.md new file mode 100644 index 000000000..f4f3c68ff --- /dev/null +++ b/examples/2.3.x/client-android/java/apps/get-secret.md @@ -0,0 +1,27 @@ +```java +import android.util.Log; + +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Apps; + +Client client = new Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject(""); // Your project ID + +Apps apps = new Apps(client); + +apps.getSecret( + "", // appId + "", // secretId + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + Log.d("Appwrite", result.toString()); + }) +); + +``` diff --git a/examples/2.3.x/client-android/java/apps/get.md b/examples/2.3.x/client-android/java/apps/get.md new file mode 100644 index 000000000..0b4c53786 --- /dev/null +++ b/examples/2.3.x/client-android/java/apps/get.md @@ -0,0 +1,26 @@ +```java +import android.util.Log; + +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Apps; + +Client client = new Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject(""); // Your project ID + +Apps apps = new Apps(client); + +apps.get( + "", // appId + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + Log.d("Appwrite", result.toString()); + }) +); + +``` diff --git a/examples/2.3.x/client-android/java/apps/list-installation-scopes.md b/examples/2.3.x/client-android/java/apps/list-installation-scopes.md new file mode 100644 index 000000000..c09da7894 --- /dev/null +++ b/examples/2.3.x/client-android/java/apps/list-installation-scopes.md @@ -0,0 +1,22 @@ +```java +import android.util.Log; + +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Apps; + +Client client = new Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject(""); // Your project ID + +Apps apps = new Apps(client); + +apps.listInstallationScopes(new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + Log.d("Appwrite", result.toString()); +})); +``` diff --git a/examples/2.3.x/client-android/java/apps/list-installations.md b/examples/2.3.x/client-android/java/apps/list-installations.md new file mode 100644 index 000000000..f83097e1a --- /dev/null +++ b/examples/2.3.x/client-android/java/apps/list-installations.md @@ -0,0 +1,28 @@ +```java +import android.util.Log; + +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Apps; + +Client client = new Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject(""); // Your project ID + +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; + } + + Log.d("Appwrite", result.toString()); + }) +); + +``` diff --git a/examples/2.3.x/client-android/java/apps/list-keys.md b/examples/2.3.x/client-android/java/apps/list-keys.md new file mode 100644 index 000000000..7a8727519 --- /dev/null +++ b/examples/2.3.x/client-android/java/apps/list-keys.md @@ -0,0 +1,28 @@ +```java +import android.util.Log; + +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Apps; + +Client client = new Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject(""); // Your project ID + +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; + } + + Log.d("Appwrite", result.toString()); + }) +); + +``` diff --git a/examples/2.3.x/client-android/java/apps/list-o-auth-2-scopes.md b/examples/2.3.x/client-android/java/apps/list-o-auth-2-scopes.md new file mode 100644 index 000000000..d96f8c361 --- /dev/null +++ b/examples/2.3.x/client-android/java/apps/list-o-auth-2-scopes.md @@ -0,0 +1,22 @@ +```java +import android.util.Log; + +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Apps; + +Client client = new Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject(""); // Your project ID + +Apps apps = new Apps(client); + +apps.listOAuth2Scopes(new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + Log.d("Appwrite", result.toString()); +})); +``` diff --git a/examples/2.3.x/client-android/java/apps/list-secrets.md b/examples/2.3.x/client-android/java/apps/list-secrets.md new file mode 100644 index 000000000..4d823a74e --- /dev/null +++ b/examples/2.3.x/client-android/java/apps/list-secrets.md @@ -0,0 +1,28 @@ +```java +import android.util.Log; + +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Apps; + +Client client = new Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject(""); // Your project ID + +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; + } + + Log.d("Appwrite", result.toString()); + }) +); + +``` diff --git a/examples/2.3.x/client-android/java/apps/list.md b/examples/2.3.x/client-android/java/apps/list.md new file mode 100644 index 000000000..31d80daae --- /dev/null +++ b/examples/2.3.x/client-android/java/apps/list.md @@ -0,0 +1,27 @@ +```java +import android.util.Log; + +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Apps; + +Client client = new Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject(""); // Your project ID + +Apps apps = new Apps(client); + +apps.list( + 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/2.3.x/client-android/java/apps/update-team.md b/examples/2.3.x/client-android/java/apps/update-team.md new file mode 100644 index 000000000..314c672f4 --- /dev/null +++ b/examples/2.3.x/client-android/java/apps/update-team.md @@ -0,0 +1,27 @@ +```java +import android.util.Log; + +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Apps; + +Client client = new Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject(""); // Your project ID + +Apps apps = new Apps(client); + +apps.updateTeam( + "", // appId + "", // teamId + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + Log.d("Appwrite", result.toString()); + }) +); + +``` diff --git a/examples/2.3.x/client-android/java/apps/update.md b/examples/2.3.x/client-android/java/apps/update.md new file mode 100644 index 000000000..e8b51fa93 --- /dev/null +++ b/examples/2.3.x/client-android/java/apps/update.md @@ -0,0 +1,45 @@ +```java +import android.util.Log; + +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Apps; + +Client client = new Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject(""); // Your project ID + +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; + } + + Log.d("Appwrite", result.toString()); + }) +); + +``` diff --git a/examples/2.3.x/client-android/java/avatars/delete-photo.md b/examples/2.3.x/client-android/java/avatars/delete-photo.md new file mode 100644 index 000000000..cffc010c5 --- /dev/null +++ b/examples/2.3.x/client-android/java/avatars/delete-photo.md @@ -0,0 +1,22 @@ +```java +import android.util.Log; + +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Avatars; + +Client client = new Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject(""); // Your project ID + +Avatars avatars = new Avatars(client); + +avatars.deletePhoto(new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + Log.d("Appwrite", result.toString()); +})); +``` diff --git a/examples/2.3.x/client-android/java/avatars/get-browser.md b/examples/2.3.x/client-android/java/avatars/get-browser.md index f101ad541..626de034e 100644 --- a/examples/2.3.x/client-android/java/avatars/get-browser.md +++ b/examples/2.3.x/client-android/java/avatars/get-browser.md @@ -14,9 +14,9 @@ Avatars avatars = new Avatars(client); avatars.getBrowser( Browser.AVANT_BROWSER, // code - 0, // width (optional) - 0, // height (optional) - -1, // quality (optional) + 0L, // width (optional) + 0L, // height (optional) + -1L, // quality (optional) new CoroutineCallback<>((result, error) -> { if (error != null) { error.printStackTrace(); diff --git a/examples/2.3.x/client-android/java/avatars/get-credit-card.md b/examples/2.3.x/client-android/java/avatars/get-credit-card.md index b12cebc96..f8e114dbd 100644 --- a/examples/2.3.x/client-android/java/avatars/get-credit-card.md +++ b/examples/2.3.x/client-android/java/avatars/get-credit-card.md @@ -14,9 +14,9 @@ Avatars avatars = new Avatars(client); avatars.getCreditCard( CreditCard.AMERICAN_EXPRESS, // code - 0, // width (optional) - 0, // height (optional) - -1, // quality (optional) + 0L, // width (optional) + 0L, // height (optional) + -1L, // quality (optional) new CoroutineCallback<>((result, error) -> { if (error != null) { error.printStackTrace(); diff --git a/examples/2.3.x/client-android/java/avatars/get-flag.md b/examples/2.3.x/client-android/java/avatars/get-flag.md index 4d808513f..0acd391f1 100644 --- a/examples/2.3.x/client-android/java/avatars/get-flag.md +++ b/examples/2.3.x/client-android/java/avatars/get-flag.md @@ -14,9 +14,9 @@ Avatars avatars = new Avatars(client); avatars.getFlag( Flag.AFGHANISTAN, // code - 0, // width (optional) - 0, // height (optional) - -1, // quality (optional) + 0L, // width (optional) + 0L, // height (optional) + -1L, // quality (optional) new CoroutineCallback<>((result, error) -> { if (error != null) { error.printStackTrace(); diff --git a/examples/2.3.x/client-android/java/avatars/get-image.md b/examples/2.3.x/client-android/java/avatars/get-image.md index a22041f53..38bd4dc86 100644 --- a/examples/2.3.x/client-android/java/avatars/get-image.md +++ b/examples/2.3.x/client-android/java/avatars/get-image.md @@ -13,8 +13,8 @@ Avatars avatars = new Avatars(client); avatars.getImage( "https://example.com", // url - 0, // width (optional) - 0, // height (optional) + 0L, // width (optional) + 0L, // height (optional) new CoroutineCallback<>((result, error) -> { if (error != null) { error.printStackTrace(); diff --git a/examples/2.3.x/client-android/java/avatars/get-initials.md b/examples/2.3.x/client-android/java/avatars/get-initials.md index 08f5bea98..c22358d2d 100644 --- a/examples/2.3.x/client-android/java/avatars/get-initials.md +++ b/examples/2.3.x/client-android/java/avatars/get-initials.md @@ -13,8 +13,8 @@ Avatars avatars = new Avatars(client); avatars.getInitials( "", // name (optional) - 0, // width (optional) - 0, // height (optional) + 0L, // width (optional) + 0L, // height (optional) "FFFFFF", // background (optional) new CoroutineCallback<>((result, error) -> { if (error != null) { diff --git a/examples/2.3.x/client-android/java/avatars/get-photo.md b/examples/2.3.x/client-android/java/avatars/get-photo.md index 2204db789..04769d1c9 100644 --- a/examples/2.3.x/client-android/java/avatars/get-photo.md +++ b/examples/2.3.x/client-android/java/avatars/get-photo.md @@ -12,9 +12,9 @@ Client client = new Client(context) Avatars avatars = new Avatars(client); avatars.getPhoto( - 0, // width (optional) - 0, // height (optional) - 0, // quality (optional) + 0L, // width (optional) + 0L, // height (optional) + 0L, // quality (optional) "png", // output (optional) "g", // rating (optional) "current()", // userId (optional) diff --git a/examples/2.3.x/client-android/java/avatars/get-qr.md b/examples/2.3.x/client-android/java/avatars/get-qr.md index ad08ab561..b3bbb6b6a 100644 --- a/examples/2.3.x/client-android/java/avatars/get-qr.md +++ b/examples/2.3.x/client-android/java/avatars/get-qr.md @@ -13,8 +13,8 @@ Avatars avatars = new Avatars(client); avatars.getQR( "", // text - 1, // size (optional) - 0, // margin (optional) + 1L, // size (optional) + 0L, // margin (optional) false, // download (optional) new CoroutineCallback<>((result, error) -> { if (error != null) { diff --git a/examples/2.3.x/client-android/java/avatars/get-screenshot.md b/examples/2.3.x/client-android/java/avatars/get-screenshot.md index 71f96c5b6..82454a654 100644 --- a/examples/2.3.x/client-android/java/avatars/get-screenshot.md +++ b/examples/2.3.x/client-android/java/avatars/get-screenshot.md @@ -18,12 +18,11 @@ Avatars avatars = new Avatars(client); avatars.getScreenshot( "https://example.com", // url Map.of( - "Authorization", "Bearer token123", - "X-Custom-Header", "value" + "Accept-Language", "en-US,en;q=0.9" ), // headers (optional) - 1920, // viewportWidth (optional) - 1080, // viewportHeight (optional) - 2, // scale (optional) + 1920L, // viewportWidth (optional) + 1080L, // viewportHeight (optional) + 2.0, // scale (optional) BrowserTheme.LIGHT, // theme (optional) "Mozilla/5.0 (iPhone; CPU iPhone OS 14_0 like Mac OS X) AppleWebKit/605.1.15", // userAgent (optional) true, // fullpage (optional) @@ -31,13 +30,13 @@ avatars.getScreenshot( Timezone.AFRICA_ABIDJAN, // timezone (optional) 37.7749, // latitude (optional) -122.4194, // longitude (optional) - 100, // accuracy (optional) + 100.0, // accuracy (optional) true, // touch (optional) BrowserPermission.GEOLOCATION, // permissions (optional) - 3, // sleep (optional) - 800, // width (optional) - 600, // height (optional) - 85, // quality (optional) + 3L, // sleep (optional) + 800L, // width (optional) + 600L, // height (optional) + 85L, // quality (optional) ImageFormat.JPG, // output (optional) new CoroutineCallback<>((result, error) -> { if (error != null) { diff --git a/examples/2.3.x/client-android/java/avatars/update-photo.md b/examples/2.3.x/client-android/java/avatars/update-photo.md new file mode 100644 index 000000000..8c4d6e903 --- /dev/null +++ b/examples/2.3.x/client-android/java/avatars/update-photo.md @@ -0,0 +1,27 @@ +```java +import android.util.Log; + +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.models.InputFile; +import io.appwrite.services.Avatars; + +Client client = new Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject(""); // Your project ID + +Avatars avatars = new Avatars(client); + +avatars.updatePhoto( + InputFile.fromPath("file.png"), // file + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + Log.d("Appwrite", result.toString()); + }) +); + +``` diff --git a/examples/2.3.x/client-android/java/databases/create-transaction.md b/examples/2.3.x/client-android/java/databases/create-transaction.md index d96c27a07..616838d21 100644 --- a/examples/2.3.x/client-android/java/databases/create-transaction.md +++ b/examples/2.3.x/client-android/java/databases/create-transaction.md @@ -12,7 +12,7 @@ Client client = new Client(context) Databases databases = new Databases(client); databases.createTransaction( - 60, // ttl (optional) + 60L, // ttl (optional) new CoroutineCallback<>((result, error) -> { if (error != null) { error.printStackTrace(); diff --git a/examples/2.3.x/client-android/java/databases/decrement-document-attribute.md b/examples/2.3.x/client-android/java/databases/decrement-document-attribute.md index 1a2f23e22..682dadd2b 100644 --- a/examples/2.3.x/client-android/java/databases/decrement-document-attribute.md +++ b/examples/2.3.x/client-android/java/databases/decrement-document-attribute.md @@ -16,8 +16,8 @@ databases.decrementDocumentAttribute( "", // collectionId "", // documentId "", // attribute - 1, // value (optional) - 0, // min (optional) + 1.0, // value (optional) + 0.0, // min (optional) "", // transactionId (optional) new CoroutineCallback<>((result, error) -> { if (error != null) { diff --git a/examples/2.3.x/client-android/java/databases/increment-document-attribute.md b/examples/2.3.x/client-android/java/databases/increment-document-attribute.md index fe3635924..07dfd55c5 100644 --- a/examples/2.3.x/client-android/java/databases/increment-document-attribute.md +++ b/examples/2.3.x/client-android/java/databases/increment-document-attribute.md @@ -16,8 +16,8 @@ databases.incrementDocumentAttribute( "", // collectionId "", // documentId "", // attribute - 1, // value (optional) - 100, // max (optional) + 1.0, // value (optional) + 100.0, // max (optional) "", // transactionId (optional) new CoroutineCallback<>((result, error) -> { if (error != null) { diff --git a/examples/2.3.x/client-android/java/databases/list-documents.md b/examples/2.3.x/client-android/java/databases/list-documents.md index 8569cb60f..8a5a52cb8 100644 --- a/examples/2.3.x/client-android/java/databases/list-documents.md +++ b/examples/2.3.x/client-android/java/databases/list-documents.md @@ -17,7 +17,7 @@ databases.listDocuments( List.of(), // queries (optional) "", // transactionId (optional) false, // total (optional) - 0, // ttl (optional) + 0L, // ttl (optional) new CoroutineCallback<>((result, error) -> { if (error != null) { error.printStackTrace(); diff --git a/examples/2.3.x/client-android/java/databases/list-transactions.md b/examples/2.3.x/client-android/java/databases/list-transactions.md index ad11c7f70..3e7ca1382 100644 --- a/examples/2.3.x/client-android/java/databases/list-transactions.md +++ b/examples/2.3.x/client-android/java/databases/list-transactions.md @@ -13,6 +13,7 @@ Databases databases = new Databases(client); databases.listTransactions( List.of(), // queries (optional) + false, // total (optional) new CoroutineCallback<>((result, error) -> { if (error != null) { error.printStackTrace(); diff --git a/examples/2.3.x/client-android/java/documentsdb/create-documents.md b/examples/2.3.x/client-android/java/documentsdb/create-documents.md index c52433a2d..ae20335d5 100644 --- a/examples/2.3.x/client-android/java/documentsdb/create-documents.md +++ b/examples/2.3.x/client-android/java/documentsdb/create-documents.md @@ -14,7 +14,14 @@ DocumentsDB documentsDB = new DocumentsDB(client); documentsDB.createDocuments( "", // databaseId "", // collectionId - List.of(), // documents + List.of(Map.of( + "$id", "example1", + "username", "walter.obrien", + "email", "walter.obrien@example.com", + "fullName", "Walter O'Brien", + "age", 30, + "isAdmin", false + )), // documents "", // transactionId (optional) new CoroutineCallback<>((result, error) -> { if (error != null) { diff --git a/examples/2.3.x/client-android/java/documentsdb/create-transaction.md b/examples/2.3.x/client-android/java/documentsdb/create-transaction.md index da91c5c8e..ac4a96d81 100644 --- a/examples/2.3.x/client-android/java/documentsdb/create-transaction.md +++ b/examples/2.3.x/client-android/java/documentsdb/create-transaction.md @@ -12,7 +12,7 @@ Client client = new Client(context) DocumentsDB documentsDB = new DocumentsDB(client); documentsDB.createTransaction( - 60, // ttl (optional) + 60L, // ttl (optional) new CoroutineCallback<>((result, error) -> { if (error != null) { error.printStackTrace(); diff --git a/examples/2.3.x/client-android/java/documentsdb/decrement-document-attribute.md b/examples/2.3.x/client-android/java/documentsdb/decrement-document-attribute.md index f1853ac6d..9e19095e3 100644 --- a/examples/2.3.x/client-android/java/documentsdb/decrement-document-attribute.md +++ b/examples/2.3.x/client-android/java/documentsdb/decrement-document-attribute.md @@ -16,8 +16,8 @@ documentsDB.decrementDocumentAttribute( "", // collectionId "", // documentId "", // attribute - 1, // value (optional) - 0, // min (optional) + 1.0, // value (optional) + 0.0, // min (optional) "", // transactionId (optional) new CoroutineCallback<>((result, error) -> { if (error != null) { diff --git a/examples/2.3.x/client-android/java/documentsdb/increment-document-attribute.md b/examples/2.3.x/client-android/java/documentsdb/increment-document-attribute.md index fab214e96..470abbf8c 100644 --- a/examples/2.3.x/client-android/java/documentsdb/increment-document-attribute.md +++ b/examples/2.3.x/client-android/java/documentsdb/increment-document-attribute.md @@ -16,8 +16,8 @@ documentsDB.incrementDocumentAttribute( "", // collectionId "", // documentId "", // attribute - 1, // value (optional) - 100, // max (optional) + 1.0, // value (optional) + 100.0, // max (optional) "", // transactionId (optional) new CoroutineCallback<>((result, error) -> { if (error != null) { diff --git a/examples/2.3.x/client-android/java/documentsdb/list-documents.md b/examples/2.3.x/client-android/java/documentsdb/list-documents.md index 0abb6734c..f6cfe4833 100644 --- a/examples/2.3.x/client-android/java/documentsdb/list-documents.md +++ b/examples/2.3.x/client-android/java/documentsdb/list-documents.md @@ -17,7 +17,7 @@ documentsDB.listDocuments( List.of(), // queries (optional) "", // transactionId (optional) false, // total (optional) - 0, // ttl (optional) + 0L, // ttl (optional) new CoroutineCallback<>((result, error) -> { if (error != null) { error.printStackTrace(); diff --git a/examples/2.3.x/client-android/java/documentsdb/list-transactions.md b/examples/2.3.x/client-android/java/documentsdb/list-transactions.md index 9b8fcd7bc..ab4974a0a 100644 --- a/examples/2.3.x/client-android/java/documentsdb/list-transactions.md +++ b/examples/2.3.x/client-android/java/documentsdb/list-transactions.md @@ -13,6 +13,7 @@ DocumentsDB documentsDB = new DocumentsDB(client); documentsDB.listTransactions( List.of(), // queries (optional) + false, // total (optional) new CoroutineCallback<>((result, error) -> { if (error != null) { error.printStackTrace(); diff --git a/examples/2.3.x/client-android/java/graphql/mutation.md b/examples/2.3.x/client-android/java/graphql/mutation.md index 9cc7febe9..a8488db12 100644 --- a/examples/2.3.x/client-android/java/graphql/mutation.md +++ b/examples/2.3.x/client-android/java/graphql/mutation.md @@ -12,7 +12,9 @@ Client client = new Client(context) Graphql graphql = new Graphql(client); graphql.mutation( - Map.of("a", "b"), // query + Map.of( + "query", "mutation { accountUpdateName(name: \"Walter\") { name } }" + ), // query new CoroutineCallback<>((result, error) -> { if (error != null) { error.printStackTrace(); diff --git a/examples/2.3.x/client-android/java/graphql/query.md b/examples/2.3.x/client-android/java/graphql/query.md index 25704b00b..58e636357 100644 --- a/examples/2.3.x/client-android/java/graphql/query.md +++ b/examples/2.3.x/client-android/java/graphql/query.md @@ -12,7 +12,9 @@ Client client = new Client(context) Graphql graphql = new Graphql(client); graphql.query( - Map.of("a", "b"), // query + Map.of( + "query", "query { localeGet { ip } }" + ), // query new CoroutineCallback<>((result, error) -> { if (error != null) { error.printStackTrace(); diff --git a/examples/2.3.x/client-android/java/locale/list-codes.md b/examples/2.3.x/client-android/java/locale/list-codes.md index 534b11995..181c1b8f2 100644 --- a/examples/2.3.x/client-android/java/locale/list-codes.md +++ b/examples/2.3.x/client-android/java/locale/list-codes.md @@ -11,12 +11,16 @@ Client client = new Client(context) Locale locale = new Locale(client); -locale.listCodes(new CoroutineCallback<>((result, error) -> { - if (error != null) { - error.printStackTrace(); - return; - } +locale.listCodes( + false, // total (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + Log.d("Appwrite", result.toString()); + }) +); - Log.d("Appwrite", result.toString()); -})); ``` diff --git a/examples/2.3.x/client-android/java/locale/list-continents.md b/examples/2.3.x/client-android/java/locale/list-continents.md index 998a31be2..e8a60fca8 100644 --- a/examples/2.3.x/client-android/java/locale/list-continents.md +++ b/examples/2.3.x/client-android/java/locale/list-continents.md @@ -11,12 +11,16 @@ Client client = new Client(context) Locale locale = new Locale(client); -locale.listContinents(new CoroutineCallback<>((result, error) -> { - if (error != null) { - error.printStackTrace(); - return; - } +locale.listContinents( + false, // total (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + Log.d("Appwrite", result.toString()); + }) +); - Log.d("Appwrite", result.toString()); -})); ``` diff --git a/examples/2.3.x/client-android/java/locale/list-countries-eu.md b/examples/2.3.x/client-android/java/locale/list-countries-eu.md index 5950c990f..b6c878fc3 100644 --- a/examples/2.3.x/client-android/java/locale/list-countries-eu.md +++ b/examples/2.3.x/client-android/java/locale/list-countries-eu.md @@ -11,12 +11,16 @@ Client client = new Client(context) Locale locale = new Locale(client); -locale.listCountriesEU(new CoroutineCallback<>((result, error) -> { - if (error != null) { - error.printStackTrace(); - return; - } +locale.listCountriesEU( + false, // total (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + Log.d("Appwrite", result.toString()); + }) +); - Log.d("Appwrite", result.toString()); -})); ``` diff --git a/examples/2.3.x/client-android/java/locale/list-countries-phones.md b/examples/2.3.x/client-android/java/locale/list-countries-phones.md index 6096758ec..3d8bb9ebf 100644 --- a/examples/2.3.x/client-android/java/locale/list-countries-phones.md +++ b/examples/2.3.x/client-android/java/locale/list-countries-phones.md @@ -11,12 +11,16 @@ Client client = new Client(context) Locale locale = new Locale(client); -locale.listCountriesPhones(new CoroutineCallback<>((result, error) -> { - if (error != null) { - error.printStackTrace(); - return; - } +locale.listCountriesPhones( + false, // total (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + Log.d("Appwrite", result.toString()); + }) +); - Log.d("Appwrite", result.toString()); -})); ``` diff --git a/examples/2.3.x/client-android/java/locale/list-countries.md b/examples/2.3.x/client-android/java/locale/list-countries.md index 140fc48a0..3238cf27f 100644 --- a/examples/2.3.x/client-android/java/locale/list-countries.md +++ b/examples/2.3.x/client-android/java/locale/list-countries.md @@ -11,12 +11,16 @@ Client client = new Client(context) Locale locale = new Locale(client); -locale.listCountries(new CoroutineCallback<>((result, error) -> { - if (error != null) { - error.printStackTrace(); - return; - } +locale.listCountries( + false, // total (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + Log.d("Appwrite", result.toString()); + }) +); - Log.d("Appwrite", result.toString()); -})); ``` diff --git a/examples/2.3.x/client-android/java/locale/list-currencies.md b/examples/2.3.x/client-android/java/locale/list-currencies.md index 0e5273d96..631bb3460 100644 --- a/examples/2.3.x/client-android/java/locale/list-currencies.md +++ b/examples/2.3.x/client-android/java/locale/list-currencies.md @@ -11,12 +11,16 @@ Client client = new Client(context) Locale locale = new Locale(client); -locale.listCurrencies(new CoroutineCallback<>((result, error) -> { - if (error != null) { - error.printStackTrace(); - return; - } +locale.listCurrencies( + false, // total (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + Log.d("Appwrite", result.toString()); + }) +); - Log.d("Appwrite", result.toString()); -})); ``` diff --git a/examples/2.3.x/client-android/java/locale/list-languages.md b/examples/2.3.x/client-android/java/locale/list-languages.md index e85bd0a11..b00006336 100644 --- a/examples/2.3.x/client-android/java/locale/list-languages.md +++ b/examples/2.3.x/client-android/java/locale/list-languages.md @@ -11,12 +11,16 @@ Client client = new Client(context) Locale locale = new Locale(client); -locale.listLanguages(new CoroutineCallback<>((result, error) -> { - if (error != null) { - error.printStackTrace(); - return; - } +locale.listLanguages( + false, // total (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + Log.d("Appwrite", result.toString()); + }) +); - Log.d("Appwrite", result.toString()); -})); ``` diff --git a/examples/2.3.x/client-android/java/oauth2/approve.md b/examples/2.3.x/client-android/java/oauth2/approve.md new file mode 100644 index 000000000..f2f4a4951 --- /dev/null +++ b/examples/2.3.x/client-android/java/oauth2/approve.md @@ -0,0 +1,28 @@ +```java +import android.util.Log; + +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Oauth2; + +Client client = new Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .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; + } + + Log.d("Appwrite", result.toString()); + }) +); + +``` diff --git a/examples/2.3.x/client-android/java/oauth2/authorize-post.md b/examples/2.3.x/client-android/java/oauth2/authorize-post.md new file mode 100644 index 000000000..99ed6b8e6 --- /dev/null +++ b/examples/2.3.x/client-android/java/oauth2/authorize-post.md @@ -0,0 +1,39 @@ +```java +import android.util.Log; + +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Oauth2; + +Client client = new Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .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) + 0L, // max_age (optional) + "", // authorization_details (optional) + "", // resource (optional) + "", // audience (optional) + "", // request_uri (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + Log.d("Appwrite", result.toString()); + }) +); + +``` diff --git a/examples/2.3.x/client-android/java/oauth2/authorize.md b/examples/2.3.x/client-android/java/oauth2/authorize.md new file mode 100644 index 000000000..62a452c88 --- /dev/null +++ b/examples/2.3.x/client-android/java/oauth2/authorize.md @@ -0,0 +1,39 @@ +```java +import android.util.Log; + +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Oauth2; + +Client client = new Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .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) + 0L, // max_age (optional) + "", // authorization_details (optional) + "", // resource (optional) + "", // audience (optional) + "", // request_uri (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + Log.d("Appwrite", result.toString()); + }) +); + +``` diff --git a/examples/2.3.x/client-android/java/oauth2/create-device-authorization.md b/examples/2.3.x/client-android/java/oauth2/create-device-authorization.md new file mode 100644 index 000000000..0b65a1abf --- /dev/null +++ b/examples/2.3.x/client-android/java/oauth2/create-device-authorization.md @@ -0,0 +1,30 @@ +```java +import android.util.Log; + +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Oauth2; + +Client client = new Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .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; + } + + Log.d("Appwrite", result.toString()); + }) +); + +``` diff --git a/examples/2.3.x/client-android/java/oauth2/create-grant.md b/examples/2.3.x/client-android/java/oauth2/create-grant.md new file mode 100644 index 000000000..a14c3886d --- /dev/null +++ b/examples/2.3.x/client-android/java/oauth2/create-grant.md @@ -0,0 +1,26 @@ +```java +import android.util.Log; + +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Oauth2; + +Client client = new Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject(""); // Your project ID + +Oauth2 oauth2 = new Oauth2(client); + +oauth2.createGrant( + "", // user_code + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + Log.d("Appwrite", result.toString()); + }) +); + +``` diff --git a/examples/2.3.x/client-android/java/oauth2/create-par.md b/examples/2.3.x/client-android/java/oauth2/create-par.md new file mode 100644 index 000000000..e65bdb54c --- /dev/null +++ b/examples/2.3.x/client-android/java/oauth2/create-par.md @@ -0,0 +1,38 @@ +```java +import android.util.Log; + +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Oauth2; + +Client client = new Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .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) + 0L, // max_age (optional) + "", // authorization_details (optional) + "", // resource (optional) + "", // audience (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + Log.d("Appwrite", result.toString()); + }) +); + +``` diff --git a/examples/2.3.x/client-android/java/oauth2/create-token.md b/examples/2.3.x/client-android/java/oauth2/create-token.md new file mode 100644 index 000000000..39b6fa256 --- /dev/null +++ b/examples/2.3.x/client-android/java/oauth2/create-token.md @@ -0,0 +1,35 @@ +```java +import android.util.Log; + +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Oauth2; + +Client client = new Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .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; + } + + Log.d("Appwrite", result.toString()); + }) +); + +``` diff --git a/examples/2.3.x/client-android/java/oauth2/get-grant.md b/examples/2.3.x/client-android/java/oauth2/get-grant.md new file mode 100644 index 000000000..180688899 --- /dev/null +++ b/examples/2.3.x/client-android/java/oauth2/get-grant.md @@ -0,0 +1,26 @@ +```java +import android.util.Log; + +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Oauth2; + +Client client = new Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject(""); // Your project ID + +Oauth2 oauth2 = new Oauth2(client); + +oauth2.getGrant( + "", // grant_id + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + Log.d("Appwrite", result.toString()); + }) +); + +``` diff --git a/examples/2.3.x/client-android/java/oauth2/list-organizations.md b/examples/2.3.x/client-android/java/oauth2/list-organizations.md new file mode 100644 index 000000000..bbc74a785 --- /dev/null +++ b/examples/2.3.x/client-android/java/oauth2/list-organizations.md @@ -0,0 +1,28 @@ +```java +import android.util.Log; + +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Oauth2; + +Client client = new Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject(""); // Your project ID + +Oauth2 oauth2 = new Oauth2(client); + +oauth2.listOrganizations( + 1L, // limit (optional) + 0L, // offset (optional) + "", // search (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + Log.d("Appwrite", result.toString()); + }) +); + +``` diff --git a/examples/2.3.x/client-android/java/oauth2/list-projects.md b/examples/2.3.x/client-android/java/oauth2/list-projects.md new file mode 100644 index 000000000..6963583ad --- /dev/null +++ b/examples/2.3.x/client-android/java/oauth2/list-projects.md @@ -0,0 +1,28 @@ +```java +import android.util.Log; + +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Oauth2; + +Client client = new Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject(""); // Your project ID + +Oauth2 oauth2 = new Oauth2(client); + +oauth2.listProjects( + 1L, // limit (optional) + 0L, // offset (optional) + "", // search (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + Log.d("Appwrite", result.toString()); + }) +); + +``` diff --git a/examples/2.3.x/client-android/java/oauth2/logout-post.md b/examples/2.3.x/client-android/java/oauth2/logout-post.md new file mode 100644 index 000000000..fefd5e920 --- /dev/null +++ b/examples/2.3.x/client-android/java/oauth2/logout-post.md @@ -0,0 +1,31 @@ +```java +import android.util.Log; + +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Oauth2; + +Client client = new Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject(""); // Your project ID + +Oauth2 oauth2 = new Oauth2(client); + +oauth2.logoutPost( + "", // id_token_hint (optional) + "", // logout_hint (optional) + "", // client_id (optional) + "https://example.com", // post_logout_redirect_uri (optional) + "", // state (optional) + "", // ui_locales (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + Log.d("Appwrite", result.toString()); + }) +); + +``` diff --git a/examples/2.3.x/client-android/java/oauth2/logout.md b/examples/2.3.x/client-android/java/oauth2/logout.md new file mode 100644 index 000000000..ca7739a25 --- /dev/null +++ b/examples/2.3.x/client-android/java/oauth2/logout.md @@ -0,0 +1,31 @@ +```java +import android.util.Log; + +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Oauth2; + +Client client = new Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject(""); // Your project ID + +Oauth2 oauth2 = new Oauth2(client); + +oauth2.logout( + "", // id_token_hint (optional) + "", // logout_hint (optional) + "", // client_id (optional) + "https://example.com", // post_logout_redirect_uri (optional) + "", // state (optional) + "", // ui_locales (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + Log.d("Appwrite", result.toString()); + }) +); + +``` diff --git a/examples/2.3.x/client-android/java/oauth2/reject.md b/examples/2.3.x/client-android/java/oauth2/reject.md new file mode 100644 index 000000000..90b9b2e24 --- /dev/null +++ b/examples/2.3.x/client-android/java/oauth2/reject.md @@ -0,0 +1,26 @@ +```java +import android.util.Log; + +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Oauth2; + +Client client = new Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject(""); // Your project ID + +Oauth2 oauth2 = new Oauth2(client); + +oauth2.reject( + "", // grant_id + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + Log.d("Appwrite", result.toString()); + }) +); + +``` diff --git a/examples/2.3.x/client-android/java/oauth2/revoke.md b/examples/2.3.x/client-android/java/oauth2/revoke.md new file mode 100644 index 000000000..0d680eb1d --- /dev/null +++ b/examples/2.3.x/client-android/java/oauth2/revoke.md @@ -0,0 +1,29 @@ +```java +import android.util.Log; + +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Oauth2; + +Client client = new Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .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; + } + + Log.d("Appwrite", result.toString()); + }) +); + +``` diff --git a/examples/2.3.x/client-android/java/presences/list.md b/examples/2.3.x/client-android/java/presences/list.md index d66a4161b..c2430748d 100644 --- a/examples/2.3.x/client-android/java/presences/list.md +++ b/examples/2.3.x/client-android/java/presences/list.md @@ -14,7 +14,7 @@ Presences presences = new Presences(client); presences.list( List.of(), // queries (optional) false, // total (optional) - 0, // ttl (optional) + 0L, // ttl (optional) new CoroutineCallback<>((result, error) -> { if (error != null) { error.printStackTrace(); diff --git a/examples/2.3.x/client-android/java/storage/get-file-preview.md b/examples/2.3.x/client-android/java/storage/get-file-preview.md index 3d753c447..2f1060a1f 100644 --- a/examples/2.3.x/client-android/java/storage/get-file-preview.md +++ b/examples/2.3.x/client-android/java/storage/get-file-preview.md @@ -16,15 +16,15 @@ Storage storage = new Storage(client); storage.getFilePreview( "", // bucketId "", // fileId - 0, // width (optional) - 0, // height (optional) + 0L, // width (optional) + 0L, // height (optional) ImageGravity.AUTO, // gravity (optional) - -1, // quality (optional) - 0, // borderWidth (optional) + -1L, // quality (optional) + 0L, // borderWidth (optional) "FFFFFF", // borderColor (optional) - 0, // borderRadius (optional) - 0, // opacity (optional) - -360, // rotation (optional) + 0L, // borderRadius (optional) + 0.0, // opacity (optional) + -360L, // rotation (optional) "FFFFFF", // background (optional) ImageFormat.JPG, // output (optional) "", // token (optional) diff --git a/examples/2.3.x/client-android/java/tablesdb/create-transaction.md b/examples/2.3.x/client-android/java/tablesdb/create-transaction.md index 8401bfec3..0dab2f0c4 100644 --- a/examples/2.3.x/client-android/java/tablesdb/create-transaction.md +++ b/examples/2.3.x/client-android/java/tablesdb/create-transaction.md @@ -12,7 +12,7 @@ Client client = new Client(context) TablesDB tablesDB = new TablesDB(client); tablesDB.createTransaction( - 60, // ttl (optional) + 60L, // ttl (optional) new CoroutineCallback<>((result, error) -> { if (error != null) { error.printStackTrace(); diff --git a/examples/2.3.x/client-android/java/tablesdb/decrement-row-column.md b/examples/2.3.x/client-android/java/tablesdb/decrement-row-column.md index c998b442f..2315f165f 100644 --- a/examples/2.3.x/client-android/java/tablesdb/decrement-row-column.md +++ b/examples/2.3.x/client-android/java/tablesdb/decrement-row-column.md @@ -16,8 +16,8 @@ tablesDB.decrementRowColumn( "", // tableId "", // rowId "", // column - 1, // value (optional) - 0, // min (optional) + 1.0, // value (optional) + 0.0, // min (optional) "", // transactionId (optional) new CoroutineCallback<>((result, error) -> { if (error != null) { diff --git a/examples/2.3.x/client-android/java/tablesdb/increment-row-column.md b/examples/2.3.x/client-android/java/tablesdb/increment-row-column.md index 5fb7189e2..2e9b52ba2 100644 --- a/examples/2.3.x/client-android/java/tablesdb/increment-row-column.md +++ b/examples/2.3.x/client-android/java/tablesdb/increment-row-column.md @@ -16,8 +16,8 @@ tablesDB.incrementRowColumn( "", // tableId "", // rowId "", // column - 1, // value (optional) - 100, // max (optional) + 1.0, // value (optional) + 100.0, // max (optional) "", // transactionId (optional) new CoroutineCallback<>((result, error) -> { if (error != null) { diff --git a/examples/2.3.x/client-android/java/tablesdb/list-rows.md b/examples/2.3.x/client-android/java/tablesdb/list-rows.md index cbf40287b..6d3a0a783 100644 --- a/examples/2.3.x/client-android/java/tablesdb/list-rows.md +++ b/examples/2.3.x/client-android/java/tablesdb/list-rows.md @@ -17,7 +17,7 @@ tablesDB.listRows( List.of(), // queries (optional) "", // transactionId (optional) false, // total (optional) - 0, // ttl (optional) + 0L, // ttl (optional) new CoroutineCallback<>((result, error) -> { if (error != null) { error.printStackTrace(); diff --git a/examples/2.3.x/client-android/java/tablesdb/list-transactions.md b/examples/2.3.x/client-android/java/tablesdb/list-transactions.md index 9ebb180a8..8a04ad9cf 100644 --- a/examples/2.3.x/client-android/java/tablesdb/list-transactions.md +++ b/examples/2.3.x/client-android/java/tablesdb/list-transactions.md @@ -13,6 +13,7 @@ TablesDB tablesDB = new TablesDB(client); tablesDB.listTransactions( List.of(), // queries (optional) + false, // total (optional) new CoroutineCallback<>((result, error) -> { if (error != null) { error.printStackTrace(); diff --git a/examples/2.3.x/client-android/java/teams/create-membership.md b/examples/2.3.x/client-android/java/teams/create-membership.md index 861aeb622..d7fba7c1f 100644 --- a/examples/2.3.x/client-android/java/teams/create-membership.md +++ b/examples/2.3.x/client-android/java/teams/create-membership.md @@ -13,7 +13,7 @@ Teams teams = new Teams(client); teams.createMembership( "", // teamId - List.of(), // roles + List.of("editor"), // roles "email@example.com", // email (optional) "", // userId (optional) "+12065550100", // phone (optional) diff --git a/examples/2.3.x/client-android/java/teams/update-membership.md b/examples/2.3.x/client-android/java/teams/update-membership.md index 60231f2c1..c4208a835 100644 --- a/examples/2.3.x/client-android/java/teams/update-membership.md +++ b/examples/2.3.x/client-android/java/teams/update-membership.md @@ -14,7 +14,7 @@ Teams teams = new Teams(client); teams.updateMembership( "", // teamId "", // membershipId - List.of(), // roles + List.of("editor"), // roles new CoroutineCallback<>((result, error) -> { if (error != null) { error.printStackTrace(); diff --git a/examples/2.3.x/client-android/java/vectorsdb/create-operations.md b/examples/2.3.x/client-android/java/vectorsdb/create-operations.md index 7e503634c..8dd6f0b8c 100644 --- a/examples/2.3.x/client-android/java/vectorsdb/create-operations.md +++ b/examples/2.3.x/client-android/java/vectorsdb/create-operations.md @@ -19,7 +19,10 @@ vectorsDB.createOperations( "collectionId", "", "documentId", "", "data", Map.of( - "name", "Walter O'Brien" + "embeddings", List.of(0.12, -0.55, 0.88, 1.02), + "metadata", Map.of( + "name", "First document" + ) ) )), // operations (optional) new CoroutineCallback<>((result, error) -> { diff --git a/examples/2.3.x/client-android/java/vectorsdb/create-query.md b/examples/2.3.x/client-android/java/vectorsdb/create-query.md index 3f1cfd5cc..8c798724d 100644 --- a/examples/2.3.x/client-android/java/vectorsdb/create-query.md +++ b/examples/2.3.x/client-android/java/vectorsdb/create-query.md @@ -17,7 +17,7 @@ vectorsDB.createQuery( List.of(), // queries (optional) "", // transactionId (optional) false, // total (optional) - 0, // ttl (optional) + 0L, // ttl (optional) new CoroutineCallback<>((result, error) -> { if (error != null) { error.printStackTrace(); diff --git a/examples/2.3.x/client-android/java/vectorsdb/create-transaction.md b/examples/2.3.x/client-android/java/vectorsdb/create-transaction.md index 4784fc47c..916f73c19 100644 --- a/examples/2.3.x/client-android/java/vectorsdb/create-transaction.md +++ b/examples/2.3.x/client-android/java/vectorsdb/create-transaction.md @@ -12,7 +12,7 @@ Client client = new Client(context) VectorsDB vectorsDB = new VectorsDB(client); vectorsDB.createTransaction( - 60, // ttl (optional) + 60L, // ttl (optional) new CoroutineCallback<>((result, error) -> { if (error != null) { error.printStackTrace(); diff --git a/examples/2.3.x/client-android/java/vectorsdb/list-documents.md b/examples/2.3.x/client-android/java/vectorsdb/list-documents.md index 12ef1f0c3..49689d363 100644 --- a/examples/2.3.x/client-android/java/vectorsdb/list-documents.md +++ b/examples/2.3.x/client-android/java/vectorsdb/list-documents.md @@ -17,7 +17,7 @@ vectorsDB.listDocuments( List.of(), // queries (optional) "", // transactionId (optional) false, // total (optional) - 0, // ttl (optional) + 0L, // ttl (optional) new CoroutineCallback<>((result, error) -> { if (error != null) { error.printStackTrace(); diff --git a/examples/2.3.x/client-android/java/vectorsdb/list-transactions.md b/examples/2.3.x/client-android/java/vectorsdb/list-transactions.md index 18ef0e55d..be8905e25 100644 --- a/examples/2.3.x/client-android/java/vectorsdb/list-transactions.md +++ b/examples/2.3.x/client-android/java/vectorsdb/list-transactions.md @@ -13,6 +13,7 @@ VectorsDB vectorsDB = new VectorsDB(client); vectorsDB.listTransactions( List.of(), // queries (optional) + false, // total (optional) new CoroutineCallback<>((result, error) -> { if (error != null) { error.printStackTrace(); diff --git a/examples/2.3.x/client-android/kotlin/account/create-email-password-session.md b/examples/2.3.x/client-android/kotlin/account/create-email-password-session.md index 6100e4834..aaceb65fe 100644 --- a/examples/2.3.x/client-android/kotlin/account/create-email-password-session.md +++ b/examples/2.3.x/client-android/kotlin/account/create-email-password-session.md @@ -12,5 +12,6 @@ val account = Account(client) val result = account.createEmailPasswordSession( email = "email@example.com", password = "password", + duration = 60, // (optional) ) ``` diff --git a/examples/2.3.x/client-android/kotlin/account/delete-sessions.md b/examples/2.3.x/client-android/kotlin/account/delete-sessions.md index ff404dbc1..96bbc341b 100644 --- a/examples/2.3.x/client-android/kotlin/account/delete-sessions.md +++ b/examples/2.3.x/client-android/kotlin/account/delete-sessions.md @@ -9,5 +9,7 @@ val client = Client(context) val account = Account(client) -val result = account.deleteSessions() +val result = account.deleteSessions( + current = false, // (optional) +) ``` diff --git a/examples/2.3.x/client-android/kotlin/account/list-sessions.md b/examples/2.3.x/client-android/kotlin/account/list-sessions.md index 8c261a2d3..38e7e556e 100644 --- a/examples/2.3.x/client-android/kotlin/account/list-sessions.md +++ b/examples/2.3.x/client-android/kotlin/account/list-sessions.md @@ -9,5 +9,7 @@ val client = Client(context) val account = Account(client) -val result = account.listSessions() +val result = account.listSessions( + total = false, // (optional) +) ``` diff --git a/examples/2.3.x/client-android/kotlin/analytics/create-event.md b/examples/2.3.x/client-android/kotlin/analytics/create-event.md new file mode 100644 index 000000000..820e0bac5 --- /dev/null +++ b/examples/2.3.x/client-android/kotlin/analytics/create-event.md @@ -0,0 +1,27 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Analytics + +val client = Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +val analytics = Analytics(client) + +val result = analytics.createEvent( + propertyId = "", + name = "", + url = "https://example.com", + domain = "", // (optional) + referrer = "", // (optional) + screenWidth = 0, // (optional) + sessionHash = "", // (optional) + scrollDepth = 0, // (optional) + engagementTime = 0, // (optional) + props = listOf(), // (optional) + userId = "", // (optional) + ip = "", // (optional) + userAgent = "", // (optional) +) +``` diff --git a/examples/2.3.x/client-android/kotlin/apps/create-installation-token.md b/examples/2.3.x/client-android/kotlin/apps/create-installation-token.md new file mode 100644 index 000000000..6226e7754 --- /dev/null +++ b/examples/2.3.x/client-android/kotlin/apps/create-installation-token.md @@ -0,0 +1,16 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Apps + +val client = Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +val apps = Apps(client) + +val result = apps.createInstallationToken( + appId = "", + installationId = "", +) +``` diff --git a/examples/2.3.x/client-android/kotlin/apps/create-key.md b/examples/2.3.x/client-android/kotlin/apps/create-key.md new file mode 100644 index 000000000..d6daef843 --- /dev/null +++ b/examples/2.3.x/client-android/kotlin/apps/create-key.md @@ -0,0 +1,15 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Apps + +val client = Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +val apps = Apps(client) + +val result = apps.createKey( + appId = "", +) +``` diff --git a/examples/2.3.x/client-android/kotlin/apps/create-secret.md b/examples/2.3.x/client-android/kotlin/apps/create-secret.md new file mode 100644 index 000000000..d9a4c525c --- /dev/null +++ b/examples/2.3.x/client-android/kotlin/apps/create-secret.md @@ -0,0 +1,15 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Apps + +val client = Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +val apps = Apps(client) + +val result = apps.createSecret( + appId = "", +) +``` diff --git a/examples/2.3.x/client-android/kotlin/apps/create.md b/examples/2.3.x/client-android/kotlin/apps/create.md new file mode 100644 index 000000000..2299c0317 --- /dev/null +++ b/examples/2.3.x/client-android/kotlin/apps/create.md @@ -0,0 +1,33 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Apps + +val client = Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +val apps = Apps(client) + +val result = 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/2.3.x/client-android/kotlin/apps/delete-installation.md b/examples/2.3.x/client-android/kotlin/apps/delete-installation.md new file mode 100644 index 000000000..c07fee534 --- /dev/null +++ b/examples/2.3.x/client-android/kotlin/apps/delete-installation.md @@ -0,0 +1,16 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Apps + +val client = Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +val apps = Apps(client) + +val result = apps.deleteInstallation( + appId = "", + installationId = "", +) +``` diff --git a/examples/2.3.x/client-android/kotlin/apps/delete-key.md b/examples/2.3.x/client-android/kotlin/apps/delete-key.md new file mode 100644 index 000000000..3ad3825a2 --- /dev/null +++ b/examples/2.3.x/client-android/kotlin/apps/delete-key.md @@ -0,0 +1,16 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Apps + +val client = Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +val apps = Apps(client) + +val result = apps.deleteKey( + appId = "", + keyId = "", +) +``` diff --git a/examples/2.3.x/client-android/kotlin/apps/delete-secret.md b/examples/2.3.x/client-android/kotlin/apps/delete-secret.md new file mode 100644 index 000000000..ad22d5e00 --- /dev/null +++ b/examples/2.3.x/client-android/kotlin/apps/delete-secret.md @@ -0,0 +1,16 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Apps + +val client = Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +val apps = Apps(client) + +val result = apps.deleteSecret( + appId = "", + secretId = "", +) +``` diff --git a/examples/2.3.x/client-android/kotlin/apps/delete-tokens.md b/examples/2.3.x/client-android/kotlin/apps/delete-tokens.md new file mode 100644 index 000000000..e8d890090 --- /dev/null +++ b/examples/2.3.x/client-android/kotlin/apps/delete-tokens.md @@ -0,0 +1,15 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Apps + +val client = Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +val apps = Apps(client) + +val result = apps.deleteTokens( + appId = "", +) +``` diff --git a/examples/2.3.x/client-android/kotlin/apps/delete.md b/examples/2.3.x/client-android/kotlin/apps/delete.md new file mode 100644 index 000000000..412b55f63 --- /dev/null +++ b/examples/2.3.x/client-android/kotlin/apps/delete.md @@ -0,0 +1,15 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Apps + +val client = Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +val apps = Apps(client) + +val result = apps.delete( + appId = "", +) +``` diff --git a/examples/2.3.x/client-android/kotlin/apps/get-installation.md b/examples/2.3.x/client-android/kotlin/apps/get-installation.md new file mode 100644 index 000000000..288f21d6f --- /dev/null +++ b/examples/2.3.x/client-android/kotlin/apps/get-installation.md @@ -0,0 +1,16 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Apps + +val client = Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +val apps = Apps(client) + +val result = apps.getInstallation( + appId = "", + installationId = "", +) +``` diff --git a/examples/2.3.x/client-android/kotlin/apps/get-key.md b/examples/2.3.x/client-android/kotlin/apps/get-key.md new file mode 100644 index 000000000..8af731164 --- /dev/null +++ b/examples/2.3.x/client-android/kotlin/apps/get-key.md @@ -0,0 +1,16 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Apps + +val client = Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +val apps = Apps(client) + +val result = apps.getKey( + appId = "", + keyId = "", +) +``` diff --git a/examples/2.3.x/client-android/kotlin/apps/get-secret.md b/examples/2.3.x/client-android/kotlin/apps/get-secret.md new file mode 100644 index 000000000..a76bbe4eb --- /dev/null +++ b/examples/2.3.x/client-android/kotlin/apps/get-secret.md @@ -0,0 +1,16 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Apps + +val client = Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +val apps = Apps(client) + +val result = apps.getSecret( + appId = "", + secretId = "", +) +``` diff --git a/examples/2.3.x/client-android/kotlin/apps/get.md b/examples/2.3.x/client-android/kotlin/apps/get.md new file mode 100644 index 000000000..3fc30c710 --- /dev/null +++ b/examples/2.3.x/client-android/kotlin/apps/get.md @@ -0,0 +1,15 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Apps + +val client = Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +val apps = Apps(client) + +val result = apps.get( + appId = "", +) +``` diff --git a/examples/2.3.x/client-android/kotlin/apps/list-installation-scopes.md b/examples/2.3.x/client-android/kotlin/apps/list-installation-scopes.md new file mode 100644 index 000000000..bafacf813 --- /dev/null +++ b/examples/2.3.x/client-android/kotlin/apps/list-installation-scopes.md @@ -0,0 +1,13 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Apps + +val client = Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +val apps = Apps(client) + +val result = apps.listInstallationScopes() +``` diff --git a/examples/2.3.x/client-android/kotlin/apps/list-installations.md b/examples/2.3.x/client-android/kotlin/apps/list-installations.md new file mode 100644 index 000000000..0819d5fce --- /dev/null +++ b/examples/2.3.x/client-android/kotlin/apps/list-installations.md @@ -0,0 +1,17 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Apps + +val client = Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +val apps = Apps(client) + +val result = apps.listInstallations( + appId = "", + queries = listOf(), // (optional) + total = false, // (optional) +) +``` diff --git a/examples/2.3.x/client-android/kotlin/apps/list-keys.md b/examples/2.3.x/client-android/kotlin/apps/list-keys.md new file mode 100644 index 000000000..9977dfe71 --- /dev/null +++ b/examples/2.3.x/client-android/kotlin/apps/list-keys.md @@ -0,0 +1,17 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Apps + +val client = Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +val apps = Apps(client) + +val result = apps.listKeys( + appId = "", + queries = listOf(), // (optional) + total = false, // (optional) +) +``` diff --git a/examples/2.3.x/client-android/kotlin/apps/list-o-auth-2-scopes.md b/examples/2.3.x/client-android/kotlin/apps/list-o-auth-2-scopes.md new file mode 100644 index 000000000..b0852955b --- /dev/null +++ b/examples/2.3.x/client-android/kotlin/apps/list-o-auth-2-scopes.md @@ -0,0 +1,13 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Apps + +val client = Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +val apps = Apps(client) + +val result = apps.listOAuth2Scopes() +``` diff --git a/examples/2.3.x/client-android/kotlin/apps/list-secrets.md b/examples/2.3.x/client-android/kotlin/apps/list-secrets.md new file mode 100644 index 000000000..aa69cc8c7 --- /dev/null +++ b/examples/2.3.x/client-android/kotlin/apps/list-secrets.md @@ -0,0 +1,17 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Apps + +val client = Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +val apps = Apps(client) + +val result = apps.listSecrets( + appId = "", + queries = listOf(), // (optional) + total = false, // (optional) +) +``` diff --git a/examples/2.3.x/client-android/kotlin/apps/list.md b/examples/2.3.x/client-android/kotlin/apps/list.md new file mode 100644 index 000000000..d2faad48c --- /dev/null +++ b/examples/2.3.x/client-android/kotlin/apps/list.md @@ -0,0 +1,16 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Apps + +val client = Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +val apps = Apps(client) + +val result = apps.list( + queries = listOf(), // (optional) + total = false, // (optional) +) +``` diff --git a/examples/2.3.x/client-android/kotlin/apps/update-team.md b/examples/2.3.x/client-android/kotlin/apps/update-team.md new file mode 100644 index 000000000..b6f69443a --- /dev/null +++ b/examples/2.3.x/client-android/kotlin/apps/update-team.md @@ -0,0 +1,16 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Apps + +val client = Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +val apps = Apps(client) + +val result = apps.updateTeam( + appId = "", + teamId = "", +) +``` diff --git a/examples/2.3.x/client-android/kotlin/apps/update.md b/examples/2.3.x/client-android/kotlin/apps/update.md new file mode 100644 index 000000000..b2bad705a --- /dev/null +++ b/examples/2.3.x/client-android/kotlin/apps/update.md @@ -0,0 +1,34 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Apps + +val client = Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +val apps = Apps(client) + +val 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 = 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/2.3.x/client-android/kotlin/avatars/delete-photo.md b/examples/2.3.x/client-android/kotlin/avatars/delete-photo.md new file mode 100644 index 000000000..e16f41738 --- /dev/null +++ b/examples/2.3.x/client-android/kotlin/avatars/delete-photo.md @@ -0,0 +1,13 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Avatars + +val client = Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +val avatars = Avatars(client) + +val result = avatars.deletePhoto() +``` diff --git a/examples/2.3.x/client-android/kotlin/avatars/get-screenshot.md b/examples/2.3.x/client-android/kotlin/avatars/get-screenshot.md index 1093c060f..fcfb36c89 100644 --- a/examples/2.3.x/client-android/kotlin/avatars/get-screenshot.md +++ b/examples/2.3.x/client-android/kotlin/avatars/get-screenshot.md @@ -16,12 +16,11 @@ val avatars = Avatars(client) val result = avatars.getScreenshot( url = "https://example.com", headers = mapOf( - "Authorization" to "Bearer token123", - "X-Custom-Header" to "value" + "Accept-Language" to "en-US,en;q=0.9" ), // (optional) viewportWidth = 1920, // (optional) viewportHeight = 1080, // (optional) - scale = 2, // (optional) + scale = 2.0, // (optional) theme = BrowserTheme.LIGHT, // (optional) userAgent = "Mozilla/5.0 (iPhone; CPU iPhone OS 14_0 like Mac OS X) AppleWebKit/605.1.15", // (optional) fullpage = true, // (optional) @@ -29,7 +28,7 @@ val result = avatars.getScreenshot( timezone = Timezone.AFRICA_ABIDJAN, // (optional) latitude = 37.7749, // (optional) longitude = -122.4194, // (optional) - accuracy = 100, // (optional) + accuracy = 100.0, // (optional) touch = true, // (optional) permissions = BrowserPermission.GEOLOCATION, // (optional) sleep = 3, // (optional) diff --git a/examples/2.3.x/client-android/kotlin/avatars/update-photo.md b/examples/2.3.x/client-android/kotlin/avatars/update-photo.md new file mode 100644 index 000000000..326fe57ab --- /dev/null +++ b/examples/2.3.x/client-android/kotlin/avatars/update-photo.md @@ -0,0 +1,16 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.models.InputFile +import io.appwrite.services.Avatars + +val client = Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +val avatars = Avatars(client) + +val result = avatars.updatePhoto( + file = InputFile.fromPath("file.png"), +) +``` diff --git a/examples/2.3.x/client-android/kotlin/databases/decrement-document-attribute.md b/examples/2.3.x/client-android/kotlin/databases/decrement-document-attribute.md index c32a60027..07452b01b 100644 --- a/examples/2.3.x/client-android/kotlin/databases/decrement-document-attribute.md +++ b/examples/2.3.x/client-android/kotlin/databases/decrement-document-attribute.md @@ -14,8 +14,8 @@ val result = databases.decrementDocumentAttribute( collectionId = "", documentId = "", attribute = "", - value = 1, // (optional) - min = 0, // (optional) + value = 1.0, // (optional) + min = 0.0, // (optional) transactionId = "", // (optional) ) ``` diff --git a/examples/2.3.x/client-android/kotlin/databases/increment-document-attribute.md b/examples/2.3.x/client-android/kotlin/databases/increment-document-attribute.md index daaa6d6ae..e71fddc7f 100644 --- a/examples/2.3.x/client-android/kotlin/databases/increment-document-attribute.md +++ b/examples/2.3.x/client-android/kotlin/databases/increment-document-attribute.md @@ -14,8 +14,8 @@ val result = databases.incrementDocumentAttribute( collectionId = "", documentId = "", attribute = "", - value = 1, // (optional) - max = 100, // (optional) + value = 1.0, // (optional) + max = 100.0, // (optional) transactionId = "", // (optional) ) ``` diff --git a/examples/2.3.x/client-android/kotlin/databases/list-transactions.md b/examples/2.3.x/client-android/kotlin/databases/list-transactions.md index 3cabd79f3..e4cd4633d 100644 --- a/examples/2.3.x/client-android/kotlin/databases/list-transactions.md +++ b/examples/2.3.x/client-android/kotlin/databases/list-transactions.md @@ -11,5 +11,6 @@ val databases = Databases(client) val result = databases.listTransactions( queries = listOf(), // (optional) + total = false, // (optional) ) ``` diff --git a/examples/2.3.x/client-android/kotlin/documentsdb/create-documents.md b/examples/2.3.x/client-android/kotlin/documentsdb/create-documents.md index 2923c1007..b66cb47dd 100644 --- a/examples/2.3.x/client-android/kotlin/documentsdb/create-documents.md +++ b/examples/2.3.x/client-android/kotlin/documentsdb/create-documents.md @@ -12,7 +12,14 @@ val documentsDB = DocumentsDB(client) val result = documentsDB.createDocuments( databaseId = "", collectionId = "", - documents = listOf(), + documents = listOf(mapOf( + "\$id" to "example1", + "username" to "walter.obrien", + "email" to "walter.obrien@example.com", + "fullName" to "Walter O'Brien", + "age" to 30, + "isAdmin" to false + )), transactionId = "", // (optional) ) ``` diff --git a/examples/2.3.x/client-android/kotlin/documentsdb/decrement-document-attribute.md b/examples/2.3.x/client-android/kotlin/documentsdb/decrement-document-attribute.md index fdb11fe06..461a2fe07 100644 --- a/examples/2.3.x/client-android/kotlin/documentsdb/decrement-document-attribute.md +++ b/examples/2.3.x/client-android/kotlin/documentsdb/decrement-document-attribute.md @@ -14,8 +14,8 @@ val result = documentsDB.decrementDocumentAttribute( collectionId = "", documentId = "", attribute = "", - value = 1, // (optional) - min = 0, // (optional) + value = 1.0, // (optional) + min = 0.0, // (optional) transactionId = "", // (optional) ) ``` diff --git a/examples/2.3.x/client-android/kotlin/documentsdb/increment-document-attribute.md b/examples/2.3.x/client-android/kotlin/documentsdb/increment-document-attribute.md index 8286ad447..0539e4a20 100644 --- a/examples/2.3.x/client-android/kotlin/documentsdb/increment-document-attribute.md +++ b/examples/2.3.x/client-android/kotlin/documentsdb/increment-document-attribute.md @@ -14,8 +14,8 @@ val result = documentsDB.incrementDocumentAttribute( collectionId = "", documentId = "", attribute = "", - value = 1, // (optional) - max = 100, // (optional) + value = 1.0, // (optional) + max = 100.0, // (optional) transactionId = "", // (optional) ) ``` diff --git a/examples/2.3.x/client-android/kotlin/documentsdb/list-transactions.md b/examples/2.3.x/client-android/kotlin/documentsdb/list-transactions.md index 46571468e..a1a47a2ac 100644 --- a/examples/2.3.x/client-android/kotlin/documentsdb/list-transactions.md +++ b/examples/2.3.x/client-android/kotlin/documentsdb/list-transactions.md @@ -11,5 +11,6 @@ val documentsDB = DocumentsDB(client) val result = documentsDB.listTransactions( queries = listOf(), // (optional) + total = false, // (optional) ) ``` diff --git a/examples/2.3.x/client-android/kotlin/graphql/mutation.md b/examples/2.3.x/client-android/kotlin/graphql/mutation.md index 0cdb78e6d..de686191b 100644 --- a/examples/2.3.x/client-android/kotlin/graphql/mutation.md +++ b/examples/2.3.x/client-android/kotlin/graphql/mutation.md @@ -10,6 +10,8 @@ val client = Client(context) val graphql = Graphql(client) val result = graphql.mutation( - query = mapOf( "a" to "b" ), + query = mapOf( + "query" to "mutation { accountUpdateName(name: \"Walter\") { name } }" + ), ) ``` diff --git a/examples/2.3.x/client-android/kotlin/graphql/query.md b/examples/2.3.x/client-android/kotlin/graphql/query.md index 3359822a5..cd0326dab 100644 --- a/examples/2.3.x/client-android/kotlin/graphql/query.md +++ b/examples/2.3.x/client-android/kotlin/graphql/query.md @@ -10,6 +10,8 @@ val client = Client(context) val graphql = Graphql(client) val result = graphql.query( - query = mapOf( "a" to "b" ), + query = mapOf( + "query" to "query { localeGet { ip } }" + ), ) ``` diff --git a/examples/2.3.x/client-android/kotlin/locale/list-codes.md b/examples/2.3.x/client-android/kotlin/locale/list-codes.md index d70521444..31a89fc9d 100644 --- a/examples/2.3.x/client-android/kotlin/locale/list-codes.md +++ b/examples/2.3.x/client-android/kotlin/locale/list-codes.md @@ -9,5 +9,7 @@ val client = Client(context) val locale = Locale(client) -val result = locale.listCodes() +val result = locale.listCodes( + total = false, // (optional) +) ``` diff --git a/examples/2.3.x/client-android/kotlin/locale/list-continents.md b/examples/2.3.x/client-android/kotlin/locale/list-continents.md index 03e917e43..a5ce1c20f 100644 --- a/examples/2.3.x/client-android/kotlin/locale/list-continents.md +++ b/examples/2.3.x/client-android/kotlin/locale/list-continents.md @@ -9,5 +9,7 @@ val client = Client(context) val locale = Locale(client) -val result = locale.listContinents() +val result = locale.listContinents( + total = false, // (optional) +) ``` diff --git a/examples/2.3.x/client-android/kotlin/locale/list-countries-eu.md b/examples/2.3.x/client-android/kotlin/locale/list-countries-eu.md index a933ed85b..9214428e6 100644 --- a/examples/2.3.x/client-android/kotlin/locale/list-countries-eu.md +++ b/examples/2.3.x/client-android/kotlin/locale/list-countries-eu.md @@ -9,5 +9,7 @@ val client = Client(context) val locale = Locale(client) -val result = locale.listCountriesEU() +val result = locale.listCountriesEU( + total = false, // (optional) +) ``` diff --git a/examples/2.3.x/client-android/kotlin/locale/list-countries-phones.md b/examples/2.3.x/client-android/kotlin/locale/list-countries-phones.md index 8d4c7534e..50355d794 100644 --- a/examples/2.3.x/client-android/kotlin/locale/list-countries-phones.md +++ b/examples/2.3.x/client-android/kotlin/locale/list-countries-phones.md @@ -9,5 +9,7 @@ val client = Client(context) val locale = Locale(client) -val result = locale.listCountriesPhones() +val result = locale.listCountriesPhones( + total = false, // (optional) +) ``` diff --git a/examples/2.3.x/client-android/kotlin/locale/list-countries.md b/examples/2.3.x/client-android/kotlin/locale/list-countries.md index e67b5fe7c..2a762a53c 100644 --- a/examples/2.3.x/client-android/kotlin/locale/list-countries.md +++ b/examples/2.3.x/client-android/kotlin/locale/list-countries.md @@ -9,5 +9,7 @@ val client = Client(context) val locale = Locale(client) -val result = locale.listCountries() +val result = locale.listCountries( + total = false, // (optional) +) ``` diff --git a/examples/2.3.x/client-android/kotlin/locale/list-currencies.md b/examples/2.3.x/client-android/kotlin/locale/list-currencies.md index fb0087d7c..a25d489b4 100644 --- a/examples/2.3.x/client-android/kotlin/locale/list-currencies.md +++ b/examples/2.3.x/client-android/kotlin/locale/list-currencies.md @@ -9,5 +9,7 @@ val client = Client(context) val locale = Locale(client) -val result = locale.listCurrencies() +val result = locale.listCurrencies( + total = false, // (optional) +) ``` diff --git a/examples/2.3.x/client-android/kotlin/locale/list-languages.md b/examples/2.3.x/client-android/kotlin/locale/list-languages.md index 30fb65bf0..acaac2e9a 100644 --- a/examples/2.3.x/client-android/kotlin/locale/list-languages.md +++ b/examples/2.3.x/client-android/kotlin/locale/list-languages.md @@ -9,5 +9,7 @@ val client = Client(context) val locale = Locale(client) -val result = locale.listLanguages() +val result = locale.listLanguages( + total = false, // (optional) +) ``` diff --git a/examples/2.3.x/client-android/kotlin/oauth2/approve.md b/examples/2.3.x/client-android/kotlin/oauth2/approve.md new file mode 100644 index 000000000..839a862d3 --- /dev/null +++ b/examples/2.3.x/client-android/kotlin/oauth2/approve.md @@ -0,0 +1,17 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Oauth2 + +val client = Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +val oauth2 = Oauth2(client) + +val result = oauth2.approve( + grantId = "", + authorizationDetails = "", // (optional) + scope = "", // (optional) +) +``` diff --git a/examples/2.3.x/client-android/kotlin/oauth2/authorize-post.md b/examples/2.3.x/client-android/kotlin/oauth2/authorize-post.md new file mode 100644 index 000000000..88bc4ee00 --- /dev/null +++ b/examples/2.3.x/client-android/kotlin/oauth2/authorize-post.md @@ -0,0 +1,28 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Oauth2 + +val client = Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +val oauth2 = Oauth2(client) + +val 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/2.3.x/client-android/kotlin/oauth2/authorize.md b/examples/2.3.x/client-android/kotlin/oauth2/authorize.md new file mode 100644 index 000000000..4d307e8d8 --- /dev/null +++ b/examples/2.3.x/client-android/kotlin/oauth2/authorize.md @@ -0,0 +1,28 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Oauth2 + +val client = Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +val oauth2 = Oauth2(client) + +val 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/2.3.x/client-android/kotlin/oauth2/create-device-authorization.md b/examples/2.3.x/client-android/kotlin/oauth2/create-device-authorization.md new file mode 100644 index 000000000..ab307c37a --- /dev/null +++ b/examples/2.3.x/client-android/kotlin/oauth2/create-device-authorization.md @@ -0,0 +1,19 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Oauth2 + +val client = Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +val oauth2 = Oauth2(client) + +val result = oauth2.createDeviceAuthorization( + clientId = "", // (optional) + scope = "", // (optional) + authorizationDetails = "", // (optional) + resource = "", // (optional) + audience = "", // (optional) +) +``` diff --git a/examples/2.3.x/client-android/kotlin/oauth2/create-grant.md b/examples/2.3.x/client-android/kotlin/oauth2/create-grant.md new file mode 100644 index 000000000..74f57c03d --- /dev/null +++ b/examples/2.3.x/client-android/kotlin/oauth2/create-grant.md @@ -0,0 +1,15 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Oauth2 + +val client = Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +val oauth2 = Oauth2(client) + +val result = oauth2.createGrant( + userCode = "", +) +``` diff --git a/examples/2.3.x/client-android/kotlin/oauth2/create-par.md b/examples/2.3.x/client-android/kotlin/oauth2/create-par.md new file mode 100644 index 000000000..752c64eb8 --- /dev/null +++ b/examples/2.3.x/client-android/kotlin/oauth2/create-par.md @@ -0,0 +1,27 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Oauth2 + +val client = Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +val oauth2 = Oauth2(client) + +val 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/2.3.x/client-android/kotlin/oauth2/create-token.md b/examples/2.3.x/client-android/kotlin/oauth2/create-token.md new file mode 100644 index 000000000..5e23344f9 --- /dev/null +++ b/examples/2.3.x/client-android/kotlin/oauth2/create-token.md @@ -0,0 +1,24 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Oauth2 + +val client = Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +val oauth2 = Oauth2(client) + +val 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/2.3.x/client-android/kotlin/oauth2/get-grant.md b/examples/2.3.x/client-android/kotlin/oauth2/get-grant.md new file mode 100644 index 000000000..4e5516be2 --- /dev/null +++ b/examples/2.3.x/client-android/kotlin/oauth2/get-grant.md @@ -0,0 +1,15 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Oauth2 + +val client = Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +val oauth2 = Oauth2(client) + +val result = oauth2.getGrant( + grantId = "", +) +``` diff --git a/examples/2.3.x/client-android/kotlin/oauth2/list-organizations.md b/examples/2.3.x/client-android/kotlin/oauth2/list-organizations.md new file mode 100644 index 000000000..463ebec01 --- /dev/null +++ b/examples/2.3.x/client-android/kotlin/oauth2/list-organizations.md @@ -0,0 +1,17 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Oauth2 + +val client = Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +val oauth2 = Oauth2(client) + +val result = oauth2.listOrganizations( + limit = 1, // (optional) + offset = 0, // (optional) + search = "", // (optional) +) +``` diff --git a/examples/2.3.x/client-android/kotlin/oauth2/list-projects.md b/examples/2.3.x/client-android/kotlin/oauth2/list-projects.md new file mode 100644 index 000000000..2105828f6 --- /dev/null +++ b/examples/2.3.x/client-android/kotlin/oauth2/list-projects.md @@ -0,0 +1,17 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Oauth2 + +val client = Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +val oauth2 = Oauth2(client) + +val result = oauth2.listProjects( + limit = 1, // (optional) + offset = 0, // (optional) + search = "", // (optional) +) +``` diff --git a/examples/2.3.x/client-android/kotlin/oauth2/logout-post.md b/examples/2.3.x/client-android/kotlin/oauth2/logout-post.md new file mode 100644 index 000000000..48bd14ee4 --- /dev/null +++ b/examples/2.3.x/client-android/kotlin/oauth2/logout-post.md @@ -0,0 +1,20 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Oauth2 + +val client = Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +val oauth2 = Oauth2(client) + +val result = oauth2.logoutPost( + idTokenHint = "", // (optional) + logoutHint = "", // (optional) + clientId = "", // (optional) + postLogoutRedirectUri = "https://example.com", // (optional) + state = "", // (optional) + uiLocales = "", // (optional) +) +``` diff --git a/examples/2.3.x/client-android/kotlin/oauth2/logout.md b/examples/2.3.x/client-android/kotlin/oauth2/logout.md new file mode 100644 index 000000000..08f2c1c1e --- /dev/null +++ b/examples/2.3.x/client-android/kotlin/oauth2/logout.md @@ -0,0 +1,20 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Oauth2 + +val client = Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +val oauth2 = Oauth2(client) + +val result = oauth2.logout( + idTokenHint = "", // (optional) + logoutHint = "", // (optional) + clientId = "", // (optional) + postLogoutRedirectUri = "https://example.com", // (optional) + state = "", // (optional) + uiLocales = "", // (optional) +) +``` diff --git a/examples/2.3.x/client-android/kotlin/oauth2/reject.md b/examples/2.3.x/client-android/kotlin/oauth2/reject.md new file mode 100644 index 000000000..f4392496c --- /dev/null +++ b/examples/2.3.x/client-android/kotlin/oauth2/reject.md @@ -0,0 +1,15 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Oauth2 + +val client = Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +val oauth2 = Oauth2(client) + +val result = oauth2.reject( + grantId = "", +) +``` diff --git a/examples/2.3.x/client-android/kotlin/oauth2/revoke.md b/examples/2.3.x/client-android/kotlin/oauth2/revoke.md new file mode 100644 index 000000000..f5ef08b76 --- /dev/null +++ b/examples/2.3.x/client-android/kotlin/oauth2/revoke.md @@ -0,0 +1,18 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Oauth2 + +val client = Client(context) + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +val oauth2 = Oauth2(client) + +val result = oauth2.revoke( + token = "", + tokenTypeHint = "access_token", // (optional) + clientId = "", // (optional) + clientSecret = "", // (optional) +) +``` diff --git a/examples/2.3.x/client-android/kotlin/storage/get-file-preview.md b/examples/2.3.x/client-android/kotlin/storage/get-file-preview.md index e2d2851d7..bd106928f 100644 --- a/examples/2.3.x/client-android/kotlin/storage/get-file-preview.md +++ b/examples/2.3.x/client-android/kotlin/storage/get-file-preview.md @@ -21,7 +21,7 @@ val result = storage.getFilePreview( borderWidth = 0, // (optional) borderColor = "FFFFFF", // (optional) borderRadius = 0, // (optional) - opacity = 0, // (optional) + opacity = 0.0, // (optional) rotation = -360, // (optional) background = "FFFFFF", // (optional) output = ImageFormat.JPG, // (optional) diff --git a/examples/2.3.x/client-android/kotlin/tablesdb/decrement-row-column.md b/examples/2.3.x/client-android/kotlin/tablesdb/decrement-row-column.md index 157c3d118..b8288ad3b 100644 --- a/examples/2.3.x/client-android/kotlin/tablesdb/decrement-row-column.md +++ b/examples/2.3.x/client-android/kotlin/tablesdb/decrement-row-column.md @@ -14,8 +14,8 @@ val result = tablesDB.decrementRowColumn( tableId = "", rowId = "", column = "", - value = 1, // (optional) - min = 0, // (optional) + value = 1.0, // (optional) + min = 0.0, // (optional) transactionId = "", // (optional) ) ``` diff --git a/examples/2.3.x/client-android/kotlin/tablesdb/increment-row-column.md b/examples/2.3.x/client-android/kotlin/tablesdb/increment-row-column.md index 802c6a2b1..1aae1ffcc 100644 --- a/examples/2.3.x/client-android/kotlin/tablesdb/increment-row-column.md +++ b/examples/2.3.x/client-android/kotlin/tablesdb/increment-row-column.md @@ -14,8 +14,8 @@ val result = tablesDB.incrementRowColumn( tableId = "", rowId = "", column = "", - value = 1, // (optional) - max = 100, // (optional) + value = 1.0, // (optional) + max = 100.0, // (optional) transactionId = "", // (optional) ) ``` diff --git a/examples/2.3.x/client-android/kotlin/tablesdb/list-transactions.md b/examples/2.3.x/client-android/kotlin/tablesdb/list-transactions.md index 03c9d5b4a..b680ee15a 100644 --- a/examples/2.3.x/client-android/kotlin/tablesdb/list-transactions.md +++ b/examples/2.3.x/client-android/kotlin/tablesdb/list-transactions.md @@ -11,5 +11,6 @@ val tablesDB = TablesDB(client) val result = tablesDB.listTransactions( queries = listOf(), // (optional) + total = false, // (optional) ) ``` diff --git a/examples/2.3.x/client-android/kotlin/teams/create-membership.md b/examples/2.3.x/client-android/kotlin/teams/create-membership.md index e5289e645..219119af3 100644 --- a/examples/2.3.x/client-android/kotlin/teams/create-membership.md +++ b/examples/2.3.x/client-android/kotlin/teams/create-membership.md @@ -11,7 +11,7 @@ val teams = Teams(client) val result = teams.createMembership( teamId = "", - roles = listOf(), + roles = listOf("editor"), email = "email@example.com", // (optional) userId = "", // (optional) phone = "+12065550100", // (optional) diff --git a/examples/2.3.x/client-android/kotlin/teams/update-membership.md b/examples/2.3.x/client-android/kotlin/teams/update-membership.md index 6e721d4ec..d9e39d7bf 100644 --- a/examples/2.3.x/client-android/kotlin/teams/update-membership.md +++ b/examples/2.3.x/client-android/kotlin/teams/update-membership.md @@ -12,6 +12,6 @@ val teams = Teams(client) val result = teams.updateMembership( teamId = "", membershipId = "", - roles = listOf(), + roles = listOf("editor"), ) ``` diff --git a/examples/2.3.x/client-android/kotlin/vectorsdb/create-operations.md b/examples/2.3.x/client-android/kotlin/vectorsdb/create-operations.md index 1a2908af9..8bd201a32 100644 --- a/examples/2.3.x/client-android/kotlin/vectorsdb/create-operations.md +++ b/examples/2.3.x/client-android/kotlin/vectorsdb/create-operations.md @@ -17,7 +17,10 @@ val result = vectorsDB.createOperations( "collectionId" to "", "documentId" to "", "data" to mapOf( - "name" to "Walter O'Brien" + "embeddings" to listOf(0.12, -0.55, 0.88, 1.02), + "metadata" to mapOf( + "name" to "First document" + ) ) )), // (optional) ) diff --git a/examples/2.3.x/client-android/kotlin/vectorsdb/list-transactions.md b/examples/2.3.x/client-android/kotlin/vectorsdb/list-transactions.md index 97981c01a..76fb10e3e 100644 --- a/examples/2.3.x/client-android/kotlin/vectorsdb/list-transactions.md +++ b/examples/2.3.x/client-android/kotlin/vectorsdb/list-transactions.md @@ -11,5 +11,6 @@ val vectorsDB = VectorsDB(client) val result = vectorsDB.listTransactions( queries = listOf(), // (optional) + total = false, // (optional) ) ``` diff --git a/examples/2.3.x/client-apple/examples/account/create-email-password-session.md b/examples/2.3.x/client-apple/examples/account/create-email-password-session.md index 7233b7399..ab87b57d8 100644 --- a/examples/2.3.x/client-apple/examples/account/create-email-password-session.md +++ b/examples/2.3.x/client-apple/examples/account/create-email-password-session.md @@ -9,7 +9,8 @@ let account = Account(client) let session = try await account.createEmailPasswordSession( email: "email@example.com", - password: "password" + password: "password", + duration: 60 // optional ) ``` diff --git a/examples/2.3.x/client-apple/examples/account/delete-sessions.md b/examples/2.3.x/client-apple/examples/account/delete-sessions.md index 7e524f2d6..73d93d1b1 100644 --- a/examples/2.3.x/client-apple/examples/account/delete-sessions.md +++ b/examples/2.3.x/client-apple/examples/account/delete-sessions.md @@ -7,6 +7,8 @@ let client = Client() let account = Account(client) -let result = try await account.deleteSessions() +let result = try await account.deleteSessions( + current: false // optional +) ``` diff --git a/examples/2.3.x/client-apple/examples/account/list-sessions.md b/examples/2.3.x/client-apple/examples/account/list-sessions.md index 2932881f0..867a952b1 100644 --- a/examples/2.3.x/client-apple/examples/account/list-sessions.md +++ b/examples/2.3.x/client-apple/examples/account/list-sessions.md @@ -7,6 +7,8 @@ let client = Client() let account = Account(client) -let sessionList = try await account.listSessions() +let sessionList = try await account.listSessions( + total: false // optional +) ``` diff --git a/examples/2.3.x/client-apple/examples/analytics/create-event.md b/examples/2.3.x/client-apple/examples/analytics/create-event.md new file mode 100644 index 000000000..5b6173d5c --- /dev/null +++ b/examples/2.3.x/client-apple/examples/analytics/create-event.md @@ -0,0 +1,26 @@ +```swift +import Appwrite + +let client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +let analytics = Analytics(client) + +let result = try await analytics.createEvent( + propertyId: "", + name: "", + url: "https://example.com", + domain: "", // optional + referrer: "", // optional + screenWidth: 0, // optional + sessionHash: "", // optional + scrollDepth: 0, // optional + engagementTime: 0, // optional + props: [], // optional + userId: "", // optional + ip: "", // optional + userAgent: "" // optional +) + +``` diff --git a/examples/2.3.x/client-apple/examples/apps/create-installation-token.md b/examples/2.3.x/client-apple/examples/apps/create-installation-token.md new file mode 100644 index 000000000..3530dd787 --- /dev/null +++ b/examples/2.3.x/client-apple/examples/apps/create-installation-token.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 apps = Apps(client) + +let oauth2Token = try await apps.createInstallationToken( + appId: "", + installationId: "" +) + +``` diff --git a/examples/2.3.x/client-apple/examples/apps/create-key.md b/examples/2.3.x/client-apple/examples/apps/create-key.md new file mode 100644 index 000000000..c8cd1f2ee --- /dev/null +++ b/examples/2.3.x/client-apple/examples/apps/create-key.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 apps = Apps(client) + +let appKey = try await apps.createKey( + appId: "" +) + +``` diff --git a/examples/2.3.x/client-apple/examples/apps/create-secret.md b/examples/2.3.x/client-apple/examples/apps/create-secret.md new file mode 100644 index 000000000..5fe4c5ec4 --- /dev/null +++ b/examples/2.3.x/client-apple/examples/apps/create-secret.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 apps = Apps(client) + +let appSecretPlaintext = try await apps.createSecret( + appId: "" +) + +``` diff --git a/examples/2.3.x/client-apple/examples/apps/create.md b/examples/2.3.x/client-apple/examples/apps/create.md new file mode 100644 index 000000000..91b396929 --- /dev/null +++ b/examples/2.3.x/client-apple/examples/apps/create.md @@ -0,0 +1,32 @@ +```swift +import Appwrite + +let client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +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/2.3.x/client-apple/examples/apps/delete-installation.md b/examples/2.3.x/client-apple/examples/apps/delete-installation.md new file mode 100644 index 000000000..873679cfd --- /dev/null +++ b/examples/2.3.x/client-apple/examples/apps/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 apps = Apps(client) + +let result = try await apps.deleteInstallation( + appId: "", + installationId: "" +) + +``` diff --git a/examples/2.3.x/client-apple/examples/apps/delete-key.md b/examples/2.3.x/client-apple/examples/apps/delete-key.md new file mode 100644 index 000000000..56c180e81 --- /dev/null +++ b/examples/2.3.x/client-apple/examples/apps/delete-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 + +let apps = Apps(client) + +let result = try await apps.deleteKey( + appId: "", + keyId: "" +) + +``` diff --git a/examples/2.3.x/client-apple/examples/apps/delete-secret.md b/examples/2.3.x/client-apple/examples/apps/delete-secret.md new file mode 100644 index 000000000..66af5a54c --- /dev/null +++ b/examples/2.3.x/client-apple/examples/apps/delete-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 + +let apps = Apps(client) + +let result = try await apps.deleteSecret( + appId: "", + secretId: "" +) + +``` diff --git a/examples/2.3.x/client-apple/examples/apps/delete-tokens.md b/examples/2.3.x/client-apple/examples/apps/delete-tokens.md new file mode 100644 index 000000000..89e73297c --- /dev/null +++ b/examples/2.3.x/client-apple/examples/apps/delete-tokens.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 apps = Apps(client) + +let result = try await apps.deleteTokens( + appId: "" +) + +``` diff --git a/examples/2.3.x/client-apple/examples/apps/delete.md b/examples/2.3.x/client-apple/examples/apps/delete.md new file mode 100644 index 000000000..2229ea2fc --- /dev/null +++ b/examples/2.3.x/client-apple/examples/apps/delete.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 apps = Apps(client) + +let result = try await apps.delete( + appId: "" +) + +``` diff --git a/examples/2.3.x/client-apple/examples/apps/get-installation.md b/examples/2.3.x/client-apple/examples/apps/get-installation.md new file mode 100644 index 000000000..f53e7a6fc --- /dev/null +++ b/examples/2.3.x/client-apple/examples/apps/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 apps = Apps(client) + +let appInstallation = try await apps.getInstallation( + appId: "", + installationId: "" +) + +``` diff --git a/examples/2.3.x/client-apple/examples/apps/get-key.md b/examples/2.3.x/client-apple/examples/apps/get-key.md new file mode 100644 index 000000000..8cef80129 --- /dev/null +++ b/examples/2.3.x/client-apple/examples/apps/get-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 + +let apps = Apps(client) + +let appKey = try await apps.getKey( + appId: "", + keyId: "" +) + +``` diff --git a/examples/2.3.x/client-apple/examples/apps/get-secret.md b/examples/2.3.x/client-apple/examples/apps/get-secret.md new file mode 100644 index 000000000..215dcb6ea --- /dev/null +++ b/examples/2.3.x/client-apple/examples/apps/get-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 + +let apps = Apps(client) + +let appSecret = try await apps.getSecret( + appId: "", + secretId: "" +) + +``` diff --git a/examples/2.3.x/client-apple/examples/apps/get.md b/examples/2.3.x/client-apple/examples/apps/get.md new file mode 100644 index 000000000..27ebc2760 --- /dev/null +++ b/examples/2.3.x/client-apple/examples/apps/get.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 apps = Apps(client) + +let app = try await apps.get( + appId: "" +) + +``` diff --git a/examples/2.3.x/client-apple/examples/apps/list-installation-scopes.md b/examples/2.3.x/client-apple/examples/apps/list-installation-scopes.md new file mode 100644 index 000000000..cb1500ed9 --- /dev/null +++ b/examples/2.3.x/client-apple/examples/apps/list-installation-scopes.md @@ -0,0 +1,12 @@ +```swift +import Appwrite + +let client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +let apps = Apps(client) + +let appScopeList = try await apps.listInstallationScopes() + +``` diff --git a/examples/2.3.x/client-apple/examples/apps/list-installations.md b/examples/2.3.x/client-apple/examples/apps/list-installations.md new file mode 100644 index 000000000..e1729c0be --- /dev/null +++ b/examples/2.3.x/client-apple/examples/apps/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 apps = Apps(client) + +let appInstallationList = try await apps.listInstallations( + appId: "", + queries: [], // optional + total: false // optional +) + +``` diff --git a/examples/2.3.x/client-apple/examples/apps/list-keys.md b/examples/2.3.x/client-apple/examples/apps/list-keys.md new file mode 100644 index 000000000..5c4f23f81 --- /dev/null +++ b/examples/2.3.x/client-apple/examples/apps/list-keys.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 apps = Apps(client) + +let appKeyList = try await apps.listKeys( + appId: "", + queries: [], // optional + total: false // optional +) + +``` diff --git a/examples/2.3.x/client-apple/examples/apps/list-o-auth-2-scopes.md b/examples/2.3.x/client-apple/examples/apps/list-o-auth-2-scopes.md new file mode 100644 index 000000000..be4bbcd8d --- /dev/null +++ b/examples/2.3.x/client-apple/examples/apps/list-o-auth-2-scopes.md @@ -0,0 +1,12 @@ +```swift +import Appwrite + +let client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +let apps = Apps(client) + +let appScopeList = try await apps.listOAuth2Scopes() + +``` diff --git a/examples/2.3.x/client-apple/examples/apps/list-secrets.md b/examples/2.3.x/client-apple/examples/apps/list-secrets.md new file mode 100644 index 000000000..a956b134d --- /dev/null +++ b/examples/2.3.x/client-apple/examples/apps/list-secrets.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 apps = Apps(client) + +let appSecretList = try await apps.listSecrets( + appId: "", + queries: [], // optional + total: false // optional +) + +``` diff --git a/examples/2.3.x/client-apple/examples/apps/list.md b/examples/2.3.x/client-apple/examples/apps/list.md new file mode 100644 index 000000000..7b9973172 --- /dev/null +++ b/examples/2.3.x/client-apple/examples/apps/list.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 apps = Apps(client) + +let appsList = try await apps.list( + queries: [], // optional + total: false // optional +) + +``` diff --git a/examples/2.3.x/client-apple/examples/apps/update-team.md b/examples/2.3.x/client-apple/examples/apps/update-team.md new file mode 100644 index 000000000..09b24dc89 --- /dev/null +++ b/examples/2.3.x/client-apple/examples/apps/update-team.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 apps = Apps(client) + +let app = try await apps.updateTeam( + appId: "", + teamId: "" +) + +``` diff --git a/examples/2.3.x/client-apple/examples/apps/update.md b/examples/2.3.x/client-apple/examples/apps/update.md new file mode 100644 index 000000000..4ded9ee5c --- /dev/null +++ b/examples/2.3.x/client-apple/examples/apps/update.md @@ -0,0 +1,33 @@ +```swift +import Appwrite + +let client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +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/2.3.x/client-apple/examples/avatars/delete-photo.md b/examples/2.3.x/client-apple/examples/avatars/delete-photo.md new file mode 100644 index 000000000..e6e00e224 --- /dev/null +++ b/examples/2.3.x/client-apple/examples/avatars/delete-photo.md @@ -0,0 +1,12 @@ +```swift +import Appwrite + +let client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +let avatars = Avatars(client) + +let result = try await avatars.deletePhoto() + +``` diff --git a/examples/2.3.x/client-apple/examples/avatars/get-screenshot.md b/examples/2.3.x/client-apple/examples/avatars/get-screenshot.md index 7711677f4..929af53b7 100644 --- a/examples/2.3.x/client-apple/examples/avatars/get-screenshot.md +++ b/examples/2.3.x/client-apple/examples/avatars/get-screenshot.md @@ -11,8 +11,7 @@ let avatars = Avatars(client) let bytes = try await avatars.getScreenshot( url: "https://example.com", headers: [ - "Authorization": "Bearer token123", - "X-Custom-Header": "value" + "Accept-Language": "en-US,en;q=0.9" ], // optional viewportWidth: 1920, // optional viewportHeight: 1080, // optional diff --git a/examples/2.3.x/client-apple/examples/avatars/update-photo.md b/examples/2.3.x/client-apple/examples/avatars/update-photo.md new file mode 100644 index 000000000..64595da5e --- /dev/null +++ b/examples/2.3.x/client-apple/examples/avatars/update-photo.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 avatars = Avatars(client) + +let account = try await avatars.updatePhoto( + file: InputFile.fromPath("file.png") +) + +``` diff --git a/examples/2.3.x/client-apple/examples/databases/list-transactions.md b/examples/2.3.x/client-apple/examples/databases/list-transactions.md index 15c823f51..e0c047b29 100644 --- a/examples/2.3.x/client-apple/examples/databases/list-transactions.md +++ b/examples/2.3.x/client-apple/examples/databases/list-transactions.md @@ -8,7 +8,8 @@ let client = Client() let databases = Databases(client) let transactionList = try await databases.listTransactions( - queries: [] // optional + queries: [], // optional + total: false // optional ) ``` diff --git a/examples/2.3.x/client-apple/examples/documentsdb/create-documents.md b/examples/2.3.x/client-apple/examples/documentsdb/create-documents.md index c170200b7..3f7938aa2 100644 --- a/examples/2.3.x/client-apple/examples/documentsdb/create-documents.md +++ b/examples/2.3.x/client-apple/examples/documentsdb/create-documents.md @@ -10,7 +10,16 @@ let documentsDB = DocumentsDB(client) let documentList = try await documentsDB.createDocuments( databaseId: "", collectionId: "", - documents: [], + documents: [ + [ + "$id": "example1", + "username": "walter.obrien", + "email": "walter.obrien@example.com", + "fullName": "Walter O'Brien", + "age": 30, + "isAdmin": false + ] + ], transactionId: "" // optional ) diff --git a/examples/2.3.x/client-apple/examples/documentsdb/list-transactions.md b/examples/2.3.x/client-apple/examples/documentsdb/list-transactions.md index 0fe1ca767..23e2de9f5 100644 --- a/examples/2.3.x/client-apple/examples/documentsdb/list-transactions.md +++ b/examples/2.3.x/client-apple/examples/documentsdb/list-transactions.md @@ -8,7 +8,8 @@ let client = Client() let documentsDB = DocumentsDB(client) let transactionList = try await documentsDB.listTransactions( - queries: [] // optional + queries: [], // optional + total: false // optional ) ``` diff --git a/examples/2.3.x/client-apple/examples/graphql/mutation.md b/examples/2.3.x/client-apple/examples/graphql/mutation.md index 86894fea9..d22c2cd62 100644 --- a/examples/2.3.x/client-apple/examples/graphql/mutation.md +++ b/examples/2.3.x/client-apple/examples/graphql/mutation.md @@ -8,7 +8,9 @@ let client = Client() let graphql = Graphql(client) let any = try await graphql.mutation( - query: [:] + query: [ + "query": "mutation { accountUpdateName(name: \"Walter\") { name } }" + ] ) ``` diff --git a/examples/2.3.x/client-apple/examples/graphql/query.md b/examples/2.3.x/client-apple/examples/graphql/query.md index e01c78df1..c14db180b 100644 --- a/examples/2.3.x/client-apple/examples/graphql/query.md +++ b/examples/2.3.x/client-apple/examples/graphql/query.md @@ -8,7 +8,9 @@ let client = Client() let graphql = Graphql(client) let any = try await graphql.query( - query: [:] + query: [ + "query": "query { localeGet { ip } }" + ] ) ``` diff --git a/examples/2.3.x/client-apple/examples/locale/list-codes.md b/examples/2.3.x/client-apple/examples/locale/list-codes.md index d524b5e2a..9eab12d8e 100644 --- a/examples/2.3.x/client-apple/examples/locale/list-codes.md +++ b/examples/2.3.x/client-apple/examples/locale/list-codes.md @@ -7,6 +7,8 @@ let client = Client() let locale = Locale(client) -let localeCodeList = try await locale.listCodes() +let localeCodeList = try await locale.listCodes( + total: false // optional +) ``` diff --git a/examples/2.3.x/client-apple/examples/locale/list-continents.md b/examples/2.3.x/client-apple/examples/locale/list-continents.md index dfad5ced7..16060964f 100644 --- a/examples/2.3.x/client-apple/examples/locale/list-continents.md +++ b/examples/2.3.x/client-apple/examples/locale/list-continents.md @@ -7,6 +7,8 @@ let client = Client() let locale = Locale(client) -let continentList = try await locale.listContinents() +let continentList = try await locale.listContinents( + total: false // optional +) ``` diff --git a/examples/2.3.x/client-apple/examples/locale/list-countries-eu.md b/examples/2.3.x/client-apple/examples/locale/list-countries-eu.md index ee6a97f92..ecff8166e 100644 --- a/examples/2.3.x/client-apple/examples/locale/list-countries-eu.md +++ b/examples/2.3.x/client-apple/examples/locale/list-countries-eu.md @@ -7,6 +7,8 @@ let client = Client() let locale = Locale(client) -let countryList = try await locale.listCountriesEU() +let countryList = try await locale.listCountriesEU( + total: false // optional +) ``` diff --git a/examples/2.3.x/client-apple/examples/locale/list-countries-phones.md b/examples/2.3.x/client-apple/examples/locale/list-countries-phones.md index d9267a684..eb673f8e2 100644 --- a/examples/2.3.x/client-apple/examples/locale/list-countries-phones.md +++ b/examples/2.3.x/client-apple/examples/locale/list-countries-phones.md @@ -7,6 +7,8 @@ let client = Client() let locale = Locale(client) -let phoneList = try await locale.listCountriesPhones() +let phoneList = try await locale.listCountriesPhones( + total: false // optional +) ``` diff --git a/examples/2.3.x/client-apple/examples/locale/list-countries.md b/examples/2.3.x/client-apple/examples/locale/list-countries.md index 2b79063db..be97621fa 100644 --- a/examples/2.3.x/client-apple/examples/locale/list-countries.md +++ b/examples/2.3.x/client-apple/examples/locale/list-countries.md @@ -7,6 +7,8 @@ let client = Client() let locale = Locale(client) -let countryList = try await locale.listCountries() +let countryList = try await locale.listCountries( + total: false // optional +) ``` diff --git a/examples/2.3.x/client-apple/examples/locale/list-currencies.md b/examples/2.3.x/client-apple/examples/locale/list-currencies.md index ccd5c92e1..5842babbc 100644 --- a/examples/2.3.x/client-apple/examples/locale/list-currencies.md +++ b/examples/2.3.x/client-apple/examples/locale/list-currencies.md @@ -7,6 +7,8 @@ let client = Client() let locale = Locale(client) -let currencyList = try await locale.listCurrencies() +let currencyList = try await locale.listCurrencies( + total: false // optional +) ``` diff --git a/examples/2.3.x/client-apple/examples/locale/list-languages.md b/examples/2.3.x/client-apple/examples/locale/list-languages.md index 7132b1bfe..7528895db 100644 --- a/examples/2.3.x/client-apple/examples/locale/list-languages.md +++ b/examples/2.3.x/client-apple/examples/locale/list-languages.md @@ -7,6 +7,8 @@ let client = Client() let locale = Locale(client) -let languageList = try await locale.listLanguages() +let languageList = try await locale.listLanguages( + total: false // optional +) ``` diff --git a/examples/2.3.x/client-apple/examples/oauth2/approve.md b/examples/2.3.x/client-apple/examples/oauth2/approve.md new file mode 100644 index 000000000..28fff41a4 --- /dev/null +++ b/examples/2.3.x/client-apple/examples/oauth2/approve.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 oauth2 = Oauth2(client) + +let oauth2Approve = try await oauth2.approve( + grant_id: "", + authorization_details: "", // optional + scope: "" // optional +) + +``` diff --git a/examples/2.3.x/client-apple/examples/oauth2/authorize-post.md b/examples/2.3.x/client-apple/examples/oauth2/authorize-post.md new file mode 100644 index 000000000..f3eee38a4 --- /dev/null +++ b/examples/2.3.x/client-apple/examples/oauth2/authorize-post.md @@ -0,0 +1,27 @@ +```swift +import Appwrite + +let client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .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/2.3.x/client-apple/examples/oauth2/authorize.md b/examples/2.3.x/client-apple/examples/oauth2/authorize.md new file mode 100644 index 000000000..fb751a9f5 --- /dev/null +++ b/examples/2.3.x/client-apple/examples/oauth2/authorize.md @@ -0,0 +1,27 @@ +```swift +import Appwrite + +let client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .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/2.3.x/client-apple/examples/oauth2/create-device-authorization.md b/examples/2.3.x/client-apple/examples/oauth2/create-device-authorization.md new file mode 100644 index 000000000..d7beeb5f0 --- /dev/null +++ b/examples/2.3.x/client-apple/examples/oauth2/create-device-authorization.md @@ -0,0 +1,18 @@ +```swift +import Appwrite + +let client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .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/2.3.x/client-apple/examples/oauth2/create-grant.md b/examples/2.3.x/client-apple/examples/oauth2/create-grant.md new file mode 100644 index 000000000..0f0126c5d --- /dev/null +++ b/examples/2.3.x/client-apple/examples/oauth2/create-grant.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 oauth2 = Oauth2(client) + +let oauth2Grant = try await oauth2.createGrant( + user_code: "" +) + +``` diff --git a/examples/2.3.x/client-apple/examples/oauth2/create-par.md b/examples/2.3.x/client-apple/examples/oauth2/create-par.md new file mode 100644 index 000000000..2aa8e304e --- /dev/null +++ b/examples/2.3.x/client-apple/examples/oauth2/create-par.md @@ -0,0 +1,26 @@ +```swift +import Appwrite + +let client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .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/2.3.x/client-apple/examples/oauth2/create-token.md b/examples/2.3.x/client-apple/examples/oauth2/create-token.md new file mode 100644 index 000000000..d604aef76 --- /dev/null +++ b/examples/2.3.x/client-apple/examples/oauth2/create-token.md @@ -0,0 +1,23 @@ +```swift +import Appwrite + +let client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .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/2.3.x/client-apple/examples/oauth2/get-grant.md b/examples/2.3.x/client-apple/examples/oauth2/get-grant.md new file mode 100644 index 000000000..c87e7832e --- /dev/null +++ b/examples/2.3.x/client-apple/examples/oauth2/get-grant.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 oauth2 = Oauth2(client) + +let oauth2Grant = try await oauth2.getGrant( + grant_id: "" +) + +``` diff --git a/examples/2.3.x/client-apple/examples/oauth2/list-organizations.md b/examples/2.3.x/client-apple/examples/oauth2/list-organizations.md new file mode 100644 index 000000000..f2ffc1eca --- /dev/null +++ b/examples/2.3.x/client-apple/examples/oauth2/list-organizations.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 oauth2 = Oauth2(client) + +let oauth2OrganizationList = try await oauth2.listOrganizations( + limit: 1, // optional + offset: 0, // optional + search: "" // optional +) + +``` diff --git a/examples/2.3.x/client-apple/examples/oauth2/list-projects.md b/examples/2.3.x/client-apple/examples/oauth2/list-projects.md new file mode 100644 index 000000000..bbccf0ffd --- /dev/null +++ b/examples/2.3.x/client-apple/examples/oauth2/list-projects.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 oauth2 = Oauth2(client) + +let oauth2ProjectList = try await oauth2.listProjects( + limit: 1, // optional + offset: 0, // optional + search: "" // optional +) + +``` diff --git a/examples/2.3.x/client-apple/examples/oauth2/logout-post.md b/examples/2.3.x/client-apple/examples/oauth2/logout-post.md new file mode 100644 index 000000000..125c26880 --- /dev/null +++ b/examples/2.3.x/client-apple/examples/oauth2/logout-post.md @@ -0,0 +1,19 @@ +```swift +import Appwrite + +let client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +let oauth2 = Oauth2(client) + +let result = try await oauth2.logoutPost( + id_token_hint: "", // optional + logout_hint: "", // optional + client_id: "", // optional + post_logout_redirect_uri: "https://example.com", // optional + state: "", // optional + ui_locales: "" // optional +) + +``` diff --git a/examples/2.3.x/client-apple/examples/oauth2/logout.md b/examples/2.3.x/client-apple/examples/oauth2/logout.md new file mode 100644 index 000000000..188d7e350 --- /dev/null +++ b/examples/2.3.x/client-apple/examples/oauth2/logout.md @@ -0,0 +1,19 @@ +```swift +import Appwrite + +let client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("") // Your project ID + +let oauth2 = Oauth2(client) + +let result = try await oauth2.logout( + id_token_hint: "", // optional + logout_hint: "", // optional + client_id: "", // optional + post_logout_redirect_uri: "https://example.com", // optional + state: "", // optional + ui_locales: "" // optional +) + +``` diff --git a/examples/2.3.x/client-apple/examples/oauth2/reject.md b/examples/2.3.x/client-apple/examples/oauth2/reject.md new file mode 100644 index 000000000..f37be5818 --- /dev/null +++ b/examples/2.3.x/client-apple/examples/oauth2/reject.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 oauth2 = Oauth2(client) + +let oauth2Reject = try await oauth2.reject( + grant_id: "" +) + +``` diff --git a/examples/2.3.x/client-apple/examples/oauth2/revoke.md b/examples/2.3.x/client-apple/examples/oauth2/revoke.md new file mode 100644 index 000000000..e9a89ffa6 --- /dev/null +++ b/examples/2.3.x/client-apple/examples/oauth2/revoke.md @@ -0,0 +1,17 @@ +```swift +import Appwrite + +let client = Client() + .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint + .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/2.3.x/client-apple/examples/tablesdb/list-transactions.md b/examples/2.3.x/client-apple/examples/tablesdb/list-transactions.md index 655109394..d814acb45 100644 --- a/examples/2.3.x/client-apple/examples/tablesdb/list-transactions.md +++ b/examples/2.3.x/client-apple/examples/tablesdb/list-transactions.md @@ -8,7 +8,8 @@ let client = Client() let tablesDB = TablesDB(client) let transactionList = try await tablesDB.listTransactions( - queries: [] // optional + queries: [], // optional + total: false // optional ) ``` diff --git a/examples/2.3.x/client-apple/examples/teams/create-membership.md b/examples/2.3.x/client-apple/examples/teams/create-membership.md index 124765abf..dd089a0f5 100644 --- a/examples/2.3.x/client-apple/examples/teams/create-membership.md +++ b/examples/2.3.x/client-apple/examples/teams/create-membership.md @@ -9,7 +9,9 @@ let teams = Teams(client) let membership = try await teams.createMembership( teamId: "", - roles: [], + roles: [ + "editor" + ], email: "email@example.com", // optional userId: "", // optional phone: "+12065550100", // optional diff --git a/examples/2.3.x/client-apple/examples/teams/update-membership.md b/examples/2.3.x/client-apple/examples/teams/update-membership.md index 5663848d1..d9173eb3e 100644 --- a/examples/2.3.x/client-apple/examples/teams/update-membership.md +++ b/examples/2.3.x/client-apple/examples/teams/update-membership.md @@ -10,7 +10,9 @@ let teams = Teams(client) let membership = try await teams.updateMembership( teamId: "", membershipId: "", - roles: [] + roles: [ + "editor" + ] ) ``` diff --git a/examples/2.3.x/client-apple/examples/vectorsdb/create-operations.md b/examples/2.3.x/client-apple/examples/vectorsdb/create-operations.md index b48c45983..8100d0b1c 100644 --- a/examples/2.3.x/client-apple/examples/vectorsdb/create-operations.md +++ b/examples/2.3.x/client-apple/examples/vectorsdb/create-operations.md @@ -16,7 +16,15 @@ let transaction = try await vectorsDB.createOperations( "collectionId": "", "documentId": "", "data": [ - "name": "Walter O'Brien" + "embeddings": [ + 0.12, + -0.55, + 0.88, + 1.02 + ], + "metadata": [ + "name": "First document" + ] ] ] ] // optional diff --git a/examples/2.3.x/client-apple/examples/vectorsdb/list-transactions.md b/examples/2.3.x/client-apple/examples/vectorsdb/list-transactions.md index 26aa4f467..b0363250c 100644 --- a/examples/2.3.x/client-apple/examples/vectorsdb/list-transactions.md +++ b/examples/2.3.x/client-apple/examples/vectorsdb/list-transactions.md @@ -8,7 +8,8 @@ let client = Client() let vectorsDB = VectorsDB(client) let transactionList = try await vectorsDB.listTransactions( - queries: [] // optional + queries: [], // optional + total: false // optional ) ``` diff --git a/examples/2.3.x/client-flutter/examples/account/create-email-password-session.md b/examples/2.3.x/client-flutter/examples/account/create-email-password-session.md index d444996d9..c27fb3281 100644 --- a/examples/2.3.x/client-flutter/examples/account/create-email-password-session.md +++ b/examples/2.3.x/client-flutter/examples/account/create-email-password-session.md @@ -10,5 +10,6 @@ Account account = Account(client); Session result = await account.createEmailPasswordSession( email: 'email@example.com', password: 'password', + duration: 60, // optional ); ``` diff --git a/examples/2.3.x/client-flutter/examples/account/delete-sessions.md b/examples/2.3.x/client-flutter/examples/account/delete-sessions.md index e8e8ba1af..388661a98 100644 --- a/examples/2.3.x/client-flutter/examples/account/delete-sessions.md +++ b/examples/2.3.x/client-flutter/examples/account/delete-sessions.md @@ -7,5 +7,7 @@ Client client = Client() Account account = Account(client); -await account.deleteSessions(); +await account.deleteSessions( + current: false, // optional +); ``` diff --git a/examples/2.3.x/client-flutter/examples/account/list-sessions.md b/examples/2.3.x/client-flutter/examples/account/list-sessions.md index 18db93bbb..3b148a7b2 100644 --- a/examples/2.3.x/client-flutter/examples/account/list-sessions.md +++ b/examples/2.3.x/client-flutter/examples/account/list-sessions.md @@ -7,5 +7,7 @@ Client client = Client() Account account = Account(client); -SessionList result = await account.listSessions(); +SessionList result = await account.listSessions( + total: false, // optional +); ``` diff --git a/examples/2.3.x/client-flutter/examples/analytics/create-event.md b/examples/2.3.x/client-flutter/examples/analytics/create-event.md new file mode 100644 index 000000000..a299877e3 --- /dev/null +++ b/examples/2.3.x/client-flutter/examples/analytics/create-event.md @@ -0,0 +1,25 @@ +```dart +import 'package:appwrite/appwrite.dart'; + +Client client = Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +Analytics analytics = Analytics(client); + + result = await analytics.createEvent( + propertyId: '', + name: '', + url: 'https://example.com', + domain: '', // optional + referrer: '', // optional + screenWidth: 0, // optional + sessionHash: '', // optional + scrollDepth: 0, // optional + engagementTime: 0, // optional + props: [], // optional + userId: '', // optional + ip: '', // optional + userAgent: '', // optional +); +``` diff --git a/examples/2.3.x/client-flutter/examples/apps/create-installation-token.md b/examples/2.3.x/client-flutter/examples/apps/create-installation-token.md new file mode 100644 index 000000000..868044ba6 --- /dev/null +++ b/examples/2.3.x/client-flutter/examples/apps/create-installation-token.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 + +Apps apps = Apps(client); + +Oauth2Token result = await apps.createInstallationToken( + appId: '', + installationId: '', +); +``` diff --git a/examples/2.3.x/client-flutter/examples/apps/create-key.md b/examples/2.3.x/client-flutter/examples/apps/create-key.md new file mode 100644 index 000000000..b22a1bd63 --- /dev/null +++ b/examples/2.3.x/client-flutter/examples/apps/create-key.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 + +Apps apps = Apps(client); + +AppKey result = await apps.createKey( + appId: '', +); +``` diff --git a/examples/2.3.x/client-flutter/examples/apps/create-secret.md b/examples/2.3.x/client-flutter/examples/apps/create-secret.md new file mode 100644 index 000000000..654f1eb53 --- /dev/null +++ b/examples/2.3.x/client-flutter/examples/apps/create-secret.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 + +Apps apps = Apps(client); + +AppSecretPlaintext result = await apps.createSecret( + appId: '', +); +``` diff --git a/examples/2.3.x/client-flutter/examples/apps/create.md b/examples/2.3.x/client-flutter/examples/apps/create.md new file mode 100644 index 000000000..77bd1430d --- /dev/null +++ b/examples/2.3.x/client-flutter/examples/apps/create.md @@ -0,0 +1,31 @@ +```dart +import 'package:appwrite/appwrite.dart'; + +Client client = Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +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/2.3.x/client-flutter/examples/apps/delete-installation.md b/examples/2.3.x/client-flutter/examples/apps/delete-installation.md new file mode 100644 index 000000000..55707ce0a --- /dev/null +++ b/examples/2.3.x/client-flutter/examples/apps/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 + +Apps apps = Apps(client); + +await apps.deleteInstallation( + appId: '', + installationId: '', +); +``` diff --git a/examples/2.3.x/client-flutter/examples/apps/delete-key.md b/examples/2.3.x/client-flutter/examples/apps/delete-key.md new file mode 100644 index 000000000..e6bd40657 --- /dev/null +++ b/examples/2.3.x/client-flutter/examples/apps/delete-key.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 + +Apps apps = Apps(client); + +await apps.deleteKey( + appId: '', + keyId: '', +); +``` diff --git a/examples/2.3.x/client-flutter/examples/apps/delete-secret.md b/examples/2.3.x/client-flutter/examples/apps/delete-secret.md new file mode 100644 index 000000000..0e7a15065 --- /dev/null +++ b/examples/2.3.x/client-flutter/examples/apps/delete-secret.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 + +Apps apps = Apps(client); + +await apps.deleteSecret( + appId: '', + secretId: '', +); +``` diff --git a/examples/2.3.x/client-flutter/examples/apps/delete-tokens.md b/examples/2.3.x/client-flutter/examples/apps/delete-tokens.md new file mode 100644 index 000000000..cdba07ee4 --- /dev/null +++ b/examples/2.3.x/client-flutter/examples/apps/delete-tokens.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 + +Apps apps = Apps(client); + +await apps.deleteTokens( + appId: '', +); +``` diff --git a/examples/2.3.x/client-flutter/examples/apps/delete.md b/examples/2.3.x/client-flutter/examples/apps/delete.md new file mode 100644 index 000000000..e56502a69 --- /dev/null +++ b/examples/2.3.x/client-flutter/examples/apps/delete.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 + +Apps apps = Apps(client); + +await apps.delete( + appId: '', +); +``` diff --git a/examples/2.3.x/client-flutter/examples/apps/get-installation.md b/examples/2.3.x/client-flutter/examples/apps/get-installation.md new file mode 100644 index 000000000..e3364ae8c --- /dev/null +++ b/examples/2.3.x/client-flutter/examples/apps/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 + +Apps apps = Apps(client); + +AppInstallation result = await apps.getInstallation( + appId: '', + installationId: '', +); +``` diff --git a/examples/2.3.x/client-flutter/examples/apps/get-key.md b/examples/2.3.x/client-flutter/examples/apps/get-key.md new file mode 100644 index 000000000..3e0a79791 --- /dev/null +++ b/examples/2.3.x/client-flutter/examples/apps/get-key.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 + +Apps apps = Apps(client); + +AppKey result = await apps.getKey( + appId: '', + keyId: '', +); +``` diff --git a/examples/2.3.x/client-flutter/examples/apps/get-secret.md b/examples/2.3.x/client-flutter/examples/apps/get-secret.md new file mode 100644 index 000000000..63d047aac --- /dev/null +++ b/examples/2.3.x/client-flutter/examples/apps/get-secret.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 + +Apps apps = Apps(client); + +AppSecret result = await apps.getSecret( + appId: '', + secretId: '', +); +``` diff --git a/examples/2.3.x/client-flutter/examples/apps/get.md b/examples/2.3.x/client-flutter/examples/apps/get.md new file mode 100644 index 000000000..be860f32d --- /dev/null +++ b/examples/2.3.x/client-flutter/examples/apps/get.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 + +Apps apps = Apps(client); + +App result = await apps.get( + appId: '', +); +``` diff --git a/examples/2.3.x/client-flutter/examples/apps/list-installation-scopes.md b/examples/2.3.x/client-flutter/examples/apps/list-installation-scopes.md new file mode 100644 index 000000000..de20ba960 --- /dev/null +++ b/examples/2.3.x/client-flutter/examples/apps/list-installation-scopes.md @@ -0,0 +1,11 @@ +```dart +import 'package:appwrite/appwrite.dart'; + +Client client = Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +Apps apps = Apps(client); + +AppScopeList result = await apps.listInstallationScopes(); +``` diff --git a/examples/2.3.x/client-flutter/examples/apps/list-installations.md b/examples/2.3.x/client-flutter/examples/apps/list-installations.md new file mode 100644 index 000000000..940de5d37 --- /dev/null +++ b/examples/2.3.x/client-flutter/examples/apps/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 + +Apps apps = Apps(client); + +AppInstallationList result = await apps.listInstallations( + appId: '', + queries: [], // optional + total: false, // optional +); +``` diff --git a/examples/2.3.x/client-flutter/examples/apps/list-keys.md b/examples/2.3.x/client-flutter/examples/apps/list-keys.md new file mode 100644 index 000000000..237d14875 --- /dev/null +++ b/examples/2.3.x/client-flutter/examples/apps/list-keys.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 + +Apps apps = Apps(client); + +AppKeyList result = await apps.listKeys( + appId: '', + queries: [], // optional + total: false, // optional +); +``` diff --git a/examples/2.3.x/client-flutter/examples/apps/list-o-auth-2-scopes.md b/examples/2.3.x/client-flutter/examples/apps/list-o-auth-2-scopes.md new file mode 100644 index 000000000..2ef099dff --- /dev/null +++ b/examples/2.3.x/client-flutter/examples/apps/list-o-auth-2-scopes.md @@ -0,0 +1,11 @@ +```dart +import 'package:appwrite/appwrite.dart'; + +Client client = Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +Apps apps = Apps(client); + +AppScopeList result = await apps.listOAuth2Scopes(); +``` diff --git a/examples/2.3.x/client-flutter/examples/apps/list-secrets.md b/examples/2.3.x/client-flutter/examples/apps/list-secrets.md new file mode 100644 index 000000000..244ed4321 --- /dev/null +++ b/examples/2.3.x/client-flutter/examples/apps/list-secrets.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 + +Apps apps = Apps(client); + +AppSecretList result = await apps.listSecrets( + appId: '', + queries: [], // optional + total: false, // optional +); +``` diff --git a/examples/2.3.x/client-flutter/examples/apps/list.md b/examples/2.3.x/client-flutter/examples/apps/list.md new file mode 100644 index 000000000..78f88ba1b --- /dev/null +++ b/examples/2.3.x/client-flutter/examples/apps/list.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 + +Apps apps = Apps(client); + +AppsList result = await apps.list( + queries: [], // optional + total: false, // optional +); +``` diff --git a/examples/2.3.x/client-flutter/examples/apps/update-team.md b/examples/2.3.x/client-flutter/examples/apps/update-team.md new file mode 100644 index 000000000..6e70778c1 --- /dev/null +++ b/examples/2.3.x/client-flutter/examples/apps/update-team.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 + +Apps apps = Apps(client); + +App result = await apps.updateTeam( + appId: '', + teamId: '', +); +``` diff --git a/examples/2.3.x/client-flutter/examples/apps/update.md b/examples/2.3.x/client-flutter/examples/apps/update.md new file mode 100644 index 000000000..08ee2218c --- /dev/null +++ b/examples/2.3.x/client-flutter/examples/apps/update.md @@ -0,0 +1,32 @@ +```dart +import 'package:appwrite/appwrite.dart'; + +Client client = Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +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/2.3.x/client-flutter/examples/avatars/delete-photo.md b/examples/2.3.x/client-flutter/examples/avatars/delete-photo.md new file mode 100644 index 000000000..390a31920 --- /dev/null +++ b/examples/2.3.x/client-flutter/examples/avatars/delete-photo.md @@ -0,0 +1,11 @@ +```dart +import 'package:appwrite/appwrite.dart'; + +Client client = Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +Avatars avatars = Avatars(client); + +await avatars.deletePhoto(); +``` diff --git a/examples/2.3.x/client-flutter/examples/avatars/get-screenshot.md b/examples/2.3.x/client-flutter/examples/avatars/get-screenshot.md index daa38d171..1a22a6922 100644 --- a/examples/2.3.x/client-flutter/examples/avatars/get-screenshot.md +++ b/examples/2.3.x/client-flutter/examples/avatars/get-screenshot.md @@ -15,8 +15,7 @@ Avatars avatars = Avatars(client); Uint8List bytes = await avatars.getScreenshot( url: 'https://example.com', headers: { - "Authorization": "Bearer token123", - "X-Custom-Header": "value" + "Accept-Language": "en-US,en;q=0.9" }, // optional viewportWidth: 1920, // optional viewportHeight: 1080, // optional @@ -46,8 +45,7 @@ FutureBuilder( future: avatars.getScreenshot( url: 'https://example.com', headers: { - "Authorization": "Bearer token123", - "X-Custom-Header": "value" + "Accept-Language": "en-US,en;q=0.9" }, // optional viewportWidth: 1920, // optional viewportHeight: 1080, // optional diff --git a/examples/2.3.x/client-flutter/examples/avatars/update-photo.md b/examples/2.3.x/client-flutter/examples/avatars/update-photo.md new file mode 100644 index 000000000..c2431d7ac --- /dev/null +++ b/examples/2.3.x/client-flutter/examples/avatars/update-photo.md @@ -0,0 +1,14 @@ +```dart +import 'dart:io'; +import 'package:appwrite/appwrite.dart'; + +Client client = Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +Avatars avatars = Avatars(client); + +Account result = await avatars.updatePhoto( + file: InputFile(path: './path-to-files/image.jpg', filename: 'image.jpg'), +); +``` diff --git a/examples/2.3.x/client-flutter/examples/databases/list-transactions.md b/examples/2.3.x/client-flutter/examples/databases/list-transactions.md index ca9ff6fb1..9ab664217 100644 --- a/examples/2.3.x/client-flutter/examples/databases/list-transactions.md +++ b/examples/2.3.x/client-flutter/examples/databases/list-transactions.md @@ -9,5 +9,6 @@ Databases databases = Databases(client); TransactionList result = await databases.listTransactions( queries: [], // optional + total: false, // optional ); ``` diff --git a/examples/2.3.x/client-flutter/examples/documentsdb/create-documents.md b/examples/2.3.x/client-flutter/examples/documentsdb/create-documents.md index 6a5083730..95dd8676e 100644 --- a/examples/2.3.x/client-flutter/examples/documentsdb/create-documents.md +++ b/examples/2.3.x/client-flutter/examples/documentsdb/create-documents.md @@ -10,7 +10,16 @@ DocumentsDB documentsDB = DocumentsDB(client); DocumentList result = await documentsDB.createDocuments( databaseId: '', collectionId: '', - documents: [], + documents: [ + { + "$id": "example1", + "username": "walter.obrien", + "email": "walter.obrien@example.com", + "fullName": "Walter O'Brien", + "age": 30, + "isAdmin": false + } + ], transactionId: '', // optional ); ``` diff --git a/examples/2.3.x/client-flutter/examples/documentsdb/list-transactions.md b/examples/2.3.x/client-flutter/examples/documentsdb/list-transactions.md index d2c09525d..f6ab157d6 100644 --- a/examples/2.3.x/client-flutter/examples/documentsdb/list-transactions.md +++ b/examples/2.3.x/client-flutter/examples/documentsdb/list-transactions.md @@ -9,5 +9,6 @@ DocumentsDB documentsDB = DocumentsDB(client); TransactionList result = await documentsDB.listTransactions( queries: [], // optional + total: false, // optional ); ``` diff --git a/examples/2.3.x/client-flutter/examples/graphql/mutation.md b/examples/2.3.x/client-flutter/examples/graphql/mutation.md index 7ec3ba75f..dca641597 100644 --- a/examples/2.3.x/client-flutter/examples/graphql/mutation.md +++ b/examples/2.3.x/client-flutter/examples/graphql/mutation.md @@ -8,6 +8,8 @@ Client client = Client() Graphql graphql = Graphql(client); Any result = await graphql.mutation( - query: {}, + query: { + "query": "mutation { accountUpdateName(name: \"Walter\") { name } }" + }, ); ``` diff --git a/examples/2.3.x/client-flutter/examples/graphql/query.md b/examples/2.3.x/client-flutter/examples/graphql/query.md index cac705e5a..668c18457 100644 --- a/examples/2.3.x/client-flutter/examples/graphql/query.md +++ b/examples/2.3.x/client-flutter/examples/graphql/query.md @@ -8,6 +8,8 @@ Client client = Client() Graphql graphql = Graphql(client); Any result = await graphql.query( - query: {}, + query: { + "query": "query { localeGet { ip } }" + }, ); ``` diff --git a/examples/2.3.x/client-flutter/examples/locale/list-codes.md b/examples/2.3.x/client-flutter/examples/locale/list-codes.md index 23c375ba3..2161cf85c 100644 --- a/examples/2.3.x/client-flutter/examples/locale/list-codes.md +++ b/examples/2.3.x/client-flutter/examples/locale/list-codes.md @@ -7,5 +7,7 @@ Client client = Client() Locale locale = Locale(client); -LocaleCodeList result = await locale.listCodes(); +LocaleCodeList result = await locale.listCodes( + total: false, // optional +); ``` diff --git a/examples/2.3.x/client-flutter/examples/locale/list-continents.md b/examples/2.3.x/client-flutter/examples/locale/list-continents.md index 349be7951..271db2adc 100644 --- a/examples/2.3.x/client-flutter/examples/locale/list-continents.md +++ b/examples/2.3.x/client-flutter/examples/locale/list-continents.md @@ -7,5 +7,7 @@ Client client = Client() Locale locale = Locale(client); -ContinentList result = await locale.listContinents(); +ContinentList result = await locale.listContinents( + total: false, // optional +); ``` diff --git a/examples/2.3.x/client-flutter/examples/locale/list-countries-eu.md b/examples/2.3.x/client-flutter/examples/locale/list-countries-eu.md index f775aa2e7..3b3d69276 100644 --- a/examples/2.3.x/client-flutter/examples/locale/list-countries-eu.md +++ b/examples/2.3.x/client-flutter/examples/locale/list-countries-eu.md @@ -7,5 +7,7 @@ Client client = Client() Locale locale = Locale(client); -CountryList result = await locale.listCountriesEU(); +CountryList result = await locale.listCountriesEU( + total: false, // optional +); ``` diff --git a/examples/2.3.x/client-flutter/examples/locale/list-countries-phones.md b/examples/2.3.x/client-flutter/examples/locale/list-countries-phones.md index ee368e297..eb66e3628 100644 --- a/examples/2.3.x/client-flutter/examples/locale/list-countries-phones.md +++ b/examples/2.3.x/client-flutter/examples/locale/list-countries-phones.md @@ -7,5 +7,7 @@ Client client = Client() Locale locale = Locale(client); -PhoneList result = await locale.listCountriesPhones(); +PhoneList result = await locale.listCountriesPhones( + total: false, // optional +); ``` diff --git a/examples/2.3.x/client-flutter/examples/locale/list-countries.md b/examples/2.3.x/client-flutter/examples/locale/list-countries.md index 17e0814f9..fb2b2220a 100644 --- a/examples/2.3.x/client-flutter/examples/locale/list-countries.md +++ b/examples/2.3.x/client-flutter/examples/locale/list-countries.md @@ -7,5 +7,7 @@ Client client = Client() Locale locale = Locale(client); -CountryList result = await locale.listCountries(); +CountryList result = await locale.listCountries( + total: false, // optional +); ``` diff --git a/examples/2.3.x/client-flutter/examples/locale/list-currencies.md b/examples/2.3.x/client-flutter/examples/locale/list-currencies.md index 751de786f..05810fe6b 100644 --- a/examples/2.3.x/client-flutter/examples/locale/list-currencies.md +++ b/examples/2.3.x/client-flutter/examples/locale/list-currencies.md @@ -7,5 +7,7 @@ Client client = Client() Locale locale = Locale(client); -CurrencyList result = await locale.listCurrencies(); +CurrencyList result = await locale.listCurrencies( + total: false, // optional +); ``` diff --git a/examples/2.3.x/client-flutter/examples/locale/list-languages.md b/examples/2.3.x/client-flutter/examples/locale/list-languages.md index 28b46a0a8..559ccddd7 100644 --- a/examples/2.3.x/client-flutter/examples/locale/list-languages.md +++ b/examples/2.3.x/client-flutter/examples/locale/list-languages.md @@ -7,5 +7,7 @@ Client client = Client() Locale locale = Locale(client); -LanguageList result = await locale.listLanguages(); +LanguageList result = await locale.listLanguages( + total: false, // optional +); ``` diff --git a/examples/2.3.x/client-flutter/examples/oauth2/approve.md b/examples/2.3.x/client-flutter/examples/oauth2/approve.md new file mode 100644 index 000000000..81a121c2d --- /dev/null +++ b/examples/2.3.x/client-flutter/examples/oauth2/approve.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 + +Oauth2 oauth2 = Oauth2(client); + +Oauth2Approve result = await oauth2.approve( + grantId: '', + authorizationDetails: '', // optional + scope: '', // optional +); +``` diff --git a/examples/2.3.x/client-flutter/examples/oauth2/authorize-post.md b/examples/2.3.x/client-flutter/examples/oauth2/authorize-post.md new file mode 100644 index 000000000..7bda4af95 --- /dev/null +++ b/examples/2.3.x/client-flutter/examples/oauth2/authorize-post.md @@ -0,0 +1,26 @@ +```dart +import 'package:appwrite/appwrite.dart'; + +Client client = Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .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/2.3.x/client-flutter/examples/oauth2/authorize.md b/examples/2.3.x/client-flutter/examples/oauth2/authorize.md new file mode 100644 index 000000000..46575c33f --- /dev/null +++ b/examples/2.3.x/client-flutter/examples/oauth2/authorize.md @@ -0,0 +1,26 @@ +```dart +import 'package:appwrite/appwrite.dart'; + +Client client = Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .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/2.3.x/client-flutter/examples/oauth2/create-device-authorization.md b/examples/2.3.x/client-flutter/examples/oauth2/create-device-authorization.md new file mode 100644 index 000000000..b35d92869 --- /dev/null +++ b/examples/2.3.x/client-flutter/examples/oauth2/create-device-authorization.md @@ -0,0 +1,17 @@ +```dart +import 'package:appwrite/appwrite.dart'; + +Client client = Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .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/2.3.x/client-flutter/examples/oauth2/create-grant.md b/examples/2.3.x/client-flutter/examples/oauth2/create-grant.md new file mode 100644 index 000000000..5d9fefa41 --- /dev/null +++ b/examples/2.3.x/client-flutter/examples/oauth2/create-grant.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 + +Oauth2 oauth2 = Oauth2(client); + +Oauth2Grant result = await oauth2.createGrant( + userCode: '', +); +``` diff --git a/examples/2.3.x/client-flutter/examples/oauth2/create-par.md b/examples/2.3.x/client-flutter/examples/oauth2/create-par.md new file mode 100644 index 000000000..016b8312a --- /dev/null +++ b/examples/2.3.x/client-flutter/examples/oauth2/create-par.md @@ -0,0 +1,25 @@ +```dart +import 'package:appwrite/appwrite.dart'; + +Client client = Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .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/2.3.x/client-flutter/examples/oauth2/create-token.md b/examples/2.3.x/client-flutter/examples/oauth2/create-token.md new file mode 100644 index 000000000..fcc22e595 --- /dev/null +++ b/examples/2.3.x/client-flutter/examples/oauth2/create-token.md @@ -0,0 +1,22 @@ +```dart +import 'package:appwrite/appwrite.dart'; + +Client client = Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .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/2.3.x/client-flutter/examples/oauth2/get-grant.md b/examples/2.3.x/client-flutter/examples/oauth2/get-grant.md new file mode 100644 index 000000000..b97ddde4c --- /dev/null +++ b/examples/2.3.x/client-flutter/examples/oauth2/get-grant.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 + +Oauth2 oauth2 = Oauth2(client); + +Oauth2Grant result = await oauth2.getGrant( + grantId: '', +); +``` diff --git a/examples/2.3.x/client-flutter/examples/oauth2/list-organizations.md b/examples/2.3.x/client-flutter/examples/oauth2/list-organizations.md new file mode 100644 index 000000000..8006c9e6c --- /dev/null +++ b/examples/2.3.x/client-flutter/examples/oauth2/list-organizations.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 + +Oauth2 oauth2 = Oauth2(client); + +Oauth2OrganizationList result = await oauth2.listOrganizations( + limit: 1, // optional + offset: 0, // optional + search: '', // optional +); +``` diff --git a/examples/2.3.x/client-flutter/examples/oauth2/list-projects.md b/examples/2.3.x/client-flutter/examples/oauth2/list-projects.md new file mode 100644 index 000000000..d973b0ded --- /dev/null +++ b/examples/2.3.x/client-flutter/examples/oauth2/list-projects.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 + +Oauth2 oauth2 = Oauth2(client); + +Oauth2ProjectList result = await oauth2.listProjects( + limit: 1, // optional + offset: 0, // optional + search: '', // optional +); +``` diff --git a/examples/2.3.x/client-flutter/examples/oauth2/logout-post.md b/examples/2.3.x/client-flutter/examples/oauth2/logout-post.md new file mode 100644 index 000000000..53e0873df --- /dev/null +++ b/examples/2.3.x/client-flutter/examples/oauth2/logout-post.md @@ -0,0 +1,18 @@ +```dart +import 'package:appwrite/appwrite.dart'; + +Client client = Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +Oauth2 oauth2 = Oauth2(client); + + result = await oauth2.logoutPost( + idTokenHint: '', // optional + logoutHint: '', // optional + clientId: '', // optional + postLogoutRedirectUri: 'https://example.com', // optional + state: '', // optional + uiLocales: '', // optional +); +``` diff --git a/examples/2.3.x/client-flutter/examples/oauth2/logout.md b/examples/2.3.x/client-flutter/examples/oauth2/logout.md new file mode 100644 index 000000000..7536d2d2a --- /dev/null +++ b/examples/2.3.x/client-flutter/examples/oauth2/logout.md @@ -0,0 +1,18 @@ +```dart +import 'package:appwrite/appwrite.dart'; + +Client client = Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +Oauth2 oauth2 = Oauth2(client); + + result = await oauth2.logout( + idTokenHint: '', // optional + logoutHint: '', // optional + clientId: '', // optional + postLogoutRedirectUri: 'https://example.com', // optional + state: '', // optional + uiLocales: '', // optional +); +``` diff --git a/examples/2.3.x/client-flutter/examples/oauth2/reject.md b/examples/2.3.x/client-flutter/examples/oauth2/reject.md new file mode 100644 index 000000000..beac37d62 --- /dev/null +++ b/examples/2.3.x/client-flutter/examples/oauth2/reject.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 + +Oauth2 oauth2 = Oauth2(client); + +Oauth2Reject result = await oauth2.reject( + grantId: '', +); +``` diff --git a/examples/2.3.x/client-flutter/examples/oauth2/revoke.md b/examples/2.3.x/client-flutter/examples/oauth2/revoke.md new file mode 100644 index 000000000..988f3315d --- /dev/null +++ b/examples/2.3.x/client-flutter/examples/oauth2/revoke.md @@ -0,0 +1,16 @@ +```dart +import 'package:appwrite/appwrite.dart'; + +Client client = Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .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/2.3.x/client-flutter/examples/tablesdb/list-transactions.md b/examples/2.3.x/client-flutter/examples/tablesdb/list-transactions.md index d95e5198b..fd1344377 100644 --- a/examples/2.3.x/client-flutter/examples/tablesdb/list-transactions.md +++ b/examples/2.3.x/client-flutter/examples/tablesdb/list-transactions.md @@ -9,5 +9,6 @@ TablesDB tablesDB = TablesDB(client); TransactionList result = await tablesDB.listTransactions( queries: [], // optional + total: false, // optional ); ``` diff --git a/examples/2.3.x/client-flutter/examples/teams/create-membership.md b/examples/2.3.x/client-flutter/examples/teams/create-membership.md index caab7926c..01fa470e4 100644 --- a/examples/2.3.x/client-flutter/examples/teams/create-membership.md +++ b/examples/2.3.x/client-flutter/examples/teams/create-membership.md @@ -9,7 +9,7 @@ Teams teams = Teams(client); Membership result = await teams.createMembership( teamId: '', - roles: [], + roles: ["editor"], email: 'email@example.com', // optional userId: '', // optional phone: '+12065550100', // optional diff --git a/examples/2.3.x/client-flutter/examples/teams/update-membership.md b/examples/2.3.x/client-flutter/examples/teams/update-membership.md index 2d7c25c87..51b8178d3 100644 --- a/examples/2.3.x/client-flutter/examples/teams/update-membership.md +++ b/examples/2.3.x/client-flutter/examples/teams/update-membership.md @@ -10,6 +10,6 @@ Teams teams = Teams(client); Membership result = await teams.updateMembership( teamId: '', membershipId: '', - roles: [], + roles: ["editor"], ); ``` diff --git a/examples/2.3.x/client-flutter/examples/vectorsdb/create-operations.md b/examples/2.3.x/client-flutter/examples/vectorsdb/create-operations.md index a994693e3..bf2dacd12 100644 --- a/examples/2.3.x/client-flutter/examples/vectorsdb/create-operations.md +++ b/examples/2.3.x/client-flutter/examples/vectorsdb/create-operations.md @@ -16,7 +16,15 @@ Transaction result = await vectorsDB.createOperations( "collectionId": "", "documentId": "", "data": { - "name": "Walter O'Brien" + "embeddings": [ + 0.12, + -0.55, + 0.88, + 1.02 + ], + "metadata": { + "name": "First document" + } } } ], // optional diff --git a/examples/2.3.x/client-flutter/examples/vectorsdb/list-transactions.md b/examples/2.3.x/client-flutter/examples/vectorsdb/list-transactions.md index fb7f83dbf..a22f32d03 100644 --- a/examples/2.3.x/client-flutter/examples/vectorsdb/list-transactions.md +++ b/examples/2.3.x/client-flutter/examples/vectorsdb/list-transactions.md @@ -9,5 +9,6 @@ VectorsDB vectorsDB = VectorsDB(client); TransactionList result = await vectorsDB.listTransactions( queries: [], // optional + total: false, // optional ); ``` diff --git a/examples/2.3.x/client-graphql/examples/account/create-email-password-session.md b/examples/2.3.x/client-graphql/examples/account/create-email-password-session.md index c68a4feb2..530acb1ed 100644 --- a/examples/2.3.x/client-graphql/examples/account/create-email-password-session.md +++ b/examples/2.3.x/client-graphql/examples/account/create-email-password-session.md @@ -2,7 +2,8 @@ mutation { accountCreateEmailPasswordSession( email: "email@example.com", - password: "password" + password: "password", + duration: 60 ) { _id _createdAt diff --git a/examples/2.3.x/client-graphql/examples/account/delete-sessions.md b/examples/2.3.x/client-graphql/examples/account/delete-sessions.md index 65f6900e5..9edcbc74a 100644 --- a/examples/2.3.x/client-graphql/examples/account/delete-sessions.md +++ b/examples/2.3.x/client-graphql/examples/account/delete-sessions.md @@ -1,6 +1,8 @@ ```graphql mutation { - accountDeleteSessions { + accountDeleteSessions( + current: false + ) { status } } diff --git a/examples/2.3.x/client-graphql/examples/account/list-sessions.md b/examples/2.3.x/client-graphql/examples/account/list-sessions.md index 106419a76..62cf7fc2c 100644 --- a/examples/2.3.x/client-graphql/examples/account/list-sessions.md +++ b/examples/2.3.x/client-graphql/examples/account/list-sessions.md @@ -1,6 +1,8 @@ ```graphql query { - accountListSessions { + accountListSessions( + total: false + ) { total sessions { _id diff --git a/examples/2.3.x/client-graphql/examples/analytics/create-event.md b/examples/2.3.x/client-graphql/examples/analytics/create-event.md new file mode 100644 index 000000000..5e58df415 --- /dev/null +++ b/examples/2.3.x/client-graphql/examples/analytics/create-event.md @@ -0,0 +1,21 @@ +```graphql +mutation { + analyticsCreateEvent( + propertyId: "", + name: "", + url: "https://example.com", + domain: "", + referrer: "", + screenWidth: 0, + sessionHash: "", + scrollDepth: 0, + engagementTime: 0, + props: [], + userId: "", + ip: "", + userAgent: "" + ) { + status + } +} +``` diff --git a/examples/2.3.x/client-graphql/examples/apps/create-installation-token.md b/examples/2.3.x/client-graphql/examples/apps/create-installation-token.md new file mode 100644 index 000000000..bf3a90f9a --- /dev/null +++ b/examples/2.3.x/client-graphql/examples/apps/create-installation-token.md @@ -0,0 +1,16 @@ +```graphql +mutation { + appsCreateInstallationToken( + appId: "", + installationId: "" + ) { + access_token + token_type + expires_in + refresh_token + scope + authorization_details + id_token + } +} +``` diff --git a/examples/2.3.x/client-graphql/examples/apps/create-key.md b/examples/2.3.x/client-graphql/examples/apps/create-key.md new file mode 100644 index 000000000..07d925653 --- /dev/null +++ b/examples/2.3.x/client-graphql/examples/apps/create-key.md @@ -0,0 +1,17 @@ +```graphql +mutation { + appsCreateKey( + appId: "" + ) { + _id + _createdAt + _updatedAt + appId + secret + hint + createdById + createdByName + lastAccessedAt + } +} +``` diff --git a/examples/2.3.x/client-graphql/examples/apps/create-secret.md b/examples/2.3.x/client-graphql/examples/apps/create-secret.md new file mode 100644 index 000000000..8c1294f4a --- /dev/null +++ b/examples/2.3.x/client-graphql/examples/apps/create-secret.md @@ -0,0 +1,17 @@ +```graphql +mutation { + appsCreateSecret( + appId: "" + ) { + _id + _createdAt + _updatedAt + appId + secret + hint + createdById + createdByName + lastAccessedAt + } +} +``` diff --git a/examples/2.3.x/client-graphql/examples/apps/create.md b/examples/2.3.x/client-graphql/examples/apps/create.md new file mode 100644 index 000000000..79441525c --- /dev/null +++ b/examples/2.3.x/client-graphql/examples/apps/create.md @@ -0,0 +1,62 @@ +```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 + } + } +} +``` diff --git a/examples/2.3.x/client-graphql/examples/apps/delete-installation.md b/examples/2.3.x/client-graphql/examples/apps/delete-installation.md new file mode 100644 index 000000000..451708bf4 --- /dev/null +++ b/examples/2.3.x/client-graphql/examples/apps/delete-installation.md @@ -0,0 +1,10 @@ +```graphql +mutation { + appsDeleteInstallation( + appId: "", + installationId: "" + ) { + status + } +} +``` diff --git a/examples/2.3.x/client-graphql/examples/apps/delete-key.md b/examples/2.3.x/client-graphql/examples/apps/delete-key.md new file mode 100644 index 000000000..81dcc6383 --- /dev/null +++ b/examples/2.3.x/client-graphql/examples/apps/delete-key.md @@ -0,0 +1,10 @@ +```graphql +mutation { + appsDeleteKey( + appId: "", + keyId: "" + ) { + status + } +} +``` diff --git a/examples/2.3.x/client-graphql/examples/apps/delete-secret.md b/examples/2.3.x/client-graphql/examples/apps/delete-secret.md new file mode 100644 index 000000000..05f82edcf --- /dev/null +++ b/examples/2.3.x/client-graphql/examples/apps/delete-secret.md @@ -0,0 +1,10 @@ +```graphql +mutation { + appsDeleteSecret( + appId: "", + secretId: "" + ) { + status + } +} +``` diff --git a/examples/2.3.x/client-graphql/examples/apps/delete-tokens.md b/examples/2.3.x/client-graphql/examples/apps/delete-tokens.md new file mode 100644 index 000000000..a6dd21b78 --- /dev/null +++ b/examples/2.3.x/client-graphql/examples/apps/delete-tokens.md @@ -0,0 +1,9 @@ +```graphql +mutation { + appsDeleteTokens( + appId: "" + ) { + status + } +} +``` diff --git a/examples/2.3.x/client-graphql/examples/apps/delete.md b/examples/2.3.x/client-graphql/examples/apps/delete.md new file mode 100644 index 000000000..e9989153b --- /dev/null +++ b/examples/2.3.x/client-graphql/examples/apps/delete.md @@ -0,0 +1,9 @@ +```graphql +mutation { + appsDelete( + appId: "" + ) { + status + } +} +``` diff --git a/examples/2.3.x/client-graphql/examples/apps/get-installation.md b/examples/2.3.x/client-graphql/examples/apps/get-installation.md new file mode 100644 index 000000000..1ef5ca9b5 --- /dev/null +++ b/examples/2.3.x/client-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/2.3.x/client-graphql/examples/apps/get-key.md b/examples/2.3.x/client-graphql/examples/apps/get-key.md new file mode 100644 index 000000000..36435f09c --- /dev/null +++ b/examples/2.3.x/client-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/2.3.x/client-graphql/examples/apps/get-secret.md b/examples/2.3.x/client-graphql/examples/apps/get-secret.md new file mode 100644 index 000000000..c389a15cc --- /dev/null +++ b/examples/2.3.x/client-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/2.3.x/client-graphql/examples/apps/get.md b/examples/2.3.x/client-graphql/examples/apps/get.md new file mode 100644 index 000000000..21d2bc950 --- /dev/null +++ b/examples/2.3.x/client-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/2.3.x/client-graphql/examples/apps/list-installation-scopes.md b/examples/2.3.x/client-graphql/examples/apps/list-installation-scopes.md new file mode 100644 index 000000000..453eff637 --- /dev/null +++ b/examples/2.3.x/client-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/2.3.x/client-graphql/examples/apps/list-installations.md b/examples/2.3.x/client-graphql/examples/apps/list-installations.md new file mode 100644 index 000000000..cf47dd81f --- /dev/null +++ b/examples/2.3.x/client-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/2.3.x/client-graphql/examples/apps/list-keys.md b/examples/2.3.x/client-graphql/examples/apps/list-keys.md new file mode 100644 index 000000000..0aa5dd759 --- /dev/null +++ b/examples/2.3.x/client-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/2.3.x/client-graphql/examples/apps/list-o-auth-2-scopes.md b/examples/2.3.x/client-graphql/examples/apps/list-o-auth-2-scopes.md new file mode 100644 index 000000000..bce864f54 --- /dev/null +++ b/examples/2.3.x/client-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/2.3.x/client-graphql/examples/apps/list-secrets.md b/examples/2.3.x/client-graphql/examples/apps/list-secrets.md new file mode 100644 index 000000000..c14c63a89 --- /dev/null +++ b/examples/2.3.x/client-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/2.3.x/client-graphql/examples/apps/list.md b/examples/2.3.x/client-graphql/examples/apps/list.md new file mode 100644 index 000000000..2b6087049 --- /dev/null +++ b/examples/2.3.x/client-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/2.3.x/client-graphql/examples/apps/update-team.md b/examples/2.3.x/client-graphql/examples/apps/update-team.md new file mode 100644 index 000000000..80f53a055 --- /dev/null +++ b/examples/2.3.x/client-graphql/examples/apps/update-team.md @@ -0,0 +1,45 @@ +```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 + } + } +} +``` diff --git a/examples/2.3.x/client-graphql/examples/apps/update.md b/examples/2.3.x/client-graphql/examples/apps/update.md new file mode 100644 index 000000000..94031890b --- /dev/null +++ b/examples/2.3.x/client-graphql/examples/apps/update.md @@ -0,0 +1,63 @@ +```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 + } + } +} +``` diff --git a/examples/2.3.x/client-graphql/examples/avatars/delete-photo.md b/examples/2.3.x/client-graphql/examples/avatars/delete-photo.md new file mode 100644 index 000000000..6c7d6afef --- /dev/null +++ b/examples/2.3.x/client-graphql/examples/avatars/delete-photo.md @@ -0,0 +1,7 @@ +```graphql +mutation { + avatarsDeletePhoto { + status + } +} +``` diff --git a/examples/2.3.x/client-graphql/examples/avatars/get-screenshot.md b/examples/2.3.x/client-graphql/examples/avatars/get-screenshot.md index f5cab660c..2b6612c38 100644 --- a/examples/2.3.x/client-graphql/examples/avatars/get-screenshot.md +++ b/examples/2.3.x/client-graphql/examples/avatars/get-screenshot.md @@ -2,7 +2,7 @@ query { avatarsGetScreenshot( url: "https://example.com", - headers: "{\"Authorization\":\"Bearer token123\",\"X-Custom-Header\":\"value\"}", + headers: "{\"Accept-Language\":\"en-US,en;q=0.9\"}", viewportWidth: 1920, viewportHeight: 1080, scale: 2, diff --git a/examples/2.3.x/client-graphql/examples/avatars/update-photo.md b/examples/2.3.x/client-graphql/examples/avatars/update-photo.md new file mode 100644 index 000000000..de86d4034 --- /dev/null +++ b/examples/2.3.x/client-graphql/examples/avatars/update-photo.md @@ -0,0 +1,26 @@ +```graphql +PUT /v1/avatars/photo HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: multipart/form-data; boundary="cec8e8123c05ba25" +Accept: application/json +X-Appwrite-Response-Format: 2.3.0 +X-Appwrite-Project: +Content-Length: *Length of your entity body in bytes* + +--cec8e8123c05ba25 +Content-Disposition: form-data; name="operations" + +{ "query": "mutation { avatarsUpdatePhoto(file: $file) { id }" }, "variables": { "file": null } } + +--cec8e8123c05ba25 +Content-Disposition: form-data; name="map" + +{ "0": ["variables.file"] } + +--cec8e8123c05ba25 +Content-Disposition: form-data; name="0"; filename="file.ext" + +File contents + +--cec8e8123c05ba25-- +``` diff --git a/examples/2.3.x/client-graphql/examples/databases/list-transactions.md b/examples/2.3.x/client-graphql/examples/databases/list-transactions.md index 2fc18db35..093d901bf 100644 --- a/examples/2.3.x/client-graphql/examples/databases/list-transactions.md +++ b/examples/2.3.x/client-graphql/examples/databases/list-transactions.md @@ -1,7 +1,8 @@ ```graphql query { databasesListTransactions( - queries: [] + queries: [], + total: false ) { total transactions { diff --git a/examples/2.3.x/client-graphql/examples/documentsdb/create-documents.md b/examples/2.3.x/client-graphql/examples/documentsdb/create-documents.md index 211576113..aa16ec584 100644 --- a/examples/2.3.x/client-graphql/examples/documentsdb/create-documents.md +++ b/examples/2.3.x/client-graphql/examples/documentsdb/create-documents.md @@ -3,7 +3,16 @@ mutation { documentsDBCreateDocuments( databaseId: "", collectionId: "", - documents: [], + documents: [ + { + "$id": "example1", + "username": "walter.obrien", + "email": "walter.obrien@example.com", + "fullName": "Walter O'Brien", + "age": 30, + "isAdmin": false + } + ], transactionId: "" ) { total diff --git a/examples/2.3.x/client-graphql/examples/documentsdb/list-transactions.md b/examples/2.3.x/client-graphql/examples/documentsdb/list-transactions.md index 2569dde05..231b6ef78 100644 --- a/examples/2.3.x/client-graphql/examples/documentsdb/list-transactions.md +++ b/examples/2.3.x/client-graphql/examples/documentsdb/list-transactions.md @@ -1,7 +1,8 @@ ```graphql query { documentsDBListTransactions( - queries: [] + queries: [], + total: false ) { total transactions { diff --git a/examples/2.3.x/client-graphql/examples/locale/list-codes.md b/examples/2.3.x/client-graphql/examples/locale/list-codes.md index 0e3967246..a644a58f0 100644 --- a/examples/2.3.x/client-graphql/examples/locale/list-codes.md +++ b/examples/2.3.x/client-graphql/examples/locale/list-codes.md @@ -1,6 +1,8 @@ ```graphql query { - localeListCodes { + localeListCodes( + total: false + ) { total localeCodes { code diff --git a/examples/2.3.x/client-graphql/examples/locale/list-continents.md b/examples/2.3.x/client-graphql/examples/locale/list-continents.md index 16ad0fd94..36fe38f20 100644 --- a/examples/2.3.x/client-graphql/examples/locale/list-continents.md +++ b/examples/2.3.x/client-graphql/examples/locale/list-continents.md @@ -1,6 +1,8 @@ ```graphql query { - localeListContinents { + localeListContinents( + total: false + ) { total continents { name diff --git a/examples/2.3.x/client-graphql/examples/locale/list-countries-eu.md b/examples/2.3.x/client-graphql/examples/locale/list-countries-eu.md index 293d32c9c..fc9bf2538 100644 --- a/examples/2.3.x/client-graphql/examples/locale/list-countries-eu.md +++ b/examples/2.3.x/client-graphql/examples/locale/list-countries-eu.md @@ -1,6 +1,8 @@ ```graphql query { - localeListCountriesEU { + localeListCountriesEU( + total: false + ) { total countries { name diff --git a/examples/2.3.x/client-graphql/examples/locale/list-countries-phones.md b/examples/2.3.x/client-graphql/examples/locale/list-countries-phones.md index b17b065e3..d298bfc99 100644 --- a/examples/2.3.x/client-graphql/examples/locale/list-countries-phones.md +++ b/examples/2.3.x/client-graphql/examples/locale/list-countries-phones.md @@ -1,6 +1,8 @@ ```graphql query { - localeListCountriesPhones { + localeListCountriesPhones( + total: false + ) { total phones { code diff --git a/examples/2.3.x/client-graphql/examples/locale/list-countries.md b/examples/2.3.x/client-graphql/examples/locale/list-countries.md index 15f566af0..2e8a3e95e 100644 --- a/examples/2.3.x/client-graphql/examples/locale/list-countries.md +++ b/examples/2.3.x/client-graphql/examples/locale/list-countries.md @@ -1,6 +1,8 @@ ```graphql query { - localeListCountries { + localeListCountries( + total: false + ) { total countries { name diff --git a/examples/2.3.x/client-graphql/examples/locale/list-currencies.md b/examples/2.3.x/client-graphql/examples/locale/list-currencies.md index 374d67126..cdc8bf320 100644 --- a/examples/2.3.x/client-graphql/examples/locale/list-currencies.md +++ b/examples/2.3.x/client-graphql/examples/locale/list-currencies.md @@ -1,6 +1,8 @@ ```graphql query { - localeListCurrencies { + localeListCurrencies( + total: false + ) { total currencies { symbol diff --git a/examples/2.3.x/client-graphql/examples/locale/list-languages.md b/examples/2.3.x/client-graphql/examples/locale/list-languages.md index ed108f5a4..bf61dfd7c 100644 --- a/examples/2.3.x/client-graphql/examples/locale/list-languages.md +++ b/examples/2.3.x/client-graphql/examples/locale/list-languages.md @@ -1,6 +1,8 @@ ```graphql query { - localeListLanguages { + localeListLanguages( + total: false + ) { total languages { name diff --git a/examples/2.3.x/client-graphql/examples/oauth2/approve.md b/examples/2.3.x/client-graphql/examples/oauth2/approve.md new file mode 100644 index 000000000..9441d5a4c --- /dev/null +++ b/examples/2.3.x/client-graphql/examples/oauth2/approve.md @@ -0,0 +1,11 @@ +```graphql +mutation { + oauth2Approve( + grantId: "", + authorizationDetails: "", + scope: "" + ) { + redirectUrl + } +} +``` diff --git a/examples/2.3.x/client-graphql/examples/oauth2/authorize-post.md b/examples/2.3.x/client-graphql/examples/oauth2/authorize-post.md new file mode 100644 index 000000000..ec6d490ae --- /dev/null +++ b/examples/2.3.x/client-graphql/examples/oauth2/authorize-post.md @@ -0,0 +1,23 @@ +```graphql +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/2.3.x/client-graphql/examples/oauth2/authorize.md b/examples/2.3.x/client-graphql/examples/oauth2/authorize.md new file mode 100644 index 000000000..f6e74d435 --- /dev/null +++ b/examples/2.3.x/client-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/2.3.x/client-graphql/examples/oauth2/create-device-authorization.md b/examples/2.3.x/client-graphql/examples/oauth2/create-device-authorization.md new file mode 100644 index 000000000..dddd74a5f --- /dev/null +++ b/examples/2.3.x/client-graphql/examples/oauth2/create-device-authorization.md @@ -0,0 +1,18 @@ +```graphql +mutation { + oauth2CreateDeviceAuthorization( + clientId: "", + scope: "", + authorizationDetails: "", + resource: "", + audience: "" + ) { + device_code + user_code + verification_uri + verification_uri_complete + expires_in + interval + } +} +``` diff --git a/examples/2.3.x/client-graphql/examples/oauth2/create-grant.md b/examples/2.3.x/client-graphql/examples/oauth2/create-grant.md new file mode 100644 index 000000000..da3978290 --- /dev/null +++ b/examples/2.3.x/client-graphql/examples/oauth2/create-grant.md @@ -0,0 +1,20 @@ +```graphql +mutation { + oauth2CreateGrant( + userCode: "" + ) { + _id + _createdAt + _updatedAt + userId + appId + scopes + resources + authorizationDetails + prompt + redirectUri + authTime + expire + } +} +``` diff --git a/examples/2.3.x/client-graphql/examples/oauth2/create-par.md b/examples/2.3.x/client-graphql/examples/oauth2/create-par.md new file mode 100644 index 000000000..7b360967c --- /dev/null +++ b/examples/2.3.x/client-graphql/examples/oauth2/create-par.md @@ -0,0 +1,22 @@ +```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 + } +} +``` diff --git a/examples/2.3.x/client-graphql/examples/oauth2/create-token.md b/examples/2.3.x/client-graphql/examples/oauth2/create-token.md new file mode 100644 index 000000000..24f812bae --- /dev/null +++ b/examples/2.3.x/client-graphql/examples/oauth2/create-token.md @@ -0,0 +1,24 @@ +```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 + } +} +``` diff --git a/examples/2.3.x/client-graphql/examples/oauth2/get-grant.md b/examples/2.3.x/client-graphql/examples/oauth2/get-grant.md new file mode 100644 index 000000000..e21ef4338 --- /dev/null +++ b/examples/2.3.x/client-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/2.3.x/client-graphql/examples/oauth2/list-organizations.md b/examples/2.3.x/client-graphql/examples/oauth2/list-organizations.md new file mode 100644 index 000000000..c36f1d741 --- /dev/null +++ b/examples/2.3.x/client-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/2.3.x/client-graphql/examples/oauth2/list-projects.md b/examples/2.3.x/client-graphql/examples/oauth2/list-projects.md new file mode 100644 index 000000000..a5073fc1a --- /dev/null +++ b/examples/2.3.x/client-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/2.3.x/client-graphql/examples/oauth2/logout-post.md b/examples/2.3.x/client-graphql/examples/oauth2/logout-post.md new file mode 100644 index 000000000..49385327f --- /dev/null +++ b/examples/2.3.x/client-graphql/examples/oauth2/logout-post.md @@ -0,0 +1,14 @@ +```graphql +mutation { + oauth2LogoutPost( + idTokenHint: "", + logoutHint: "", + clientId: "", + postLogoutRedirectUri: "https://example.com", + state: "", + uiLocales: "" + ) { + status + } +} +``` diff --git a/examples/2.3.x/client-graphql/examples/oauth2/logout.md b/examples/2.3.x/client-graphql/examples/oauth2/logout.md new file mode 100644 index 000000000..0ac670ec6 --- /dev/null +++ b/examples/2.3.x/client-graphql/examples/oauth2/logout.md @@ -0,0 +1,14 @@ +```graphql +query { + oauth2Logout( + idTokenHint: "", + logoutHint: "", + clientId: "", + postLogoutRedirectUri: "https://example.com", + state: "", + uiLocales: "" + ) { + status + } +} +``` diff --git a/examples/2.3.x/client-graphql/examples/oauth2/reject.md b/examples/2.3.x/client-graphql/examples/oauth2/reject.md new file mode 100644 index 000000000..35ac07ca8 --- /dev/null +++ b/examples/2.3.x/client-graphql/examples/oauth2/reject.md @@ -0,0 +1,9 @@ +```graphql +mutation { + oauth2Reject( + grantId: "" + ) { + redirectUrl + } +} +``` diff --git a/examples/2.3.x/client-graphql/examples/oauth2/revoke.md b/examples/2.3.x/client-graphql/examples/oauth2/revoke.md new file mode 100644 index 000000000..06858fc0e --- /dev/null +++ b/examples/2.3.x/client-graphql/examples/oauth2/revoke.md @@ -0,0 +1,12 @@ +```graphql +mutation { + oauth2Revoke( + token: "", + tokenTypeHint: "access_token", + clientId: "", + clientSecret: "" + ) { + status + } +} +``` diff --git a/examples/2.3.x/client-graphql/examples/tablesdb/list-transactions.md b/examples/2.3.x/client-graphql/examples/tablesdb/list-transactions.md index bc3663bec..61d1d7a44 100644 --- a/examples/2.3.x/client-graphql/examples/tablesdb/list-transactions.md +++ b/examples/2.3.x/client-graphql/examples/tablesdb/list-transactions.md @@ -1,7 +1,8 @@ ```graphql query { tablesDBListTransactions( - queries: [] + queries: [], + total: false ) { total transactions { diff --git a/examples/2.3.x/client-graphql/examples/teams/create-membership.md b/examples/2.3.x/client-graphql/examples/teams/create-membership.md index 67b153ea1..223760490 100644 --- a/examples/2.3.x/client-graphql/examples/teams/create-membership.md +++ b/examples/2.3.x/client-graphql/examples/teams/create-membership.md @@ -2,7 +2,7 @@ mutation { teamsCreateMembership( teamId: "", - roles: [], + roles: ["editor"], email: "email@example.com", userId: "", phone: "+12065550100", diff --git a/examples/2.3.x/client-graphql/examples/teams/update-membership.md b/examples/2.3.x/client-graphql/examples/teams/update-membership.md index c08593729..d456b7239 100644 --- a/examples/2.3.x/client-graphql/examples/teams/update-membership.md +++ b/examples/2.3.x/client-graphql/examples/teams/update-membership.md @@ -3,7 +3,7 @@ mutation { teamsUpdateMembership( teamId: "", membershipId: "", - roles: [] + roles: ["editor"] ) { _id _createdAt diff --git a/examples/2.3.x/client-graphql/examples/vectorsdb/create-operations.md b/examples/2.3.x/client-graphql/examples/vectorsdb/create-operations.md index b1d86d55b..b9fc3fc7f 100644 --- a/examples/2.3.x/client-graphql/examples/vectorsdb/create-operations.md +++ b/examples/2.3.x/client-graphql/examples/vectorsdb/create-operations.md @@ -9,7 +9,15 @@ mutation { "collectionId": "", "documentId": "", "data": { - "name": "Walter O'Brien" + "embeddings": [ + 0.12, + -0.55, + 0.88, + 1.02 + ], + "metadata": { + "name": "First document" + } } } ] diff --git a/examples/2.3.x/client-graphql/examples/vectorsdb/list-transactions.md b/examples/2.3.x/client-graphql/examples/vectorsdb/list-transactions.md index 1f2ea4aa4..307764ec2 100644 --- a/examples/2.3.x/client-graphql/examples/vectorsdb/list-transactions.md +++ b/examples/2.3.x/client-graphql/examples/vectorsdb/list-transactions.md @@ -1,7 +1,8 @@ ```graphql query { vectorsDBListTransactions( - queries: [] + queries: [], + total: false ) { total transactions { diff --git a/examples/2.3.x/client-react-native/examples/account/create-email-password-session.md b/examples/2.3.x/client-react-native/examples/account/create-email-password-session.md index e38beaf79..f52da4676 100644 --- a/examples/2.3.x/client-react-native/examples/account/create-email-password-session.md +++ b/examples/2.3.x/client-react-native/examples/account/create-email-password-session.md @@ -10,6 +10,7 @@ const account = new Account(client); const result = await account.createEmailPasswordSession({ email: 'email@example.com', password: 'password', + duration: 60, // optional }); console.log(result); diff --git a/examples/2.3.x/client-react-native/examples/account/delete-sessions.md b/examples/2.3.x/client-react-native/examples/account/delete-sessions.md index 0f1bc281c..600450538 100644 --- a/examples/2.3.x/client-react-native/examples/account/delete-sessions.md +++ b/examples/2.3.x/client-react-native/examples/account/delete-sessions.md @@ -7,7 +7,9 @@ const client = new Client() const account = new Account(client); -const result = await account.deleteSessions(); +const result = await account.deleteSessions({ + current: false, // optional +}); console.log(result); ``` diff --git a/examples/2.3.x/client-react-native/examples/account/list-sessions.md b/examples/2.3.x/client-react-native/examples/account/list-sessions.md index c8acda4d4..ddf9c1338 100644 --- a/examples/2.3.x/client-react-native/examples/account/list-sessions.md +++ b/examples/2.3.x/client-react-native/examples/account/list-sessions.md @@ -7,7 +7,9 @@ const client = new Client() const account = new Account(client); -const result = await account.listSessions(); +const result = await account.listSessions({ + total: false, // optional +}); console.log(result); ``` diff --git a/examples/2.3.x/client-react-native/examples/analytics/create-event.md b/examples/2.3.x/client-react-native/examples/analytics/create-event.md new file mode 100644 index 000000000..3223f3a37 --- /dev/null +++ b/examples/2.3.x/client-react-native/examples/analytics/create-event.md @@ -0,0 +1,27 @@ +```javascript +import { Client, Analytics } from 'react-native-appwrite'; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const analytics = new Analytics(client); + +const result = await analytics.createEvent({ + propertyId: '', + name: '', + url: 'https://example.com', + domain: '', // optional + referrer: '', // optional + screenWidth: null, // optional + sessionHash: '', // optional + scrollDepth: 0, // optional + engagementTime: null, // optional + props: [], // optional + userId: '', // optional + ip: '', // optional + userAgent: '', // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/client-react-native/examples/apps/create-installation-token.md b/examples/2.3.x/client-react-native/examples/apps/create-installation-token.md new file mode 100644 index 000000000..ff84fa289 --- /dev/null +++ b/examples/2.3.x/client-react-native/examples/apps/create-installation-token.md @@ -0,0 +1,16 @@ +```javascript +import { Client, Apps } from 'react-native-appwrite'; + +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.createInstallationToken({ + appId: '', + installationId: '', +}); + +console.log(result); +``` diff --git a/examples/2.3.x/client-react-native/examples/apps/create-key.md b/examples/2.3.x/client-react-native/examples/apps/create-key.md new file mode 100644 index 000000000..c36c46962 --- /dev/null +++ b/examples/2.3.x/client-react-native/examples/apps/create-key.md @@ -0,0 +1,15 @@ +```javascript +import { Client, Apps } from 'react-native-appwrite'; + +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/2.3.x/client-react-native/examples/apps/create-secret.md b/examples/2.3.x/client-react-native/examples/apps/create-secret.md new file mode 100644 index 000000000..d994b74f6 --- /dev/null +++ b/examples/2.3.x/client-react-native/examples/apps/create-secret.md @@ -0,0 +1,15 @@ +```javascript +import { Client, Apps } from 'react-native-appwrite'; + +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.createSecret({ + appId: '', +}); + +console.log(result); +``` diff --git a/examples/2.3.x/client-react-native/examples/apps/create.md b/examples/2.3.x/client-react-native/examples/apps/create.md new file mode 100644 index 000000000..f472d8469 --- /dev/null +++ b/examples/2.3.x/client-react-native/examples/apps/create.md @@ -0,0 +1,33 @@ +```javascript +import { Client, Apps } from 'react-native-appwrite'; + +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.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 +}); + +console.log(result); +``` diff --git a/examples/2.3.x/client-react-native/examples/apps/delete-installation.md b/examples/2.3.x/client-react-native/examples/apps/delete-installation.md new file mode 100644 index 000000000..f8cfa235c --- /dev/null +++ b/examples/2.3.x/client-react-native/examples/apps/delete-installation.md @@ -0,0 +1,16 @@ +```javascript +import { Client, Apps } from 'react-native-appwrite'; + +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.deleteInstallation({ + appId: '', + installationId: '', +}); + +console.log(result); +``` diff --git a/examples/2.3.x/client-react-native/examples/apps/delete-key.md b/examples/2.3.x/client-react-native/examples/apps/delete-key.md new file mode 100644 index 000000000..a7c8b88aa --- /dev/null +++ b/examples/2.3.x/client-react-native/examples/apps/delete-key.md @@ -0,0 +1,16 @@ +```javascript +import { Client, Apps } from 'react-native-appwrite'; + +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/2.3.x/client-react-native/examples/apps/delete-secret.md b/examples/2.3.x/client-react-native/examples/apps/delete-secret.md new file mode 100644 index 000000000..fe82ce48f --- /dev/null +++ b/examples/2.3.x/client-react-native/examples/apps/delete-secret.md @@ -0,0 +1,16 @@ +```javascript +import { Client, Apps } from 'react-native-appwrite'; + +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.deleteSecret({ + appId: '', + secretId: '', +}); + +console.log(result); +``` diff --git a/examples/2.3.x/client-react-native/examples/apps/delete-tokens.md b/examples/2.3.x/client-react-native/examples/apps/delete-tokens.md new file mode 100644 index 000000000..06386ae14 --- /dev/null +++ b/examples/2.3.x/client-react-native/examples/apps/delete-tokens.md @@ -0,0 +1,15 @@ +```javascript +import { Client, Apps } from 'react-native-appwrite'; + +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.deleteTokens({ + appId: '', +}); + +console.log(result); +``` diff --git a/examples/2.3.x/client-react-native/examples/apps/delete.md b/examples/2.3.x/client-react-native/examples/apps/delete.md new file mode 100644 index 000000000..ef20501ce --- /dev/null +++ b/examples/2.3.x/client-react-native/examples/apps/delete.md @@ -0,0 +1,15 @@ +```javascript +import { Client, Apps } from 'react-native-appwrite'; + +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.delete({ + appId: '', +}); + +console.log(result); +``` diff --git a/examples/2.3.x/client-react-native/examples/apps/get-installation.md b/examples/2.3.x/client-react-native/examples/apps/get-installation.md new file mode 100644 index 000000000..627a02a17 --- /dev/null +++ b/examples/2.3.x/client-react-native/examples/apps/get-installation.md @@ -0,0 +1,16 @@ +```javascript +import { Client, Apps } from 'react-native-appwrite'; + +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.getInstallation({ + appId: '', + installationId: '', +}); + +console.log(result); +``` diff --git a/examples/2.3.x/client-react-native/examples/apps/get-key.md b/examples/2.3.x/client-react-native/examples/apps/get-key.md new file mode 100644 index 000000000..8123a4591 --- /dev/null +++ b/examples/2.3.x/client-react-native/examples/apps/get-key.md @@ -0,0 +1,16 @@ +```javascript +import { Client, Apps } from 'react-native-appwrite'; + +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/2.3.x/client-react-native/examples/apps/get-secret.md b/examples/2.3.x/client-react-native/examples/apps/get-secret.md new file mode 100644 index 000000000..aae0a5a75 --- /dev/null +++ b/examples/2.3.x/client-react-native/examples/apps/get-secret.md @@ -0,0 +1,16 @@ +```javascript +import { Client, Apps } from 'react-native-appwrite'; + +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.getSecret({ + appId: '', + secretId: '', +}); + +console.log(result); +``` diff --git a/examples/2.3.x/client-react-native/examples/apps/get.md b/examples/2.3.x/client-react-native/examples/apps/get.md new file mode 100644 index 000000000..80507f038 --- /dev/null +++ b/examples/2.3.x/client-react-native/examples/apps/get.md @@ -0,0 +1,15 @@ +```javascript +import { Client, Apps } from 'react-native-appwrite'; + +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.get({ + appId: '', +}); + +console.log(result); +``` diff --git a/examples/2.3.x/client-react-native/examples/apps/list-installation-scopes.md b/examples/2.3.x/client-react-native/examples/apps/list-installation-scopes.md new file mode 100644 index 000000000..4fa19c6e2 --- /dev/null +++ b/examples/2.3.x/client-react-native/examples/apps/list-installation-scopes.md @@ -0,0 +1,13 @@ +```javascript +import { Client, Apps } from 'react-native-appwrite'; + +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/2.3.x/client-react-native/examples/apps/list-installations.md b/examples/2.3.x/client-react-native/examples/apps/list-installations.md new file mode 100644 index 000000000..9d58a9fcf --- /dev/null +++ b/examples/2.3.x/client-react-native/examples/apps/list-installations.md @@ -0,0 +1,17 @@ +```javascript +import { Client, Apps } from 'react-native-appwrite'; + +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.listInstallations({ + appId: '', + queries: [], // optional + total: false, // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/client-react-native/examples/apps/list-keys.md b/examples/2.3.x/client-react-native/examples/apps/list-keys.md new file mode 100644 index 000000000..19d28553c --- /dev/null +++ b/examples/2.3.x/client-react-native/examples/apps/list-keys.md @@ -0,0 +1,17 @@ +```javascript +import { Client, Apps } from 'react-native-appwrite'; + +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/2.3.x/client-react-native/examples/apps/list-o-auth-2-scopes.md b/examples/2.3.x/client-react-native/examples/apps/list-o-auth-2-scopes.md new file mode 100644 index 000000000..2c0ddac33 --- /dev/null +++ b/examples/2.3.x/client-react-native/examples/apps/list-o-auth-2-scopes.md @@ -0,0 +1,13 @@ +```javascript +import { Client, Apps } from 'react-native-appwrite'; + +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.listOAuth2Scopes(); + +console.log(result); +``` diff --git a/examples/2.3.x/client-react-native/examples/apps/list-secrets.md b/examples/2.3.x/client-react-native/examples/apps/list-secrets.md new file mode 100644 index 000000000..f67bedbd8 --- /dev/null +++ b/examples/2.3.x/client-react-native/examples/apps/list-secrets.md @@ -0,0 +1,17 @@ +```javascript +import { Client, Apps } from 'react-native-appwrite'; + +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.listSecrets({ + appId: '', + queries: [], // optional + total: false, // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/client-react-native/examples/apps/list.md b/examples/2.3.x/client-react-native/examples/apps/list.md new file mode 100644 index 000000000..c0691b595 --- /dev/null +++ b/examples/2.3.x/client-react-native/examples/apps/list.md @@ -0,0 +1,16 @@ +```javascript +import { Client, Apps } from 'react-native-appwrite'; + +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.list({ + queries: [], // optional + total: false, // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/client-react-native/examples/apps/update-team.md b/examples/2.3.x/client-react-native/examples/apps/update-team.md new file mode 100644 index 000000000..6073a2f2f --- /dev/null +++ b/examples/2.3.x/client-react-native/examples/apps/update-team.md @@ -0,0 +1,16 @@ +```javascript +import { Client, Apps } from 'react-native-appwrite'; + +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.updateTeam({ + appId: '', + teamId: '', +}); + +console.log(result); +``` diff --git a/examples/2.3.x/client-react-native/examples/apps/update.md b/examples/2.3.x/client-react-native/examples/apps/update.md new file mode 100644 index 000000000..38666ce7c --- /dev/null +++ b/examples/2.3.x/client-react-native/examples/apps/update.md @@ -0,0 +1,34 @@ +```javascript +import { Client, Apps } from 'react-native-appwrite'; + +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.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 +}); + +console.log(result); +``` diff --git a/examples/2.3.x/client-react-native/examples/avatars/delete-photo.md b/examples/2.3.x/client-react-native/examples/avatars/delete-photo.md new file mode 100644 index 000000000..a0120a62c --- /dev/null +++ b/examples/2.3.x/client-react-native/examples/avatars/delete-photo.md @@ -0,0 +1,13 @@ +```javascript +import { Client, Avatars } from 'react-native-appwrite'; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const avatars = new Avatars(client); + +const result = await avatars.deletePhoto(); + +console.log(result); +``` diff --git a/examples/2.3.x/client-react-native/examples/avatars/get-screenshot.md b/examples/2.3.x/client-react-native/examples/avatars/get-screenshot.md index 4e0402bc8..c42066a72 100644 --- a/examples/2.3.x/client-react-native/examples/avatars/get-screenshot.md +++ b/examples/2.3.x/client-react-native/examples/avatars/get-screenshot.md @@ -17,8 +17,7 @@ const avatars = new Avatars(client); const result = avatars.getScreenshot({ url: 'https://example.com', headers: { - Authorization: 'Bearer token123', - 'X-Custom-Header': 'value', + 'Accept-Language': 'en-US,en;q=0.9', }, // optional viewportWidth: 1920, // optional viewportHeight: 1080, // optional diff --git a/examples/2.3.x/client-react-native/examples/avatars/update-photo.md b/examples/2.3.x/client-react-native/examples/avatars/update-photo.md new file mode 100644 index 000000000..052042002 --- /dev/null +++ b/examples/2.3.x/client-react-native/examples/avatars/update-photo.md @@ -0,0 +1,20 @@ +```javascript +import { Client, Avatars } from 'react-native-appwrite'; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const avatars = new Avatars(client); + +const result = await avatars.updatePhoto({ + file: { + name: 'image.png', + type: 'image/png', + size: 1024, + uri: 'file:///path/to/image.png', + }, +}); + +console.log(result); +``` diff --git a/examples/2.3.x/client-react-native/examples/databases/list-transactions.md b/examples/2.3.x/client-react-native/examples/databases/list-transactions.md index 051ea0f3a..bc62da267 100644 --- a/examples/2.3.x/client-react-native/examples/databases/list-transactions.md +++ b/examples/2.3.x/client-react-native/examples/databases/list-transactions.md @@ -9,6 +9,7 @@ const databases = new Databases(client); const result = await databases.listTransactions({ queries: [], // optional + total: false, // optional }); console.log(result); diff --git a/examples/2.3.x/client-react-native/examples/documentsdb/create-documents.md b/examples/2.3.x/client-react-native/examples/documentsdb/create-documents.md index 891757c68..dc0cb5314 100644 --- a/examples/2.3.x/client-react-native/examples/documentsdb/create-documents.md +++ b/examples/2.3.x/client-react-native/examples/documentsdb/create-documents.md @@ -10,7 +10,16 @@ const documentsDB = new DocumentsDB(client); const result = await documentsDB.createDocuments({ databaseId: '', collectionId: '', - documents: [], + documents: [ + { + $id: 'example1', + username: 'walter.obrien', + email: 'walter.obrien@example.com', + fullName: "Walter O'Brien", + age: 30, + isAdmin: false, + }, + ], transactionId: '', // optional }); diff --git a/examples/2.3.x/client-react-native/examples/documentsdb/list-transactions.md b/examples/2.3.x/client-react-native/examples/documentsdb/list-transactions.md index 24c8dbdb1..d4a8c4ea1 100644 --- a/examples/2.3.x/client-react-native/examples/documentsdb/list-transactions.md +++ b/examples/2.3.x/client-react-native/examples/documentsdb/list-transactions.md @@ -9,6 +9,7 @@ const documentsDB = new DocumentsDB(client); const result = await documentsDB.listTransactions({ queries: [], // optional + total: false, // optional }); console.log(result); diff --git a/examples/2.3.x/client-react-native/examples/graphql/mutation.md b/examples/2.3.x/client-react-native/examples/graphql/mutation.md index f5e673a2f..89c0cd426 100644 --- a/examples/2.3.x/client-react-native/examples/graphql/mutation.md +++ b/examples/2.3.x/client-react-native/examples/graphql/mutation.md @@ -8,7 +8,9 @@ const client = new Client() const graphql = new Graphql(client); const result = await graphql.mutation({ - query: {}, + query: { + query: 'mutation { accountUpdateName(name: "Walter") { name } }', + }, }); console.log(result); diff --git a/examples/2.3.x/client-react-native/examples/graphql/query.md b/examples/2.3.x/client-react-native/examples/graphql/query.md index c9640ebeb..872ebc0ab 100644 --- a/examples/2.3.x/client-react-native/examples/graphql/query.md +++ b/examples/2.3.x/client-react-native/examples/graphql/query.md @@ -8,7 +8,9 @@ const client = new Client() const graphql = new Graphql(client); const result = await graphql.query({ - query: {}, + query: { + query: 'query { localeGet { ip } }', + }, }); console.log(result); diff --git a/examples/2.3.x/client-react-native/examples/locale/list-codes.md b/examples/2.3.x/client-react-native/examples/locale/list-codes.md index f96a7ee39..7157d5d83 100644 --- a/examples/2.3.x/client-react-native/examples/locale/list-codes.md +++ b/examples/2.3.x/client-react-native/examples/locale/list-codes.md @@ -7,7 +7,9 @@ const client = new Client() const locale = new Locale(client); -const result = await locale.listCodes(); +const result = await locale.listCodes({ + total: false, // optional +}); console.log(result); ``` diff --git a/examples/2.3.x/client-react-native/examples/locale/list-continents.md b/examples/2.3.x/client-react-native/examples/locale/list-continents.md index 8973cfd4d..296b39d34 100644 --- a/examples/2.3.x/client-react-native/examples/locale/list-continents.md +++ b/examples/2.3.x/client-react-native/examples/locale/list-continents.md @@ -7,7 +7,9 @@ const client = new Client() const locale = new Locale(client); -const result = await locale.listContinents(); +const result = await locale.listContinents({ + total: false, // optional +}); console.log(result); ``` diff --git a/examples/2.3.x/client-react-native/examples/locale/list-countries-eu.md b/examples/2.3.x/client-react-native/examples/locale/list-countries-eu.md index f948ee69d..4667a26f8 100644 --- a/examples/2.3.x/client-react-native/examples/locale/list-countries-eu.md +++ b/examples/2.3.x/client-react-native/examples/locale/list-countries-eu.md @@ -7,7 +7,9 @@ const client = new Client() const locale = new Locale(client); -const result = await locale.listCountriesEU(); +const result = await locale.listCountriesEU({ + total: false, // optional +}); console.log(result); ``` diff --git a/examples/2.3.x/client-react-native/examples/locale/list-countries-phones.md b/examples/2.3.x/client-react-native/examples/locale/list-countries-phones.md index 7974d60ee..4f719b3e4 100644 --- a/examples/2.3.x/client-react-native/examples/locale/list-countries-phones.md +++ b/examples/2.3.x/client-react-native/examples/locale/list-countries-phones.md @@ -7,7 +7,9 @@ const client = new Client() const locale = new Locale(client); -const result = await locale.listCountriesPhones(); +const result = await locale.listCountriesPhones({ + total: false, // optional +}); console.log(result); ``` diff --git a/examples/2.3.x/client-react-native/examples/locale/list-countries.md b/examples/2.3.x/client-react-native/examples/locale/list-countries.md index b46bc615f..ef9ff5692 100644 --- a/examples/2.3.x/client-react-native/examples/locale/list-countries.md +++ b/examples/2.3.x/client-react-native/examples/locale/list-countries.md @@ -7,7 +7,9 @@ const client = new Client() const locale = new Locale(client); -const result = await locale.listCountries(); +const result = await locale.listCountries({ + total: false, // optional +}); console.log(result); ``` diff --git a/examples/2.3.x/client-react-native/examples/locale/list-currencies.md b/examples/2.3.x/client-react-native/examples/locale/list-currencies.md index 28498d9a5..f3db19f3c 100644 --- a/examples/2.3.x/client-react-native/examples/locale/list-currencies.md +++ b/examples/2.3.x/client-react-native/examples/locale/list-currencies.md @@ -7,7 +7,9 @@ const client = new Client() const locale = new Locale(client); -const result = await locale.listCurrencies(); +const result = await locale.listCurrencies({ + total: false, // optional +}); console.log(result); ``` diff --git a/examples/2.3.x/client-react-native/examples/locale/list-languages.md b/examples/2.3.x/client-react-native/examples/locale/list-languages.md index 835b04de2..beb495b01 100644 --- a/examples/2.3.x/client-react-native/examples/locale/list-languages.md +++ b/examples/2.3.x/client-react-native/examples/locale/list-languages.md @@ -7,7 +7,9 @@ const client = new Client() const locale = new Locale(client); -const result = await locale.listLanguages(); +const result = await locale.listLanguages({ + total: false, // optional +}); console.log(result); ``` diff --git a/examples/2.3.x/client-react-native/examples/oauth2/approve.md b/examples/2.3.x/client-react-native/examples/oauth2/approve.md new file mode 100644 index 000000000..73ebd7761 --- /dev/null +++ b/examples/2.3.x/client-react-native/examples/oauth2/approve.md @@ -0,0 +1,17 @@ +```javascript +import { Client, Oauth2 } from 'react-native-appwrite'; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const oauth2 = new Oauth2(client); + +const result = await oauth2.approve({ + grantId: '', + authorizationDetails: '', // optional + scope: '', // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/client-react-native/examples/oauth2/authorize-post.md b/examples/2.3.x/client-react-native/examples/oauth2/authorize-post.md new file mode 100644 index 000000000..e27aa7e3b --- /dev/null +++ b/examples/2.3.x/client-react-native/examples/oauth2/authorize-post.md @@ -0,0 +1,28 @@ +```javascript +import { Client, Oauth2 } from 'react-native-appwrite'; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const oauth2 = new 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 +}); + +console.log(result); +``` diff --git a/examples/2.3.x/client-react-native/examples/oauth2/authorize.md b/examples/2.3.x/client-react-native/examples/oauth2/authorize.md new file mode 100644 index 000000000..039dc744e --- /dev/null +++ b/examples/2.3.x/client-react-native/examples/oauth2/authorize.md @@ -0,0 +1,28 @@ +```javascript +import { Client, Oauth2 } from 'react-native-appwrite'; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const oauth2 = new 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 +}); + +console.log(result); +``` diff --git a/examples/2.3.x/client-react-native/examples/oauth2/create-device-authorization.md b/examples/2.3.x/client-react-native/examples/oauth2/create-device-authorization.md new file mode 100644 index 000000000..c136011b3 --- /dev/null +++ b/examples/2.3.x/client-react-native/examples/oauth2/create-device-authorization.md @@ -0,0 +1,19 @@ +```javascript +import { Client, Oauth2 } from 'react-native-appwrite'; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const oauth2 = new Oauth2(client); + +const result = await oauth2.createDeviceAuthorization({ + clientId: '', // optional + scope: '', // optional + authorizationDetails: '', // optional + resource: '', // optional + audience: '', // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/client-react-native/examples/oauth2/create-grant.md b/examples/2.3.x/client-react-native/examples/oauth2/create-grant.md new file mode 100644 index 000000000..2e5e30026 --- /dev/null +++ b/examples/2.3.x/client-react-native/examples/oauth2/create-grant.md @@ -0,0 +1,15 @@ +```javascript +import { Client, Oauth2 } from 'react-native-appwrite'; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const oauth2 = new Oauth2(client); + +const result = await oauth2.createGrant({ + userCode: '', +}); + +console.log(result); +``` diff --git a/examples/2.3.x/client-react-native/examples/oauth2/create-par.md b/examples/2.3.x/client-react-native/examples/oauth2/create-par.md new file mode 100644 index 000000000..5d9b57830 --- /dev/null +++ b/examples/2.3.x/client-react-native/examples/oauth2/create-par.md @@ -0,0 +1,27 @@ +```javascript +import { Client, Oauth2 } from 'react-native-appwrite'; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const oauth2 = new 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 +}); + +console.log(result); +``` diff --git a/examples/2.3.x/client-react-native/examples/oauth2/create-token.md b/examples/2.3.x/client-react-native/examples/oauth2/create-token.md new file mode 100644 index 000000000..3be9ff4a6 --- /dev/null +++ b/examples/2.3.x/client-react-native/examples/oauth2/create-token.md @@ -0,0 +1,24 @@ +```javascript +import { Client, Oauth2 } from 'react-native-appwrite'; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const oauth2 = new 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 +}); + +console.log(result); +``` diff --git a/examples/2.3.x/client-react-native/examples/oauth2/get-grant.md b/examples/2.3.x/client-react-native/examples/oauth2/get-grant.md new file mode 100644 index 000000000..e2851e77c --- /dev/null +++ b/examples/2.3.x/client-react-native/examples/oauth2/get-grant.md @@ -0,0 +1,15 @@ +```javascript +import { Client, Oauth2 } from 'react-native-appwrite'; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const oauth2 = new Oauth2(client); + +const result = await oauth2.getGrant({ + grantId: '', +}); + +console.log(result); +``` diff --git a/examples/2.3.x/client-react-native/examples/oauth2/list-organizations.md b/examples/2.3.x/client-react-native/examples/oauth2/list-organizations.md new file mode 100644 index 000000000..5305b17e5 --- /dev/null +++ b/examples/2.3.x/client-react-native/examples/oauth2/list-organizations.md @@ -0,0 +1,17 @@ +```javascript +import { Client, Oauth2 } from 'react-native-appwrite'; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const oauth2 = new Oauth2(client); + +const result = await oauth2.listOrganizations({ + limit: 1, // optional + offset: 0, // optional + search: '', // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/client-react-native/examples/oauth2/list-projects.md b/examples/2.3.x/client-react-native/examples/oauth2/list-projects.md new file mode 100644 index 000000000..fe6f0c887 --- /dev/null +++ b/examples/2.3.x/client-react-native/examples/oauth2/list-projects.md @@ -0,0 +1,17 @@ +```javascript +import { Client, Oauth2 } from 'react-native-appwrite'; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const oauth2 = new Oauth2(client); + +const result = await oauth2.listProjects({ + limit: 1, // optional + offset: 0, // optional + search: '', // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/client-react-native/examples/oauth2/logout-post.md b/examples/2.3.x/client-react-native/examples/oauth2/logout-post.md new file mode 100644 index 000000000..ad84a0c4a --- /dev/null +++ b/examples/2.3.x/client-react-native/examples/oauth2/logout-post.md @@ -0,0 +1,20 @@ +```javascript +import { Client, Oauth2 } from 'react-native-appwrite'; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const oauth2 = new Oauth2(client); + +const result = await oauth2.logoutPost({ + idTokenHint: '', // optional + logoutHint: '', // optional + clientId: '', // optional + postLogoutRedirectUri: 'https://example.com', // optional + state: '', // optional + uiLocales: '', // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/client-react-native/examples/oauth2/logout.md b/examples/2.3.x/client-react-native/examples/oauth2/logout.md new file mode 100644 index 000000000..8d0e0e624 --- /dev/null +++ b/examples/2.3.x/client-react-native/examples/oauth2/logout.md @@ -0,0 +1,20 @@ +```javascript +import { Client, Oauth2 } from 'react-native-appwrite'; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const oauth2 = new Oauth2(client); + +const result = await oauth2.logout({ + idTokenHint: '', // optional + logoutHint: '', // optional + clientId: '', // optional + postLogoutRedirectUri: 'https://example.com', // optional + state: '', // optional + uiLocales: '', // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/client-react-native/examples/oauth2/reject.md b/examples/2.3.x/client-react-native/examples/oauth2/reject.md new file mode 100644 index 000000000..3c6c58886 --- /dev/null +++ b/examples/2.3.x/client-react-native/examples/oauth2/reject.md @@ -0,0 +1,15 @@ +```javascript +import { Client, Oauth2 } from 'react-native-appwrite'; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const oauth2 = new Oauth2(client); + +const result = await oauth2.reject({ + grantId: '', +}); + +console.log(result); +``` diff --git a/examples/2.3.x/client-react-native/examples/oauth2/revoke.md b/examples/2.3.x/client-react-native/examples/oauth2/revoke.md new file mode 100644 index 000000000..5369493d5 --- /dev/null +++ b/examples/2.3.x/client-react-native/examples/oauth2/revoke.md @@ -0,0 +1,18 @@ +```javascript +import { Client, Oauth2 } from 'react-native-appwrite'; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const oauth2 = new Oauth2(client); + +const result = await oauth2.revoke({ + token: '', + tokenTypeHint: 'access_token', // optional + clientId: '', // optional + clientSecret: '', // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/client-react-native/examples/tablesdb/list-transactions.md b/examples/2.3.x/client-react-native/examples/tablesdb/list-transactions.md index e28ff1415..ef26c6bf3 100644 --- a/examples/2.3.x/client-react-native/examples/tablesdb/list-transactions.md +++ b/examples/2.3.x/client-react-native/examples/tablesdb/list-transactions.md @@ -9,6 +9,7 @@ const tablesDB = new TablesDB(client); const result = await tablesDB.listTransactions({ queries: [], // optional + total: false, // optional }); console.log(result); diff --git a/examples/2.3.x/client-react-native/examples/teams/create-membership.md b/examples/2.3.x/client-react-native/examples/teams/create-membership.md index e7fe0d72c..3c6ee849e 100644 --- a/examples/2.3.x/client-react-native/examples/teams/create-membership.md +++ b/examples/2.3.x/client-react-native/examples/teams/create-membership.md @@ -9,7 +9,7 @@ const teams = new Teams(client); const result = await teams.createMembership({ teamId: '', - roles: [], + roles: ['editor'], email: 'email@example.com', // optional userId: '', // optional phone: '+12065550100', // optional diff --git a/examples/2.3.x/client-react-native/examples/teams/update-membership.md b/examples/2.3.x/client-react-native/examples/teams/update-membership.md index 92e596961..8b05702d8 100644 --- a/examples/2.3.x/client-react-native/examples/teams/update-membership.md +++ b/examples/2.3.x/client-react-native/examples/teams/update-membership.md @@ -10,7 +10,7 @@ const teams = new Teams(client); const result = await teams.updateMembership({ teamId: '', membershipId: '', - roles: [], + roles: ['editor'], }); console.log(result); diff --git a/examples/2.3.x/client-react-native/examples/vectorsdb/create-operations.md b/examples/2.3.x/client-react-native/examples/vectorsdb/create-operations.md index 86be153fa..11f4bb505 100644 --- a/examples/2.3.x/client-react-native/examples/vectorsdb/create-operations.md +++ b/examples/2.3.x/client-react-native/examples/vectorsdb/create-operations.md @@ -16,7 +16,10 @@ const result = await vectorsDB.createOperations({ collectionId: '', documentId: '', data: { - name: "Walter O'Brien", + embeddings: [0.12, -0.55, 0.88, 1.02], + metadata: { + name: 'First document', + }, }, }, ], // optional diff --git a/examples/2.3.x/client-react-native/examples/vectorsdb/list-transactions.md b/examples/2.3.x/client-react-native/examples/vectorsdb/list-transactions.md index 8a009a985..d29cc0458 100644 --- a/examples/2.3.x/client-react-native/examples/vectorsdb/list-transactions.md +++ b/examples/2.3.x/client-react-native/examples/vectorsdb/list-transactions.md @@ -9,6 +9,7 @@ const vectorsDB = new VectorsDB(client); const result = await vectorsDB.listTransactions({ queries: [], // optional + total: false, // optional }); console.log(result); diff --git a/examples/2.3.x/client-rest/examples/account/create-email-password-session.md b/examples/2.3.x/client-rest/examples/account/create-email-password-session.md index bd8c32a48..57b9b36d8 100644 --- a/examples/2.3.x/client-rest/examples/account/create-email-password-session.md +++ b/examples/2.3.x/client-rest/examples/account/create-email-password-session.md @@ -8,6 +8,7 @@ X-Appwrite-Project: { "email": "email@example.com", - "password": "password" + "password": "password", + "duration": 60 } ``` diff --git a/examples/2.3.x/client-rest/examples/analytics/create-event.md b/examples/2.3.x/client-rest/examples/analytics/create-event.md new file mode 100644 index 000000000..51f37423a --- /dev/null +++ b/examples/2.3.x/client-rest/examples/analytics/create-event.md @@ -0,0 +1,23 @@ +```http +POST /v1/analytics/properties/{propertyId}/events HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +Accept: application/json +X-Appwrite-Response-Format: 2.3.0 +X-Appwrite-Project: + +{ + "name": "", + "url": "https://example.com", + "domain": "", + "referrer": "", + "screenWidth": 0, + "sessionHash": "", + "scrollDepth": 0, + "engagementTime": 0, + "props": [], + "userId": "", + "ip": "", + "userAgent": "" +} +``` diff --git a/examples/2.3.x/client-rest/examples/apps/create-installation-token.md b/examples/2.3.x/client-rest/examples/apps/create-installation-token.md new file mode 100644 index 000000000..4de00ce8c --- /dev/null +++ b/examples/2.3.x/client-rest/examples/apps/create-installation-token.md @@ -0,0 +1,9 @@ +```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: 2.3.0 +X-Appwrite-Project: + +``` diff --git a/examples/2.3.x/client-rest/examples/apps/create-key.md b/examples/2.3.x/client-rest/examples/apps/create-key.md new file mode 100644 index 000000000..4cde099e7 --- /dev/null +++ b/examples/2.3.x/client-rest/examples/apps/create-key.md @@ -0,0 +1,9 @@ +```http +POST /v1/apps/{appId}/keys HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +Accept: application/json +X-Appwrite-Response-Format: 2.3.0 +X-Appwrite-Project: + +``` diff --git a/examples/2.3.x/client-rest/examples/apps/create-secret.md b/examples/2.3.x/client-rest/examples/apps/create-secret.md new file mode 100644 index 000000000..bf47e198d --- /dev/null +++ b/examples/2.3.x/client-rest/examples/apps/create-secret.md @@ -0,0 +1,9 @@ +```http +POST /v1/apps/{appId}/secrets HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +Accept: application/json +X-Appwrite-Response-Format: 2.3.0 +X-Appwrite-Project: + +``` diff --git a/examples/2.3.x/client-rest/examples/apps/create.md b/examples/2.3.x/client-rest/examples/apps/create.md new file mode 100644 index 000000000..cbf6e809b --- /dev/null +++ b/examples/2.3.x/client-rest/examples/apps/create.md @@ -0,0 +1,30 @@ +```http +POST /v1/apps HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +Accept: application/json +X-Appwrite-Response-Format: 2.3.0 +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": "" +} +``` diff --git a/examples/2.3.x/client-rest/examples/apps/delete-installation.md b/examples/2.3.x/client-rest/examples/apps/delete-installation.md new file mode 100644 index 000000000..aea259673 --- /dev/null +++ b/examples/2.3.x/client-rest/examples/apps/delete-installation.md @@ -0,0 +1,9 @@ +```http +DELETE /v1/apps/{appId}/installations/{installationId} HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +Accept: application/json +X-Appwrite-Response-Format: 2.3.0 +X-Appwrite-Project: + +``` diff --git a/examples/2.3.x/client-rest/examples/apps/delete-key.md b/examples/2.3.x/client-rest/examples/apps/delete-key.md new file mode 100644 index 000000000..d9035c0b7 --- /dev/null +++ b/examples/2.3.x/client-rest/examples/apps/delete-key.md @@ -0,0 +1,9 @@ +```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: 2.3.0 +X-Appwrite-Project: + +``` diff --git a/examples/2.3.x/client-rest/examples/apps/delete-secret.md b/examples/2.3.x/client-rest/examples/apps/delete-secret.md new file mode 100644 index 000000000..2e4ae9a25 --- /dev/null +++ b/examples/2.3.x/client-rest/examples/apps/delete-secret.md @@ -0,0 +1,9 @@ +```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: 2.3.0 +X-Appwrite-Project: + +``` diff --git a/examples/2.3.x/client-rest/examples/apps/delete-tokens.md b/examples/2.3.x/client-rest/examples/apps/delete-tokens.md new file mode 100644 index 000000000..5bfc608c0 --- /dev/null +++ b/examples/2.3.x/client-rest/examples/apps/delete-tokens.md @@ -0,0 +1,9 @@ +```http +DELETE /v1/apps/{appId}/tokens HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +Accept: application/json +X-Appwrite-Response-Format: 2.3.0 +X-Appwrite-Project: + +``` diff --git a/examples/2.3.x/client-rest/examples/apps/delete.md b/examples/2.3.x/client-rest/examples/apps/delete.md new file mode 100644 index 000000000..cc52e59b9 --- /dev/null +++ b/examples/2.3.x/client-rest/examples/apps/delete.md @@ -0,0 +1,9 @@ +```http +DELETE /v1/apps/{appId} HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +Accept: application/json +X-Appwrite-Response-Format: 2.3.0 +X-Appwrite-Project: + +``` diff --git a/examples/2.3.x/client-rest/examples/apps/get-installation.md b/examples/2.3.x/client-rest/examples/apps/get-installation.md new file mode 100644 index 000000000..0f6b4a05d --- /dev/null +++ b/examples/2.3.x/client-rest/examples/apps/get-installation.md @@ -0,0 +1,7 @@ +```http +GET /v1/apps/{appId}/installations/{installationId} HTTP/1.1 +Host: cloud.appwrite.io +Accept: application/json +X-Appwrite-Response-Format: 2.3.0 +X-Appwrite-Project: +``` diff --git a/examples/2.3.x/client-rest/examples/apps/get-key.md b/examples/2.3.x/client-rest/examples/apps/get-key.md new file mode 100644 index 000000000..bfe359869 --- /dev/null +++ b/examples/2.3.x/client-rest/examples/apps/get-key.md @@ -0,0 +1,7 @@ +```http +GET /v1/apps/{appId}/keys/{keyId} HTTP/1.1 +Host: cloud.appwrite.io +Accept: application/json +X-Appwrite-Response-Format: 2.3.0 +X-Appwrite-Project: +``` diff --git a/examples/2.3.x/client-rest/examples/apps/get-secret.md b/examples/2.3.x/client-rest/examples/apps/get-secret.md new file mode 100644 index 000000000..53b7c8531 --- /dev/null +++ b/examples/2.3.x/client-rest/examples/apps/get-secret.md @@ -0,0 +1,7 @@ +```http +GET /v1/apps/{appId}/secrets/{secretId} HTTP/1.1 +Host: cloud.appwrite.io +Accept: application/json +X-Appwrite-Response-Format: 2.3.0 +X-Appwrite-Project: +``` diff --git a/examples/2.3.x/client-rest/examples/apps/get.md b/examples/2.3.x/client-rest/examples/apps/get.md new file mode 100644 index 000000000..869a639a9 --- /dev/null +++ b/examples/2.3.x/client-rest/examples/apps/get.md @@ -0,0 +1,7 @@ +```http +GET /v1/apps/{appId} HTTP/1.1 +Host: cloud.appwrite.io +Accept: application/json +X-Appwrite-Response-Format: 2.3.0 +X-Appwrite-Project: +``` diff --git a/examples/2.3.x/client-rest/examples/apps/list-installation-scopes.md b/examples/2.3.x/client-rest/examples/apps/list-installation-scopes.md new file mode 100644 index 000000000..e758a4dfa --- /dev/null +++ b/examples/2.3.x/client-rest/examples/apps/list-installation-scopes.md @@ -0,0 +1,7 @@ +```http +GET /v1/apps/scopes/installations HTTP/1.1 +Host: cloud.appwrite.io +Accept: application/json +X-Appwrite-Response-Format: 2.3.0 +X-Appwrite-Project: +``` diff --git a/examples/2.3.x/client-rest/examples/apps/list-installations.md b/examples/2.3.x/client-rest/examples/apps/list-installations.md new file mode 100644 index 000000000..8f7e64009 --- /dev/null +++ b/examples/2.3.x/client-rest/examples/apps/list-installations.md @@ -0,0 +1,7 @@ +```http +GET /v1/apps/{appId}/installations HTTP/1.1 +Host: cloud.appwrite.io +Accept: application/json +X-Appwrite-Response-Format: 2.3.0 +X-Appwrite-Project: +``` diff --git a/examples/2.3.x/client-rest/examples/apps/list-keys.md b/examples/2.3.x/client-rest/examples/apps/list-keys.md new file mode 100644 index 000000000..0e75e1350 --- /dev/null +++ b/examples/2.3.x/client-rest/examples/apps/list-keys.md @@ -0,0 +1,7 @@ +```http +GET /v1/apps/{appId}/keys HTTP/1.1 +Host: cloud.appwrite.io +Accept: application/json +X-Appwrite-Response-Format: 2.3.0 +X-Appwrite-Project: +``` diff --git a/examples/2.3.x/client-rest/examples/apps/list-o-auth-2-scopes.md b/examples/2.3.x/client-rest/examples/apps/list-o-auth-2-scopes.md new file mode 100644 index 000000000..9de4b7b4e --- /dev/null +++ b/examples/2.3.x/client-rest/examples/apps/list-o-auth-2-scopes.md @@ -0,0 +1,7 @@ +```http +GET /v1/apps/scopes/oauth2 HTTP/1.1 +Host: cloud.appwrite.io +Accept: application/json +X-Appwrite-Response-Format: 2.3.0 +X-Appwrite-Project: +``` diff --git a/examples/2.3.x/client-rest/examples/apps/list-secrets.md b/examples/2.3.x/client-rest/examples/apps/list-secrets.md new file mode 100644 index 000000000..b9cba54b3 --- /dev/null +++ b/examples/2.3.x/client-rest/examples/apps/list-secrets.md @@ -0,0 +1,7 @@ +```http +GET /v1/apps/{appId}/secrets HTTP/1.1 +Host: cloud.appwrite.io +Accept: application/json +X-Appwrite-Response-Format: 2.3.0 +X-Appwrite-Project: +``` diff --git a/examples/2.3.x/client-rest/examples/apps/list.md b/examples/2.3.x/client-rest/examples/apps/list.md new file mode 100644 index 000000000..2002bbac3 --- /dev/null +++ b/examples/2.3.x/client-rest/examples/apps/list.md @@ -0,0 +1,7 @@ +```http +GET /v1/apps HTTP/1.1 +Host: cloud.appwrite.io +Accept: application/json +X-Appwrite-Response-Format: 2.3.0 +X-Appwrite-Project: +``` diff --git a/examples/2.3.x/client-rest/examples/apps/update-team.md b/examples/2.3.x/client-rest/examples/apps/update-team.md new file mode 100644 index 000000000..36db6e7b2 --- /dev/null +++ b/examples/2.3.x/client-rest/examples/apps/update-team.md @@ -0,0 +1,12 @@ +```http +PATCH /v1/apps/{appId}/team HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +Accept: application/json +X-Appwrite-Response-Format: 2.3.0 +X-Appwrite-Project: + +{ + "teamId": "" +} +``` diff --git a/examples/2.3.x/client-rest/examples/apps/update.md b/examples/2.3.x/client-rest/examples/apps/update.md new file mode 100644 index 000000000..b531f1a6f --- /dev/null +++ b/examples/2.3.x/client-rest/examples/apps/update.md @@ -0,0 +1,30 @@ +```http +PUT /v1/apps/{appId} HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +Accept: application/json +X-Appwrite-Response-Format: 2.3.0 +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" +} +``` diff --git a/examples/2.3.x/client-rest/examples/avatars/delete-photo.md b/examples/2.3.x/client-rest/examples/avatars/delete-photo.md new file mode 100644 index 000000000..f892a9467 --- /dev/null +++ b/examples/2.3.x/client-rest/examples/avatars/delete-photo.md @@ -0,0 +1,9 @@ +```http +DELETE /v1/avatars/photo HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +Accept: application/json +X-Appwrite-Response-Format: 2.3.0 +X-Appwrite-Project: + +``` diff --git a/examples/2.3.x/client-rest/examples/avatars/update-photo.md b/examples/2.3.x/client-rest/examples/avatars/update-photo.md new file mode 100644 index 000000000..121562d9f --- /dev/null +++ b/examples/2.3.x/client-rest/examples/avatars/update-photo.md @@ -0,0 +1,16 @@ +```http +PUT /v1/avatars/photo HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: multipart/form-data; boundary="cec8e8123c05ba25" +Accept: application/json +X-Appwrite-Response-Format: 2.3.0 +X-Appwrite-Project: +Content-Length: *Length of your entity body in bytes* + +--cec8e8123c05ba25 +Content-Disposition: form-data; name="file" + +cf 94 84 24 8d c4 91 10 0f dc 54 26 6c 8e 4b bc e8 ee 55 94 29 e7 94 89 19 26 28 01 26 29 3f 16... + +--cec8e8123c05ba25-- +``` diff --git a/examples/2.3.x/client-rest/examples/documentsdb/create-documents.md b/examples/2.3.x/client-rest/examples/documentsdb/create-documents.md index 8ab99545a..53673b5c4 100644 --- a/examples/2.3.x/client-rest/examples/documentsdb/create-documents.md +++ b/examples/2.3.x/client-rest/examples/documentsdb/create-documents.md @@ -7,7 +7,16 @@ X-Appwrite-Response-Format: 2.3.0 X-Appwrite-Project: { - "documents": [], + "documents": [ + { + "$id": "example1", + "username": "walter.obrien", + "email": "walter.obrien@example.com", + "fullName": "Walter O'Brien", + "age": 30, + "isAdmin": false + } + ], "transactionId": "" } ``` diff --git a/examples/2.3.x/client-rest/examples/graphql/mutation.md b/examples/2.3.x/client-rest/examples/graphql/mutation.md index 2ad4b0d6d..845b6d3f3 100644 --- a/examples/2.3.x/client-rest/examples/graphql/mutation.md +++ b/examples/2.3.x/client-rest/examples/graphql/mutation.md @@ -8,6 +8,8 @@ X-Appwrite-Response-Format: 2.3.0 X-Appwrite-Project: { - "query": {} + "query": { + "query": "mutation { accountUpdateName(name: \"Walter\") { name } }" + } } ``` diff --git a/examples/2.3.x/client-rest/examples/graphql/query.md b/examples/2.3.x/client-rest/examples/graphql/query.md index 98a401e63..6776fac98 100644 --- a/examples/2.3.x/client-rest/examples/graphql/query.md +++ b/examples/2.3.x/client-rest/examples/graphql/query.md @@ -8,6 +8,8 @@ X-Appwrite-Response-Format: 2.3.0 X-Appwrite-Project: { - "query": {} + "query": { + "query": "query { localeGet { ip } }" + } } ``` diff --git a/examples/2.3.x/client-rest/examples/oauth2/approve.md b/examples/2.3.x/client-rest/examples/oauth2/approve.md new file mode 100644 index 000000000..8d5dabc69 --- /dev/null +++ b/examples/2.3.x/client-rest/examples/oauth2/approve.md @@ -0,0 +1,13 @@ +```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: 2.3.0 + +{ + "grant_id": "", + "authorization_details": "", + "scope": "" +} +``` diff --git a/examples/2.3.x/client-rest/examples/oauth2/authorize-post.md b/examples/2.3.x/client-rest/examples/oauth2/authorize-post.md new file mode 100644 index 000000000..e0974827b --- /dev/null +++ b/examples/2.3.x/client-rest/examples/oauth2/authorize-post.md @@ -0,0 +1,24 @@ +```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: 2.3.0 + +{ + "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/2.3.x/client-rest/examples/oauth2/authorize.md b/examples/2.3.x/client-rest/examples/oauth2/authorize.md new file mode 100644 index 000000000..eb58df4e3 --- /dev/null +++ b/examples/2.3.x/client-rest/examples/oauth2/authorize.md @@ -0,0 +1,6 @@ +```http +GET /v1/oauth2/{project_id}/authorize HTTP/1.1 +Host: cloud.appwrite.io +Accept: application/json +X-Appwrite-Response-Format: 2.3.0 +``` diff --git a/examples/2.3.x/client-rest/examples/oauth2/create-device-authorization.md b/examples/2.3.x/client-rest/examples/oauth2/create-device-authorization.md new file mode 100644 index 000000000..dc24bd063 --- /dev/null +++ b/examples/2.3.x/client-rest/examples/oauth2/create-device-authorization.md @@ -0,0 +1,15 @@ +```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: 2.3.0 + +{ + "client_id": "", + "scope": "", + "authorization_details": "", + "resource": "", + "audience": "" +} +``` diff --git a/examples/2.3.x/client-rest/examples/oauth2/create-grant.md b/examples/2.3.x/client-rest/examples/oauth2/create-grant.md new file mode 100644 index 000000000..871c28106 --- /dev/null +++ b/examples/2.3.x/client-rest/examples/oauth2/create-grant.md @@ -0,0 +1,11 @@ +```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: 2.3.0 + +{ + "user_code": "" +} +``` diff --git a/examples/2.3.x/client-rest/examples/oauth2/create-par.md b/examples/2.3.x/client-rest/examples/oauth2/create-par.md new file mode 100644 index 000000000..9e8c4c71f --- /dev/null +++ b/examples/2.3.x/client-rest/examples/oauth2/create-par.md @@ -0,0 +1,23 @@ +```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: 2.3.0 + +{ + "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/2.3.x/client-rest/examples/oauth2/create-token.md b/examples/2.3.x/client-rest/examples/oauth2/create-token.md new file mode 100644 index 000000000..676439533 --- /dev/null +++ b/examples/2.3.x/client-rest/examples/oauth2/create-token.md @@ -0,0 +1,20 @@ +```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: 2.3.0 + +{ + "grant_type": "", + "code": "", + "refresh_token": "", + "device_code": "", + "client_id": "", + "client_secret": "", + "code_verifier": "", + "redirect_uri": "https://example.com", + "resource": "", + "audience": "" +} +``` diff --git a/examples/2.3.x/client-rest/examples/oauth2/get-grant.md b/examples/2.3.x/client-rest/examples/oauth2/get-grant.md new file mode 100644 index 000000000..a3ea3d852 --- /dev/null +++ b/examples/2.3.x/client-rest/examples/oauth2/get-grant.md @@ -0,0 +1,6 @@ +```http +GET /v1/oauth2/{project_id}/grants/{grant_id} HTTP/1.1 +Host: cloud.appwrite.io +Accept: application/json +X-Appwrite-Response-Format: 2.3.0 +``` diff --git a/examples/2.3.x/client-rest/examples/oauth2/list-organizations.md b/examples/2.3.x/client-rest/examples/oauth2/list-organizations.md new file mode 100644 index 000000000..babe287c2 --- /dev/null +++ b/examples/2.3.x/client-rest/examples/oauth2/list-organizations.md @@ -0,0 +1,6 @@ +```http +GET /v1/oauth2/{project_id}/organizations HTTP/1.1 +Host: cloud.appwrite.io +Accept: application/json +X-Appwrite-Response-Format: 2.3.0 +``` diff --git a/examples/2.3.x/client-rest/examples/oauth2/list-projects.md b/examples/2.3.x/client-rest/examples/oauth2/list-projects.md new file mode 100644 index 000000000..128ce8b32 --- /dev/null +++ b/examples/2.3.x/client-rest/examples/oauth2/list-projects.md @@ -0,0 +1,6 @@ +```http +GET /v1/oauth2/{project_id}/projects HTTP/1.1 +Host: cloud.appwrite.io +Accept: application/json +X-Appwrite-Response-Format: 2.3.0 +``` diff --git a/examples/2.3.x/client-rest/examples/oauth2/logout-post.md b/examples/2.3.x/client-rest/examples/oauth2/logout-post.md new file mode 100644 index 000000000..ddb4bd533 --- /dev/null +++ b/examples/2.3.x/client-rest/examples/oauth2/logout-post.md @@ -0,0 +1,16 @@ +```http +POST /v1/oauth2/{project_id}/logout HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +Accept: application/json +X-Appwrite-Response-Format: 2.3.0 + +{ + "id_token_hint": "", + "logout_hint": "", + "client_id": "", + "post_logout_redirect_uri": "https://example.com", + "state": "", + "ui_locales": "" +} +``` diff --git a/examples/2.3.x/client-rest/examples/oauth2/logout.md b/examples/2.3.x/client-rest/examples/oauth2/logout.md new file mode 100644 index 000000000..5bb40218b --- /dev/null +++ b/examples/2.3.x/client-rest/examples/oauth2/logout.md @@ -0,0 +1,6 @@ +```http +GET /v1/oauth2/{project_id}/logout HTTP/1.1 +Host: cloud.appwrite.io +Accept: application/json +X-Appwrite-Response-Format: 2.3.0 +``` diff --git a/examples/2.3.x/client-rest/examples/oauth2/reject.md b/examples/2.3.x/client-rest/examples/oauth2/reject.md new file mode 100644 index 000000000..4e0beece0 --- /dev/null +++ b/examples/2.3.x/client-rest/examples/oauth2/reject.md @@ -0,0 +1,11 @@ +```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: 2.3.0 + +{ + "grant_id": "" +} +``` diff --git a/examples/2.3.x/client-rest/examples/oauth2/revoke.md b/examples/2.3.x/client-rest/examples/oauth2/revoke.md new file mode 100644 index 000000000..3b9012586 --- /dev/null +++ b/examples/2.3.x/client-rest/examples/oauth2/revoke.md @@ -0,0 +1,14 @@ +```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: 2.3.0 + +{ + "token": "", + "token_type_hint": "access_token", + "client_id": "", + "client_secret": "" +} +``` diff --git a/examples/2.3.x/client-rest/examples/teams/create-membership.md b/examples/2.3.x/client-rest/examples/teams/create-membership.md index c4840217f..4f855fb2f 100644 --- a/examples/2.3.x/client-rest/examples/teams/create-membership.md +++ b/examples/2.3.x/client-rest/examples/teams/create-membership.md @@ -10,7 +10,7 @@ X-Appwrite-Project: "email": "email@example.com", "userId": "", "phone": "+12065550100", - "roles": [], + "roles": ["editor"], "url": "https://example.com", "name": "" } diff --git a/examples/2.3.x/client-rest/examples/teams/update-membership.md b/examples/2.3.x/client-rest/examples/teams/update-membership.md index 22358a94d..b451422c0 100644 --- a/examples/2.3.x/client-rest/examples/teams/update-membership.md +++ b/examples/2.3.x/client-rest/examples/teams/update-membership.md @@ -7,6 +7,6 @@ X-Appwrite-Response-Format: 2.3.0 X-Appwrite-Project: { - "roles": [] + "roles": ["editor"] } ``` diff --git a/examples/2.3.x/client-rest/examples/vectorsdb/create-operations.md b/examples/2.3.x/client-rest/examples/vectorsdb/create-operations.md index 9f34f5b34..fa894e4ce 100644 --- a/examples/2.3.x/client-rest/examples/vectorsdb/create-operations.md +++ b/examples/2.3.x/client-rest/examples/vectorsdb/create-operations.md @@ -14,7 +14,15 @@ X-Appwrite-Project: "collectionId": "", "documentId": "", "data": { - "name": "Walter O'Brien" + "embeddings": [ + 0.12, + -0.55, + 0.88, + 1.02 + ], + "metadata": { + "name": "First document" + } } } ] diff --git a/examples/2.3.x/client-web/examples/account/create-email-password-session.md b/examples/2.3.x/client-web/examples/account/create-email-password-session.md index 6093aa240..40ae7c9eb 100644 --- a/examples/2.3.x/client-web/examples/account/create-email-password-session.md +++ b/examples/2.3.x/client-web/examples/account/create-email-password-session.md @@ -10,6 +10,7 @@ const account = new Account(client); const result = await account.createEmailPasswordSession({ email: 'email@example.com', password: 'password', + duration: 60, // optional }); console.log(result); diff --git a/examples/2.3.x/client-web/examples/account/delete-sessions.md b/examples/2.3.x/client-web/examples/account/delete-sessions.md index 1bd929a8a..1e32eb343 100644 --- a/examples/2.3.x/client-web/examples/account/delete-sessions.md +++ b/examples/2.3.x/client-web/examples/account/delete-sessions.md @@ -7,7 +7,9 @@ const client = new Client() const account = new Account(client); -const result = await account.deleteSessions(); +const result = await account.deleteSessions({ + current: false, // optional +}); console.log(result); ``` diff --git a/examples/2.3.x/client-web/examples/account/list-sessions.md b/examples/2.3.x/client-web/examples/account/list-sessions.md index d07cf48e5..99d0f05d2 100644 --- a/examples/2.3.x/client-web/examples/account/list-sessions.md +++ b/examples/2.3.x/client-web/examples/account/list-sessions.md @@ -7,7 +7,9 @@ const client = new Client() const account = new Account(client); -const result = await account.listSessions(); +const result = await account.listSessions({ + total: false, // optional +}); console.log(result); ``` diff --git a/examples/2.3.x/client-web/examples/analytics/create-event.md b/examples/2.3.x/client-web/examples/analytics/create-event.md new file mode 100644 index 000000000..bccdfeff5 --- /dev/null +++ b/examples/2.3.x/client-web/examples/analytics/create-event.md @@ -0,0 +1,27 @@ +```javascript +import { Client, Analytics } from 'appwrite'; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const analytics = new Analytics(client); + +const result = await analytics.createEvent({ + propertyId: '', + name: '', + url: 'https://example.com', + domain: '', // optional + referrer: '', // optional + screenWidth: null, // optional + sessionHash: '', // optional + scrollDepth: 0, // optional + engagementTime: null, // optional + props: [], // optional + userId: '', // optional + ip: '', // optional + userAgent: '', // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/client-web/examples/apps/create-installation-token.md b/examples/2.3.x/client-web/examples/apps/create-installation-token.md new file mode 100644 index 000000000..fc90377c0 --- /dev/null +++ b/examples/2.3.x/client-web/examples/apps/create-installation-token.md @@ -0,0 +1,16 @@ +```javascript +import { Client, Apps } from 'appwrite'; + +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.createInstallationToken({ + appId: '', + installationId: '', +}); + +console.log(result); +``` diff --git a/examples/2.3.x/client-web/examples/apps/create-key.md b/examples/2.3.x/client-web/examples/apps/create-key.md new file mode 100644 index 000000000..f7e92c4c9 --- /dev/null +++ b/examples/2.3.x/client-web/examples/apps/create-key.md @@ -0,0 +1,15 @@ +```javascript +import { Client, Apps } from 'appwrite'; + +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/2.3.x/client-web/examples/apps/create-secret.md b/examples/2.3.x/client-web/examples/apps/create-secret.md new file mode 100644 index 000000000..76a2c7177 --- /dev/null +++ b/examples/2.3.x/client-web/examples/apps/create-secret.md @@ -0,0 +1,15 @@ +```javascript +import { Client, Apps } from 'appwrite'; + +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.createSecret({ + appId: '', +}); + +console.log(result); +``` diff --git a/examples/2.3.x/client-web/examples/apps/create.md b/examples/2.3.x/client-web/examples/apps/create.md new file mode 100644 index 000000000..948940ac5 --- /dev/null +++ b/examples/2.3.x/client-web/examples/apps/create.md @@ -0,0 +1,33 @@ +```javascript +import { Client, Apps } from 'appwrite'; + +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.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 +}); + +console.log(result); +``` diff --git a/examples/2.3.x/client-web/examples/apps/delete-installation.md b/examples/2.3.x/client-web/examples/apps/delete-installation.md new file mode 100644 index 000000000..813de0a60 --- /dev/null +++ b/examples/2.3.x/client-web/examples/apps/delete-installation.md @@ -0,0 +1,16 @@ +```javascript +import { Client, Apps } from 'appwrite'; + +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.deleteInstallation({ + appId: '', + installationId: '', +}); + +console.log(result); +``` diff --git a/examples/2.3.x/client-web/examples/apps/delete-key.md b/examples/2.3.x/client-web/examples/apps/delete-key.md new file mode 100644 index 000000000..a0e06cfbd --- /dev/null +++ b/examples/2.3.x/client-web/examples/apps/delete-key.md @@ -0,0 +1,16 @@ +```javascript +import { Client, Apps } from 'appwrite'; + +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/2.3.x/client-web/examples/apps/delete-secret.md b/examples/2.3.x/client-web/examples/apps/delete-secret.md new file mode 100644 index 000000000..3a827edb8 --- /dev/null +++ b/examples/2.3.x/client-web/examples/apps/delete-secret.md @@ -0,0 +1,16 @@ +```javascript +import { Client, Apps } from 'appwrite'; + +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.deleteSecret({ + appId: '', + secretId: '', +}); + +console.log(result); +``` diff --git a/examples/2.3.x/client-web/examples/apps/delete-tokens.md b/examples/2.3.x/client-web/examples/apps/delete-tokens.md new file mode 100644 index 000000000..9fe9f7ce9 --- /dev/null +++ b/examples/2.3.x/client-web/examples/apps/delete-tokens.md @@ -0,0 +1,15 @@ +```javascript +import { Client, Apps } from 'appwrite'; + +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.deleteTokens({ + appId: '', +}); + +console.log(result); +``` diff --git a/examples/2.3.x/client-web/examples/apps/delete.md b/examples/2.3.x/client-web/examples/apps/delete.md new file mode 100644 index 000000000..ea0e7e38f --- /dev/null +++ b/examples/2.3.x/client-web/examples/apps/delete.md @@ -0,0 +1,15 @@ +```javascript +import { Client, Apps } from 'appwrite'; + +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.delete({ + appId: '', +}); + +console.log(result); +``` diff --git a/examples/2.3.x/client-web/examples/apps/get-installation.md b/examples/2.3.x/client-web/examples/apps/get-installation.md new file mode 100644 index 000000000..1ef3ab906 --- /dev/null +++ b/examples/2.3.x/client-web/examples/apps/get-installation.md @@ -0,0 +1,16 @@ +```javascript +import { Client, Apps } from 'appwrite'; + +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.getInstallation({ + appId: '', + installationId: '', +}); + +console.log(result); +``` diff --git a/examples/2.3.x/client-web/examples/apps/get-key.md b/examples/2.3.x/client-web/examples/apps/get-key.md new file mode 100644 index 000000000..43d457497 --- /dev/null +++ b/examples/2.3.x/client-web/examples/apps/get-key.md @@ -0,0 +1,16 @@ +```javascript +import { Client, Apps } from 'appwrite'; + +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/2.3.x/client-web/examples/apps/get-secret.md b/examples/2.3.x/client-web/examples/apps/get-secret.md new file mode 100644 index 000000000..f5fea62f0 --- /dev/null +++ b/examples/2.3.x/client-web/examples/apps/get-secret.md @@ -0,0 +1,16 @@ +```javascript +import { Client, Apps } from 'appwrite'; + +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.getSecret({ + appId: '', + secretId: '', +}); + +console.log(result); +``` diff --git a/examples/2.3.x/client-web/examples/apps/get.md b/examples/2.3.x/client-web/examples/apps/get.md new file mode 100644 index 000000000..2c0f2effe --- /dev/null +++ b/examples/2.3.x/client-web/examples/apps/get.md @@ -0,0 +1,15 @@ +```javascript +import { Client, Apps } from 'appwrite'; + +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.get({ + appId: '', +}); + +console.log(result); +``` diff --git a/examples/2.3.x/client-web/examples/apps/list-installation-scopes.md b/examples/2.3.x/client-web/examples/apps/list-installation-scopes.md new file mode 100644 index 000000000..5230dfb08 --- /dev/null +++ b/examples/2.3.x/client-web/examples/apps/list-installation-scopes.md @@ -0,0 +1,13 @@ +```javascript +import { Client, Apps } from 'appwrite'; + +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/2.3.x/client-web/examples/apps/list-installations.md b/examples/2.3.x/client-web/examples/apps/list-installations.md new file mode 100644 index 000000000..3c3317f12 --- /dev/null +++ b/examples/2.3.x/client-web/examples/apps/list-installations.md @@ -0,0 +1,17 @@ +```javascript +import { Client, Apps } from 'appwrite'; + +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.listInstallations({ + appId: '', + queries: [], // optional + total: false, // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/client-web/examples/apps/list-keys.md b/examples/2.3.x/client-web/examples/apps/list-keys.md new file mode 100644 index 000000000..8598aa924 --- /dev/null +++ b/examples/2.3.x/client-web/examples/apps/list-keys.md @@ -0,0 +1,17 @@ +```javascript +import { Client, Apps } from 'appwrite'; + +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/2.3.x/client-web/examples/apps/list-o-auth-2-scopes.md b/examples/2.3.x/client-web/examples/apps/list-o-auth-2-scopes.md new file mode 100644 index 000000000..4026247c8 --- /dev/null +++ b/examples/2.3.x/client-web/examples/apps/list-o-auth-2-scopes.md @@ -0,0 +1,13 @@ +```javascript +import { Client, Apps } from 'appwrite'; + +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.listOAuth2Scopes(); + +console.log(result); +``` diff --git a/examples/2.3.x/client-web/examples/apps/list-secrets.md b/examples/2.3.x/client-web/examples/apps/list-secrets.md new file mode 100644 index 000000000..a839d9c64 --- /dev/null +++ b/examples/2.3.x/client-web/examples/apps/list-secrets.md @@ -0,0 +1,17 @@ +```javascript +import { Client, Apps } from 'appwrite'; + +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.listSecrets({ + appId: '', + queries: [], // optional + total: false, // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/client-web/examples/apps/list.md b/examples/2.3.x/client-web/examples/apps/list.md new file mode 100644 index 000000000..dbac28fd0 --- /dev/null +++ b/examples/2.3.x/client-web/examples/apps/list.md @@ -0,0 +1,16 @@ +```javascript +import { Client, Apps } from 'appwrite'; + +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.list({ + queries: [], // optional + total: false, // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/client-web/examples/apps/update-team.md b/examples/2.3.x/client-web/examples/apps/update-team.md new file mode 100644 index 000000000..e1eac2073 --- /dev/null +++ b/examples/2.3.x/client-web/examples/apps/update-team.md @@ -0,0 +1,16 @@ +```javascript +import { Client, Apps } from 'appwrite'; + +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.updateTeam({ + appId: '', + teamId: '', +}); + +console.log(result); +``` diff --git a/examples/2.3.x/client-web/examples/apps/update.md b/examples/2.3.x/client-web/examples/apps/update.md new file mode 100644 index 000000000..d9fbd53e7 --- /dev/null +++ b/examples/2.3.x/client-web/examples/apps/update.md @@ -0,0 +1,34 @@ +```javascript +import { Client, Apps } from 'appwrite'; + +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.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 +}); + +console.log(result); +``` diff --git a/examples/2.3.x/client-web/examples/avatars/delete-photo.md b/examples/2.3.x/client-web/examples/avatars/delete-photo.md new file mode 100644 index 000000000..fd5d42f5f --- /dev/null +++ b/examples/2.3.x/client-web/examples/avatars/delete-photo.md @@ -0,0 +1,13 @@ +```javascript +import { Client, Avatars } from 'appwrite'; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const avatars = new Avatars(client); + +const result = await avatars.deletePhoto(); + +console.log(result); +``` diff --git a/examples/2.3.x/client-web/examples/avatars/get-screenshot.md b/examples/2.3.x/client-web/examples/avatars/get-screenshot.md index 680d225e4..d1f1a160c 100644 --- a/examples/2.3.x/client-web/examples/avatars/get-screenshot.md +++ b/examples/2.3.x/client-web/examples/avatars/get-screenshot.md @@ -17,8 +17,7 @@ const avatars = new Avatars(client); const result = avatars.getScreenshot({ url: 'https://example.com', headers: { - Authorization: 'Bearer token123', - 'X-Custom-Header': 'value', + 'Accept-Language': 'en-US,en;q=0.9', }, // optional viewportWidth: 1920, // optional viewportHeight: 1080, // optional diff --git a/examples/2.3.x/client-web/examples/avatars/update-photo.md b/examples/2.3.x/client-web/examples/avatars/update-photo.md new file mode 100644 index 000000000..2deb92009 --- /dev/null +++ b/examples/2.3.x/client-web/examples/avatars/update-photo.md @@ -0,0 +1,15 @@ +```javascript +import { Client, Avatars } from 'appwrite'; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const avatars = new Avatars(client); + +const result = await avatars.updatePhoto({ + file: document.getElementById('uploader').files[0], +}); + +console.log(result); +``` diff --git a/examples/2.3.x/client-web/examples/databases/list-transactions.md b/examples/2.3.x/client-web/examples/databases/list-transactions.md index bb8ae2e1f..03e770cf0 100644 --- a/examples/2.3.x/client-web/examples/databases/list-transactions.md +++ b/examples/2.3.x/client-web/examples/databases/list-transactions.md @@ -9,6 +9,7 @@ const databases = new Databases(client); const result = await databases.listTransactions({ queries: [], // optional + total: false, // optional }); console.log(result); diff --git a/examples/2.3.x/client-web/examples/documentsdb/create-documents.md b/examples/2.3.x/client-web/examples/documentsdb/create-documents.md index c2830b94d..b86362cad 100644 --- a/examples/2.3.x/client-web/examples/documentsdb/create-documents.md +++ b/examples/2.3.x/client-web/examples/documentsdb/create-documents.md @@ -10,7 +10,16 @@ const documentsDB = new DocumentsDB(client); const result = await documentsDB.createDocuments({ databaseId: '', collectionId: '', - documents: [], + documents: [ + { + $id: 'example1', + username: 'walter.obrien', + email: 'walter.obrien@example.com', + fullName: "Walter O'Brien", + age: 30, + isAdmin: false, + }, + ], transactionId: '', // optional }); diff --git a/examples/2.3.x/client-web/examples/documentsdb/list-transactions.md b/examples/2.3.x/client-web/examples/documentsdb/list-transactions.md index 161d38804..6d43c9b47 100644 --- a/examples/2.3.x/client-web/examples/documentsdb/list-transactions.md +++ b/examples/2.3.x/client-web/examples/documentsdb/list-transactions.md @@ -9,6 +9,7 @@ const documentsDB = new DocumentsDB(client); const result = await documentsDB.listTransactions({ queries: [], // optional + total: false, // optional }); console.log(result); diff --git a/examples/2.3.x/client-web/examples/graphql/mutation.md b/examples/2.3.x/client-web/examples/graphql/mutation.md index abd27e3d4..5e0a138da 100644 --- a/examples/2.3.x/client-web/examples/graphql/mutation.md +++ b/examples/2.3.x/client-web/examples/graphql/mutation.md @@ -8,7 +8,9 @@ const client = new Client() const graphql = new Graphql(client); const result = await graphql.mutation({ - query: {}, + query: { + query: 'mutation { accountUpdateName(name: "Walter") { name } }', + }, }); console.log(result); diff --git a/examples/2.3.x/client-web/examples/graphql/query.md b/examples/2.3.x/client-web/examples/graphql/query.md index 21b353fc9..e18863e6a 100644 --- a/examples/2.3.x/client-web/examples/graphql/query.md +++ b/examples/2.3.x/client-web/examples/graphql/query.md @@ -8,7 +8,9 @@ const client = new Client() const graphql = new Graphql(client); const result = await graphql.query({ - query: {}, + query: { + query: 'query { localeGet { ip } }', + }, }); console.log(result); diff --git a/examples/2.3.x/client-web/examples/locale/list-codes.md b/examples/2.3.x/client-web/examples/locale/list-codes.md index dce429ef9..d4647f3ce 100644 --- a/examples/2.3.x/client-web/examples/locale/list-codes.md +++ b/examples/2.3.x/client-web/examples/locale/list-codes.md @@ -7,7 +7,9 @@ const client = new Client() const locale = new Locale(client); -const result = await locale.listCodes(); +const result = await locale.listCodes({ + total: false, // optional +}); console.log(result); ``` diff --git a/examples/2.3.x/client-web/examples/locale/list-continents.md b/examples/2.3.x/client-web/examples/locale/list-continents.md index 4fde4252d..81321ad0f 100644 --- a/examples/2.3.x/client-web/examples/locale/list-continents.md +++ b/examples/2.3.x/client-web/examples/locale/list-continents.md @@ -7,7 +7,9 @@ const client = new Client() const locale = new Locale(client); -const result = await locale.listContinents(); +const result = await locale.listContinents({ + total: false, // optional +}); console.log(result); ``` diff --git a/examples/2.3.x/client-web/examples/locale/list-countries-eu.md b/examples/2.3.x/client-web/examples/locale/list-countries-eu.md index 917245469..902e257e2 100644 --- a/examples/2.3.x/client-web/examples/locale/list-countries-eu.md +++ b/examples/2.3.x/client-web/examples/locale/list-countries-eu.md @@ -7,7 +7,9 @@ const client = new Client() const locale = new Locale(client); -const result = await locale.listCountriesEU(); +const result = await locale.listCountriesEU({ + total: false, // optional +}); console.log(result); ``` diff --git a/examples/2.3.x/client-web/examples/locale/list-countries-phones.md b/examples/2.3.x/client-web/examples/locale/list-countries-phones.md index 95ef6e533..8bf2abe69 100644 --- a/examples/2.3.x/client-web/examples/locale/list-countries-phones.md +++ b/examples/2.3.x/client-web/examples/locale/list-countries-phones.md @@ -7,7 +7,9 @@ const client = new Client() const locale = new Locale(client); -const result = await locale.listCountriesPhones(); +const result = await locale.listCountriesPhones({ + total: false, // optional +}); console.log(result); ``` diff --git a/examples/2.3.x/client-web/examples/locale/list-countries.md b/examples/2.3.x/client-web/examples/locale/list-countries.md index 7d37e8011..453317889 100644 --- a/examples/2.3.x/client-web/examples/locale/list-countries.md +++ b/examples/2.3.x/client-web/examples/locale/list-countries.md @@ -7,7 +7,9 @@ const client = new Client() const locale = new Locale(client); -const result = await locale.listCountries(); +const result = await locale.listCountries({ + total: false, // optional +}); console.log(result); ``` diff --git a/examples/2.3.x/client-web/examples/locale/list-currencies.md b/examples/2.3.x/client-web/examples/locale/list-currencies.md index b123b1789..f52d26d81 100644 --- a/examples/2.3.x/client-web/examples/locale/list-currencies.md +++ b/examples/2.3.x/client-web/examples/locale/list-currencies.md @@ -7,7 +7,9 @@ const client = new Client() const locale = new Locale(client); -const result = await locale.listCurrencies(); +const result = await locale.listCurrencies({ + total: false, // optional +}); console.log(result); ``` diff --git a/examples/2.3.x/client-web/examples/locale/list-languages.md b/examples/2.3.x/client-web/examples/locale/list-languages.md index c9abd5dc5..4ff97c3f4 100644 --- a/examples/2.3.x/client-web/examples/locale/list-languages.md +++ b/examples/2.3.x/client-web/examples/locale/list-languages.md @@ -7,7 +7,9 @@ const client = new Client() const locale = new Locale(client); -const result = await locale.listLanguages(); +const result = await locale.listLanguages({ + total: false, // optional +}); console.log(result); ``` diff --git a/examples/2.3.x/client-web/examples/oauth2/approve.md b/examples/2.3.x/client-web/examples/oauth2/approve.md new file mode 100644 index 000000000..ee6da4a3c --- /dev/null +++ b/examples/2.3.x/client-web/examples/oauth2/approve.md @@ -0,0 +1,17 @@ +```javascript +import { Client, Oauth2 } from 'appwrite'; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const oauth2 = new Oauth2(client); + +const result = await oauth2.approve({ + grantId: '', + authorizationDetails: '', // optional + scope: '', // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/client-web/examples/oauth2/authorize-post.md b/examples/2.3.x/client-web/examples/oauth2/authorize-post.md new file mode 100644 index 000000000..7664d1054 --- /dev/null +++ b/examples/2.3.x/client-web/examples/oauth2/authorize-post.md @@ -0,0 +1,28 @@ +```javascript +import { Client, Oauth2 } from 'appwrite'; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const oauth2 = new 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 +}); + +console.log(result); +``` diff --git a/examples/2.3.x/client-web/examples/oauth2/authorize.md b/examples/2.3.x/client-web/examples/oauth2/authorize.md new file mode 100644 index 000000000..495fd11eb --- /dev/null +++ b/examples/2.3.x/client-web/examples/oauth2/authorize.md @@ -0,0 +1,28 @@ +```javascript +import { Client, Oauth2 } from 'appwrite'; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const oauth2 = new 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 +}); + +console.log(result); +``` diff --git a/examples/2.3.x/client-web/examples/oauth2/create-device-authorization.md b/examples/2.3.x/client-web/examples/oauth2/create-device-authorization.md new file mode 100644 index 000000000..56c0236ba --- /dev/null +++ b/examples/2.3.x/client-web/examples/oauth2/create-device-authorization.md @@ -0,0 +1,19 @@ +```javascript +import { Client, Oauth2 } from 'appwrite'; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const oauth2 = new Oauth2(client); + +const result = await oauth2.createDeviceAuthorization({ + clientId: '', // optional + scope: '', // optional + authorizationDetails: '', // optional + resource: '', // optional + audience: '', // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/client-web/examples/oauth2/create-grant.md b/examples/2.3.x/client-web/examples/oauth2/create-grant.md new file mode 100644 index 000000000..cd5e693a3 --- /dev/null +++ b/examples/2.3.x/client-web/examples/oauth2/create-grant.md @@ -0,0 +1,15 @@ +```javascript +import { Client, Oauth2 } from 'appwrite'; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const oauth2 = new Oauth2(client); + +const result = await oauth2.createGrant({ + userCode: '', +}); + +console.log(result); +``` diff --git a/examples/2.3.x/client-web/examples/oauth2/create-par.md b/examples/2.3.x/client-web/examples/oauth2/create-par.md new file mode 100644 index 000000000..c345b2c03 --- /dev/null +++ b/examples/2.3.x/client-web/examples/oauth2/create-par.md @@ -0,0 +1,27 @@ +```javascript +import { Client, Oauth2 } from 'appwrite'; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const oauth2 = new 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 +}); + +console.log(result); +``` diff --git a/examples/2.3.x/client-web/examples/oauth2/create-token.md b/examples/2.3.x/client-web/examples/oauth2/create-token.md new file mode 100644 index 000000000..0a2a3c718 --- /dev/null +++ b/examples/2.3.x/client-web/examples/oauth2/create-token.md @@ -0,0 +1,24 @@ +```javascript +import { Client, Oauth2 } from 'appwrite'; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const oauth2 = new 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 +}); + +console.log(result); +``` diff --git a/examples/2.3.x/client-web/examples/oauth2/get-grant.md b/examples/2.3.x/client-web/examples/oauth2/get-grant.md new file mode 100644 index 000000000..43c159fc5 --- /dev/null +++ b/examples/2.3.x/client-web/examples/oauth2/get-grant.md @@ -0,0 +1,15 @@ +```javascript +import { Client, Oauth2 } from 'appwrite'; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const oauth2 = new Oauth2(client); + +const result = await oauth2.getGrant({ + grantId: '', +}); + +console.log(result); +``` diff --git a/examples/2.3.x/client-web/examples/oauth2/list-organizations.md b/examples/2.3.x/client-web/examples/oauth2/list-organizations.md new file mode 100644 index 000000000..2efdecf78 --- /dev/null +++ b/examples/2.3.x/client-web/examples/oauth2/list-organizations.md @@ -0,0 +1,17 @@ +```javascript +import { Client, Oauth2 } from 'appwrite'; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const oauth2 = new Oauth2(client); + +const result = await oauth2.listOrganizations({ + limit: 1, // optional + offset: 0, // optional + search: '', // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/client-web/examples/oauth2/list-projects.md b/examples/2.3.x/client-web/examples/oauth2/list-projects.md new file mode 100644 index 000000000..bf7ed6aee --- /dev/null +++ b/examples/2.3.x/client-web/examples/oauth2/list-projects.md @@ -0,0 +1,17 @@ +```javascript +import { Client, Oauth2 } from 'appwrite'; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const oauth2 = new Oauth2(client); + +const result = await oauth2.listProjects({ + limit: 1, // optional + offset: 0, // optional + search: '', // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/client-web/examples/oauth2/logout-post.md b/examples/2.3.x/client-web/examples/oauth2/logout-post.md new file mode 100644 index 000000000..9f19e4b99 --- /dev/null +++ b/examples/2.3.x/client-web/examples/oauth2/logout-post.md @@ -0,0 +1,20 @@ +```javascript +import { Client, Oauth2 } from 'appwrite'; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const oauth2 = new Oauth2(client); + +const result = await oauth2.logoutPost({ + idTokenHint: '', // optional + logoutHint: '', // optional + clientId: '', // optional + postLogoutRedirectUri: 'https://example.com', // optional + state: '', // optional + uiLocales: '', // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/client-web/examples/oauth2/logout.md b/examples/2.3.x/client-web/examples/oauth2/logout.md new file mode 100644 index 000000000..df14c7a6a --- /dev/null +++ b/examples/2.3.x/client-web/examples/oauth2/logout.md @@ -0,0 +1,20 @@ +```javascript +import { Client, Oauth2 } from 'appwrite'; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const oauth2 = new Oauth2(client); + +const result = await oauth2.logout({ + idTokenHint: '', // optional + logoutHint: '', // optional + clientId: '', // optional + postLogoutRedirectUri: 'https://example.com', // optional + state: '', // optional + uiLocales: '', // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/client-web/examples/oauth2/reject.md b/examples/2.3.x/client-web/examples/oauth2/reject.md new file mode 100644 index 000000000..fe6f8698b --- /dev/null +++ b/examples/2.3.x/client-web/examples/oauth2/reject.md @@ -0,0 +1,15 @@ +```javascript +import { Client, Oauth2 } from 'appwrite'; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const oauth2 = new Oauth2(client); + +const result = await oauth2.reject({ + grantId: '', +}); + +console.log(result); +``` diff --git a/examples/2.3.x/client-web/examples/oauth2/revoke.md b/examples/2.3.x/client-web/examples/oauth2/revoke.md new file mode 100644 index 000000000..1998f5e88 --- /dev/null +++ b/examples/2.3.x/client-web/examples/oauth2/revoke.md @@ -0,0 +1,18 @@ +```javascript +import { Client, Oauth2 } from 'appwrite'; + +const client = new Client() + .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint + .setProject(''); // Your project ID + +const oauth2 = new Oauth2(client); + +const result = await oauth2.revoke({ + token: '', + tokenTypeHint: 'access_token', // optional + clientId: '', // optional + clientSecret: '', // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/client-web/examples/tablesdb/list-transactions.md b/examples/2.3.x/client-web/examples/tablesdb/list-transactions.md index 20f0dba5c..6b3a60a53 100644 --- a/examples/2.3.x/client-web/examples/tablesdb/list-transactions.md +++ b/examples/2.3.x/client-web/examples/tablesdb/list-transactions.md @@ -9,6 +9,7 @@ const tablesDB = new TablesDB(client); const result = await tablesDB.listTransactions({ queries: [], // optional + total: false, // optional }); console.log(result); diff --git a/examples/2.3.x/client-web/examples/teams/create-membership.md b/examples/2.3.x/client-web/examples/teams/create-membership.md index d8f15f3d9..e7e03ea51 100644 --- a/examples/2.3.x/client-web/examples/teams/create-membership.md +++ b/examples/2.3.x/client-web/examples/teams/create-membership.md @@ -9,7 +9,7 @@ const teams = new Teams(client); const result = await teams.createMembership({ teamId: '', - roles: [], + roles: ['editor'], email: 'email@example.com', // optional userId: '', // optional phone: '+12065550100', // optional diff --git a/examples/2.3.x/client-web/examples/teams/update-membership.md b/examples/2.3.x/client-web/examples/teams/update-membership.md index a568e3041..ce05e53f4 100644 --- a/examples/2.3.x/client-web/examples/teams/update-membership.md +++ b/examples/2.3.x/client-web/examples/teams/update-membership.md @@ -10,7 +10,7 @@ const teams = new Teams(client); const result = await teams.updateMembership({ teamId: '', membershipId: '', - roles: [], + roles: ['editor'], }); console.log(result); diff --git a/examples/2.3.x/client-web/examples/vectorsdb/create-operations.md b/examples/2.3.x/client-web/examples/vectorsdb/create-operations.md index 35fb3d34b..7e9225673 100644 --- a/examples/2.3.x/client-web/examples/vectorsdb/create-operations.md +++ b/examples/2.3.x/client-web/examples/vectorsdb/create-operations.md @@ -16,7 +16,10 @@ const result = await vectorsDB.createOperations({ collectionId: '', documentId: '', data: { - name: "Walter O'Brien", + embeddings: [0.12, -0.55, 0.88, 1.02], + metadata: { + name: 'First document', + }, }, }, ], // optional diff --git a/examples/2.3.x/client-web/examples/vectorsdb/list-transactions.md b/examples/2.3.x/client-web/examples/vectorsdb/list-transactions.md index a39afbc15..981018e76 100644 --- a/examples/2.3.x/client-web/examples/vectorsdb/list-transactions.md +++ b/examples/2.3.x/client-web/examples/vectorsdb/list-transactions.md @@ -9,6 +9,7 @@ const vectorsDB = new VectorsDB(client); const result = await vectorsDB.listTransactions({ queries: [], // optional + total: false, // optional }); console.log(result); diff --git a/examples/2.3.x/console-cli/examples/account/update-mfa.md b/examples/2.3.x/console-cli/examples/account/update-mfa.md index 77b324179..b137706de 100644 --- a/examples/2.3.x/console-cli/examples/account/update-mfa.md +++ b/examples/2.3.x/console-cli/examples/account/update-mfa.md @@ -1,4 +1,4 @@ ```bash appwrite account update-mfa \ - --mfa false + --mfa=false ``` diff --git a/examples/2.3.x/console-cli/examples/account/update-prefs.md b/examples/2.3.x/console-cli/examples/account/update-prefs.md index 80fc7d8f6..3d0e2cd13 100644 --- a/examples/2.3.x/console-cli/examples/account/update-prefs.md +++ b/examples/2.3.x/console-cli/examples/account/update-prefs.md @@ -1,4 +1,4 @@ ```bash appwrite account update-prefs \ - --prefs '{ "key": "value" }' + --prefs '{"language":"en","timezone":"UTC","darkTheme":true}' ``` diff --git a/examples/2.3.x/console-cli/examples/analytics/create-event.md b/examples/2.3.x/console-cli/examples/analytics/create-event.md new file mode 100644 index 000000000..b61a1671e --- /dev/null +++ b/examples/2.3.x/console-cli/examples/analytics/create-event.md @@ -0,0 +1,6 @@ +```bash +appwrite analytics create-event \ + --property-id '' \ + --name '' \ + --url https://example.com +``` diff --git a/examples/2.3.x/console-cli/examples/analytics/create-property.md b/examples/2.3.x/console-cli/examples/analytics/create-property.md new file mode 100644 index 000000000..02c6b915d --- /dev/null +++ b/examples/2.3.x/console-cli/examples/analytics/create-property.md @@ -0,0 +1,5 @@ +```bash +appwrite analytics create-property \ + --property-id '' \ + --name '' +``` diff --git a/examples/2.3.x/console-cli/examples/analytics/delete-property.md b/examples/2.3.x/console-cli/examples/analytics/delete-property.md new file mode 100644 index 000000000..95e739eb6 --- /dev/null +++ b/examples/2.3.x/console-cli/examples/analytics/delete-property.md @@ -0,0 +1,4 @@ +```bash +appwrite analytics delete-property \ + --property-id '' +``` diff --git a/examples/2.3.x/console-cli/examples/analytics/get-property.md b/examples/2.3.x/console-cli/examples/analytics/get-property.md new file mode 100644 index 000000000..bfe56a4ad --- /dev/null +++ b/examples/2.3.x/console-cli/examples/analytics/get-property.md @@ -0,0 +1,4 @@ +```bash +appwrite analytics get-property \ + --property-id '' +``` diff --git a/examples/2.3.x/console-cli/examples/analytics/list-metrics.md b/examples/2.3.x/console-cli/examples/analytics/list-metrics.md new file mode 100644 index 000000000..a00af31bf --- /dev/null +++ b/examples/2.3.x/console-cli/examples/analytics/list-metrics.md @@ -0,0 +1,4 @@ +```bash +appwrite analytics list-metrics \ + --property-id '' +``` diff --git a/examples/2.3.x/console-cli/examples/analytics/list-properties.md b/examples/2.3.x/console-cli/examples/analytics/list-properties.md new file mode 100644 index 000000000..63f4f3b63 --- /dev/null +++ b/examples/2.3.x/console-cli/examples/analytics/list-properties.md @@ -0,0 +1,4 @@ +```bash +appwrite analytics list-properties \ + --limit 25 +``` diff --git a/examples/2.3.x/console-cli/examples/analytics/update-property.md b/examples/2.3.x/console-cli/examples/analytics/update-property.md new file mode 100644 index 000000000..bee0531cb --- /dev/null +++ b/examples/2.3.x/console-cli/examples/analytics/update-property.md @@ -0,0 +1,4 @@ +```bash +appwrite analytics update-property \ + --property-id '' +``` diff --git a/examples/2.3.x/console-cli/examples/apps/create.md b/examples/2.3.x/console-cli/examples/apps/create.md index 05006a8c0..bbeda90ef 100644 --- a/examples/2.3.x/console-cli/examples/apps/create.md +++ b/examples/2.3.x/console-cli/examples/apps/create.md @@ -2,5 +2,5 @@ appwrite apps create \ --app-id '' \ --name '' \ - --redirect-uris one two three + --redirect-uris '' ``` diff --git a/examples/2.3.x/console-cli/examples/apps/update-labels.md b/examples/2.3.x/console-cli/examples/apps/update-labels.md index b574bb9ba..dd56f858f 100644 --- a/examples/2.3.x/console-cli/examples/apps/update-labels.md +++ b/examples/2.3.x/console-cli/examples/apps/update-labels.md @@ -1,5 +1,5 @@ ```bash appwrite apps update-labels \ --app-id '' \ - --labels one two three + --labels '' ``` diff --git a/examples/2.3.x/console-cli/examples/backups/create-archive.md b/examples/2.3.x/console-cli/examples/backups/create-archive.md index 984d4ce64..662bbd1dc 100644 --- a/examples/2.3.x/console-cli/examples/backups/create-archive.md +++ b/examples/2.3.x/console-cli/examples/backups/create-archive.md @@ -1,4 +1,4 @@ ```bash appwrite backups create-archive \ - --services one two three + --services databases ``` diff --git a/examples/2.3.x/console-cli/examples/backups/create-policy.md b/examples/2.3.x/console-cli/examples/backups/create-policy.md index fb893dc41..7838cfb4e 100644 --- a/examples/2.3.x/console-cli/examples/backups/create-policy.md +++ b/examples/2.3.x/console-cli/examples/backups/create-policy.md @@ -1,7 +1,7 @@ ```bash appwrite backups create-policy \ --policy-id '' \ - --services one two three \ + --services databases \ --retention 1 \ - --schedule '' + --schedule '' ``` diff --git a/examples/2.3.x/console-cli/examples/backups/create-restoration.md b/examples/2.3.x/console-cli/examples/backups/create-restoration.md index a4e1e2c22..71d37fe83 100644 --- a/examples/2.3.x/console-cli/examples/backups/create-restoration.md +++ b/examples/2.3.x/console-cli/examples/backups/create-restoration.md @@ -1,5 +1,5 @@ ```bash appwrite backups create-restoration \ --archive-id '' \ - --services one two three + --services databases ``` diff --git a/examples/2.3.x/console-cli/examples/databases/create-big-int-attribute.md b/examples/2.3.x/console-cli/examples/databases/create-big-int-attribute.md index b6723191d..6588324f4 100644 --- a/examples/2.3.x/console-cli/examples/databases/create-big-int-attribute.md +++ b/examples/2.3.x/console-cli/examples/databases/create-big-int-attribute.md @@ -3,5 +3,5 @@ appwrite databases create-big-int-attribute \ --database-id '' \ --collection-id '' \ --key '' \ - --required false + --required=false ``` diff --git a/examples/2.3.x/console-cli/examples/databases/create-boolean-attribute.md b/examples/2.3.x/console-cli/examples/databases/create-boolean-attribute.md index fdeca8e82..0d535df36 100644 --- a/examples/2.3.x/console-cli/examples/databases/create-boolean-attribute.md +++ b/examples/2.3.x/console-cli/examples/databases/create-boolean-attribute.md @@ -3,5 +3,5 @@ appwrite databases create-boolean-attribute \ --database-id '' \ --collection-id '' \ --key '' \ - --required false + --required=false ``` diff --git a/examples/2.3.x/console-cli/examples/databases/create-datetime-attribute.md b/examples/2.3.x/console-cli/examples/databases/create-datetime-attribute.md index 2bd727d69..debc1a658 100644 --- a/examples/2.3.x/console-cli/examples/databases/create-datetime-attribute.md +++ b/examples/2.3.x/console-cli/examples/databases/create-datetime-attribute.md @@ -3,5 +3,5 @@ appwrite databases create-datetime-attribute \ --database-id '' \ --collection-id '' \ --key '' \ - --required false + --required=false ``` diff --git a/examples/2.3.x/console-cli/examples/databases/create-document.md b/examples/2.3.x/console-cli/examples/databases/create-document.md index d14a8498a..2222c1672 100644 --- a/examples/2.3.x/console-cli/examples/databases/create-document.md +++ b/examples/2.3.x/console-cli/examples/databases/create-document.md @@ -3,5 +3,5 @@ appwrite databases create-document \ --database-id '' \ --collection-id '' \ --document-id '' \ - --data '{ "key": "value" }' + --data '{"username":"walter.obrien","email":"walter.obrien@example.com","fullName":"Walter O'"'"'Brien","age":30,"isAdmin":false}' ``` diff --git a/examples/2.3.x/console-cli/examples/databases/create-documents.md b/examples/2.3.x/console-cli/examples/databases/create-documents.md index 1c9fbfb26..3d68ea3b9 100644 --- a/examples/2.3.x/console-cli/examples/databases/create-documents.md +++ b/examples/2.3.x/console-cli/examples/databases/create-documents.md @@ -2,5 +2,5 @@ appwrite databases create-documents \ --database-id '' \ --collection-id '' \ - --documents one two three + --documents '{"$id":"example1","username":"walter.obrien","email":"walter.obrien@example.com","fullName":"Walter O'"'"'Brien","age":30,"isAdmin":false}' ``` diff --git a/examples/2.3.x/console-cli/examples/databases/create-email-attribute.md b/examples/2.3.x/console-cli/examples/databases/create-email-attribute.md index d28ab7bb9..c6add8f17 100644 --- a/examples/2.3.x/console-cli/examples/databases/create-email-attribute.md +++ b/examples/2.3.x/console-cli/examples/databases/create-email-attribute.md @@ -3,5 +3,5 @@ appwrite databases create-email-attribute \ --database-id '' \ --collection-id '' \ --key '' \ - --required false + --required=false ``` diff --git a/examples/2.3.x/console-cli/examples/databases/create-enum-attribute.md b/examples/2.3.x/console-cli/examples/databases/create-enum-attribute.md index b8bef3823..8806b4063 100644 --- a/examples/2.3.x/console-cli/examples/databases/create-enum-attribute.md +++ b/examples/2.3.x/console-cli/examples/databases/create-enum-attribute.md @@ -3,6 +3,7 @@ appwrite databases create-enum-attribute \ --database-id '' \ --collection-id '' \ --key '' \ - --elements "active" "inactive" \ - --required false + --elements active \ + --elements inactive \ + --required=false ``` diff --git a/examples/2.3.x/console-cli/examples/databases/create-float-attribute.md b/examples/2.3.x/console-cli/examples/databases/create-float-attribute.md index 9d992c0cc..0cf954242 100644 --- a/examples/2.3.x/console-cli/examples/databases/create-float-attribute.md +++ b/examples/2.3.x/console-cli/examples/databases/create-float-attribute.md @@ -3,5 +3,5 @@ appwrite databases create-float-attribute \ --database-id '' \ --collection-id '' \ --key '' \ - --required false + --required=false ``` diff --git a/examples/2.3.x/console-cli/examples/databases/create-index.md b/examples/2.3.x/console-cli/examples/databases/create-index.md index 266472713..498c3c9da 100644 --- a/examples/2.3.x/console-cli/examples/databases/create-index.md +++ b/examples/2.3.x/console-cli/examples/databases/create-index.md @@ -4,5 +4,5 @@ appwrite databases create-index \ --collection-id '' \ --key '' \ --type key \ - --attributes one two three + --attributes username ``` diff --git a/examples/2.3.x/console-cli/examples/databases/create-integer-attribute.md b/examples/2.3.x/console-cli/examples/databases/create-integer-attribute.md index 072a08148..308bb5cb6 100644 --- a/examples/2.3.x/console-cli/examples/databases/create-integer-attribute.md +++ b/examples/2.3.x/console-cli/examples/databases/create-integer-attribute.md @@ -3,5 +3,5 @@ appwrite databases create-integer-attribute \ --database-id '' \ --collection-id '' \ --key '' \ - --required false + --required=false ``` diff --git a/examples/2.3.x/console-cli/examples/databases/create-ip-attribute.md b/examples/2.3.x/console-cli/examples/databases/create-ip-attribute.md index 8e7371074..f7956f7f3 100644 --- a/examples/2.3.x/console-cli/examples/databases/create-ip-attribute.md +++ b/examples/2.3.x/console-cli/examples/databases/create-ip-attribute.md @@ -3,5 +3,5 @@ appwrite databases create-ip-attribute \ --database-id '' \ --collection-id '' \ --key '' \ - --required false + --required=false ``` diff --git a/examples/2.3.x/console-cli/examples/databases/create-line-attribute.md b/examples/2.3.x/console-cli/examples/databases/create-line-attribute.md index 371c418d5..570d823b3 100644 --- a/examples/2.3.x/console-cli/examples/databases/create-line-attribute.md +++ b/examples/2.3.x/console-cli/examples/databases/create-line-attribute.md @@ -3,5 +3,5 @@ appwrite databases create-line-attribute \ --database-id '' \ --collection-id '' \ --key '' \ - --required false + --required=false ``` diff --git a/examples/2.3.x/console-cli/examples/databases/create-longtext-attribute.md b/examples/2.3.x/console-cli/examples/databases/create-longtext-attribute.md index e8126d52e..bbe95bb19 100644 --- a/examples/2.3.x/console-cli/examples/databases/create-longtext-attribute.md +++ b/examples/2.3.x/console-cli/examples/databases/create-longtext-attribute.md @@ -3,5 +3,5 @@ appwrite databases create-longtext-attribute \ --database-id '' \ --collection-id '' \ --key '' \ - --required false + --required=false ``` diff --git a/examples/2.3.x/console-cli/examples/databases/create-mediumtext-attribute.md b/examples/2.3.x/console-cli/examples/databases/create-mediumtext-attribute.md index cd391c731..dfe143291 100644 --- a/examples/2.3.x/console-cli/examples/databases/create-mediumtext-attribute.md +++ b/examples/2.3.x/console-cli/examples/databases/create-mediumtext-attribute.md @@ -3,5 +3,5 @@ appwrite databases create-mediumtext-attribute \ --database-id '' \ --collection-id '' \ --key '' \ - --required false + --required=false ``` diff --git a/examples/2.3.x/console-cli/examples/databases/create-point-attribute.md b/examples/2.3.x/console-cli/examples/databases/create-point-attribute.md index e16557a17..c76b9787f 100644 --- a/examples/2.3.x/console-cli/examples/databases/create-point-attribute.md +++ b/examples/2.3.x/console-cli/examples/databases/create-point-attribute.md @@ -3,5 +3,5 @@ appwrite databases create-point-attribute \ --database-id '' \ --collection-id '' \ --key '' \ - --required false + --required=false ``` diff --git a/examples/2.3.x/console-cli/examples/databases/create-polygon-attribute.md b/examples/2.3.x/console-cli/examples/databases/create-polygon-attribute.md index 82066257b..d4edce31f 100644 --- a/examples/2.3.x/console-cli/examples/databases/create-polygon-attribute.md +++ b/examples/2.3.x/console-cli/examples/databases/create-polygon-attribute.md @@ -3,5 +3,5 @@ appwrite databases create-polygon-attribute \ --database-id '' \ --collection-id '' \ --key '' \ - --required false + --required=false ``` diff --git a/examples/2.3.x/console-cli/examples/databases/create-string-attribute.md b/examples/2.3.x/console-cli/examples/databases/create-string-attribute.md index acbd165e0..a6e50c2c5 100644 --- a/examples/2.3.x/console-cli/examples/databases/create-string-attribute.md +++ b/examples/2.3.x/console-cli/examples/databases/create-string-attribute.md @@ -4,5 +4,5 @@ appwrite databases create-string-attribute \ --collection-id '' \ --key '' \ --size 1 \ - --required false + --required=false ``` diff --git a/examples/2.3.x/console-cli/examples/databases/create-text-attribute.md b/examples/2.3.x/console-cli/examples/databases/create-text-attribute.md index 9836c002a..94089a187 100644 --- a/examples/2.3.x/console-cli/examples/databases/create-text-attribute.md +++ b/examples/2.3.x/console-cli/examples/databases/create-text-attribute.md @@ -3,5 +3,5 @@ appwrite databases create-text-attribute \ --database-id '' \ --collection-id '' \ --key '' \ - --required false + --required=false ``` diff --git a/examples/2.3.x/console-cli/examples/databases/create-url-attribute.md b/examples/2.3.x/console-cli/examples/databases/create-url-attribute.md index 2dc8eeaf5..c0c545f17 100644 --- a/examples/2.3.x/console-cli/examples/databases/create-url-attribute.md +++ b/examples/2.3.x/console-cli/examples/databases/create-url-attribute.md @@ -3,5 +3,5 @@ appwrite databases create-url-attribute \ --database-id '' \ --collection-id '' \ --key '' \ - --required false + --required=false ``` diff --git a/examples/2.3.x/console-cli/examples/databases/create-varchar-attribute.md b/examples/2.3.x/console-cli/examples/databases/create-varchar-attribute.md index 4aed5c58e..25f34791d 100644 --- a/examples/2.3.x/console-cli/examples/databases/create-varchar-attribute.md +++ b/examples/2.3.x/console-cli/examples/databases/create-varchar-attribute.md @@ -4,5 +4,5 @@ appwrite databases create-varchar-attribute \ --collection-id '' \ --key '' \ --size 1 \ - --required false + --required=false ``` diff --git a/examples/2.3.x/console-cli/examples/databases/update-big-int-attribute.md b/examples/2.3.x/console-cli/examples/databases/update-big-int-attribute.md index a371e6fe7..baff2a27c 100644 --- a/examples/2.3.x/console-cli/examples/databases/update-big-int-attribute.md +++ b/examples/2.3.x/console-cli/examples/databases/update-big-int-attribute.md @@ -3,6 +3,6 @@ appwrite databases update-big-int-attribute \ --database-id '' \ --collection-id '' \ --key '' \ - --required false \ - --default 0 + --required=false \ + --xdefault 0 ``` diff --git a/examples/2.3.x/console-cli/examples/databases/update-boolean-attribute.md b/examples/2.3.x/console-cli/examples/databases/update-boolean-attribute.md index af3960fb3..5e2e01a1b 100644 --- a/examples/2.3.x/console-cli/examples/databases/update-boolean-attribute.md +++ b/examples/2.3.x/console-cli/examples/databases/update-boolean-attribute.md @@ -3,6 +3,6 @@ appwrite databases update-boolean-attribute \ --database-id '' \ --collection-id '' \ --key '' \ - --required false \ - --default false + --required=false \ + --xdefault=false ``` diff --git a/examples/2.3.x/console-cli/examples/databases/update-datetime-attribute.md b/examples/2.3.x/console-cli/examples/databases/update-datetime-attribute.md index 9e78e4a6c..affc80e44 100644 --- a/examples/2.3.x/console-cli/examples/databases/update-datetime-attribute.md +++ b/examples/2.3.x/console-cli/examples/databases/update-datetime-attribute.md @@ -3,6 +3,6 @@ appwrite databases update-datetime-attribute \ --database-id '' \ --collection-id '' \ --key '' \ - --required false \ - --default 2020-10-15T06:38:00.000+00:00 + --required=false \ + --xdefault 2020-10-15T06:38:00.000+00:00 ``` diff --git a/examples/2.3.x/console-cli/examples/databases/update-email-attribute.md b/examples/2.3.x/console-cli/examples/databases/update-email-attribute.md index 1e29ab6c6..6a49254d5 100644 --- a/examples/2.3.x/console-cli/examples/databases/update-email-attribute.md +++ b/examples/2.3.x/console-cli/examples/databases/update-email-attribute.md @@ -3,6 +3,6 @@ appwrite databases update-email-attribute \ --database-id '' \ --collection-id '' \ --key '' \ - --required false \ - --default email@example.com + --required=false \ + --xdefault email@example.com ``` diff --git a/examples/2.3.x/console-cli/examples/databases/update-enum-attribute.md b/examples/2.3.x/console-cli/examples/databases/update-enum-attribute.md index 95dac92a6..dbb2c160d 100644 --- a/examples/2.3.x/console-cli/examples/databases/update-enum-attribute.md +++ b/examples/2.3.x/console-cli/examples/databases/update-enum-attribute.md @@ -3,7 +3,8 @@ appwrite databases update-enum-attribute \ --database-id '' \ --collection-id '' \ --key '' \ - --elements "active" "inactive" \ - --required false \ - --default active + --elements active \ + --elements inactive \ + --required=false \ + --xdefault active ``` diff --git a/examples/2.3.x/console-cli/examples/databases/update-float-attribute.md b/examples/2.3.x/console-cli/examples/databases/update-float-attribute.md index 84949cc50..f17e97ac5 100644 --- a/examples/2.3.x/console-cli/examples/databases/update-float-attribute.md +++ b/examples/2.3.x/console-cli/examples/databases/update-float-attribute.md @@ -3,6 +3,6 @@ appwrite databases update-float-attribute \ --database-id '' \ --collection-id '' \ --key '' \ - --required false \ - --default 10.5 + --required=false \ + --xdefault 10.5 ``` diff --git a/examples/2.3.x/console-cli/examples/databases/update-integer-attribute.md b/examples/2.3.x/console-cli/examples/databases/update-integer-attribute.md index 0239677f5..798a0c3f7 100644 --- a/examples/2.3.x/console-cli/examples/databases/update-integer-attribute.md +++ b/examples/2.3.x/console-cli/examples/databases/update-integer-attribute.md @@ -3,6 +3,6 @@ appwrite databases update-integer-attribute \ --database-id '' \ --collection-id '' \ --key '' \ - --required false \ - --default 10 + --required=false \ + --xdefault 10 ``` diff --git a/examples/2.3.x/console-cli/examples/databases/update-ip-attribute.md b/examples/2.3.x/console-cli/examples/databases/update-ip-attribute.md index 7fe37561b..4c2986ed2 100644 --- a/examples/2.3.x/console-cli/examples/databases/update-ip-attribute.md +++ b/examples/2.3.x/console-cli/examples/databases/update-ip-attribute.md @@ -3,6 +3,6 @@ appwrite databases update-ip-attribute \ --database-id '' \ --collection-id '' \ --key '' \ - --required false \ - --default 192.0.2.0 + --required=false \ + --xdefault 192.0.2.0 ``` diff --git a/examples/2.3.x/console-cli/examples/databases/update-line-attribute.md b/examples/2.3.x/console-cli/examples/databases/update-line-attribute.md index ca4a53f7f..297f7c0b1 100644 --- a/examples/2.3.x/console-cli/examples/databases/update-line-attribute.md +++ b/examples/2.3.x/console-cli/examples/databases/update-line-attribute.md @@ -3,5 +3,5 @@ appwrite databases update-line-attribute \ --database-id '' \ --collection-id '' \ --key '' \ - --required false + --required=false ``` diff --git a/examples/2.3.x/console-cli/examples/databases/update-longtext-attribute.md b/examples/2.3.x/console-cli/examples/databases/update-longtext-attribute.md index 27cb4aac4..ee53dba7c 100644 --- a/examples/2.3.x/console-cli/examples/databases/update-longtext-attribute.md +++ b/examples/2.3.x/console-cli/examples/databases/update-longtext-attribute.md @@ -3,6 +3,6 @@ appwrite databases update-longtext-attribute \ --database-id '' \ --collection-id '' \ --key '' \ - --required false \ - --default 'Hello World' + --required=false \ + --xdefault 'Hello World' ``` diff --git a/examples/2.3.x/console-cli/examples/databases/update-mediumtext-attribute.md b/examples/2.3.x/console-cli/examples/databases/update-mediumtext-attribute.md index 27d4569bc..15ab5f864 100644 --- a/examples/2.3.x/console-cli/examples/databases/update-mediumtext-attribute.md +++ b/examples/2.3.x/console-cli/examples/databases/update-mediumtext-attribute.md @@ -3,6 +3,6 @@ appwrite databases update-mediumtext-attribute \ --database-id '' \ --collection-id '' \ --key '' \ - --required false \ - --default 'Hello World' + --required=false \ + --xdefault 'Hello World' ``` diff --git a/examples/2.3.x/console-cli/examples/databases/update-point-attribute.md b/examples/2.3.x/console-cli/examples/databases/update-point-attribute.md index 9a0332913..3d7c649b4 100644 --- a/examples/2.3.x/console-cli/examples/databases/update-point-attribute.md +++ b/examples/2.3.x/console-cli/examples/databases/update-point-attribute.md @@ -3,5 +3,5 @@ appwrite databases update-point-attribute \ --database-id '' \ --collection-id '' \ --key '' \ - --required false + --required=false ``` diff --git a/examples/2.3.x/console-cli/examples/databases/update-polygon-attribute.md b/examples/2.3.x/console-cli/examples/databases/update-polygon-attribute.md index 9b461b8b8..57e7b239a 100644 --- a/examples/2.3.x/console-cli/examples/databases/update-polygon-attribute.md +++ b/examples/2.3.x/console-cli/examples/databases/update-polygon-attribute.md @@ -3,5 +3,5 @@ appwrite databases update-polygon-attribute \ --database-id '' \ --collection-id '' \ --key '' \ - --required false + --required=false ``` diff --git a/examples/2.3.x/console-cli/examples/databases/update-string-attribute.md b/examples/2.3.x/console-cli/examples/databases/update-string-attribute.md index 8db9c724f..124166f45 100644 --- a/examples/2.3.x/console-cli/examples/databases/update-string-attribute.md +++ b/examples/2.3.x/console-cli/examples/databases/update-string-attribute.md @@ -3,6 +3,6 @@ appwrite databases update-string-attribute \ --database-id '' \ --collection-id '' \ --key '' \ - --required false \ - --default 'Hello World' + --required=false \ + --xdefault 'Hello World' ``` diff --git a/examples/2.3.x/console-cli/examples/databases/update-text-attribute.md b/examples/2.3.x/console-cli/examples/databases/update-text-attribute.md index d52e97644..02c48d095 100644 --- a/examples/2.3.x/console-cli/examples/databases/update-text-attribute.md +++ b/examples/2.3.x/console-cli/examples/databases/update-text-attribute.md @@ -3,6 +3,6 @@ appwrite databases update-text-attribute \ --database-id '' \ --collection-id '' \ --key '' \ - --required false \ - --default 'Hello World' + --required=false \ + --xdefault 'Hello World' ``` diff --git a/examples/2.3.x/console-cli/examples/databases/update-url-attribute.md b/examples/2.3.x/console-cli/examples/databases/update-url-attribute.md index a5e8548ae..2d99450ca 100644 --- a/examples/2.3.x/console-cli/examples/databases/update-url-attribute.md +++ b/examples/2.3.x/console-cli/examples/databases/update-url-attribute.md @@ -3,6 +3,6 @@ appwrite databases update-url-attribute \ --database-id '' \ --collection-id '' \ --key '' \ - --required false \ - --default https://example.com + --required=false \ + --xdefault https://example.com ``` diff --git a/examples/2.3.x/console-cli/examples/databases/update-varchar-attribute.md b/examples/2.3.x/console-cli/examples/databases/update-varchar-attribute.md index 1e726a42b..9651eb225 100644 --- a/examples/2.3.x/console-cli/examples/databases/update-varchar-attribute.md +++ b/examples/2.3.x/console-cli/examples/databases/update-varchar-attribute.md @@ -3,6 +3,6 @@ appwrite databases update-varchar-attribute \ --database-id '' \ --collection-id '' \ --key '' \ - --required false \ - --default 'Hello World' + --required=false \ + --xdefault 'Hello World' ``` diff --git a/examples/2.3.x/console-cli/examples/databases/upsert-documents.md b/examples/2.3.x/console-cli/examples/databases/upsert-documents.md index 1bb53704a..76ea9769f 100644 --- a/examples/2.3.x/console-cli/examples/databases/upsert-documents.md +++ b/examples/2.3.x/console-cli/examples/databases/upsert-documents.md @@ -2,5 +2,5 @@ appwrite databases upsert-documents \ --database-id '' \ --collection-id '' \ - --documents one two three + --documents '{"$id":"example1","username":"walter.obrien","email":"walter.obrien@example.com","fullName":"Walter O'"'"'Brien","age":30,"isAdmin":false}' ``` diff --git a/examples/2.3.x/console-cli/examples/documentsdb/create-document.md b/examples/2.3.x/console-cli/examples/documentsdb/create-document.md index 68d4ecf7c..1ed357230 100644 --- a/examples/2.3.x/console-cli/examples/documentsdb/create-document.md +++ b/examples/2.3.x/console-cli/examples/documentsdb/create-document.md @@ -3,5 +3,5 @@ appwrite documentsdb create-document \ --database-id '' \ --collection-id '' \ --document-id '' \ - --data '{ "key": "value" }' + --data '{"username":"walter.obrien","email":"walter.obrien@example.com","fullName":"Walter O'"'"'Brien","age":30,"isAdmin":false}' ``` diff --git a/examples/2.3.x/console-cli/examples/documentsdb/create-documents.md b/examples/2.3.x/console-cli/examples/documentsdb/create-documents.md index ddaa05eaa..a740a266d 100644 --- a/examples/2.3.x/console-cli/examples/documentsdb/create-documents.md +++ b/examples/2.3.x/console-cli/examples/documentsdb/create-documents.md @@ -2,5 +2,5 @@ appwrite documentsdb create-documents \ --database-id '' \ --collection-id '' \ - --documents one two three + --documents '{"$id":"example1","username":"walter.obrien","email":"walter.obrien@example.com","fullName":"Walter O'"'"'Brien","age":30,"isAdmin":false}' ``` diff --git a/examples/2.3.x/console-cli/examples/documentsdb/create-index.md b/examples/2.3.x/console-cli/examples/documentsdb/create-index.md index 1fa9238a3..32386f568 100644 --- a/examples/2.3.x/console-cli/examples/documentsdb/create-index.md +++ b/examples/2.3.x/console-cli/examples/documentsdb/create-index.md @@ -4,5 +4,5 @@ appwrite documentsdb create-index \ --collection-id '' \ --key '' \ --type key \ - --attributes one two three + --attributes username ``` diff --git a/examples/2.3.x/console-cli/examples/documentsdb/create-operations.md b/examples/2.3.x/console-cli/examples/documentsdb/create-operations.md new file mode 100644 index 000000000..565956adb --- /dev/null +++ b/examples/2.3.x/console-cli/examples/documentsdb/create-operations.md @@ -0,0 +1,4 @@ +```bash +appwrite documentsdb create-operations \ + --transaction-id '' +``` diff --git a/examples/2.3.x/console-cli/examples/documentsdb/upsert-documents.md b/examples/2.3.x/console-cli/examples/documentsdb/upsert-documents.md index 646977ad2..9b56aca8a 100644 --- a/examples/2.3.x/console-cli/examples/documentsdb/upsert-documents.md +++ b/examples/2.3.x/console-cli/examples/documentsdb/upsert-documents.md @@ -2,5 +2,5 @@ appwrite documentsdb upsert-documents \ --database-id '' \ --collection-id '' \ - --documents one two three + --documents '{"$id":"example1","username":"walter.obrien","email":"walter.obrien@example.com","fullName":"Walter O'"'"'Brien","age":30,"isAdmin":false}' ``` diff --git a/examples/2.3.x/console-cli/examples/domains/create-record-a.md b/examples/2.3.x/console-cli/examples/domains/create-record-a.md index 4517579a2..f0ed33c7a 100644 --- a/examples/2.3.x/console-cli/examples/domains/create-record-a.md +++ b/examples/2.3.x/console-cli/examples/domains/create-record-a.md @@ -1,7 +1,7 @@ ```bash appwrite domains create-record-a \ --domain-id '' \ - --name '' \ - --value '' \ + --name '' \ + --value '' \ --ttl 1 ``` diff --git a/examples/2.3.x/console-cli/examples/domains/create-record-aaaa.md b/examples/2.3.x/console-cli/examples/domains/create-record-aaaa.md index 25e144d6a..62392dcf0 100644 --- a/examples/2.3.x/console-cli/examples/domains/create-record-aaaa.md +++ b/examples/2.3.x/console-cli/examples/domains/create-record-aaaa.md @@ -1,7 +1,7 @@ ```bash appwrite domains create-record-aaaa \ --domain-id '' \ - --name '' \ - --value '' \ + --name '' \ + --value '' \ --ttl 1 ``` diff --git a/examples/2.3.x/console-cli/examples/domains/create-record-alias.md b/examples/2.3.x/console-cli/examples/domains/create-record-alias.md index c14f2c291..f87a8e7f0 100644 --- a/examples/2.3.x/console-cli/examples/domains/create-record-alias.md +++ b/examples/2.3.x/console-cli/examples/domains/create-record-alias.md @@ -1,7 +1,7 @@ ```bash appwrite domains create-record-alias \ --domain-id '' \ - --name '' \ + --name '' \ --value '' \ --ttl 1 ``` diff --git a/examples/2.3.x/console-cli/examples/domains/create-record-caa.md b/examples/2.3.x/console-cli/examples/domains/create-record-caa.md index b20aff851..6285e3cba 100644 --- a/examples/2.3.x/console-cli/examples/domains/create-record-caa.md +++ b/examples/2.3.x/console-cli/examples/domains/create-record-caa.md @@ -1,7 +1,7 @@ ```bash appwrite domains create-record-caa \ --domain-id '' \ - --name '' \ - --value '' \ + --name '' \ + --value '' \ --ttl 1 ``` diff --git a/examples/2.3.x/console-cli/examples/domains/create-record-cname.md b/examples/2.3.x/console-cli/examples/domains/create-record-cname.md index 084057b16..0c2f5b80f 100644 --- a/examples/2.3.x/console-cli/examples/domains/create-record-cname.md +++ b/examples/2.3.x/console-cli/examples/domains/create-record-cname.md @@ -1,7 +1,7 @@ ```bash appwrite domains create-record-cname \ --domain-id '' \ - --name '' \ + --name '' \ --value '' \ --ttl 1 ``` diff --git a/examples/2.3.x/console-cli/examples/domains/create-record-https.md b/examples/2.3.x/console-cli/examples/domains/create-record-https.md index 1c0618f12..647edb341 100644 --- a/examples/2.3.x/console-cli/examples/domains/create-record-https.md +++ b/examples/2.3.x/console-cli/examples/domains/create-record-https.md @@ -1,7 +1,7 @@ ```bash appwrite domains create-record-https \ --domain-id '' \ - --name '' \ + --name '' \ --value '' \ --ttl 1 ``` diff --git a/examples/2.3.x/console-cli/examples/domains/create-record-mx.md b/examples/2.3.x/console-cli/examples/domains/create-record-mx.md index f92422426..8369bf0de 100644 --- a/examples/2.3.x/console-cli/examples/domains/create-record-mx.md +++ b/examples/2.3.x/console-cli/examples/domains/create-record-mx.md @@ -1,7 +1,7 @@ ```bash appwrite domains create-record-mx \ --domain-id '' \ - --name '' \ + --name '' \ --value '' \ --ttl 1 \ --priority 0 diff --git a/examples/2.3.x/console-cli/examples/domains/create-record-ns.md b/examples/2.3.x/console-cli/examples/domains/create-record-ns.md index 9aa4440d8..1c6b0ee5c 100644 --- a/examples/2.3.x/console-cli/examples/domains/create-record-ns.md +++ b/examples/2.3.x/console-cli/examples/domains/create-record-ns.md @@ -1,7 +1,7 @@ ```bash appwrite domains create-record-ns \ --domain-id '' \ - --name '' \ + --name '' \ --value '' \ --ttl 1 ``` diff --git a/examples/2.3.x/console-cli/examples/domains/create-record-srv.md b/examples/2.3.x/console-cli/examples/domains/create-record-srv.md index 7b5cf346e..03fdef740 100644 --- a/examples/2.3.x/console-cli/examples/domains/create-record-srv.md +++ b/examples/2.3.x/console-cli/examples/domains/create-record-srv.md @@ -1,7 +1,7 @@ ```bash appwrite domains create-record-srv \ --domain-id '' \ - --name '' \ + --name '' \ --value '' \ --ttl 1 \ --priority 0 \ diff --git a/examples/2.3.x/console-cli/examples/domains/create-record-txt.md b/examples/2.3.x/console-cli/examples/domains/create-record-txt.md index 4d70663aa..b7488eedb 100644 --- a/examples/2.3.x/console-cli/examples/domains/create-record-txt.md +++ b/examples/2.3.x/console-cli/examples/domains/create-record-txt.md @@ -1,6 +1,6 @@ ```bash appwrite domains create-record-txt \ --domain-id '' \ - --name '' \ + --name '' \ --ttl 1 ``` diff --git a/examples/2.3.x/console-cli/examples/domains/list-prices.md b/examples/2.3.x/console-cli/examples/domains/list-prices.md index 9d85aa32f..95caae6f0 100644 --- a/examples/2.3.x/console-cli/examples/domains/list-prices.md +++ b/examples/2.3.x/console-cli/examples/domains/list-prices.md @@ -1,4 +1,4 @@ ```bash appwrite domains list-prices \ - --domains one two three + --domains '' ``` diff --git a/examples/2.3.x/console-cli/examples/domains/update-record-a.md b/examples/2.3.x/console-cli/examples/domains/update-record-a.md index 18a64dc67..ad6e3d467 100644 --- a/examples/2.3.x/console-cli/examples/domains/update-record-a.md +++ b/examples/2.3.x/console-cli/examples/domains/update-record-a.md @@ -2,7 +2,7 @@ appwrite domains update-record-a \ --domain-id '' \ --record-id '' \ - --name '' \ - --value '' \ + --name '' \ + --value '' \ --ttl 1 ``` diff --git a/examples/2.3.x/console-cli/examples/domains/update-record-aaaa.md b/examples/2.3.x/console-cli/examples/domains/update-record-aaaa.md index 37ba90b7f..e7fbdadbc 100644 --- a/examples/2.3.x/console-cli/examples/domains/update-record-aaaa.md +++ b/examples/2.3.x/console-cli/examples/domains/update-record-aaaa.md @@ -2,7 +2,7 @@ appwrite domains update-record-aaaa \ --domain-id '' \ --record-id '' \ - --name '' \ - --value '' \ + --name '' \ + --value '' \ --ttl 1 ``` diff --git a/examples/2.3.x/console-cli/examples/domains/update-record-alias.md b/examples/2.3.x/console-cli/examples/domains/update-record-alias.md index 116f00879..6a501641a 100644 --- a/examples/2.3.x/console-cli/examples/domains/update-record-alias.md +++ b/examples/2.3.x/console-cli/examples/domains/update-record-alias.md @@ -2,7 +2,7 @@ appwrite domains update-record-alias \ --domain-id '' \ --record-id '' \ - --name '' \ + --name '' \ --value '' \ --ttl 1 ``` diff --git a/examples/2.3.x/console-cli/examples/domains/update-record-caa.md b/examples/2.3.x/console-cli/examples/domains/update-record-caa.md index 2aea15ca3..f109de9c1 100644 --- a/examples/2.3.x/console-cli/examples/domains/update-record-caa.md +++ b/examples/2.3.x/console-cli/examples/domains/update-record-caa.md @@ -2,7 +2,7 @@ appwrite domains update-record-caa \ --domain-id '' \ --record-id '' \ - --name '' \ - --value '' \ + --name '' \ + --value '' \ --ttl 1 ``` diff --git a/examples/2.3.x/console-cli/examples/domains/update-record-cname.md b/examples/2.3.x/console-cli/examples/domains/update-record-cname.md index 8fff4d197..0b7479a4b 100644 --- a/examples/2.3.x/console-cli/examples/domains/update-record-cname.md +++ b/examples/2.3.x/console-cli/examples/domains/update-record-cname.md @@ -2,7 +2,7 @@ appwrite domains update-record-cname \ --domain-id '' \ --record-id '' \ - --name '' \ + --name '' \ --value '' \ --ttl 1 ``` diff --git a/examples/2.3.x/console-cli/examples/domains/update-record-https.md b/examples/2.3.x/console-cli/examples/domains/update-record-https.md index ca21bfd86..cb4cb3a52 100644 --- a/examples/2.3.x/console-cli/examples/domains/update-record-https.md +++ b/examples/2.3.x/console-cli/examples/domains/update-record-https.md @@ -2,7 +2,7 @@ appwrite domains update-record-https \ --domain-id '' \ --record-id '' \ - --name '' \ + --name '' \ --value '' \ --ttl 1 ``` diff --git a/examples/2.3.x/console-cli/examples/domains/update-record-mx.md b/examples/2.3.x/console-cli/examples/domains/update-record-mx.md index 890fe7822..854e0c49f 100644 --- a/examples/2.3.x/console-cli/examples/domains/update-record-mx.md +++ b/examples/2.3.x/console-cli/examples/domains/update-record-mx.md @@ -2,7 +2,7 @@ appwrite domains update-record-mx \ --domain-id '' \ --record-id '' \ - --name '' \ + --name '' \ --value '' \ --ttl 1 \ --priority 0 diff --git a/examples/2.3.x/console-cli/examples/domains/update-record-ns.md b/examples/2.3.x/console-cli/examples/domains/update-record-ns.md index b70faaf41..398acdd3b 100644 --- a/examples/2.3.x/console-cli/examples/domains/update-record-ns.md +++ b/examples/2.3.x/console-cli/examples/domains/update-record-ns.md @@ -2,7 +2,7 @@ appwrite domains update-record-ns \ --domain-id '' \ --record-id '' \ - --name '' \ + --name '' \ --value '' \ --ttl 1 ``` diff --git a/examples/2.3.x/console-cli/examples/domains/update-record-srv.md b/examples/2.3.x/console-cli/examples/domains/update-record-srv.md index 5a9969bc1..ecec422c4 100644 --- a/examples/2.3.x/console-cli/examples/domains/update-record-srv.md +++ b/examples/2.3.x/console-cli/examples/domains/update-record-srv.md @@ -2,7 +2,7 @@ appwrite domains update-record-srv \ --domain-id '' \ --record-id '' \ - --name '' \ + --name '' \ --value '' \ --ttl 1 \ --priority 0 \ diff --git a/examples/2.3.x/console-cli/examples/domains/update-record-txt.md b/examples/2.3.x/console-cli/examples/domains/update-record-txt.md index 337704761..e86f2efc6 100644 --- a/examples/2.3.x/console-cli/examples/domains/update-record-txt.md +++ b/examples/2.3.x/console-cli/examples/domains/update-record-txt.md @@ -2,7 +2,7 @@ appwrite domains update-record-txt \ --domain-id '' \ --record-id '' \ - --name '' \ + --name '' \ --value '' \ --ttl 1 ``` diff --git a/examples/2.3.x/console-cli/examples/embeddings/create-text-embeddings.md b/examples/2.3.x/console-cli/examples/embeddings/create-text-embeddings.md index b66166f8e..fd3a158df 100644 --- a/examples/2.3.x/console-cli/examples/embeddings/create-text-embeddings.md +++ b/examples/2.3.x/console-cli/examples/embeddings/create-text-embeddings.md @@ -1,4 +1,5 @@ ```bash appwrite embeddings create-text-embeddings \ - --texts one two three + --texts 'Appwrite helps developers build applications.' \ + --texts 'Find documents with semantic search.' ``` diff --git a/examples/2.3.x/console-cli/examples/functions/create-deployment.md b/examples/2.3.x/console-cli/examples/functions/create-deployment.md index de08a42d1..92de668fd 100644 --- a/examples/2.3.x/console-cli/examples/functions/create-deployment.md +++ b/examples/2.3.x/console-cli/examples/functions/create-deployment.md @@ -1,6 +1,6 @@ ```bash appwrite functions create-deployment \ --function-id '' \ - --code 'path/to/file.png' \ - --activate false + --code path/to/file.png \ + --activate=false ``` diff --git a/examples/2.3.x/console-cli/examples/functions/get-deployment-download.md b/examples/2.3.x/console-cli/examples/functions/get-deployment-download.md index fa1f2febb..f760594ea 100644 --- a/examples/2.3.x/console-cli/examples/functions/get-deployment-download.md +++ b/examples/2.3.x/console-cli/examples/functions/get-deployment-download.md @@ -1,5 +1,6 @@ ```bash appwrite functions get-deployment-download \ --function-id '' \ - --deployment-id '' + --deployment-id '' \ + --destination ./download ``` diff --git a/examples/2.3.x/console-cli/examples/graphql/mutation.md b/examples/2.3.x/console-cli/examples/graphql/mutation.md index 4666d3020..b419534ae 100644 --- a/examples/2.3.x/console-cli/examples/graphql/mutation.md +++ b/examples/2.3.x/console-cli/examples/graphql/mutation.md @@ -1,4 +1,4 @@ ```bash appwrite graphql mutation \ - --query '{ "key": "value" }' + --query '{"query":"mutation { accountUpdateName(name: \"Walter\") { name } }"}' ``` diff --git a/examples/2.3.x/console-cli/examples/graphql/query.md b/examples/2.3.x/console-cli/examples/graphql/query.md index 9285fbdf6..2923becce 100644 --- a/examples/2.3.x/console-cli/examples/graphql/query.md +++ b/examples/2.3.x/console-cli/examples/graphql/query.md @@ -1,4 +1,4 @@ ```bash appwrite graphql query \ - --query '{ "key": "value" }' + --query '{"query":"query { localeGet { ip } }"}' ``` diff --git a/examples/2.3.x/console-cli/examples/oauth2/introspect.md b/examples/2.3.x/console-cli/examples/oauth2/introspect.md new file mode 100644 index 000000000..ed183448a --- /dev/null +++ b/examples/2.3.x/console-cli/examples/oauth2/introspect.md @@ -0,0 +1,4 @@ +```bash +appwrite oauth2 introspect \ + --token '' +``` diff --git a/examples/2.3.x/console-cli/examples/organization/create-ephemeral-project-key.md b/examples/2.3.x/console-cli/examples/organization/create-ephemeral-project-key.md index 3b4a3ffe1..2c8e988c8 100644 --- a/examples/2.3.x/console-cli/examples/organization/create-ephemeral-project-key.md +++ b/examples/2.3.x/console-cli/examples/organization/create-ephemeral-project-key.md @@ -1,6 +1,6 @@ ```bash appwrite organization create-ephemeral-project-key \ --project-id '' \ - --scopes one two three \ + --scopes users.read \ --duration 600 ``` diff --git a/examples/2.3.x/console-cli/examples/organization/create-membership.md b/examples/2.3.x/console-cli/examples/organization/create-membership.md index 984ffbaca..403fc774b 100644 --- a/examples/2.3.x/console-cli/examples/organization/create-membership.md +++ b/examples/2.3.x/console-cli/examples/organization/create-membership.md @@ -1,4 +1,4 @@ ```bash appwrite organization create-membership \ - --roles one two three + --roles '' ``` diff --git a/examples/2.3.x/console-cli/examples/organization/update-membership.md b/examples/2.3.x/console-cli/examples/organization/update-membership.md index 162ad6414..2d3165188 100644 --- a/examples/2.3.x/console-cli/examples/organization/update-membership.md +++ b/examples/2.3.x/console-cli/examples/organization/update-membership.md @@ -1,5 +1,5 @@ ```bash appwrite organization update-membership \ --membership-id '' \ - --roles one two three + --roles '' ``` diff --git a/examples/2.3.x/console-cli/examples/organization/update-project-key.md b/examples/2.3.x/console-cli/examples/organization/update-project-key.md index 418c81190..042e79a7f 100644 --- a/examples/2.3.x/console-cli/examples/organization/update-project-key.md +++ b/examples/2.3.x/console-cli/examples/organization/update-project-key.md @@ -3,5 +3,5 @@ appwrite organization update-project-key \ --project-id '' \ --key-id '' \ --name '' \ - --scopes one two three + --scopes users.read ``` diff --git a/examples/2.3.x/console-cli/examples/project/create-ephemeral-key.md b/examples/2.3.x/console-cli/examples/project/create-ephemeral-key.md index d4ab3852b..89568d597 100644 --- a/examples/2.3.x/console-cli/examples/project/create-ephemeral-key.md +++ b/examples/2.3.x/console-cli/examples/project/create-ephemeral-key.md @@ -1,5 +1,5 @@ ```bash appwrite project create-ephemeral-key \ - --scopes one two three \ + --scopes users.read \ --duration 600 ``` diff --git a/examples/2.3.x/console-cli/examples/project/create-smtp-test.md b/examples/2.3.x/console-cli/examples/project/create-smtp-test.md index 01393020b..7f39230ab 100644 --- a/examples/2.3.x/console-cli/examples/project/create-smtp-test.md +++ b/examples/2.3.x/console-cli/examples/project/create-smtp-test.md @@ -1,4 +1,4 @@ ```bash appwrite project create-smtp-test \ - --emails one two three + --emails recipient@example.com ``` diff --git a/examples/2.3.x/console-cli/examples/project/update-auth-method.md b/examples/2.3.x/console-cli/examples/project/update-auth-method.md index 45ca9a749..add4f529d 100644 --- a/examples/2.3.x/console-cli/examples/project/update-auth-method.md +++ b/examples/2.3.x/console-cli/examples/project/update-auth-method.md @@ -1,5 +1,5 @@ ```bash appwrite project update-auth-method \ --method-id email-password \ - --enabled false + --enabled=false ``` diff --git a/examples/2.3.x/console-cli/examples/project/update-deny-aliased-email-policy.md b/examples/2.3.x/console-cli/examples/project/update-deny-aliased-email-policy.md index dfd873344..d3259b967 100644 --- a/examples/2.3.x/console-cli/examples/project/update-deny-aliased-email-policy.md +++ b/examples/2.3.x/console-cli/examples/project/update-deny-aliased-email-policy.md @@ -1,4 +1,4 @@ ```bash appwrite project update-deny-aliased-email-policy \ - --enabled false + --enabled=false ``` diff --git a/examples/2.3.x/console-cli/examples/project/update-deny-corporate-email-policy.md b/examples/2.3.x/console-cli/examples/project/update-deny-corporate-email-policy.md index ddbfc636b..b0b89e0d8 100644 --- a/examples/2.3.x/console-cli/examples/project/update-deny-corporate-email-policy.md +++ b/examples/2.3.x/console-cli/examples/project/update-deny-corporate-email-policy.md @@ -1,4 +1,4 @@ ```bash appwrite project update-deny-corporate-email-policy \ - --enabled false + --enabled=false ``` diff --git a/examples/2.3.x/console-cli/examples/project/update-deny-disposable-email-policy.md b/examples/2.3.x/console-cli/examples/project/update-deny-disposable-email-policy.md index 1764d04dc..90d2d07af 100644 --- a/examples/2.3.x/console-cli/examples/project/update-deny-disposable-email-policy.md +++ b/examples/2.3.x/console-cli/examples/project/update-deny-disposable-email-policy.md @@ -1,4 +1,4 @@ ```bash appwrite project update-deny-disposable-email-policy \ - --enabled false + --enabled=false ``` diff --git a/examples/2.3.x/console-cli/examples/project/update-deny-free-email-policy.md b/examples/2.3.x/console-cli/examples/project/update-deny-free-email-policy.md index c12ac1265..81f68f10a 100644 --- a/examples/2.3.x/console-cli/examples/project/update-deny-free-email-policy.md +++ b/examples/2.3.x/console-cli/examples/project/update-deny-free-email-policy.md @@ -1,4 +1,4 @@ ```bash appwrite project update-deny-free-email-policy \ - --enabled false + --enabled=false ``` diff --git a/examples/2.3.x/console-cli/examples/project/update-key.md b/examples/2.3.x/console-cli/examples/project/update-key.md index bb7159140..6cb5eddeb 100644 --- a/examples/2.3.x/console-cli/examples/project/update-key.md +++ b/examples/2.3.x/console-cli/examples/project/update-key.md @@ -2,5 +2,5 @@ appwrite project update-key \ --key-id '' \ --name '' \ - --scopes one two three + --scopes users.read ``` diff --git a/examples/2.3.x/console-cli/examples/project/update-labels.md b/examples/2.3.x/console-cli/examples/project/update-labels.md index df4703c72..f0b37f7a8 100644 --- a/examples/2.3.x/console-cli/examples/project/update-labels.md +++ b/examples/2.3.x/console-cli/examples/project/update-labels.md @@ -1,4 +1,4 @@ ```bash appwrite project update-labels \ - --labels one two three + --labels production ``` diff --git a/examples/2.3.x/console-cli/examples/project/update-o-auth-2-server.md b/examples/2.3.x/console-cli/examples/project/update-o-auth-2-server.md index a2a3596d9..fdd4441b5 100644 --- a/examples/2.3.x/console-cli/examples/project/update-o-auth-2-server.md +++ b/examples/2.3.x/console-cli/examples/project/update-o-auth-2-server.md @@ -1,5 +1,5 @@ ```bash appwrite project update-o-auth-2-server \ - --enabled false \ + --enabled=false \ --authorization-url https://example.com ``` diff --git a/examples/2.3.x/console-cli/examples/project/update-o-auth-2-webflow.md b/examples/2.3.x/console-cli/examples/project/update-o-auth-2-webflow.md new file mode 100644 index 000000000..d6b21a380 --- /dev/null +++ b/examples/2.3.x/console-cli/examples/project/update-o-auth-2-webflow.md @@ -0,0 +1,3 @@ +```bash +appwrite project update-o-auth-2-webflow +``` diff --git a/examples/2.3.x/console-cli/examples/project/update-password-dictionary-policy.md b/examples/2.3.x/console-cli/examples/project/update-password-dictionary-policy.md index 37b9a564e..2a2107f6a 100644 --- a/examples/2.3.x/console-cli/examples/project/update-password-dictionary-policy.md +++ b/examples/2.3.x/console-cli/examples/project/update-password-dictionary-policy.md @@ -1,4 +1,4 @@ ```bash appwrite project update-password-dictionary-policy \ - --enabled false + --enabled=false ``` diff --git a/examples/2.3.x/console-cli/examples/project/update-password-personal-data-policy.md b/examples/2.3.x/console-cli/examples/project/update-password-personal-data-policy.md index 5adb1391a..66f12ffa3 100644 --- a/examples/2.3.x/console-cli/examples/project/update-password-personal-data-policy.md +++ b/examples/2.3.x/console-cli/examples/project/update-password-personal-data-policy.md @@ -1,4 +1,4 @@ ```bash appwrite project update-password-personal-data-policy \ - --enabled false + --enabled=false ``` diff --git a/examples/2.3.x/console-cli/examples/project/update-protocol.md b/examples/2.3.x/console-cli/examples/project/update-protocol.md index ff486476e..afaa226e0 100644 --- a/examples/2.3.x/console-cli/examples/project/update-protocol.md +++ b/examples/2.3.x/console-cli/examples/project/update-protocol.md @@ -1,5 +1,5 @@ ```bash appwrite project update-protocol \ --protocol-id rest \ - --enabled false + --enabled=false ``` diff --git a/examples/2.3.x/console-cli/examples/project/update-service.md b/examples/2.3.x/console-cli/examples/project/update-service.md index 778224817..0276f6331 100644 --- a/examples/2.3.x/console-cli/examples/project/update-service.md +++ b/examples/2.3.x/console-cli/examples/project/update-service.md @@ -1,5 +1,5 @@ ```bash appwrite project update-service \ --service-id account \ - --enabled false + --enabled=false ``` diff --git a/examples/2.3.x/console-cli/examples/project/update-session-alert-policy.md b/examples/2.3.x/console-cli/examples/project/update-session-alert-policy.md index 67e666be0..4807a6bbc 100644 --- a/examples/2.3.x/console-cli/examples/project/update-session-alert-policy.md +++ b/examples/2.3.x/console-cli/examples/project/update-session-alert-policy.md @@ -1,4 +1,4 @@ ```bash appwrite project update-session-alert-policy \ - --enabled false + --enabled=false ``` diff --git a/examples/2.3.x/console-cli/examples/project/update-session-invalidation-policy.md b/examples/2.3.x/console-cli/examples/project/update-session-invalidation-policy.md index 14a54b82b..e3d701d27 100644 --- a/examples/2.3.x/console-cli/examples/project/update-session-invalidation-policy.md +++ b/examples/2.3.x/console-cli/examples/project/update-session-invalidation-policy.md @@ -1,4 +1,4 @@ ```bash appwrite project update-session-invalidation-policy \ - --enabled false + --enabled=false ``` diff --git a/examples/2.3.x/console-cli/examples/sites/create-deployment.md b/examples/2.3.x/console-cli/examples/sites/create-deployment.md index 1a357aea2..8a98c7399 100644 --- a/examples/2.3.x/console-cli/examples/sites/create-deployment.md +++ b/examples/2.3.x/console-cli/examples/sites/create-deployment.md @@ -1,5 +1,5 @@ ```bash appwrite sites create-deployment \ --site-id '' \ - --code 'path/to/file.png' + --code path/to/file.png ``` diff --git a/examples/2.3.x/console-cli/examples/sites/get-deployment-download.md b/examples/2.3.x/console-cli/examples/sites/get-deployment-download.md index 2a033d018..5b92285f3 100644 --- a/examples/2.3.x/console-cli/examples/sites/get-deployment-download.md +++ b/examples/2.3.x/console-cli/examples/sites/get-deployment-download.md @@ -1,5 +1,6 @@ ```bash appwrite sites get-deployment-download \ --site-id '' \ - --deployment-id '' + --deployment-id '' \ + --destination ./download ``` diff --git a/examples/2.3.x/console-cli/examples/storage/create-file.md b/examples/2.3.x/console-cli/examples/storage/create-file.md index c5b90a5c3..6e12f405d 100644 --- a/examples/2.3.x/console-cli/examples/storage/create-file.md +++ b/examples/2.3.x/console-cli/examples/storage/create-file.md @@ -2,5 +2,5 @@ appwrite storage create-file \ --bucket-id '' \ --file-id '' \ - --file 'path/to/file.png' + --file path/to/file.png ``` diff --git a/examples/2.3.x/console-cli/examples/storage/get-file-download.md b/examples/2.3.x/console-cli/examples/storage/get-file-download.md index dd8880eab..624e1fbc6 100644 --- a/examples/2.3.x/console-cli/examples/storage/get-file-download.md +++ b/examples/2.3.x/console-cli/examples/storage/get-file-download.md @@ -1,5 +1,6 @@ ```bash appwrite storage get-file-download \ --bucket-id '' \ - --file-id '' + --file-id '' \ + --destination ./download ``` diff --git a/examples/2.3.x/console-cli/examples/storage/get-file-preview.md b/examples/2.3.x/console-cli/examples/storage/get-file-preview.md index e088ab221..060d09e94 100644 --- a/examples/2.3.x/console-cli/examples/storage/get-file-preview.md +++ b/examples/2.3.x/console-cli/examples/storage/get-file-preview.md @@ -1,5 +1,6 @@ ```bash appwrite storage get-file-preview \ --bucket-id '' \ - --file-id '' + --file-id '' \ + --destination ./download ``` diff --git a/examples/2.3.x/console-cli/examples/storage/get-file-view.md b/examples/2.3.x/console-cli/examples/storage/get-file-view.md index 92409c4aa..51042b8a7 100644 --- a/examples/2.3.x/console-cli/examples/storage/get-file-view.md +++ b/examples/2.3.x/console-cli/examples/storage/get-file-view.md @@ -1,5 +1,6 @@ ```bash appwrite storage get-file-view \ --bucket-id '' \ - --file-id '' + --file-id '' \ + --destination ./download ``` diff --git a/examples/2.3.x/console-cli/examples/tablesdb/create-big-int-column.md b/examples/2.3.x/console-cli/examples/tablesdb/create-big-int-column.md index f1e9c85c5..5b78fddb3 100644 --- a/examples/2.3.x/console-cli/examples/tablesdb/create-big-int-column.md +++ b/examples/2.3.x/console-cli/examples/tablesdb/create-big-int-column.md @@ -3,5 +3,5 @@ appwrite tablesdb create-big-int-column \ --database-id '' \ --table-id '' \ --key '' \ - --required false + --required=false ``` diff --git a/examples/2.3.x/console-cli/examples/tablesdb/create-boolean-column.md b/examples/2.3.x/console-cli/examples/tablesdb/create-boolean-column.md index 7ead222a6..0757d59ce 100644 --- a/examples/2.3.x/console-cli/examples/tablesdb/create-boolean-column.md +++ b/examples/2.3.x/console-cli/examples/tablesdb/create-boolean-column.md @@ -3,5 +3,5 @@ appwrite tablesdb create-boolean-column \ --database-id '' \ --table-id '' \ --key '' \ - --required false + --required=false ``` diff --git a/examples/2.3.x/console-cli/examples/tablesdb/create-datetime-column.md b/examples/2.3.x/console-cli/examples/tablesdb/create-datetime-column.md index da3632a4a..292f3ea2d 100644 --- a/examples/2.3.x/console-cli/examples/tablesdb/create-datetime-column.md +++ b/examples/2.3.x/console-cli/examples/tablesdb/create-datetime-column.md @@ -3,5 +3,5 @@ appwrite tablesdb create-datetime-column \ --database-id '' \ --table-id '' \ --key '' \ - --required false + --required=false ``` diff --git a/examples/2.3.x/console-cli/examples/tablesdb/create-email-column.md b/examples/2.3.x/console-cli/examples/tablesdb/create-email-column.md index 5d2b7cb2a..bac643e7d 100644 --- a/examples/2.3.x/console-cli/examples/tablesdb/create-email-column.md +++ b/examples/2.3.x/console-cli/examples/tablesdb/create-email-column.md @@ -3,5 +3,5 @@ appwrite tablesdb create-email-column \ --database-id '' \ --table-id '' \ --key '' \ - --required false + --required=false ``` diff --git a/examples/2.3.x/console-cli/examples/tablesdb/create-enum-column.md b/examples/2.3.x/console-cli/examples/tablesdb/create-enum-column.md index 0b1bb126c..c7b09f5e6 100644 --- a/examples/2.3.x/console-cli/examples/tablesdb/create-enum-column.md +++ b/examples/2.3.x/console-cli/examples/tablesdb/create-enum-column.md @@ -3,6 +3,7 @@ appwrite tablesdb create-enum-column \ --database-id '' \ --table-id '' \ --key '' \ - --elements "active" "inactive" \ - --required false + --elements active \ + --elements inactive \ + --required=false ``` diff --git a/examples/2.3.x/console-cli/examples/tablesdb/create-float-column.md b/examples/2.3.x/console-cli/examples/tablesdb/create-float-column.md index 4021c25ee..22eb70c4b 100644 --- a/examples/2.3.x/console-cli/examples/tablesdb/create-float-column.md +++ b/examples/2.3.x/console-cli/examples/tablesdb/create-float-column.md @@ -3,5 +3,5 @@ appwrite tablesdb create-float-column \ --database-id '' \ --table-id '' \ --key '' \ - --required false + --required=false ``` diff --git a/examples/2.3.x/console-cli/examples/tablesdb/create-index.md b/examples/2.3.x/console-cli/examples/tablesdb/create-index.md index e65d50ea7..acc5e486a 100644 --- a/examples/2.3.x/console-cli/examples/tablesdb/create-index.md +++ b/examples/2.3.x/console-cli/examples/tablesdb/create-index.md @@ -4,5 +4,5 @@ appwrite tablesdb create-index \ --table-id '' \ --key '' \ --type key \ - --columns one two three + --columns username ``` diff --git a/examples/2.3.x/console-cli/examples/tablesdb/create-integer-column.md b/examples/2.3.x/console-cli/examples/tablesdb/create-integer-column.md index b647af7e3..6ce0bf3fc 100644 --- a/examples/2.3.x/console-cli/examples/tablesdb/create-integer-column.md +++ b/examples/2.3.x/console-cli/examples/tablesdb/create-integer-column.md @@ -3,5 +3,5 @@ appwrite tablesdb create-integer-column \ --database-id '' \ --table-id '' \ --key '' \ - --required false + --required=false ``` diff --git a/examples/2.3.x/console-cli/examples/tablesdb/create-ip-column.md b/examples/2.3.x/console-cli/examples/tablesdb/create-ip-column.md index 9b05de2e1..8a32361a8 100644 --- a/examples/2.3.x/console-cli/examples/tablesdb/create-ip-column.md +++ b/examples/2.3.x/console-cli/examples/tablesdb/create-ip-column.md @@ -3,5 +3,5 @@ appwrite tablesdb create-ip-column \ --database-id '' \ --table-id '' \ --key '' \ - --required false + --required=false ``` diff --git a/examples/2.3.x/console-cli/examples/tablesdb/create-line-column.md b/examples/2.3.x/console-cli/examples/tablesdb/create-line-column.md index 6f484b321..2703ae5c3 100644 --- a/examples/2.3.x/console-cli/examples/tablesdb/create-line-column.md +++ b/examples/2.3.x/console-cli/examples/tablesdb/create-line-column.md @@ -3,5 +3,5 @@ appwrite tablesdb create-line-column \ --database-id '' \ --table-id '' \ --key '' \ - --required false + --required=false ``` diff --git a/examples/2.3.x/console-cli/examples/tablesdb/create-longtext-column.md b/examples/2.3.x/console-cli/examples/tablesdb/create-longtext-column.md index 00655468e..b29567a76 100644 --- a/examples/2.3.x/console-cli/examples/tablesdb/create-longtext-column.md +++ b/examples/2.3.x/console-cli/examples/tablesdb/create-longtext-column.md @@ -3,5 +3,5 @@ appwrite tablesdb create-longtext-column \ --database-id '' \ --table-id '' \ --key '' \ - --required false + --required=false ``` diff --git a/examples/2.3.x/console-cli/examples/tablesdb/create-mediumtext-column.md b/examples/2.3.x/console-cli/examples/tablesdb/create-mediumtext-column.md index 348b4c0d6..af2cef147 100644 --- a/examples/2.3.x/console-cli/examples/tablesdb/create-mediumtext-column.md +++ b/examples/2.3.x/console-cli/examples/tablesdb/create-mediumtext-column.md @@ -3,5 +3,5 @@ appwrite tablesdb create-mediumtext-column \ --database-id '' \ --table-id '' \ --key '' \ - --required false + --required=false ``` diff --git a/examples/2.3.x/console-cli/examples/tablesdb/create-point-column.md b/examples/2.3.x/console-cli/examples/tablesdb/create-point-column.md index 7f0754ef0..518b6caa4 100644 --- a/examples/2.3.x/console-cli/examples/tablesdb/create-point-column.md +++ b/examples/2.3.x/console-cli/examples/tablesdb/create-point-column.md @@ -3,5 +3,5 @@ appwrite tablesdb create-point-column \ --database-id '' \ --table-id '' \ --key '' \ - --required false + --required=false ``` diff --git a/examples/2.3.x/console-cli/examples/tablesdb/create-polygon-column.md b/examples/2.3.x/console-cli/examples/tablesdb/create-polygon-column.md index 03bc4192c..6fa0f49bc 100644 --- a/examples/2.3.x/console-cli/examples/tablesdb/create-polygon-column.md +++ b/examples/2.3.x/console-cli/examples/tablesdb/create-polygon-column.md @@ -3,5 +3,5 @@ appwrite tablesdb create-polygon-column \ --database-id '' \ --table-id '' \ --key '' \ - --required false + --required=false ``` diff --git a/examples/2.3.x/console-cli/examples/tablesdb/create-row.md b/examples/2.3.x/console-cli/examples/tablesdb/create-row.md index c44e11505..370a749b0 100644 --- a/examples/2.3.x/console-cli/examples/tablesdb/create-row.md +++ b/examples/2.3.x/console-cli/examples/tablesdb/create-row.md @@ -3,5 +3,5 @@ appwrite tablesdb create-row \ --database-id '' \ --table-id '' \ --row-id '' \ - --data '{ "key": "value" }' + --data '{"username":"walter.obrien","email":"walter.obrien@example.com","fullName":"Walter O'"'"'Brien","age":30,"isAdmin":false}' ``` diff --git a/examples/2.3.x/console-cli/examples/tablesdb/create-rows.md b/examples/2.3.x/console-cli/examples/tablesdb/create-rows.md index 6e02c78dc..cd50a5238 100644 --- a/examples/2.3.x/console-cli/examples/tablesdb/create-rows.md +++ b/examples/2.3.x/console-cli/examples/tablesdb/create-rows.md @@ -2,5 +2,5 @@ appwrite tablesdb create-rows \ --database-id '' \ --table-id '' \ - --rows one two three + --rows '{"$id":"example1","username":"walter.obrien","email":"walter.obrien@example.com","fullName":"Walter O'"'"'Brien","age":30,"isAdmin":false}' ``` diff --git a/examples/2.3.x/console-cli/examples/tablesdb/create-string-column.md b/examples/2.3.x/console-cli/examples/tablesdb/create-string-column.md index 33c99a9df..598b65bea 100644 --- a/examples/2.3.x/console-cli/examples/tablesdb/create-string-column.md +++ b/examples/2.3.x/console-cli/examples/tablesdb/create-string-column.md @@ -4,5 +4,5 @@ appwrite tablesdb create-string-column \ --table-id '' \ --key '' \ --size 1 \ - --required false + --required=false ``` diff --git a/examples/2.3.x/console-cli/examples/tablesdb/create-text-column.md b/examples/2.3.x/console-cli/examples/tablesdb/create-text-column.md index 773c9c36e..15ad58b36 100644 --- a/examples/2.3.x/console-cli/examples/tablesdb/create-text-column.md +++ b/examples/2.3.x/console-cli/examples/tablesdb/create-text-column.md @@ -3,5 +3,5 @@ appwrite tablesdb create-text-column \ --database-id '' \ --table-id '' \ --key '' \ - --required false + --required=false ``` diff --git a/examples/2.3.x/console-cli/examples/tablesdb/create-url-column.md b/examples/2.3.x/console-cli/examples/tablesdb/create-url-column.md index b01d7b965..2ab8cc8f9 100644 --- a/examples/2.3.x/console-cli/examples/tablesdb/create-url-column.md +++ b/examples/2.3.x/console-cli/examples/tablesdb/create-url-column.md @@ -3,5 +3,5 @@ appwrite tablesdb create-url-column \ --database-id '' \ --table-id '' \ --key '' \ - --required false + --required=false ``` diff --git a/examples/2.3.x/console-cli/examples/tablesdb/create-varchar-column.md b/examples/2.3.x/console-cli/examples/tablesdb/create-varchar-column.md index 4049c3956..c19de5831 100644 --- a/examples/2.3.x/console-cli/examples/tablesdb/create-varchar-column.md +++ b/examples/2.3.x/console-cli/examples/tablesdb/create-varchar-column.md @@ -4,5 +4,5 @@ appwrite tablesdb create-varchar-column \ --table-id '' \ --key '' \ --size 1 \ - --required false + --required=false ``` diff --git a/examples/2.3.x/console-cli/examples/tablesdb/update-big-int-column.md b/examples/2.3.x/console-cli/examples/tablesdb/update-big-int-column.md index 4166589c6..3e2e52e93 100644 --- a/examples/2.3.x/console-cli/examples/tablesdb/update-big-int-column.md +++ b/examples/2.3.x/console-cli/examples/tablesdb/update-big-int-column.md @@ -3,6 +3,6 @@ appwrite tablesdb update-big-int-column \ --database-id '' \ --table-id '' \ --key '' \ - --required false \ - --default 0 + --required=false \ + --xdefault 0 ``` diff --git a/examples/2.3.x/console-cli/examples/tablesdb/update-boolean-column.md b/examples/2.3.x/console-cli/examples/tablesdb/update-boolean-column.md index 3f060bf71..bce0b5c52 100644 --- a/examples/2.3.x/console-cli/examples/tablesdb/update-boolean-column.md +++ b/examples/2.3.x/console-cli/examples/tablesdb/update-boolean-column.md @@ -3,6 +3,6 @@ appwrite tablesdb update-boolean-column \ --database-id '' \ --table-id '' \ --key '' \ - --required false \ - --default false + --required=false \ + --xdefault=false ``` diff --git a/examples/2.3.x/console-cli/examples/tablesdb/update-datetime-column.md b/examples/2.3.x/console-cli/examples/tablesdb/update-datetime-column.md index 27087b030..85a68eb9e 100644 --- a/examples/2.3.x/console-cli/examples/tablesdb/update-datetime-column.md +++ b/examples/2.3.x/console-cli/examples/tablesdb/update-datetime-column.md @@ -3,6 +3,6 @@ appwrite tablesdb update-datetime-column \ --database-id '' \ --table-id '' \ --key '' \ - --required false \ - --default 2020-10-15T06:38:00.000+00:00 + --required=false \ + --xdefault 2020-10-15T06:38:00.000+00:00 ``` diff --git a/examples/2.3.x/console-cli/examples/tablesdb/update-email-column.md b/examples/2.3.x/console-cli/examples/tablesdb/update-email-column.md index 6068c567c..adaafdbe5 100644 --- a/examples/2.3.x/console-cli/examples/tablesdb/update-email-column.md +++ b/examples/2.3.x/console-cli/examples/tablesdb/update-email-column.md @@ -3,6 +3,6 @@ appwrite tablesdb update-email-column \ --database-id '' \ --table-id '' \ --key '' \ - --required false \ - --default email@example.com + --required=false \ + --xdefault email@example.com ``` diff --git a/examples/2.3.x/console-cli/examples/tablesdb/update-enum-column.md b/examples/2.3.x/console-cli/examples/tablesdb/update-enum-column.md index b1acb10b7..17b584bb5 100644 --- a/examples/2.3.x/console-cli/examples/tablesdb/update-enum-column.md +++ b/examples/2.3.x/console-cli/examples/tablesdb/update-enum-column.md @@ -3,7 +3,8 @@ appwrite tablesdb update-enum-column \ --database-id '' \ --table-id '' \ --key '' \ - --elements "active" "inactive" \ - --required false \ - --default active + --elements active \ + --elements inactive \ + --required=false \ + --xdefault active ``` diff --git a/examples/2.3.x/console-cli/examples/tablesdb/update-float-column.md b/examples/2.3.x/console-cli/examples/tablesdb/update-float-column.md index a6ca8d8eb..62f76c52f 100644 --- a/examples/2.3.x/console-cli/examples/tablesdb/update-float-column.md +++ b/examples/2.3.x/console-cli/examples/tablesdb/update-float-column.md @@ -3,6 +3,6 @@ appwrite tablesdb update-float-column \ --database-id '' \ --table-id '' \ --key '' \ - --required false \ - --default 10.5 + --required=false \ + --xdefault 10.5 ``` diff --git a/examples/2.3.x/console-cli/examples/tablesdb/update-integer-column.md b/examples/2.3.x/console-cli/examples/tablesdb/update-integer-column.md index ee9ca7f8f..4b29fa024 100644 --- a/examples/2.3.x/console-cli/examples/tablesdb/update-integer-column.md +++ b/examples/2.3.x/console-cli/examples/tablesdb/update-integer-column.md @@ -3,6 +3,6 @@ appwrite tablesdb update-integer-column \ --database-id '' \ --table-id '' \ --key '' \ - --required false \ - --default 10 + --required=false \ + --xdefault 10 ``` diff --git a/examples/2.3.x/console-cli/examples/tablesdb/update-ip-column.md b/examples/2.3.x/console-cli/examples/tablesdb/update-ip-column.md index 4cf98de9c..f0e6dbcd2 100644 --- a/examples/2.3.x/console-cli/examples/tablesdb/update-ip-column.md +++ b/examples/2.3.x/console-cli/examples/tablesdb/update-ip-column.md @@ -3,6 +3,6 @@ appwrite tablesdb update-ip-column \ --database-id '' \ --table-id '' \ --key '' \ - --required false \ - --default 192.0.2.0 + --required=false \ + --xdefault 192.0.2.0 ``` diff --git a/examples/2.3.x/console-cli/examples/tablesdb/update-line-column.md b/examples/2.3.x/console-cli/examples/tablesdb/update-line-column.md index e4bb8acbf..2e214ae8a 100644 --- a/examples/2.3.x/console-cli/examples/tablesdb/update-line-column.md +++ b/examples/2.3.x/console-cli/examples/tablesdb/update-line-column.md @@ -3,5 +3,5 @@ appwrite tablesdb update-line-column \ --database-id '' \ --table-id '' \ --key '' \ - --required false + --required=false ``` diff --git a/examples/2.3.x/console-cli/examples/tablesdb/update-longtext-column.md b/examples/2.3.x/console-cli/examples/tablesdb/update-longtext-column.md index c65db39b3..67b368aa5 100644 --- a/examples/2.3.x/console-cli/examples/tablesdb/update-longtext-column.md +++ b/examples/2.3.x/console-cli/examples/tablesdb/update-longtext-column.md @@ -3,6 +3,6 @@ appwrite tablesdb update-longtext-column \ --database-id '' \ --table-id '' \ --key '' \ - --required false \ - --default 'Hello World' + --required=false \ + --xdefault 'Hello World' ``` diff --git a/examples/2.3.x/console-cli/examples/tablesdb/update-mediumtext-column.md b/examples/2.3.x/console-cli/examples/tablesdb/update-mediumtext-column.md index da61b0d5e..af33275d9 100644 --- a/examples/2.3.x/console-cli/examples/tablesdb/update-mediumtext-column.md +++ b/examples/2.3.x/console-cli/examples/tablesdb/update-mediumtext-column.md @@ -3,6 +3,6 @@ appwrite tablesdb update-mediumtext-column \ --database-id '' \ --table-id '' \ --key '' \ - --required false \ - --default 'Hello World' + --required=false \ + --xdefault 'Hello World' ``` diff --git a/examples/2.3.x/console-cli/examples/tablesdb/update-point-column.md b/examples/2.3.x/console-cli/examples/tablesdb/update-point-column.md index c1608cc4a..0937a10c1 100644 --- a/examples/2.3.x/console-cli/examples/tablesdb/update-point-column.md +++ b/examples/2.3.x/console-cli/examples/tablesdb/update-point-column.md @@ -3,5 +3,5 @@ appwrite tablesdb update-point-column \ --database-id '' \ --table-id '' \ --key '' \ - --required false + --required=false ``` diff --git a/examples/2.3.x/console-cli/examples/tablesdb/update-polygon-column.md b/examples/2.3.x/console-cli/examples/tablesdb/update-polygon-column.md index 30ac311a1..35d9964bb 100644 --- a/examples/2.3.x/console-cli/examples/tablesdb/update-polygon-column.md +++ b/examples/2.3.x/console-cli/examples/tablesdb/update-polygon-column.md @@ -3,5 +3,5 @@ appwrite tablesdb update-polygon-column \ --database-id '' \ --table-id '' \ --key '' \ - --required false + --required=false ``` diff --git a/examples/2.3.x/console-cli/examples/tablesdb/update-string-column.md b/examples/2.3.x/console-cli/examples/tablesdb/update-string-column.md index 04a5c67b1..85536ed68 100644 --- a/examples/2.3.x/console-cli/examples/tablesdb/update-string-column.md +++ b/examples/2.3.x/console-cli/examples/tablesdb/update-string-column.md @@ -3,6 +3,6 @@ appwrite tablesdb update-string-column \ --database-id '' \ --table-id '' \ --key '' \ - --required false \ - --default 'Hello World' + --required=false \ + --xdefault 'Hello World' ``` diff --git a/examples/2.3.x/console-cli/examples/tablesdb/update-text-column.md b/examples/2.3.x/console-cli/examples/tablesdb/update-text-column.md index 075d5b346..d134bad45 100644 --- a/examples/2.3.x/console-cli/examples/tablesdb/update-text-column.md +++ b/examples/2.3.x/console-cli/examples/tablesdb/update-text-column.md @@ -3,6 +3,6 @@ appwrite tablesdb update-text-column \ --database-id '' \ --table-id '' \ --key '' \ - --required false \ - --default 'Hello World' + --required=false \ + --xdefault 'Hello World' ``` diff --git a/examples/2.3.x/console-cli/examples/tablesdb/update-url-column.md b/examples/2.3.x/console-cli/examples/tablesdb/update-url-column.md index a25b355d9..cd26a8ec4 100644 --- a/examples/2.3.x/console-cli/examples/tablesdb/update-url-column.md +++ b/examples/2.3.x/console-cli/examples/tablesdb/update-url-column.md @@ -3,6 +3,6 @@ appwrite tablesdb update-url-column \ --database-id '' \ --table-id '' \ --key '' \ - --required false \ - --default https://example.com + --required=false \ + --xdefault https://example.com ``` diff --git a/examples/2.3.x/console-cli/examples/tablesdb/update-varchar-column.md b/examples/2.3.x/console-cli/examples/tablesdb/update-varchar-column.md index 28667f42e..588cec45e 100644 --- a/examples/2.3.x/console-cli/examples/tablesdb/update-varchar-column.md +++ b/examples/2.3.x/console-cli/examples/tablesdb/update-varchar-column.md @@ -3,6 +3,6 @@ appwrite tablesdb update-varchar-column \ --database-id '' \ --table-id '' \ --key '' \ - --required false \ - --default 'Hello World' + --required=false \ + --xdefault 'Hello World' ``` diff --git a/examples/2.3.x/console-cli/examples/tablesdb/upsert-rows.md b/examples/2.3.x/console-cli/examples/tablesdb/upsert-rows.md index 2a435ca54..484731c8d 100644 --- a/examples/2.3.x/console-cli/examples/tablesdb/upsert-rows.md +++ b/examples/2.3.x/console-cli/examples/tablesdb/upsert-rows.md @@ -2,5 +2,5 @@ appwrite tablesdb upsert-rows \ --database-id '' \ --table-id '' \ - --rows one two three + --rows '{"$id":"example1","username":"walter.obrien","email":"walter.obrien@example.com","fullName":"Walter O'"'"'Brien","age":30,"isAdmin":false}' ``` diff --git a/examples/2.3.x/console-cli/examples/teams/create-membership.md b/examples/2.3.x/console-cli/examples/teams/create-membership.md index 1105702d5..ebd4fe532 100644 --- a/examples/2.3.x/console-cli/examples/teams/create-membership.md +++ b/examples/2.3.x/console-cli/examples/teams/create-membership.md @@ -1,5 +1,5 @@ ```bash appwrite teams create-membership \ --team-id '' \ - --roles one two three + --roles editor ``` diff --git a/examples/2.3.x/console-cli/examples/teams/update-membership.md b/examples/2.3.x/console-cli/examples/teams/update-membership.md index b885d3fd4..b1afbe2cd 100644 --- a/examples/2.3.x/console-cli/examples/teams/update-membership.md +++ b/examples/2.3.x/console-cli/examples/teams/update-membership.md @@ -2,5 +2,5 @@ appwrite teams update-membership \ --team-id '' \ --membership-id '' \ - --roles one two three + --roles editor ``` diff --git a/examples/2.3.x/console-cli/examples/teams/update-prefs.md b/examples/2.3.x/console-cli/examples/teams/update-prefs.md index dd9b45cba..232919906 100644 --- a/examples/2.3.x/console-cli/examples/teams/update-prefs.md +++ b/examples/2.3.x/console-cli/examples/teams/update-prefs.md @@ -1,5 +1,5 @@ ```bash appwrite teams update-prefs \ --team-id '' \ - --prefs '{ "key": "value" }' + --prefs '{}' ``` diff --git a/examples/2.3.x/console-cli/examples/users/update-email-verification.md b/examples/2.3.x/console-cli/examples/users/update-email-verification.md index 68a53d9ec..55af0a978 100644 --- a/examples/2.3.x/console-cli/examples/users/update-email-verification.md +++ b/examples/2.3.x/console-cli/examples/users/update-email-verification.md @@ -1,5 +1,5 @@ ```bash appwrite users update-email-verification \ --user-id '' \ - --email-verification false + --email-verification=false ``` diff --git a/examples/2.3.x/console-cli/examples/users/update-impersonator.md b/examples/2.3.x/console-cli/examples/users/update-impersonator.md index 1669722ab..ddb2ae7a9 100644 --- a/examples/2.3.x/console-cli/examples/users/update-impersonator.md +++ b/examples/2.3.x/console-cli/examples/users/update-impersonator.md @@ -1,5 +1,5 @@ ```bash appwrite users update-impersonator \ --user-id '' \ - --impersonator false + --impersonator=false ``` diff --git a/examples/2.3.x/console-cli/examples/users/update-labels.md b/examples/2.3.x/console-cli/examples/users/update-labels.md index 68f7fc081..b0421cd06 100644 --- a/examples/2.3.x/console-cli/examples/users/update-labels.md +++ b/examples/2.3.x/console-cli/examples/users/update-labels.md @@ -1,5 +1,5 @@ ```bash appwrite users update-labels \ --user-id '' \ - --labels one two three + --labels subscriber ``` diff --git a/examples/2.3.x/console-cli/examples/users/update-mfa.md b/examples/2.3.x/console-cli/examples/users/update-mfa.md index 68c09a524..d994cea66 100644 --- a/examples/2.3.x/console-cli/examples/users/update-mfa.md +++ b/examples/2.3.x/console-cli/examples/users/update-mfa.md @@ -1,5 +1,5 @@ ```bash appwrite users update-mfa \ --user-id '' \ - --mfa false + --mfa=false ``` diff --git a/examples/2.3.x/console-cli/examples/users/update-phone-verification.md b/examples/2.3.x/console-cli/examples/users/update-phone-verification.md index c161f06fd..1298be059 100644 --- a/examples/2.3.x/console-cli/examples/users/update-phone-verification.md +++ b/examples/2.3.x/console-cli/examples/users/update-phone-verification.md @@ -1,5 +1,5 @@ ```bash appwrite users update-phone-verification \ --user-id '' \ - --phone-verification false + --phone-verification=false ``` diff --git a/examples/2.3.x/console-cli/examples/users/update-prefs.md b/examples/2.3.x/console-cli/examples/users/update-prefs.md index b7942f73f..d6f42b177 100644 --- a/examples/2.3.x/console-cli/examples/users/update-prefs.md +++ b/examples/2.3.x/console-cli/examples/users/update-prefs.md @@ -1,5 +1,5 @@ ```bash appwrite users update-prefs \ --user-id '' \ - --prefs '{ "key": "value" }' + --prefs '{}' ``` diff --git a/examples/2.3.x/console-cli/examples/users/update-status.md b/examples/2.3.x/console-cli/examples/users/update-status.md index 5312d0c71..821a38c45 100644 --- a/examples/2.3.x/console-cli/examples/users/update-status.md +++ b/examples/2.3.x/console-cli/examples/users/update-status.md @@ -1,5 +1,5 @@ ```bash appwrite users update-status \ --user-id '' \ - --status false + --status=false ``` diff --git a/examples/2.3.x/console-cli/examples/vectorsdb/create-collection.md b/examples/2.3.x/console-cli/examples/vectorsdb/create-collection.md index c03fd786c..0c0e3ec40 100644 --- a/examples/2.3.x/console-cli/examples/vectorsdb/create-collection.md +++ b/examples/2.3.x/console-cli/examples/vectorsdb/create-collection.md @@ -3,5 +3,5 @@ appwrite vectorsdb create-collection \ --database-id '' \ --collection-id '' \ --name '' \ - --dimension 1 + --dimension 4 ``` diff --git a/examples/2.3.x/console-cli/examples/vectorsdb/create-document.md b/examples/2.3.x/console-cli/examples/vectorsdb/create-document.md index 4fdd19bd7..f4d463581 100644 --- a/examples/2.3.x/console-cli/examples/vectorsdb/create-document.md +++ b/examples/2.3.x/console-cli/examples/vectorsdb/create-document.md @@ -3,5 +3,5 @@ appwrite vectorsdb create-document \ --database-id '' \ --collection-id '' \ --document-id '' \ - --data '{ "key": "value" }' + --data '{"embeddings":[0.12,-0.55,0.88,1.02],"metadata":{"key":"value"}}' ``` diff --git a/examples/2.3.x/console-cli/examples/vectorsdb/create-documents.md b/examples/2.3.x/console-cli/examples/vectorsdb/create-documents.md index a47c7dc0b..45a113f65 100644 --- a/examples/2.3.x/console-cli/examples/vectorsdb/create-documents.md +++ b/examples/2.3.x/console-cli/examples/vectorsdb/create-documents.md @@ -2,5 +2,5 @@ appwrite vectorsdb create-documents \ --database-id '' \ --collection-id '' \ - --documents one two three + --documents '{"$id":"example1","embeddings":[0.12,-0.55,0.88,1.02],"metadata":{"name":"First document"}}' ``` diff --git a/examples/2.3.x/console-cli/examples/vectorsdb/create-index.md b/examples/2.3.x/console-cli/examples/vectorsdb/create-index.md index 98d47f7de..cbca707ca 100644 --- a/examples/2.3.x/console-cli/examples/vectorsdb/create-index.md +++ b/examples/2.3.x/console-cli/examples/vectorsdb/create-index.md @@ -4,5 +4,5 @@ appwrite vectorsdb create-index \ --collection-id '' \ --key '' \ --type hnsw_euclidean \ - --attributes one two three + --attributes embeddings ``` diff --git a/examples/2.3.x/console-cli/examples/vectorsdb/upsert-documents.md b/examples/2.3.x/console-cli/examples/vectorsdb/upsert-documents.md index 01ca49d71..304e814f1 100644 --- a/examples/2.3.x/console-cli/examples/vectorsdb/upsert-documents.md +++ b/examples/2.3.x/console-cli/examples/vectorsdb/upsert-documents.md @@ -2,5 +2,5 @@ appwrite vectorsdb upsert-documents \ --database-id '' \ --collection-id '' \ - --documents one two three + --documents '{"$id":"example1","embeddings":[0.12,-0.55,0.88,1.02],"metadata":{"name":"First document"}}' ``` diff --git a/examples/2.3.x/console-cli/examples/webhooks/create.md b/examples/2.3.x/console-cli/examples/webhooks/create.md index 5683ae0e3..d9c2b7ffe 100644 --- a/examples/2.3.x/console-cli/examples/webhooks/create.md +++ b/examples/2.3.x/console-cli/examples/webhooks/create.md @@ -3,5 +3,5 @@ appwrite webhooks create \ --webhook-id '' \ --url https://example.com/webhook \ --name '' \ - --events one two three + --events 'users.*.create' ``` diff --git a/examples/2.3.x/console-cli/examples/webhooks/update.md b/examples/2.3.x/console-cli/examples/webhooks/update.md index 5a62554f4..94c2dc3c5 100644 --- a/examples/2.3.x/console-cli/examples/webhooks/update.md +++ b/examples/2.3.x/console-cli/examples/webhooks/update.md @@ -3,5 +3,5 @@ appwrite webhooks update \ --webhook-id '' \ --name '' \ --url https://example.com/webhook \ - --events one two three + --events 'users.*.create' ``` diff --git a/examples/2.3.x/console-python/examples/account/create-email-password-session.md b/examples/2.3.x/console-python/examples/account/create-email-password-session.md index e40405df1..aa59005c5 100644 --- a/examples/2.3.x/console-python/examples/account/create-email-password-session.md +++ b/examples/2.3.x/console-python/examples/account/create-email-password-session.md @@ -11,7 +11,8 @@ account = Account(client) result: Session = account.create_email_password_session( email = 'email@example.com', - password = 'password' + password = 'password', + duration = 60 # optional ) print(result.model_dump()) diff --git a/examples/2.3.x/console-python/examples/account/delete-sessions.md b/examples/2.3.x/console-python/examples/account/delete-sessions.md index db350d07f..fcc01eaa0 100644 --- a/examples/2.3.x/console-python/examples/account/delete-sessions.md +++ b/examples/2.3.x/console-python/examples/account/delete-sessions.md @@ -8,5 +8,7 @@ client.set_project('') # Your project ID account = Account(client) -result = account.delete_sessions() +result = account.delete_sessions( + current = False # optional +) ``` diff --git a/examples/2.3.x/console-python/examples/account/list-sessions.md b/examples/2.3.x/console-python/examples/account/list-sessions.md index 02834b821..a3cc17285 100644 --- a/examples/2.3.x/console-python/examples/account/list-sessions.md +++ b/examples/2.3.x/console-python/examples/account/list-sessions.md @@ -9,7 +9,9 @@ client.set_project('') # Your project ID account = Account(client) -result: SessionList = account.list_sessions() +result: SessionList = account.list_sessions( + total = False # optional +) print(result.model_dump()) ``` diff --git a/examples/2.3.x/console-python/examples/analytics/create-event.md b/examples/2.3.x/console-python/examples/analytics/create-event.md new file mode 100644 index 000000000..4a4df77d8 --- /dev/null +++ b/examples/2.3.x/console-python/examples/analytics/create-event.md @@ -0,0 +1,26 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.analytics import Analytics + +client = Client() +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('') # Your project ID + +analytics = Analytics(client) + +result = analytics.create_event( + property_id = '', + name = '', + url = 'https://example.com', + domain = '', # optional + referrer = '', # optional + screen_width = None, # optional + session_hash = '', # optional + scroll_depth = 0, # optional + engagement_time = None, # optional + props = [], # optional + user_id = '', # optional + ip = '', # optional + user_agent = '' # optional +) +``` diff --git a/examples/2.3.x/console-python/examples/analytics/create-property.md b/examples/2.3.x/console-python/examples/analytics/create-property.md new file mode 100644 index 000000000..d88ddbcf4 --- /dev/null +++ b/examples/2.3.x/console-python/examples/analytics/create-property.md @@ -0,0 +1,23 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.analytics import Analytics +from appwrite_console.models import AnalyticsProperty + +client = Client() +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('') # Your project ID + +analytics = Analytics(client) + +result: AnalyticsProperty = analytics.create_property( + property_id = '', + name = '', + domain = '', # optional + timezone = '', # optional + enabled = False, # optional + public = False, # optional + allowed_origins = [] # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/analytics/delete-property.md b/examples/2.3.x/console-python/examples/analytics/delete-property.md new file mode 100644 index 000000000..b6709565d --- /dev/null +++ b/examples/2.3.x/console-python/examples/analytics/delete-property.md @@ -0,0 +1,14 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.analytics import Analytics + +client = Client() +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('') # Your project ID + +analytics = Analytics(client) + +result = analytics.delete_property( + property_id = '' +) +``` diff --git a/examples/2.3.x/console-python/examples/analytics/get-property.md b/examples/2.3.x/console-python/examples/analytics/get-property.md new file mode 100644 index 000000000..3537be821 --- /dev/null +++ b/examples/2.3.x/console-python/examples/analytics/get-property.md @@ -0,0 +1,17 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.analytics import Analytics +from appwrite_console.models import AnalyticsProperty + +client = Client() +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('') # Your project ID + +analytics = Analytics(client) + +result: AnalyticsProperty = analytics.get_property( + property_id = '' +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/analytics/list-metrics.md b/examples/2.3.x/console-python/examples/analytics/list-metrics.md new file mode 100644 index 000000000..c1c660c74 --- /dev/null +++ b/examples/2.3.x/console-python/examples/analytics/list-metrics.md @@ -0,0 +1,26 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.analytics import Analytics +from appwrite_console.models import AnalyticsMetricList +from appwrite_console.enums import AnalyticsInterval +from appwrite_console.enums import AnalyticsDimension + +client = Client() +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('') # Your project ID + +analytics = Analytics(client) + +result: AnalyticsMetricList = analytics.list_metrics( + property_id = '', + queries = [], # optional + interval = AnalyticsInterval.ONE_HOUR, # optional + dimensions = [AnalyticsDimension.COUNTRY], # optional + date_range = '', # optional + start_at = '2020-10-15T06:38:00.000+00:00', # optional + end_at = '2020-10-15T06:38:00.000+00:00', # optional + limit = 1 # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/analytics/list-properties.md b/examples/2.3.x/console-python/examples/analytics/list-properties.md new file mode 100644 index 000000000..1c952b1c4 --- /dev/null +++ b/examples/2.3.x/console-python/examples/analytics/list-properties.md @@ -0,0 +1,19 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.analytics import Analytics +from appwrite_console.models import AnalyticsPropertyList + +client = Client() +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('') # Your project ID + +analytics = Analytics(client) + +result: AnalyticsPropertyList = analytics.list_properties( + queries = [], # optional + search = '', # optional + total = False # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/analytics/update-property.md b/examples/2.3.x/console-python/examples/analytics/update-property.md new file mode 100644 index 000000000..0f7fb33e3 --- /dev/null +++ b/examples/2.3.x/console-python/examples/analytics/update-property.md @@ -0,0 +1,23 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.analytics import Analytics +from appwrite_console.models import AnalyticsProperty + +client = Client() +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('') # Your project ID + +analytics = Analytics(client) + +result: AnalyticsProperty = analytics.update_property( + property_id = '', + name = '', # optional + domain = '', # optional + timezone = '', # optional + enabled = False, # optional + public = False, # optional + allowed_origins = [] # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/avatars/delete-photo.md b/examples/2.3.x/console-python/examples/avatars/delete-photo.md new file mode 100644 index 000000000..774d22d7e --- /dev/null +++ b/examples/2.3.x/console-python/examples/avatars/delete-photo.md @@ -0,0 +1,12 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.avatars import Avatars + +client = Client() +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('') # Your project ID + +avatars = Avatars(client) + +result = avatars.delete_photo() +``` diff --git a/examples/2.3.x/console-python/examples/avatars/get-screenshot.md b/examples/2.3.x/console-python/examples/avatars/get-screenshot.md index 5f74ca094..a2d91f3e0 100644 --- a/examples/2.3.x/console-python/examples/avatars/get-screenshot.md +++ b/examples/2.3.x/console-python/examples/avatars/get-screenshot.md @@ -15,8 +15,7 @@ avatars = Avatars(client) result: bytes = avatars.get_screenshot( url = 'https://example.com', headers = { - "Authorization": "Bearer token123", - "X-Custom-Header": "value" + "Accept-Language": "en-US,en;q=0.9" }, # optional viewport_width = 1920, # optional viewport_height = 1080, # optional diff --git a/examples/2.3.x/console-python/examples/avatars/update-photo.md b/examples/2.3.x/console-python/examples/avatars/update-photo.md new file mode 100644 index 000000000..3ca31c94e --- /dev/null +++ b/examples/2.3.x/console-python/examples/avatars/update-photo.md @@ -0,0 +1,18 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.avatars import Avatars +from appwrite_console.input_file import InputFile +from appwrite_console.models import Account + +client = Client() +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('') # Your project ID + +avatars = Avatars(client) + +result: Account = avatars.update_photo( + file = InputFile.from_path('file.png') +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/console/list-o-auth-2-providers.md b/examples/2.3.x/console-python/examples/console/list-o-auth-2-providers.md index 7acf8ad66..026a0daf3 100644 --- a/examples/2.3.x/console-python/examples/console/list-o-auth-2-providers.md +++ b/examples/2.3.x/console-python/examples/console/list-o-auth-2-providers.md @@ -9,7 +9,9 @@ client.set_project('') # Your project ID console = Console(client) -result: ConsoleOAuth2ProviderList = console.list_o_auth2_providers() +result: ConsoleOAuth2ProviderList = console.list_o_auth2_providers( + total = False # optional +) print(result.model_dump()) ``` diff --git a/examples/2.3.x/console-python/examples/console/list-organization-scopes.md b/examples/2.3.x/console-python/examples/console/list-organization-scopes.md index 7dff56c55..12f3648ff 100644 --- a/examples/2.3.x/console-python/examples/console/list-organization-scopes.md +++ b/examples/2.3.x/console-python/examples/console/list-organization-scopes.md @@ -9,7 +9,9 @@ client.set_project('') # Your project ID console = Console(client) -result: ConsoleKeyScopeList = console.list_organization_scopes() +result: ConsoleKeyScopeList = console.list_organization_scopes( + total = False # optional +) print(result.model_dump()) ``` diff --git a/examples/2.3.x/console-python/examples/console/list-project-scopes.md b/examples/2.3.x/console-python/examples/console/list-project-scopes.md index 85fb60dd3..cc5cbb770 100644 --- a/examples/2.3.x/console-python/examples/console/list-project-scopes.md +++ b/examples/2.3.x/console-python/examples/console/list-project-scopes.md @@ -9,7 +9,9 @@ client.set_project('') # Your project ID console = Console(client) -result: ConsoleKeyScopeList = console.list_project_scopes() +result: ConsoleKeyScopeList = console.list_project_scopes( + total = False # optional +) print(result.model_dump()) ``` diff --git a/examples/2.3.x/console-python/examples/databases/create-documents.md b/examples/2.3.x/console-python/examples/databases/create-documents.md index 39d39625b..577975a19 100644 --- a/examples/2.3.x/console-python/examples/databases/create-documents.md +++ b/examples/2.3.x/console-python/examples/databases/create-documents.md @@ -12,7 +12,16 @@ databases = Databases(client) result: DocumentList = databases.create_documents( database_id = '', collection_id = '', - documents = [], + documents = [ + { + "$id": "example1", + "username": "walter.obrien", + "email": "walter.obrien@example.com", + "fullName": "Walter O'Brien", + "age": 30, + "isAdmin": false + } + ], transaction_id = '' # optional ) diff --git a/examples/2.3.x/console-python/examples/databases/create-index.md b/examples/2.3.x/console-python/examples/databases/create-index.md index 1310e83d6..09c077db1 100644 --- a/examples/2.3.x/console-python/examples/databases/create-index.md +++ b/examples/2.3.x/console-python/examples/databases/create-index.md @@ -16,7 +16,7 @@ result: Index = databases.create_index( collection_id = '', key = '', type = DatabasesIndexType.KEY, - attributes = [], + attributes = ["username"], orders = [OrderBy.ASC], # optional lengths = [] # optional ) diff --git a/examples/2.3.x/console-python/examples/databases/delete-documents.md b/examples/2.3.x/console-python/examples/databases/delete-documents.md index 94d91cb1b..16f36b692 100644 --- a/examples/2.3.x/console-python/examples/databases/delete-documents.md +++ b/examples/2.3.x/console-python/examples/databases/delete-documents.md @@ -12,7 +12,7 @@ databases = Databases(client) result: DocumentList = databases.delete_documents( database_id = '', collection_id = '', - queries = [], # optional + queries = ["{\"method\":\"equal\", \"attribute\":\"$id\", \"values\":[\"\"]}"], # optional transaction_id = '' # optional ) diff --git a/examples/2.3.x/console-python/examples/databases/get-attribute.md b/examples/2.3.x/console-python/examples/databases/get-attribute.md index bd077abaa..af8ace3bf 100644 --- a/examples/2.3.x/console-python/examples/databases/get-attribute.md +++ b/examples/2.3.x/console-python/examples/databases/get-attribute.md @@ -2,6 +2,7 @@ from appwrite_console.client import Client from appwrite_console.services.databases import Databases from appwrite_console.models import AttributeBoolean +from appwrite_console.models import AttributeBigint from appwrite_console.models import AttributeInteger from appwrite_console.models import AttributeFloat from appwrite_console.models import AttributeEmail @@ -10,6 +11,13 @@ from appwrite_console.models import AttributeUrl from appwrite_console.models import AttributeIp from appwrite_console.models import AttributeDatetime from appwrite_console.models import AttributeRelationship +from appwrite_console.models import AttributePoint +from appwrite_console.models import AttributeLine +from appwrite_console.models import AttributePolygon +from appwrite_console.models import AttributeVarchar +from appwrite_console.models import AttributeText +from appwrite_console.models import AttributeMediumtext +from appwrite_console.models import AttributeLongtext from appwrite_console.models import AttributeString from typing import Union @@ -19,7 +27,7 @@ client.set_project('') # Your project ID databases = Databases(client) -result: Union[AttributeBoolean, AttributeInteger, AttributeFloat, AttributeEmail, AttributeEnum, AttributeUrl, AttributeIp, AttributeDatetime, AttributeRelationship, AttributeString] = databases.get_attribute( +result: Union[AttributeBoolean, AttributeBigint, AttributeInteger, AttributeFloat, AttributeEmail, AttributeEnum, AttributeUrl, AttributeIp, AttributeDatetime, AttributeRelationship, AttributePoint, AttributeLine, AttributePolygon, AttributeVarchar, AttributeText, AttributeMediumtext, AttributeLongtext, AttributeString] = databases.get_attribute( database_id = '', collection_id = '', key = '' diff --git a/examples/2.3.x/console-python/examples/databases/list-transactions.md b/examples/2.3.x/console-python/examples/databases/list-transactions.md index 868d95522..d37462e41 100644 --- a/examples/2.3.x/console-python/examples/databases/list-transactions.md +++ b/examples/2.3.x/console-python/examples/databases/list-transactions.md @@ -10,7 +10,8 @@ client.set_project('') # Your project ID databases = Databases(client) result: TransactionList = databases.list_transactions( - queries = [] # optional + queries = [], # optional + total = False # optional ) print(result.model_dump()) diff --git a/examples/2.3.x/console-python/examples/databases/upsert-documents.md b/examples/2.3.x/console-python/examples/databases/upsert-documents.md index 2cde1e4f9..c6c441ffc 100644 --- a/examples/2.3.x/console-python/examples/databases/upsert-documents.md +++ b/examples/2.3.x/console-python/examples/databases/upsert-documents.md @@ -12,7 +12,16 @@ databases = Databases(client) result: DocumentList = databases.upsert_documents( database_id = '', collection_id = '', - documents = [], + documents = [ + { + "$id": "example1", + "username": "walter.obrien", + "email": "walter.obrien@example.com", + "fullName": "Walter O'Brien", + "age": 30, + "isAdmin": false + } + ], transaction_id = '' # optional ) diff --git a/examples/2.3.x/console-python/examples/documentsdb/create-documents.md b/examples/2.3.x/console-python/examples/documentsdb/create-documents.md index e4b9926ea..47482fb74 100644 --- a/examples/2.3.x/console-python/examples/documentsdb/create-documents.md +++ b/examples/2.3.x/console-python/examples/documentsdb/create-documents.md @@ -12,7 +12,16 @@ documents_db = DocumentsDB(client) result: DocumentList = documents_db.create_documents( database_id = '', collection_id = '', - documents = [], + documents = [ + { + "$id": "example1", + "username": "walter.obrien", + "email": "walter.obrien@example.com", + "fullName": "Walter O'Brien", + "age": 30, + "isAdmin": false + } + ], transaction_id = '' # optional ) diff --git a/examples/2.3.x/console-python/examples/documentsdb/create-index.md b/examples/2.3.x/console-python/examples/documentsdb/create-index.md index 9f6ed7f5f..5410dc414 100644 --- a/examples/2.3.x/console-python/examples/documentsdb/create-index.md +++ b/examples/2.3.x/console-python/examples/documentsdb/create-index.md @@ -16,7 +16,7 @@ result: Index = documents_db.create_index( collection_id = '', key = '', type = DocumentsDBIndexType.KEY, - attributes = [], + attributes = ["username"], orders = [OrderBy.ASC], # optional lengths = [] # optional ) diff --git a/examples/2.3.x/console-python/examples/documentsdb/delete-documents.md b/examples/2.3.x/console-python/examples/documentsdb/delete-documents.md index a772b969a..0e9da1734 100644 --- a/examples/2.3.x/console-python/examples/documentsdb/delete-documents.md +++ b/examples/2.3.x/console-python/examples/documentsdb/delete-documents.md @@ -12,7 +12,7 @@ documents_db = DocumentsDB(client) result: DocumentList = documents_db.delete_documents( database_id = '', collection_id = '', - queries = [], # optional + queries = ["{\"method\":\"equal\", \"attribute\":\"$id\", \"values\":[\"\"]}"], # optional transaction_id = '' # optional ) diff --git a/examples/2.3.x/console-python/examples/documentsdb/list-transactions.md b/examples/2.3.x/console-python/examples/documentsdb/list-transactions.md index cb1db3563..703475aa7 100644 --- a/examples/2.3.x/console-python/examples/documentsdb/list-transactions.md +++ b/examples/2.3.x/console-python/examples/documentsdb/list-transactions.md @@ -10,7 +10,8 @@ client.set_project('') # Your project ID documents_db = DocumentsDB(client) result: TransactionList = documents_db.list_transactions( - queries = [] # optional + queries = [], # optional + total = False # optional ) print(result.model_dump()) diff --git a/examples/2.3.x/console-python/examples/documentsdb/upsert-documents.md b/examples/2.3.x/console-python/examples/documentsdb/upsert-documents.md index 9cf057d7a..2e8e33c27 100644 --- a/examples/2.3.x/console-python/examples/documentsdb/upsert-documents.md +++ b/examples/2.3.x/console-python/examples/documentsdb/upsert-documents.md @@ -12,7 +12,16 @@ documents_db = DocumentsDB(client) result: DocumentList = documents_db.upsert_documents( database_id = '', collection_id = '', - documents = [], + documents = [ + { + "$id": "example1", + "username": "walter.obrien", + "email": "walter.obrien@example.com", + "fullName": "Walter O'Brien", + "age": 30, + "isAdmin": false + } + ], transaction_id = '' # optional ) diff --git a/examples/2.3.x/console-python/examples/embeddings/create-text-embeddings.md b/examples/2.3.x/console-python/examples/embeddings/create-text-embeddings.md index 1ed437b62..c2a920bc5 100644 --- a/examples/2.3.x/console-python/examples/embeddings/create-text-embeddings.md +++ b/examples/2.3.x/console-python/examples/embeddings/create-text-embeddings.md @@ -11,7 +11,7 @@ client.set_project('') # Your project ID embeddings = Embeddings(client) result: EmbeddingList = embeddings.create_text_embeddings( - texts = [], + texts = ["Appwrite helps developers build applications.", "Find documents with semantic search."], model = EmbeddingModel.NOMIC_EMBED_TEXT # optional ) diff --git a/examples/2.3.x/console-python/examples/functions/list-runtimes.md b/examples/2.3.x/console-python/examples/functions/list-runtimes.md index f34385651..c23f5418b 100644 --- a/examples/2.3.x/console-python/examples/functions/list-runtimes.md +++ b/examples/2.3.x/console-python/examples/functions/list-runtimes.md @@ -9,7 +9,9 @@ client.set_project('') # Your project ID functions = Functions(client) -result: RuntimeList = functions.list_runtimes() +result: RuntimeList = functions.list_runtimes( + total = False # optional +) print(result.model_dump()) ``` diff --git a/examples/2.3.x/console-python/examples/functions/list-specifications.md b/examples/2.3.x/console-python/examples/functions/list-specifications.md index 5bb501568..ced166cc1 100644 --- a/examples/2.3.x/console-python/examples/functions/list-specifications.md +++ b/examples/2.3.x/console-python/examples/functions/list-specifications.md @@ -10,7 +10,8 @@ client.set_project('') # Your project ID functions = Functions(client) result: SpecificationList = functions.list_specifications( - type = 'runtimes' # optional + type = 'runtimes', # optional + total = False # optional ) print(result.model_dump()) diff --git a/examples/2.3.x/console-python/examples/graphql/mutation.md b/examples/2.3.x/console-python/examples/graphql/mutation.md index 3b9d4fd4a..641c0badc 100644 --- a/examples/2.3.x/console-python/examples/graphql/mutation.md +++ b/examples/2.3.x/console-python/examples/graphql/mutation.md @@ -9,6 +9,8 @@ client.set_project('') # Your project ID graphql = Graphql(client) result = graphql.mutation( - query = {} + query = { + "query": "mutation { accountUpdateName(name: \"Walter\") { name } }" + } ) ``` diff --git a/examples/2.3.x/console-python/examples/graphql/query.md b/examples/2.3.x/console-python/examples/graphql/query.md index 111ee1fc3..43604a95c 100644 --- a/examples/2.3.x/console-python/examples/graphql/query.md +++ b/examples/2.3.x/console-python/examples/graphql/query.md @@ -9,6 +9,8 @@ client.set_project('') # Your project ID graphql = Graphql(client) result = graphql.query( - query = {} + query = { + "query": "query { localeGet { ip } }" + } ) ``` diff --git a/examples/2.3.x/console-python/examples/growth/create-conversation.md b/examples/2.3.x/console-python/examples/growth/create-conversation.md new file mode 100644 index 000000000..bf3589bc9 --- /dev/null +++ b/examples/2.3.x/console-python/examples/growth/create-conversation.md @@ -0,0 +1,27 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.growth import Growth +from appwrite_console.input_file import InputFile +from appwrite_console.models import GrowthConversation +from appwrite_console.enums import ConversationType + +client = Client() +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('') # Your project ID + +growth = Growth(client) + +result: GrowthConversation = growth.create_conversation( + type = ConversationType.SUPPORT, + email = 'email@example.com', # optional + name = '', # optional + subject = '', # optional + message = '', # optional + organization_id = '', # optional + project_id = '', # optional + attributes = {}, # optional + attachment = InputFile.from_path('file.png') # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/growth/create-installation.md b/examples/2.3.x/console-python/examples/growth/create-installation.md new file mode 100644 index 000000000..bc45922b6 --- /dev/null +++ b/examples/2.3.x/console-python/examples/growth/create-installation.md @@ -0,0 +1,24 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.growth import Growth + +client = Client() +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('') # Your project ID + +growth = Growth(client) + +result = growth.create_installation( + email = 'email@example.com', # optional + name = '', # optional + version = '', # optional + domain = '', # optional + database = '', # optional + host_ip = '', # optional + user_agent = '', # optional + os = '', # optional + arch = '', # optional + cpus = None, # optional + ram = None # optional +) +``` diff --git a/examples/2.3.x/console-python/examples/locale/list-codes.md b/examples/2.3.x/console-python/examples/locale/list-codes.md index 1da3d63d4..56d2c84c6 100644 --- a/examples/2.3.x/console-python/examples/locale/list-codes.md +++ b/examples/2.3.x/console-python/examples/locale/list-codes.md @@ -9,7 +9,9 @@ client.set_project('') # Your project ID locale = Locale(client) -result: LocaleCodeList = locale.list_codes() +result: LocaleCodeList = locale.list_codes( + total = False # optional +) print(result.model_dump()) ``` diff --git a/examples/2.3.x/console-python/examples/locale/list-continents.md b/examples/2.3.x/console-python/examples/locale/list-continents.md index 4e8f44fe9..08e1c5a62 100644 --- a/examples/2.3.x/console-python/examples/locale/list-continents.md +++ b/examples/2.3.x/console-python/examples/locale/list-continents.md @@ -9,7 +9,9 @@ client.set_project('') # Your project ID locale = Locale(client) -result: ContinentList = locale.list_continents() +result: ContinentList = locale.list_continents( + total = False # optional +) print(result.model_dump()) ``` diff --git a/examples/2.3.x/console-python/examples/locale/list-countries-eu.md b/examples/2.3.x/console-python/examples/locale/list-countries-eu.md index 7b70b948e..1924728db 100644 --- a/examples/2.3.x/console-python/examples/locale/list-countries-eu.md +++ b/examples/2.3.x/console-python/examples/locale/list-countries-eu.md @@ -9,7 +9,9 @@ client.set_project('') # Your project ID locale = Locale(client) -result: CountryList = locale.list_countries_eu() +result: CountryList = locale.list_countries_eu( + total = False # optional +) print(result.model_dump()) ``` diff --git a/examples/2.3.x/console-python/examples/locale/list-countries-phones.md b/examples/2.3.x/console-python/examples/locale/list-countries-phones.md index 2b9c8233c..b9ebcbc0d 100644 --- a/examples/2.3.x/console-python/examples/locale/list-countries-phones.md +++ b/examples/2.3.x/console-python/examples/locale/list-countries-phones.md @@ -9,7 +9,9 @@ client.set_project('') # Your project ID locale = Locale(client) -result: PhoneList = locale.list_countries_phones() +result: PhoneList = locale.list_countries_phones( + total = False # optional +) print(result.model_dump()) ``` diff --git a/examples/2.3.x/console-python/examples/locale/list-countries.md b/examples/2.3.x/console-python/examples/locale/list-countries.md index 096755844..c9edb0e69 100644 --- a/examples/2.3.x/console-python/examples/locale/list-countries.md +++ b/examples/2.3.x/console-python/examples/locale/list-countries.md @@ -9,7 +9,9 @@ client.set_project('') # Your project ID locale = Locale(client) -result: CountryList = locale.list_countries() +result: CountryList = locale.list_countries( + total = False # optional +) print(result.model_dump()) ``` diff --git a/examples/2.3.x/console-python/examples/locale/list-currencies.md b/examples/2.3.x/console-python/examples/locale/list-currencies.md index 8d523fb68..8e4f0dbbd 100644 --- a/examples/2.3.x/console-python/examples/locale/list-currencies.md +++ b/examples/2.3.x/console-python/examples/locale/list-currencies.md @@ -9,7 +9,9 @@ client.set_project('') # Your project ID locale = Locale(client) -result: CurrencyList = locale.list_currencies() +result: CurrencyList = locale.list_currencies( + total = False # optional +) print(result.model_dump()) ``` diff --git a/examples/2.3.x/console-python/examples/locale/list-languages.md b/examples/2.3.x/console-python/examples/locale/list-languages.md index e1ef07e7b..01bc58708 100644 --- a/examples/2.3.x/console-python/examples/locale/list-languages.md +++ b/examples/2.3.x/console-python/examples/locale/list-languages.md @@ -9,7 +9,9 @@ client.set_project('') # Your project ID locale = Locale(client) -result: LanguageList = locale.list_languages() +result: LanguageList = locale.list_languages( + total = False # optional +) print(result.model_dump()) ``` diff --git a/examples/2.3.x/console-python/examples/messaging/create-push.md b/examples/2.3.x/console-python/examples/messaging/create-push.md index 6843674be..d5cf8e090 100644 --- a/examples/2.3.x/console-python/examples/messaging/create-push.md +++ b/examples/2.3.x/console-python/examples/messaging/create-push.md @@ -29,7 +29,8 @@ result: Message = messaging.create_push( scheduled_at = '2020-10-15T06:38:00.000+00:00', # optional content_available = False, # optional critical = False, # optional - priority = MessagePriority.NORMAL # optional + priority = MessagePriority.NORMAL, # optional + channel_id = '' # optional ) print(result.model_dump()) diff --git a/examples/2.3.x/console-python/examples/messaging/update-email.md b/examples/2.3.x/console-python/examples/messaging/update-email.md index 2a60946db..9f850c8d1 100644 --- a/examples/2.3.x/console-python/examples/messaging/update-email.md +++ b/examples/2.3.x/console-python/examples/messaging/update-email.md @@ -11,19 +11,19 @@ messaging = Messaging(client) result: Message = messaging.update_email( message_id = '', + subject = '', # optional + content = '', # optional topics = [], # optional users = [], # optional targets = [], # optional - subject = '', # optional - content = '', # optional - draft = False, # optional - html = False, # optional cc = [], # optional bcc = [], # optional + attachments = [], # optional reply_to_email = 'email@example.com', # optional reply_to_name = '', # optional - scheduled_at = '2020-10-15T06:38:00.000+00:00', # optional - attachments = [] # optional + draft = False, # optional + html = False, # optional + scheduled_at = '2020-10-15T06:38:00.000+00:00' # optional ) print(result.model_dump()) diff --git a/examples/2.3.x/console-python/examples/messaging/update-push.md b/examples/2.3.x/console-python/examples/messaging/update-push.md index 1adf64f8d..e7532b6c6 100644 --- a/examples/2.3.x/console-python/examples/messaging/update-push.md +++ b/examples/2.3.x/console-python/examples/messaging/update-push.md @@ -12,11 +12,11 @@ messaging = Messaging(client) result: Message = messaging.update_push( message_id = '', + title = '', # optional + body = '<BODY>', # optional topics = [], # optional users = [], # optional targets = [], # optional - title = '<TITLE>', # optional - body = '<BODY>', # optional data = {}, # optional action = '<ACTION>', # optional image = '<ID1:ID2>', # optional @@ -29,7 +29,8 @@ result: Message = messaging.update_push( scheduled_at = '2020-10-15T06:38:00.000+00:00', # optional content_available = False, # optional critical = False, # optional - priority = MessagePriority.NORMAL # optional + priority = MessagePriority.NORMAL, # optional + channel_id = '<CHANNEL_ID>' # optional ) print(result.model_dump()) diff --git a/examples/2.3.x/console-python/examples/messaging/update-sms.md b/examples/2.3.x/console-python/examples/messaging/update-sms.md index 8660189c7..d1cb88a3a 100644 --- a/examples/2.3.x/console-python/examples/messaging/update-sms.md +++ b/examples/2.3.x/console-python/examples/messaging/update-sms.md @@ -11,10 +11,10 @@ messaging = Messaging(client) result: Message = messaging.update_sms( message_id = '<MESSAGE_ID>', + content = '<CONTENT>', # optional topics = [], # optional users = [], # optional targets = [], # optional - content = '<CONTENT>', # optional draft = False, # optional scheduled_at = '2020-10-15T06:38:00.000+00:00' # optional ) diff --git a/examples/2.3.x/console-python/examples/notifications/list.md b/examples/2.3.x/console-python/examples/notifications/list.md index 378c548ad..86fd0daaa 100644 --- a/examples/2.3.x/console-python/examples/notifications/list.md +++ b/examples/2.3.x/console-python/examples/notifications/list.md @@ -10,7 +10,8 @@ client.set_project('<YOUR_PROJECT_ID>') # Your project ID notifications = Notifications(client) result: NotificationList = notifications.list( - queries = [] # optional + queries = [], # optional + total = False # optional ) print(result.model_dump()) diff --git a/examples/2.3.x/console-python/examples/organization/create-ephemeral-project-key.md b/examples/2.3.x/console-python/examples/organization/create-ephemeral-project-key.md index 925f94809..e4980904d 100644 --- a/examples/2.3.x/console-python/examples/organization/create-ephemeral-project-key.md +++ b/examples/2.3.x/console-python/examples/organization/create-ephemeral-project-key.md @@ -12,7 +12,7 @@ organization = Organization(client) result: EphemeralKey = organization.create_ephemeral_project_key( project_id = '<PROJECT_ID>', - scopes = [ProjectKeyScopes.PROJECT_READ], + scopes = [ProjectKeyScopes.USERS_READ], duration = 600 ) diff --git a/examples/2.3.x/console-python/examples/organization/create-project-key.md b/examples/2.3.x/console-python/examples/organization/create-project-key.md index e0843bae1..1fe2e4e71 100644 --- a/examples/2.3.x/console-python/examples/organization/create-project-key.md +++ b/examples/2.3.x/console-python/examples/organization/create-project-key.md @@ -14,7 +14,7 @@ result: Key = organization.create_project_key( project_id = '<PROJECT_ID>', key_id = '<KEY_ID>', name = '<NAME>', - scopes = [ProjectKeyScopes.PROJECT_READ], + scopes = [ProjectKeyScopes.USERS_READ], expire = '2020-10-15T06:38:00.000+00:00' # optional ) diff --git a/examples/2.3.x/console-python/examples/organization/update-project-key.md b/examples/2.3.x/console-python/examples/organization/update-project-key.md index b17a46a2d..79b162b37 100644 --- a/examples/2.3.x/console-python/examples/organization/update-project-key.md +++ b/examples/2.3.x/console-python/examples/organization/update-project-key.md @@ -14,7 +14,7 @@ result: Key = organization.update_project_key( project_id = '<PROJECT_ID>', key_id = '<KEY_ID>', name = '<NAME>', - scopes = [ProjectKeyScopes.PROJECT_READ], + scopes = [ProjectKeyScopes.USERS_READ], expire = '2020-10-15T06:38:00.000+00:00' # optional ) diff --git a/examples/2.3.x/console-python/examples/project/create-ephemeral-key.md b/examples/2.3.x/console-python/examples/project/create-ephemeral-key.md index 41fb5da61..8125e78da 100644 --- a/examples/2.3.x/console-python/examples/project/create-ephemeral-key.md +++ b/examples/2.3.x/console-python/examples/project/create-ephemeral-key.md @@ -11,7 +11,7 @@ client.set_project('<YOUR_PROJECT_ID>') # Your project ID project = Project(client) result: EphemeralKey = project.create_ephemeral_key( - scopes = [ProjectKeyScopes.PROJECT_READ], + scopes = [ProjectKeyScopes.USERS_READ], duration = 600 ) diff --git a/examples/2.3.x/console-python/examples/project/create-key.md b/examples/2.3.x/console-python/examples/project/create-key.md index 75eed1da8..60d8d9b8a 100644 --- a/examples/2.3.x/console-python/examples/project/create-key.md +++ b/examples/2.3.x/console-python/examples/project/create-key.md @@ -13,7 +13,7 @@ project = Project(client) result: Key = project.create_key( key_id = '<KEY_ID>', name = '<NAME>', - scopes = [ProjectKeyScopes.PROJECT_READ], + scopes = [ProjectKeyScopes.USERS_READ], expire = '2020-10-15T06:38:00.000+00:00' # optional ) diff --git a/examples/2.3.x/console-python/examples/project/create-smtp-test.md b/examples/2.3.x/console-python/examples/project/create-smtp-test.md index 6eb08cfb7..c95a30d80 100644 --- a/examples/2.3.x/console-python/examples/project/create-smtp-test.md +++ b/examples/2.3.x/console-python/examples/project/create-smtp-test.md @@ -9,6 +9,6 @@ client.set_project('<YOUR_PROJECT_ID>') # Your project ID project = Project(client) result = project.create_smtp_test( - emails = [] + emails = ["recipient@example.com"] ) ``` diff --git a/examples/2.3.x/console-python/examples/project/get-o-auth-2-provider.md b/examples/2.3.x/console-python/examples/project/get-o-auth-2-provider.md index 031e2abcf..93afe8408 100644 --- a/examples/2.3.x/console-python/examples/project/get-o-auth-2-provider.md +++ b/examples/2.3.x/console-python/examples/project/get-o-auth-2-provider.md @@ -16,6 +16,7 @@ from appwrite_console.models import OAuth2Zoho from appwrite_console.models import OAuth2Yandex from appwrite_console.models import OAuth2X from appwrite_console.models import OAuth2WordPress +from appwrite_console.models import OAuth2Webflow from appwrite_console.models import OAuth2Twitch from appwrite_console.models import OAuth2Stripe from appwrite_console.models import OAuth2Spotify @@ -55,7 +56,7 @@ client.set_project('<YOUR_PROJECT_ID>') # Your project ID project = Project(client) -result: Union[OAuth2Github, OAuth2Discord, OAuth2Figma, OAuth2Dropbox, OAuth2Dailymotion, OAuth2Bitbucket, OAuth2Bitly, OAuth2Box, OAuth2Autodesk, OAuth2Google, OAuth2Zoom, OAuth2Zoho, OAuth2Yandex, OAuth2X, OAuth2WordPress, OAuth2Twitch, OAuth2Stripe, OAuth2Spotify, OAuth2Slack, OAuth2Podio, OAuth2Notion, OAuth2Salesforce, OAuth2Yahoo, OAuth2HuggingFace, OAuth2Resend, OAuth2Cloudflare, OAuth2Linkedin, OAuth2Disqus, OAuth2Amazon, OAuth2Etsy, OAuth2Facebook, OAuth2Tradeshift, OAuth2Paypal, OAuth2Gitlab, OAuth2Authentik, OAuth2Auth0, OAuth2FusionAuth, OAuth2Keycloak, OAuth2Oidc, OAuth2Apple, OAuth2Okta, OAuth2Kick, OAuth2Microsoft, OAuth2TikTok, OAuth2Kakao] = project.get_o_auth2_provider( +result: Union[OAuth2Github, OAuth2Discord, OAuth2Figma, OAuth2Dropbox, OAuth2Dailymotion, OAuth2Bitbucket, OAuth2Bitly, OAuth2Box, OAuth2Autodesk, OAuth2Google, OAuth2Zoom, OAuth2Zoho, OAuth2Yandex, OAuth2X, OAuth2WordPress, OAuth2Webflow, OAuth2Twitch, OAuth2Stripe, OAuth2Spotify, OAuth2Slack, OAuth2Podio, OAuth2Notion, OAuth2Salesforce, OAuth2Yahoo, OAuth2HuggingFace, OAuth2Resend, OAuth2Cloudflare, OAuth2Linkedin, OAuth2Disqus, OAuth2Amazon, OAuth2Etsy, OAuth2Facebook, OAuth2Tradeshift, OAuth2Paypal, OAuth2Gitlab, OAuth2Authentik, OAuth2Auth0, OAuth2FusionAuth, OAuth2Keycloak, OAuth2Oidc, OAuth2Apple, OAuth2Okta, OAuth2Kick, OAuth2Microsoft, OAuth2TikTok, OAuth2Kakao] = project.get_o_auth2_provider( provider_id = ProjectOAuthProviderId.AMAZON ) diff --git a/examples/2.3.x/console-python/examples/project/update-key.md b/examples/2.3.x/console-python/examples/project/update-key.md index 2f948dde4..4842f952d 100644 --- a/examples/2.3.x/console-python/examples/project/update-key.md +++ b/examples/2.3.x/console-python/examples/project/update-key.md @@ -13,7 +13,7 @@ project = Project(client) result: Key = project.update_key( key_id = '<KEY_ID>', name = '<NAME>', - scopes = [ProjectKeyScopes.PROJECT_READ], + scopes = [ProjectKeyScopes.USERS_READ], expire = '2020-10-15T06:38:00.000+00:00' # optional ) diff --git a/examples/2.3.x/console-python/examples/project/update-labels.md b/examples/2.3.x/console-python/examples/project/update-labels.md index 32afbb13a..936b29294 100644 --- a/examples/2.3.x/console-python/examples/project/update-labels.md +++ b/examples/2.3.x/console-python/examples/project/update-labels.md @@ -10,7 +10,7 @@ client.set_project('<YOUR_PROJECT_ID>') # Your project ID project = Project(client) result: ProjectModel = project.update_labels( - labels = [] + labels = ["production"] ) print(result.model_dump()) diff --git a/examples/2.3.x/console-python/examples/project/update-o-auth-2-auth-0.md b/examples/2.3.x/console-python/examples/project/update-o-auth-2-auth-0.md index 27f4b0b88..6fe0631f5 100644 --- a/examples/2.3.x/console-python/examples/project/update-o-auth-2-auth-0.md +++ b/examples/2.3.x/console-python/examples/project/update-o-auth-2-auth-0.md @@ -2,6 +2,7 @@ from appwrite_console.client import Client from appwrite_console.services.project import Project from appwrite_console.models import OAuth2Auth0 +from appwrite_console.enums import ProjectOAuth2Auth0Prompt client = Client() client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint @@ -13,6 +14,7 @@ result: OAuth2Auth0 = project.update_o_auth2_auth0( client_id = '<CLIENT_ID>', # optional client_secret = '<CLIENT_SECRET>', # optional endpoint = '<ENDPOINT>', # optional + prompt = [ProjectOAuth2Auth0Prompt.NONE], # optional enabled = False # optional ) diff --git a/examples/2.3.x/console-python/examples/project/update-o-auth-2-discord.md b/examples/2.3.x/console-python/examples/project/update-o-auth-2-discord.md index 5487c5c00..b67864490 100644 --- a/examples/2.3.x/console-python/examples/project/update-o-auth-2-discord.md +++ b/examples/2.3.x/console-python/examples/project/update-o-auth-2-discord.md @@ -2,6 +2,7 @@ from appwrite_console.client import Client from appwrite_console.services.project import Project from appwrite_console.models import OAuth2Discord +from appwrite_console.enums import ProjectOAuth2DiscordPrompt client = Client() client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint @@ -12,6 +13,7 @@ project = Project(client) result: OAuth2Discord = project.update_o_auth2_discord( client_id = '<CLIENT_ID>', # optional client_secret = '<CLIENT_SECRET>', # optional + prompt = [ProjectOAuth2DiscordPrompt.NONE], # optional enabled = False # optional ) diff --git a/examples/2.3.x/console-python/examples/project/update-o-auth-2-git-hub.md b/examples/2.3.x/console-python/examples/project/update-o-auth-2-git-hub.md index 4cd8a08c8..1fa6afbc4 100644 --- a/examples/2.3.x/console-python/examples/project/update-o-auth-2-git-hub.md +++ b/examples/2.3.x/console-python/examples/project/update-o-auth-2-git-hub.md @@ -2,6 +2,7 @@ from appwrite_console.client import Client from appwrite_console.services.project import Project from appwrite_console.models import OAuth2Github +from appwrite_console.enums import ProjectOAuth2GitHubPrompt client = Client() client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint @@ -12,6 +13,7 @@ project = Project(client) result: OAuth2Github = project.update_o_auth2_git_hub( client_id = '<CLIENT_ID>', # optional client_secret = '<CLIENT_SECRET>', # optional + prompt = [ProjectOAuth2GitHubPrompt.SELECT_ACCOUNT], # optional enabled = False # optional ) diff --git a/examples/2.3.x/console-python/examples/project/update-o-auth-2-kakao.md b/examples/2.3.x/console-python/examples/project/update-o-auth-2-kakao.md index 49da8ef7a..01b42d558 100644 --- a/examples/2.3.x/console-python/examples/project/update-o-auth-2-kakao.md +++ b/examples/2.3.x/console-python/examples/project/update-o-auth-2-kakao.md @@ -2,6 +2,7 @@ from appwrite_console.client import Client from appwrite_console.services.project import Project from appwrite_console.models import OAuth2Kakao +from appwrite_console.enums import ProjectOAuth2KakaoPrompt client = Client() client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint @@ -12,6 +13,7 @@ project = Project(client) result: OAuth2Kakao = project.update_o_auth2_kakao( client_id = '<CLIENT_ID>', # optional client_secret = '<CLIENT_SECRET>', # optional + prompt = [ProjectOAuth2KakaoPrompt.NONE], # optional enabled = False # optional ) diff --git a/examples/2.3.x/console-python/examples/project/update-o-auth-2-microsoft.md b/examples/2.3.x/console-python/examples/project/update-o-auth-2-microsoft.md index c70f3e974..d03411fa3 100644 --- a/examples/2.3.x/console-python/examples/project/update-o-auth-2-microsoft.md +++ b/examples/2.3.x/console-python/examples/project/update-o-auth-2-microsoft.md @@ -2,6 +2,7 @@ from appwrite_console.client import Client from appwrite_console.services.project import Project from appwrite_console.models import OAuth2Microsoft +from appwrite_console.enums import ProjectOAuth2MicrosoftPrompt client = Client() client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint @@ -13,6 +14,7 @@ result: OAuth2Microsoft = project.update_o_auth2_microsoft( application_id = '<APPLICATION_ID>', # optional application_secret = '<APPLICATION_SECRET>', # optional tenant = '<TENANT>', # optional + prompt = [ProjectOAuth2MicrosoftPrompt.NONE], # optional enabled = False # optional ) diff --git a/examples/2.3.x/console-python/examples/project/update-o-auth-2-okta.md b/examples/2.3.x/console-python/examples/project/update-o-auth-2-okta.md index 459dac8da..1756c3844 100644 --- a/examples/2.3.x/console-python/examples/project/update-o-auth-2-okta.md +++ b/examples/2.3.x/console-python/examples/project/update-o-auth-2-okta.md @@ -2,6 +2,7 @@ from appwrite_console.client import Client from appwrite_console.services.project import Project from appwrite_console.models import OAuth2Okta +from appwrite_console.enums import ProjectOAuth2OktaPrompt client = Client() client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint @@ -14,6 +15,7 @@ result: OAuth2Okta = project.update_o_auth2_okta( client_secret = '<CLIENT_SECRET>', # optional domain = 'example.com', # optional authorization_server_id = '<AUTHORIZATION_SERVER_ID>', # optional + prompt = [ProjectOAuth2OktaPrompt.NONE], # optional enabled = False # optional ) diff --git a/examples/2.3.x/console-python/examples/project/update-o-auth-2-salesforce.md b/examples/2.3.x/console-python/examples/project/update-o-auth-2-salesforce.md index 3742515b8..a92e1bda4 100644 --- a/examples/2.3.x/console-python/examples/project/update-o-auth-2-salesforce.md +++ b/examples/2.3.x/console-python/examples/project/update-o-auth-2-salesforce.md @@ -2,6 +2,7 @@ from appwrite_console.client import Client from appwrite_console.services.project import Project from appwrite_console.models import OAuth2Salesforce +from appwrite_console.enums import ProjectOAuth2SalesforcePrompt client = Client() client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint @@ -12,6 +13,7 @@ project = Project(client) result: OAuth2Salesforce = project.update_o_auth2_salesforce( customer_key = '<CUSTOMER_KEY>', # optional customer_secret = '<CUSTOMER_SECRET>', # optional + prompt = [ProjectOAuth2SalesforcePrompt.LOGIN], # optional enabled = False # optional ) diff --git a/examples/2.3.x/console-python/examples/project/update-o-auth-2-webflow.md b/examples/2.3.x/console-python/examples/project/update-o-auth-2-webflow.md new file mode 100644 index 000000000..b2ef5387e --- /dev/null +++ b/examples/2.3.x/console-python/examples/project/update-o-auth-2-webflow.md @@ -0,0 +1,19 @@ +```python +from appwrite_console.client import Client +from appwrite_console.services.project import Project +from appwrite_console.models import OAuth2Webflow + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID + +project = Project(client) + +result: OAuth2Webflow = project.update_o_auth2_webflow( + client_id = '<CLIENT_ID>', # optional + client_secret = '<CLIENT_SECRET>', # optional + enabled = False # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/console-python/examples/project/update-o-auth-2-zoho.md b/examples/2.3.x/console-python/examples/project/update-o-auth-2-zoho.md index 92f5ede73..2d36ddb08 100644 --- a/examples/2.3.x/console-python/examples/project/update-o-auth-2-zoho.md +++ b/examples/2.3.x/console-python/examples/project/update-o-auth-2-zoho.md @@ -2,6 +2,7 @@ from appwrite_console.client import Client from appwrite_console.services.project import Project from appwrite_console.models import OAuth2Zoho +from appwrite_console.enums import ProjectOAuth2ZohoPrompt client = Client() client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint @@ -12,6 +13,7 @@ project = Project(client) result: OAuth2Zoho = project.update_o_auth2_zoho( client_id = '<CLIENT_ID>', # optional client_secret = '<CLIENT_SECRET>', # optional + prompt = [ProjectOAuth2ZohoPrompt.CONSENT], # optional enabled = False # optional ) diff --git a/examples/2.3.x/console-python/examples/sites/list-frameworks.md b/examples/2.3.x/console-python/examples/sites/list-frameworks.md index a765ccbdc..bb22e2500 100644 --- a/examples/2.3.x/console-python/examples/sites/list-frameworks.md +++ b/examples/2.3.x/console-python/examples/sites/list-frameworks.md @@ -9,7 +9,9 @@ client.set_project('<YOUR_PROJECT_ID>') # Your project ID sites = Sites(client) -result: FrameworkList = sites.list_frameworks() +result: FrameworkList = sites.list_frameworks( + total = False # optional +) print(result.model_dump()) ``` diff --git a/examples/2.3.x/console-python/examples/sites/list-specifications.md b/examples/2.3.x/console-python/examples/sites/list-specifications.md index 3ea154b3a..81e0371df 100644 --- a/examples/2.3.x/console-python/examples/sites/list-specifications.md +++ b/examples/2.3.x/console-python/examples/sites/list-specifications.md @@ -10,7 +10,8 @@ client.set_project('<YOUR_PROJECT_ID>') # Your project ID sites = Sites(client) result: SpecificationList = sites.list_specifications( - type = 'runtimes' # optional + type = 'runtimes', # optional + total = False # optional ) print(result.model_dump()) diff --git a/examples/2.3.x/console-python/examples/sites/list-templates.md b/examples/2.3.x/console-python/examples/sites/list-templates.md index 737df7edf..3a3f0e00b 100644 --- a/examples/2.3.x/console-python/examples/sites/list-templates.md +++ b/examples/2.3.x/console-python/examples/sites/list-templates.md @@ -15,7 +15,8 @@ result: TemplateSiteList = sites.list_templates( frameworks = [Framework.ANALOG], # optional use_cases = [SiteTemplateUseCase.PORTFOLIO], # optional limit = 1, # optional - offset = 0 # optional + offset = 0, # optional + total = False # optional ) print(result.model_dump()) diff --git a/examples/2.3.x/console-python/examples/tablesdb/create-index.md b/examples/2.3.x/console-python/examples/tablesdb/create-index.md index c8c849d91..95b4223bc 100644 --- a/examples/2.3.x/console-python/examples/tablesdb/create-index.md +++ b/examples/2.3.x/console-python/examples/tablesdb/create-index.md @@ -16,7 +16,7 @@ result: ColumnIndex = tables_db.create_index( table_id = '<TABLE_ID>', key = '<KEY>', type = TablesDBIndexType.KEY, - columns = [], + columns = ["username"], orders = [OrderBy.ASC], # optional lengths = [] # optional ) diff --git a/examples/2.3.x/console-python/examples/tablesdb/create-rows.md b/examples/2.3.x/console-python/examples/tablesdb/create-rows.md index 130cd62a0..60c8fc586 100644 --- a/examples/2.3.x/console-python/examples/tablesdb/create-rows.md +++ b/examples/2.3.x/console-python/examples/tablesdb/create-rows.md @@ -12,7 +12,16 @@ tables_db = TablesDB(client) result: RowList = tables_db.create_rows( database_id = '<DATABASE_ID>', table_id = '<TABLE_ID>', - rows = [], + rows = [ + { + "$id": "example1", + "username": "walter.obrien", + "email": "walter.obrien@example.com", + "fullName": "Walter O'Brien", + "age": 30, + "isAdmin": false + } + ], transaction_id = '<TRANSACTION_ID>' # optional ) diff --git a/examples/2.3.x/console-python/examples/tablesdb/delete-rows.md b/examples/2.3.x/console-python/examples/tablesdb/delete-rows.md index 634996a45..c4a16229d 100644 --- a/examples/2.3.x/console-python/examples/tablesdb/delete-rows.md +++ b/examples/2.3.x/console-python/examples/tablesdb/delete-rows.md @@ -12,7 +12,7 @@ tables_db = TablesDB(client) result: RowList = tables_db.delete_rows( database_id = '<DATABASE_ID>', table_id = '<TABLE_ID>', - queries = [], # optional + queries = ["{\"method\":\"equal\", \"attribute\":\"$id\", \"values\":[\"<ROW_ID>\"]}"], # optional transaction_id = '<TRANSACTION_ID>' # optional ) diff --git a/examples/2.3.x/console-python/examples/tablesdb/get-column.md b/examples/2.3.x/console-python/examples/tablesdb/get-column.md index 74ed8ae34..e77e6867d 100644 --- a/examples/2.3.x/console-python/examples/tablesdb/get-column.md +++ b/examples/2.3.x/console-python/examples/tablesdb/get-column.md @@ -2,6 +2,7 @@ from appwrite_console.client import Client from appwrite_console.services.tables_db import TablesDB from appwrite_console.models import ColumnBoolean +from appwrite_console.models import ColumnBigint from appwrite_console.models import ColumnInteger from appwrite_console.models import ColumnFloat from appwrite_console.models import ColumnEmail @@ -10,6 +11,13 @@ from appwrite_console.models import ColumnUrl from appwrite_console.models import ColumnIp from appwrite_console.models import ColumnDatetime from appwrite_console.models import ColumnRelationship +from appwrite_console.models import ColumnPoint +from appwrite_console.models import ColumnLine +from appwrite_console.models import ColumnPolygon +from appwrite_console.models import ColumnVarchar +from appwrite_console.models import ColumnText +from appwrite_console.models import ColumnMediumtext +from appwrite_console.models import ColumnLongtext from appwrite_console.models import ColumnString from typing import Union @@ -19,7 +27,7 @@ client.set_project('<YOUR_PROJECT_ID>') # Your project ID tables_db = TablesDB(client) -result: Union[ColumnBoolean, ColumnInteger, ColumnFloat, ColumnEmail, ColumnEnum, ColumnUrl, ColumnIp, ColumnDatetime, ColumnRelationship, ColumnString] = tables_db.get_column( +result: Union[ColumnBoolean, ColumnBigint, ColumnInteger, ColumnFloat, ColumnEmail, ColumnEnum, ColumnUrl, ColumnIp, ColumnDatetime, ColumnRelationship, ColumnPoint, ColumnLine, ColumnPolygon, ColumnVarchar, ColumnText, ColumnMediumtext, ColumnLongtext, ColumnString] = tables_db.get_column( database_id = '<DATABASE_ID>', table_id = '<TABLE_ID>', key = '<KEY>' diff --git a/examples/2.3.x/console-python/examples/tablesdb/list-transactions.md b/examples/2.3.x/console-python/examples/tablesdb/list-transactions.md index 9d4098d79..26ea13ee4 100644 --- a/examples/2.3.x/console-python/examples/tablesdb/list-transactions.md +++ b/examples/2.3.x/console-python/examples/tablesdb/list-transactions.md @@ -10,7 +10,8 @@ client.set_project('<YOUR_PROJECT_ID>') # Your project ID tables_db = TablesDB(client) result: TransactionList = tables_db.list_transactions( - queries = [] # optional + queries = [], # optional + total = False # optional ) print(result.model_dump()) diff --git a/examples/2.3.x/console-python/examples/tablesdb/upsert-rows.md b/examples/2.3.x/console-python/examples/tablesdb/upsert-rows.md index 3c4e91fa8..a819f8ca3 100644 --- a/examples/2.3.x/console-python/examples/tablesdb/upsert-rows.md +++ b/examples/2.3.x/console-python/examples/tablesdb/upsert-rows.md @@ -12,7 +12,16 @@ tables_db = TablesDB(client) result: RowList = tables_db.upsert_rows( database_id = '<DATABASE_ID>', table_id = '<TABLE_ID>', - rows = [], + rows = [ + { + "$id": "example1", + "username": "walter.obrien", + "email": "walter.obrien@example.com", + "fullName": "Walter O'Brien", + "age": 30, + "isAdmin": false + } + ], transaction_id = '<TRANSACTION_ID>' # optional ) diff --git a/examples/2.3.x/console-python/examples/teams/create-membership.md b/examples/2.3.x/console-python/examples/teams/create-membership.md index 8b0d4dcd4..402afdb2d 100644 --- a/examples/2.3.x/console-python/examples/teams/create-membership.md +++ b/examples/2.3.x/console-python/examples/teams/create-membership.md @@ -11,7 +11,7 @@ teams = Teams(client) result: Membership = teams.create_membership( team_id = '<TEAM_ID>', - roles = [], + roles = ["editor"], email = 'email@example.com', # optional user_id = '<USER_ID>', # optional phone = '+12065550100', # optional diff --git a/examples/2.3.x/console-python/examples/teams/update-membership.md b/examples/2.3.x/console-python/examples/teams/update-membership.md index 17e59db8d..8756e9018 100644 --- a/examples/2.3.x/console-python/examples/teams/update-membership.md +++ b/examples/2.3.x/console-python/examples/teams/update-membership.md @@ -12,7 +12,7 @@ teams = Teams(client) result: Membership = teams.update_membership( team_id = '<TEAM_ID>', membership_id = '<MEMBERSHIP_ID>', - roles = [] + roles = ["editor"] ) print(result.model_dump()) diff --git a/examples/2.3.x/console-python/examples/usage/list-events.md b/examples/2.3.x/console-python/examples/usage/list-events.md index aed1418db..a95303b1c 100644 --- a/examples/2.3.x/console-python/examples/usage/list-events.md +++ b/examples/2.3.x/console-python/examples/usage/list-events.md @@ -15,7 +15,7 @@ client.set_project('<YOUR_PROJECT_ID>') # Your project ID usage = Usage(client) result: UsageEventList = usage.list_events( - metrics = [UsageEventMetric.NETWORK_REQUESTS], + metrics = [UsageEventMetric.ANALYTICS_EVENTS], queries = [], # optional interval = UsageInterval.ONE_MINUTE, # optional dimensions = [UsageEventDimension.PATH], # optional diff --git a/examples/2.3.x/console-python/examples/usage/list-gauges.md b/examples/2.3.x/console-python/examples/usage/list-gauges.md index dde34126c..ea8dc82a1 100644 --- a/examples/2.3.x/console-python/examples/usage/list-gauges.md +++ b/examples/2.3.x/console-python/examples/usage/list-gauges.md @@ -15,7 +15,7 @@ client.set_project('<YOUR_PROJECT_ID>') # Your project ID usage = Usage(client) result: UsageGaugeList = usage.list_gauges( - metrics = [UsageGaugeMetric.TEAMS], + metrics = [UsageGaugeMetric.ANALYTICS_PROPERTIES], queries = [], # optional interval = UsageInterval.ONE_MINUTE, # optional dimensions = [UsageGaugeDimension.RESOURCEID], # optional diff --git a/examples/2.3.x/console-python/examples/users/update-labels.md b/examples/2.3.x/console-python/examples/users/update-labels.md index 2d6985024..da881e01b 100644 --- a/examples/2.3.x/console-python/examples/users/update-labels.md +++ b/examples/2.3.x/console-python/examples/users/update-labels.md @@ -11,7 +11,7 @@ users = Users(client) result: User = users.update_labels( user_id = '<USER_ID>', - labels = [] + labels = ["subscriber"] ) print(result.model_dump()) diff --git a/examples/2.3.x/console-python/examples/vcs/list-namespaces.md b/examples/2.3.x/console-python/examples/vcs/list-namespaces.md index c0fd41ee5..b0fdf03be 100644 --- a/examples/2.3.x/console-python/examples/vcs/list-namespaces.md +++ b/examples/2.3.x/console-python/examples/vcs/list-namespaces.md @@ -12,7 +12,8 @@ vcs = Vcs(client) result: VcsNamespaceList = vcs.list_namespaces( installation_id = '<INSTALLATION_ID>', search = '<SEARCH>', # optional - queries = [] # optional + queries = [], # optional + total = False # optional ) print(result.model_dump()) diff --git a/examples/2.3.x/console-python/examples/vcs/list-repositories.md b/examples/2.3.x/console-python/examples/vcs/list-repositories.md index 40e097c5c..a58ccc3e1 100644 --- a/examples/2.3.x/console-python/examples/vcs/list-repositories.md +++ b/examples/2.3.x/console-python/examples/vcs/list-repositories.md @@ -16,7 +16,8 @@ result: Union[ProviderRepositoryRuntimeList, ProviderRepositoryFrameworkList] = installation_id = '<INSTALLATION_ID>', type = VCSDetectionType.RUNTIME, search = '<SEARCH>', # optional - queries = [] # optional + queries = [], # optional + total = False # optional ) print(result.model_dump()) diff --git a/examples/2.3.x/console-python/examples/vcs/list-repository-branches.md b/examples/2.3.x/console-python/examples/vcs/list-repository-branches.md index 604a2a17c..b06f23360 100644 --- a/examples/2.3.x/console-python/examples/vcs/list-repository-branches.md +++ b/examples/2.3.x/console-python/examples/vcs/list-repository-branches.md @@ -13,7 +13,8 @@ result: BranchList = vcs.list_repository_branches( installation_id = '<INSTALLATION_ID>', provider_repository_id = '<PROVIDER_REPOSITORY_ID>', search = '<SEARCH>', # optional - queries = [] # optional + queries = [], # optional + total = False # optional ) print(result.model_dump()) diff --git a/examples/2.3.x/console-python/examples/vectorsdb/create-collection.md b/examples/2.3.x/console-python/examples/vectorsdb/create-collection.md index 06934a98e..a1cd4395d 100644 --- a/examples/2.3.x/console-python/examples/vectorsdb/create-collection.md +++ b/examples/2.3.x/console-python/examples/vectorsdb/create-collection.md @@ -15,7 +15,7 @@ result: VectorsdbCollection = vectors_db.create_collection( database_id = '<DATABASE_ID>', collection_id = '<COLLECTION_ID>', name = '<NAME>', - dimension = 1, + dimension = 4, permissions = [Permission.read(Role.any())], # optional document_security = False, # optional enabled = False # optional diff --git a/examples/2.3.x/console-python/examples/vectorsdb/create-documents.md b/examples/2.3.x/console-python/examples/vectorsdb/create-documents.md index 6dbbfe5e0..7cb8e2a65 100644 --- a/examples/2.3.x/console-python/examples/vectorsdb/create-documents.md +++ b/examples/2.3.x/console-python/examples/vectorsdb/create-documents.md @@ -12,7 +12,20 @@ vectors_db = VectorsDB(client) result: DocumentList = vectors_db.create_documents( database_id = '<DATABASE_ID>', collection_id = '<COLLECTION_ID>', - documents = [], + documents = [ + { + "$id": "example1", + "embeddings": [ + 0.12, + -0.55, + 0.88, + 1.02 + ], + "metadata": { + "name": "First document" + } + } + ], transaction_id = '<TRANSACTION_ID>' # optional ) diff --git a/examples/2.3.x/console-python/examples/vectorsdb/create-index.md b/examples/2.3.x/console-python/examples/vectorsdb/create-index.md index 9df8d59f8..3e552f076 100644 --- a/examples/2.3.x/console-python/examples/vectorsdb/create-index.md +++ b/examples/2.3.x/console-python/examples/vectorsdb/create-index.md @@ -16,7 +16,7 @@ result: Index = vectors_db.create_index( collection_id = '<COLLECTION_ID>', key = '<KEY>', type = VectorsDBIndexType.HNSW_EUCLIDEAN, - attributes = [], + attributes = ["embeddings"], orders = [OrderBy.ASC], # optional lengths = [] # optional ) diff --git a/examples/2.3.x/console-python/examples/vectorsdb/create-operations.md b/examples/2.3.x/console-python/examples/vectorsdb/create-operations.md index 9cc0f70b1..1a4f04e9d 100644 --- a/examples/2.3.x/console-python/examples/vectorsdb/create-operations.md +++ b/examples/2.3.x/console-python/examples/vectorsdb/create-operations.md @@ -18,7 +18,15 @@ result: Transaction = vectors_db.create_operations( "collectionId": "<COLLECTION_ID>", "documentId": "<DOCUMENT_ID>", "data": { - "name": "Walter O'Brien" + "embeddings": [ + 0.12, + -0.55, + 0.88, + 1.02 + ], + "metadata": { + "name": "First document" + } } } ] # optional diff --git a/examples/2.3.x/console-python/examples/vectorsdb/delete-documents.md b/examples/2.3.x/console-python/examples/vectorsdb/delete-documents.md index 15c1e4741..60b094d69 100644 --- a/examples/2.3.x/console-python/examples/vectorsdb/delete-documents.md +++ b/examples/2.3.x/console-python/examples/vectorsdb/delete-documents.md @@ -12,7 +12,7 @@ vectors_db = VectorsDB(client) result: DocumentList = vectors_db.delete_documents( database_id = '<DATABASE_ID>', collection_id = '<COLLECTION_ID>', - queries = [], # optional + queries = ["{\"method\":\"equal\", \"attribute\":\"$id\", \"values\":[\"<DOCUMENT_ID>\"]}"], # optional transaction_id = '<TRANSACTION_ID>' # optional ) diff --git a/examples/2.3.x/console-python/examples/vectorsdb/list-transactions.md b/examples/2.3.x/console-python/examples/vectorsdb/list-transactions.md index c7e0655db..92e756c27 100644 --- a/examples/2.3.x/console-python/examples/vectorsdb/list-transactions.md +++ b/examples/2.3.x/console-python/examples/vectorsdb/list-transactions.md @@ -10,7 +10,8 @@ client.set_project('<YOUR_PROJECT_ID>') # Your project ID vectors_db = VectorsDB(client) result: TransactionList = vectors_db.list_transactions( - queries = [] # optional + queries = [], # optional + total = False # optional ) print(result.model_dump()) diff --git a/examples/2.3.x/console-python/examples/vectorsdb/update-collection.md b/examples/2.3.x/console-python/examples/vectorsdb/update-collection.md index 8b34e235e..a2b71fffb 100644 --- a/examples/2.3.x/console-python/examples/vectorsdb/update-collection.md +++ b/examples/2.3.x/console-python/examples/vectorsdb/update-collection.md @@ -15,7 +15,7 @@ result: VectorsdbCollection = vectors_db.update_collection( database_id = '<DATABASE_ID>', collection_id = '<COLLECTION_ID>', name = '<NAME>', - dimension = 1, # optional + dimension = 4, # optional permissions = [Permission.read(Role.any())], # optional document_security = False, # optional enabled = False # optional diff --git a/examples/2.3.x/console-python/examples/vectorsdb/upsert-documents.md b/examples/2.3.x/console-python/examples/vectorsdb/upsert-documents.md index 05b0d65f4..1ff772f45 100644 --- a/examples/2.3.x/console-python/examples/vectorsdb/upsert-documents.md +++ b/examples/2.3.x/console-python/examples/vectorsdb/upsert-documents.md @@ -12,7 +12,20 @@ vectors_db = VectorsDB(client) result: DocumentList = vectors_db.upsert_documents( database_id = '<DATABASE_ID>', collection_id = '<COLLECTION_ID>', - documents = [], + documents = [ + { + "$id": "example1", + "embeddings": [ + 0.12, + -0.55, + 0.88, + 1.02 + ], + "metadata": { + "name": "First document" + } + } + ], transaction_id = '<TRANSACTION_ID>' # optional ) diff --git a/examples/2.3.x/console-python/examples/webhooks/create.md b/examples/2.3.x/console-python/examples/webhooks/create.md index 4f4e69b23..83420e3cf 100644 --- a/examples/2.3.x/console-python/examples/webhooks/create.md +++ b/examples/2.3.x/console-python/examples/webhooks/create.md @@ -13,7 +13,7 @@ result: Webhook = webhooks.create( webhook_id = '<WEBHOOK_ID>', url = 'https://example.com/webhook', name = '<NAME>', - events = [], + events = ["users.*.create"], enabled = False, # optional tls = False, # optional auth_username = '<AUTH_USERNAME>', # optional diff --git a/examples/2.3.x/console-python/examples/webhooks/update.md b/examples/2.3.x/console-python/examples/webhooks/update.md index c3f98e002..9592ea441 100644 --- a/examples/2.3.x/console-python/examples/webhooks/update.md +++ b/examples/2.3.x/console-python/examples/webhooks/update.md @@ -13,7 +13,7 @@ result: Webhook = webhooks.update( webhook_id = '<WEBHOOK_ID>', name = '<NAME>', url = 'https://example.com/webhook', - events = [], + events = ["users.*.create"], enabled = False, # optional tls = False, # optional auth_username = '<AUTH_USERNAME>', # optional diff --git a/examples/2.3.x/console-web/examples/account/create-email-password-session.md b/examples/2.3.x/console-web/examples/account/create-email-password-session.md index e962d2a57..bf8caaac4 100644 --- a/examples/2.3.x/console-web/examples/account/create-email-password-session.md +++ b/examples/2.3.x/console-web/examples/account/create-email-password-session.md @@ -10,6 +10,7 @@ const account = new Account(client); const result = await account.createEmailPasswordSession({ email: 'email@example.com', password: 'password', + duration: 60, // optional }); console.log(result); diff --git a/examples/2.3.x/console-web/examples/account/delete-sessions.md b/examples/2.3.x/console-web/examples/account/delete-sessions.md index b363c935c..ced40d6dd 100644 --- a/examples/2.3.x/console-web/examples/account/delete-sessions.md +++ b/examples/2.3.x/console-web/examples/account/delete-sessions.md @@ -7,7 +7,9 @@ const client = new Client() const account = new Account(client); -const result = await account.deleteSessions(); +const result = await account.deleteSessions({ + current: false, // optional +}); console.log(result); ``` diff --git a/examples/2.3.x/console-web/examples/account/list-sessions.md b/examples/2.3.x/console-web/examples/account/list-sessions.md index 2270ddfdf..85fc4021b 100644 --- a/examples/2.3.x/console-web/examples/account/list-sessions.md +++ b/examples/2.3.x/console-web/examples/account/list-sessions.md @@ -7,7 +7,9 @@ const client = new Client() const account = new Account(client); -const result = await account.listSessions(); +const result = await account.listSessions({ + total: false, // optional +}); console.log(result); ``` diff --git a/examples/2.3.x/console-web/examples/analytics/create-event.md b/examples/2.3.x/console-web/examples/analytics/create-event.md new file mode 100644 index 000000000..1fba7e580 --- /dev/null +++ b/examples/2.3.x/console-web/examples/analytics/create-event.md @@ -0,0 +1,27 @@ +```javascript +import { Client, Analytics } from '@appwrite.io/console'; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const analytics = new Analytics(client); + +const result = await analytics.createEvent({ + propertyId: '<PROPERTY_ID>', + name: '<NAME>', + url: 'https://example.com', + domain: '<DOMAIN>', // optional + referrer: '<REFERRER>', // optional + screenWidth: null, // optional + sessionHash: '<SESSION_HASH>', // optional + scrollDepth: 0, // optional + engagementTime: null, // optional + props: [], // optional + userId: '<USER_ID>', // optional + ip: '<IP>', // optional + userAgent: '<USER_AGENT>', // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/analytics/create-property.md b/examples/2.3.x/console-web/examples/analytics/create-property.md new file mode 100644 index 000000000..6bd67cf26 --- /dev/null +++ b/examples/2.3.x/console-web/examples/analytics/create-property.md @@ -0,0 +1,21 @@ +```javascript +import { Client, Analytics } from '@appwrite.io/console'; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const analytics = new Analytics(client); + +const result = await analytics.createProperty({ + propertyId: '<PROPERTY_ID>', + name: '<NAME>', + domain: '<DOMAIN>', // optional + timezone: '<TIMEZONE>', // optional + enabled: false, // optional + xpublic: false, // optional + allowedOrigins: [], // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/analytics/delete-property.md b/examples/2.3.x/console-web/examples/analytics/delete-property.md new file mode 100644 index 000000000..390ec323f --- /dev/null +++ b/examples/2.3.x/console-web/examples/analytics/delete-property.md @@ -0,0 +1,15 @@ +```javascript +import { Client, Analytics } from '@appwrite.io/console'; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const analytics = new Analytics(client); + +const result = await analytics.deleteProperty({ + propertyId: '<PROPERTY_ID>', +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/analytics/get-property.md b/examples/2.3.x/console-web/examples/analytics/get-property.md new file mode 100644 index 000000000..9605b5227 --- /dev/null +++ b/examples/2.3.x/console-web/examples/analytics/get-property.md @@ -0,0 +1,15 @@ +```javascript +import { Client, Analytics } from '@appwrite.io/console'; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const analytics = new Analytics(client); + +const result = await analytics.getProperty({ + propertyId: '<PROPERTY_ID>', +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/analytics/list-metrics.md b/examples/2.3.x/console-web/examples/analytics/list-metrics.md new file mode 100644 index 000000000..675da6f1b --- /dev/null +++ b/examples/2.3.x/console-web/examples/analytics/list-metrics.md @@ -0,0 +1,27 @@ +```javascript +import { + Client, + Analytics, + AnalyticsInterval, + AnalyticsDimension, +} from '@appwrite.io/console'; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const analytics = new Analytics(client); + +const result = await analytics.listMetrics({ + propertyId: '<PROPERTY_ID>', + queries: [], // optional + interval: AnalyticsInterval.OneHour, // optional + dimensions: [AnalyticsDimension.Country], // optional + dateRange: '<DATE_RANGE>', // optional + startAt: '2020-10-15T06:38:00.000+00:00', // optional + endAt: '2020-10-15T06:38:00.000+00:00', // optional + limit: 1, // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/analytics/list-properties.md b/examples/2.3.x/console-web/examples/analytics/list-properties.md new file mode 100644 index 000000000..d543a7d52 --- /dev/null +++ b/examples/2.3.x/console-web/examples/analytics/list-properties.md @@ -0,0 +1,17 @@ +```javascript +import { Client, Analytics } from '@appwrite.io/console'; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const analytics = new Analytics(client); + +const result = await analytics.listProperties({ + queries: [], // optional + search: '<SEARCH>', // optional + total: false, // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/analytics/update-property.md b/examples/2.3.x/console-web/examples/analytics/update-property.md new file mode 100644 index 000000000..e31b22739 --- /dev/null +++ b/examples/2.3.x/console-web/examples/analytics/update-property.md @@ -0,0 +1,21 @@ +```javascript +import { Client, Analytics } from '@appwrite.io/console'; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const analytics = new Analytics(client); + +const result = await analytics.updateProperty({ + propertyId: '<PROPERTY_ID>', + name: '<NAME>', // optional + domain: '<DOMAIN>', // optional + timezone: '<TIMEZONE>', // optional + enabled: false, // optional + xpublic: false, // optional + allowedOrigins: [], // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/avatars/delete-photo.md b/examples/2.3.x/console-web/examples/avatars/delete-photo.md new file mode 100644 index 000000000..da8cc6e2b --- /dev/null +++ b/examples/2.3.x/console-web/examples/avatars/delete-photo.md @@ -0,0 +1,13 @@ +```javascript +import { Client, Avatars } from '@appwrite.io/console'; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const avatars = new Avatars(client); + +const result = await avatars.deletePhoto(); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/avatars/get-screenshot.md b/examples/2.3.x/console-web/examples/avatars/get-screenshot.md index 0869f5422..0d243b0d3 100644 --- a/examples/2.3.x/console-web/examples/avatars/get-screenshot.md +++ b/examples/2.3.x/console-web/examples/avatars/get-screenshot.md @@ -17,8 +17,7 @@ const avatars = new Avatars(client); const result = avatars.getScreenshot({ url: 'https://example.com', headers: { - Authorization: 'Bearer token123', - 'X-Custom-Header': 'value', + 'Accept-Language': 'en-US,en;q=0.9', }, // optional viewportWidth: 1920, // optional viewportHeight: 1080, // optional diff --git a/examples/2.3.x/console-web/examples/avatars/update-photo.md b/examples/2.3.x/console-web/examples/avatars/update-photo.md new file mode 100644 index 000000000..cc9abe103 --- /dev/null +++ b/examples/2.3.x/console-web/examples/avatars/update-photo.md @@ -0,0 +1,15 @@ +```javascript +import { Client, Avatars } from '@appwrite.io/console'; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const avatars = new Avatars(client); + +const result = await avatars.updatePhoto({ + file: document.getElementById('uploader').files[0], +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/console/list-o-auth-2-providers.md b/examples/2.3.x/console-web/examples/console/list-o-auth-2-providers.md index 9270d3bb9..305b58fa1 100644 --- a/examples/2.3.x/console-web/examples/console/list-o-auth-2-providers.md +++ b/examples/2.3.x/console-web/examples/console/list-o-auth-2-providers.md @@ -7,7 +7,9 @@ const client = new Client() const xconsole = new Console(client); -const result = await xconsole.listOAuth2Providers(); +const result = await xconsole.listOAuth2Providers({ + total: false, // optional +}); console.log(result); ``` diff --git a/examples/2.3.x/console-web/examples/console/list-organization-scopes.md b/examples/2.3.x/console-web/examples/console/list-organization-scopes.md index e6c927a03..95570113d 100644 --- a/examples/2.3.x/console-web/examples/console/list-organization-scopes.md +++ b/examples/2.3.x/console-web/examples/console/list-organization-scopes.md @@ -7,7 +7,9 @@ const client = new Client() const xconsole = new Console(client); -const result = await xconsole.listOrganizationScopes(); +const result = await xconsole.listOrganizationScopes({ + total: false, // optional +}); console.log(result); ``` diff --git a/examples/2.3.x/console-web/examples/console/list-project-scopes.md b/examples/2.3.x/console-web/examples/console/list-project-scopes.md index 6ae757839..1e29f7c25 100644 --- a/examples/2.3.x/console-web/examples/console/list-project-scopes.md +++ b/examples/2.3.x/console-web/examples/console/list-project-scopes.md @@ -7,7 +7,9 @@ const client = new Client() const xconsole = new Console(client); -const result = await xconsole.listProjectScopes(); +const result = await xconsole.listProjectScopes({ + total: false, // optional +}); console.log(result); ``` diff --git a/examples/2.3.x/console-web/examples/databases/create-documents.md b/examples/2.3.x/console-web/examples/databases/create-documents.md index e264c9297..3ba08ea38 100644 --- a/examples/2.3.x/console-web/examples/databases/create-documents.md +++ b/examples/2.3.x/console-web/examples/databases/create-documents.md @@ -10,7 +10,16 @@ const databases = new Databases(client); const result = await databases.createDocuments({ databaseId: '<DATABASE_ID>', collectionId: '<COLLECTION_ID>', - documents: [], + documents: [ + { + $id: 'example1', + username: 'walter.obrien', + email: 'walter.obrien@example.com', + fullName: "Walter O'Brien", + age: 30, + isAdmin: false, + }, + ], transactionId: '<TRANSACTION_ID>', // optional }); diff --git a/examples/2.3.x/console-web/examples/databases/create-index.md b/examples/2.3.x/console-web/examples/databases/create-index.md index 01a86729b..788f5d2e6 100644 --- a/examples/2.3.x/console-web/examples/databases/create-index.md +++ b/examples/2.3.x/console-web/examples/databases/create-index.md @@ -17,7 +17,7 @@ const result = await databases.createIndex({ collectionId: '<COLLECTION_ID>', key: '<KEY>', type: DatabasesIndexType.Key, - attributes: [], + attributes: ['username'], orders: [OrderBy.Asc], // optional lengths: [], // optional }); diff --git a/examples/2.3.x/console-web/examples/databases/delete-documents.md b/examples/2.3.x/console-web/examples/databases/delete-documents.md index fd68feeb7..08fca8a1d 100644 --- a/examples/2.3.x/console-web/examples/databases/delete-documents.md +++ b/examples/2.3.x/console-web/examples/databases/delete-documents.md @@ -10,7 +10,9 @@ const databases = new Databases(client); const result = await databases.deleteDocuments({ databaseId: '<DATABASE_ID>', collectionId: '<COLLECTION_ID>', - queries: [], // optional + queries: [ + '{"method":"equal", "attribute":"$id", "values":["<DOCUMENT_ID>"]}', + ], // optional transactionId: '<TRANSACTION_ID>', // optional }); diff --git a/examples/2.3.x/console-web/examples/databases/list-transactions.md b/examples/2.3.x/console-web/examples/databases/list-transactions.md index 37f2fde74..192e7aad6 100644 --- a/examples/2.3.x/console-web/examples/databases/list-transactions.md +++ b/examples/2.3.x/console-web/examples/databases/list-transactions.md @@ -9,6 +9,7 @@ const databases = new Databases(client); const result = await databases.listTransactions({ queries: [], // optional + total: false, // optional }); console.log(result); diff --git a/examples/2.3.x/console-web/examples/databases/upsert-documents.md b/examples/2.3.x/console-web/examples/databases/upsert-documents.md index 5ee9d710e..5a62dd5c8 100644 --- a/examples/2.3.x/console-web/examples/databases/upsert-documents.md +++ b/examples/2.3.x/console-web/examples/databases/upsert-documents.md @@ -10,7 +10,16 @@ const databases = new Databases(client); const result = await databases.upsertDocuments({ databaseId: '<DATABASE_ID>', collectionId: '<COLLECTION_ID>', - documents: [], + documents: [ + { + $id: 'example1', + username: 'walter.obrien', + email: 'walter.obrien@example.com', + fullName: "Walter O'Brien", + age: 30, + isAdmin: false, + }, + ], transactionId: '<TRANSACTION_ID>', // optional }); diff --git a/examples/2.3.x/console-web/examples/documentsdb/create-documents.md b/examples/2.3.x/console-web/examples/documentsdb/create-documents.md index 1c9613362..fc5fce8cc 100644 --- a/examples/2.3.x/console-web/examples/documentsdb/create-documents.md +++ b/examples/2.3.x/console-web/examples/documentsdb/create-documents.md @@ -10,7 +10,16 @@ const documentsDB = new DocumentsDB(client); const result = await documentsDB.createDocuments({ databaseId: '<DATABASE_ID>', collectionId: '<COLLECTION_ID>', - documents: [], + documents: [ + { + $id: 'example1', + username: 'walter.obrien', + email: 'walter.obrien@example.com', + fullName: "Walter O'Brien", + age: 30, + isAdmin: false, + }, + ], transactionId: '<TRANSACTION_ID>', // optional }); diff --git a/examples/2.3.x/console-web/examples/documentsdb/create-index.md b/examples/2.3.x/console-web/examples/documentsdb/create-index.md index ec398d9df..ce61944a9 100644 --- a/examples/2.3.x/console-web/examples/documentsdb/create-index.md +++ b/examples/2.3.x/console-web/examples/documentsdb/create-index.md @@ -17,7 +17,7 @@ const result = await documentsDB.createIndex({ collectionId: '<COLLECTION_ID>', key: '<KEY>', type: DocumentsDBIndexType.Key, - attributes: [], + attributes: ['username'], orders: [OrderBy.Asc], // optional lengths: [], // optional }); diff --git a/examples/2.3.x/console-web/examples/documentsdb/delete-documents.md b/examples/2.3.x/console-web/examples/documentsdb/delete-documents.md index f9e603c05..125cd5610 100644 --- a/examples/2.3.x/console-web/examples/documentsdb/delete-documents.md +++ b/examples/2.3.x/console-web/examples/documentsdb/delete-documents.md @@ -10,7 +10,9 @@ const documentsDB = new DocumentsDB(client); const result = await documentsDB.deleteDocuments({ databaseId: '<DATABASE_ID>', collectionId: '<COLLECTION_ID>', - queries: [], // optional + queries: [ + '{"method":"equal", "attribute":"$id", "values":["<DOCUMENT_ID>"]}', + ], // optional transactionId: '<TRANSACTION_ID>', // optional }); diff --git a/examples/2.3.x/console-web/examples/documentsdb/list-transactions.md b/examples/2.3.x/console-web/examples/documentsdb/list-transactions.md index cf97fb49a..a0c739115 100644 --- a/examples/2.3.x/console-web/examples/documentsdb/list-transactions.md +++ b/examples/2.3.x/console-web/examples/documentsdb/list-transactions.md @@ -9,6 +9,7 @@ const documentsDB = new DocumentsDB(client); const result = await documentsDB.listTransactions({ queries: [], // optional + total: false, // optional }); console.log(result); diff --git a/examples/2.3.x/console-web/examples/documentsdb/upsert-documents.md b/examples/2.3.x/console-web/examples/documentsdb/upsert-documents.md index fb5a380a9..ec7d82515 100644 --- a/examples/2.3.x/console-web/examples/documentsdb/upsert-documents.md +++ b/examples/2.3.x/console-web/examples/documentsdb/upsert-documents.md @@ -10,7 +10,16 @@ const documentsDB = new DocumentsDB(client); const result = await documentsDB.upsertDocuments({ databaseId: '<DATABASE_ID>', collectionId: '<COLLECTION_ID>', - documents: [], + documents: [ + { + $id: 'example1', + username: 'walter.obrien', + email: 'walter.obrien@example.com', + fullName: "Walter O'Brien", + age: 30, + isAdmin: false, + }, + ], transactionId: '<TRANSACTION_ID>', // optional }); diff --git a/examples/2.3.x/console-web/examples/embeddings/create-text-embeddings.md b/examples/2.3.x/console-web/examples/embeddings/create-text-embeddings.md index 0b93299b5..36639a805 100644 --- a/examples/2.3.x/console-web/examples/embeddings/create-text-embeddings.md +++ b/examples/2.3.x/console-web/examples/embeddings/create-text-embeddings.md @@ -8,7 +8,10 @@ const client = new Client() const embeddings = new Embeddings(client); const result = await embeddings.createTextEmbeddings({ - texts: [], + texts: [ + 'Appwrite helps developers build applications.', + 'Find documents with semantic search.', + ], model: EmbeddingModel.NomicEmbedText, // optional }); diff --git a/examples/2.3.x/console-web/examples/functions/list-runtimes.md b/examples/2.3.x/console-web/examples/functions/list-runtimes.md index 634305df1..c63211011 100644 --- a/examples/2.3.x/console-web/examples/functions/list-runtimes.md +++ b/examples/2.3.x/console-web/examples/functions/list-runtimes.md @@ -7,7 +7,9 @@ const client = new Client() const functions = new Functions(client); -const result = await functions.listRuntimes(); +const result = await functions.listRuntimes({ + total: false, // optional +}); console.log(result); ``` diff --git a/examples/2.3.x/console-web/examples/functions/list-specifications.md b/examples/2.3.x/console-web/examples/functions/list-specifications.md index b67d111c1..55b3fdb56 100644 --- a/examples/2.3.x/console-web/examples/functions/list-specifications.md +++ b/examples/2.3.x/console-web/examples/functions/list-specifications.md @@ -9,6 +9,7 @@ const functions = new Functions(client); const result = await functions.listSpecifications({ type: 'runtimes', // optional + total: false, // optional }); console.log(result); diff --git a/examples/2.3.x/console-web/examples/graphql/mutation.md b/examples/2.3.x/console-web/examples/graphql/mutation.md index 25c0ffbdd..de2264045 100644 --- a/examples/2.3.x/console-web/examples/graphql/mutation.md +++ b/examples/2.3.x/console-web/examples/graphql/mutation.md @@ -8,7 +8,9 @@ const client = new Client() const graphql = new Graphql(client); const result = await graphql.mutation({ - query: {}, + query: { + query: 'mutation { accountUpdateName(name: "Walter") { name } }', + }, }); console.log(result); diff --git a/examples/2.3.x/console-web/examples/graphql/query.md b/examples/2.3.x/console-web/examples/graphql/query.md index 73b3da233..5773b8778 100644 --- a/examples/2.3.x/console-web/examples/graphql/query.md +++ b/examples/2.3.x/console-web/examples/graphql/query.md @@ -8,7 +8,9 @@ const client = new Client() const graphql = new Graphql(client); const result = await graphql.query({ - query: {}, + query: { + query: 'query { localeGet { ip } }', + }, }); console.log(result); diff --git a/examples/2.3.x/console-web/examples/growth/create-conversation.md b/examples/2.3.x/console-web/examples/growth/create-conversation.md new file mode 100644 index 000000000..ad321dcc8 --- /dev/null +++ b/examples/2.3.x/console-web/examples/growth/create-conversation.md @@ -0,0 +1,23 @@ +```javascript +import { Client, Growth, ConversationType } from '@appwrite.io/console'; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const growth = new Growth(client); + +const result = await growth.createConversation({ + type: ConversationType.Support, + email: 'email@example.com', // optional + name: '<NAME>', // optional + subject: '<SUBJECT>', // optional + message: '<MESSAGE>', // optional + organizationId: '<ORGANIZATION_ID>', // optional + projectId: '<PROJECT_ID>', // optional + attributes: {}, // optional + attachment: document.getElementById('uploader').files[0], // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/growth/create-installation.md b/examples/2.3.x/console-web/examples/growth/create-installation.md new file mode 100644 index 000000000..a4fb466c7 --- /dev/null +++ b/examples/2.3.x/console-web/examples/growth/create-installation.md @@ -0,0 +1,25 @@ +```javascript +import { Client, Growth } from '@appwrite.io/console'; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const growth = new Growth(client); + +const result = await growth.createInstallation({ + email: 'email@example.com', // optional + name: '<NAME>', // optional + version: '<VERSION>', // optional + domain: '<DOMAIN>', // optional + database: '<DATABASE>', // optional + hostIp: '<HOST_IP>', // optional + userAgent: '<USER_AGENT>', // optional + os: '<OS>', // optional + arch: '<ARCH>', // optional + cpus: null, // optional + ram: null, // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/locale/list-codes.md b/examples/2.3.x/console-web/examples/locale/list-codes.md index 815fc01ac..bfa65d2e7 100644 --- a/examples/2.3.x/console-web/examples/locale/list-codes.md +++ b/examples/2.3.x/console-web/examples/locale/list-codes.md @@ -7,7 +7,9 @@ const client = new Client() const locale = new Locale(client); -const result = await locale.listCodes(); +const result = await locale.listCodes({ + total: false, // optional +}); console.log(result); ``` diff --git a/examples/2.3.x/console-web/examples/locale/list-continents.md b/examples/2.3.x/console-web/examples/locale/list-continents.md index 89bfc10a8..bb416b389 100644 --- a/examples/2.3.x/console-web/examples/locale/list-continents.md +++ b/examples/2.3.x/console-web/examples/locale/list-continents.md @@ -7,7 +7,9 @@ const client = new Client() const locale = new Locale(client); -const result = await locale.listContinents(); +const result = await locale.listContinents({ + total: false, // optional +}); console.log(result); ``` diff --git a/examples/2.3.x/console-web/examples/locale/list-countries-eu.md b/examples/2.3.x/console-web/examples/locale/list-countries-eu.md index 0223e0474..bb0cff5e8 100644 --- a/examples/2.3.x/console-web/examples/locale/list-countries-eu.md +++ b/examples/2.3.x/console-web/examples/locale/list-countries-eu.md @@ -7,7 +7,9 @@ const client = new Client() const locale = new Locale(client); -const result = await locale.listCountriesEU(); +const result = await locale.listCountriesEU({ + total: false, // optional +}); console.log(result); ``` diff --git a/examples/2.3.x/console-web/examples/locale/list-countries-phones.md b/examples/2.3.x/console-web/examples/locale/list-countries-phones.md index e172ecf11..ba2153384 100644 --- a/examples/2.3.x/console-web/examples/locale/list-countries-phones.md +++ b/examples/2.3.x/console-web/examples/locale/list-countries-phones.md @@ -7,7 +7,9 @@ const client = new Client() const locale = new Locale(client); -const result = await locale.listCountriesPhones(); +const result = await locale.listCountriesPhones({ + total: false, // optional +}); console.log(result); ``` diff --git a/examples/2.3.x/console-web/examples/locale/list-countries.md b/examples/2.3.x/console-web/examples/locale/list-countries.md index b40c2c642..d8151b6a9 100644 --- a/examples/2.3.x/console-web/examples/locale/list-countries.md +++ b/examples/2.3.x/console-web/examples/locale/list-countries.md @@ -7,7 +7,9 @@ const client = new Client() const locale = new Locale(client); -const result = await locale.listCountries(); +const result = await locale.listCountries({ + total: false, // optional +}); console.log(result); ``` diff --git a/examples/2.3.x/console-web/examples/locale/list-currencies.md b/examples/2.3.x/console-web/examples/locale/list-currencies.md index ccdceeeaf..953ee024c 100644 --- a/examples/2.3.x/console-web/examples/locale/list-currencies.md +++ b/examples/2.3.x/console-web/examples/locale/list-currencies.md @@ -7,7 +7,9 @@ const client = new Client() const locale = new Locale(client); -const result = await locale.listCurrencies(); +const result = await locale.listCurrencies({ + total: false, // optional +}); console.log(result); ``` diff --git a/examples/2.3.x/console-web/examples/locale/list-languages.md b/examples/2.3.x/console-web/examples/locale/list-languages.md index 26688ff74..e53adfaf8 100644 --- a/examples/2.3.x/console-web/examples/locale/list-languages.md +++ b/examples/2.3.x/console-web/examples/locale/list-languages.md @@ -7,7 +7,9 @@ const client = new Client() const locale = new Locale(client); -const result = await locale.listLanguages(); +const result = await locale.listLanguages({ + total: false, // optional +}); console.log(result); ``` diff --git a/examples/2.3.x/console-web/examples/manager/update-organization-status.md b/examples/2.3.x/console-web/examples/manager/update-organization-status.md new file mode 100644 index 000000000..b1b1e19a2 --- /dev/null +++ b/examples/2.3.x/console-web/examples/manager/update-organization-status.md @@ -0,0 +1,17 @@ +```javascript +import { Client, Manager } from '@appwrite.io/console'; + +const client = new Client().setEndpoint( + 'https://<REGION>.cloud.appwrite.io/v1', +); // Your API Endpoint + +const manager = new Manager(client); + +const result = await manager.updateOrganizationStatus({ + teamId: '<TEAM_ID>', + status: false, + reason: '<REASON>', // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/messaging/create-push.md b/examples/2.3.x/console-web/examples/messaging/create-push.md index 7235c19d9..02dc04654 100644 --- a/examples/2.3.x/console-web/examples/messaging/create-push.md +++ b/examples/2.3.x/console-web/examples/messaging/create-push.md @@ -27,6 +27,7 @@ const result = await messaging.createPush({ contentAvailable: false, // optional critical: false, // optional priority: MessagePriority.Normal, // optional + channelId: '<CHANNEL_ID>', // optional }); console.log(result); diff --git a/examples/2.3.x/console-web/examples/messaging/update-email.md b/examples/2.3.x/console-web/examples/messaging/update-email.md index a043d35e8..81cda404c 100644 --- a/examples/2.3.x/console-web/examples/messaging/update-email.md +++ b/examples/2.3.x/console-web/examples/messaging/update-email.md @@ -9,19 +9,19 @@ const messaging = new Messaging(client); const result = await messaging.updateEmail({ messageId: '<MESSAGE_ID>', + subject: '<SUBJECT>', // optional + content: '<CONTENT>', // optional topics: [], // optional users: [], // optional targets: [], // optional - subject: '<SUBJECT>', // optional - content: '<CONTENT>', // optional - draft: false, // optional - html: false, // optional cc: [], // optional bcc: [], // optional + attachments: [], // optional replyToEmail: 'email@example.com', // optional replyToName: '<REPLY_TO_NAME>', // optional + draft: false, // optional + html: false, // optional scheduledAt: '2020-10-15T06:38:00.000+00:00', // optional - attachments: [], // optional }); console.log(result); diff --git a/examples/2.3.x/console-web/examples/messaging/update-push.md b/examples/2.3.x/console-web/examples/messaging/update-push.md index f7c46bcfa..fd95175f6 100644 --- a/examples/2.3.x/console-web/examples/messaging/update-push.md +++ b/examples/2.3.x/console-web/examples/messaging/update-push.md @@ -9,11 +9,11 @@ const messaging = new Messaging(client); const result = await messaging.updatePush({ messageId: '<MESSAGE_ID>', + title: '<TITLE>', // optional + body: '<BODY>', // optional topics: [], // optional users: [], // optional targets: [], // optional - title: '<TITLE>', // optional - body: '<BODY>', // optional data: {}, // optional action: '<ACTION>', // optional image: '<ID1:ID2>', // optional @@ -27,6 +27,7 @@ const result = await messaging.updatePush({ contentAvailable: false, // optional critical: false, // optional priority: MessagePriority.Normal, // optional + channelId: '<CHANNEL_ID>', // optional }); console.log(result); diff --git a/examples/2.3.x/console-web/examples/messaging/update-sms.md b/examples/2.3.x/console-web/examples/messaging/update-sms.md index a41f32269..68ec42c74 100644 --- a/examples/2.3.x/console-web/examples/messaging/update-sms.md +++ b/examples/2.3.x/console-web/examples/messaging/update-sms.md @@ -9,10 +9,10 @@ const messaging = new Messaging(client); const result = await messaging.updateSMS({ messageId: '<MESSAGE_ID>', + content: '<CONTENT>', // optional topics: [], // optional users: [], // optional targets: [], // optional - content: '<CONTENT>', // optional draft: false, // optional scheduledAt: '2020-10-15T06:38:00.000+00:00', // optional }); diff --git a/examples/2.3.x/console-web/examples/notifications/list.md b/examples/2.3.x/console-web/examples/notifications/list.md index 3c6575818..3861cf599 100644 --- a/examples/2.3.x/console-web/examples/notifications/list.md +++ b/examples/2.3.x/console-web/examples/notifications/list.md @@ -9,6 +9,7 @@ const notifications = new Notifications(client); const result = await notifications.list({ queries: [], // optional + total: false, // optional }); console.log(result); diff --git a/examples/2.3.x/console-web/examples/organization/create-ephemeral-project-key.md b/examples/2.3.x/console-web/examples/organization/create-ephemeral-project-key.md index d1cb12951..4cc1194ac 100644 --- a/examples/2.3.x/console-web/examples/organization/create-ephemeral-project-key.md +++ b/examples/2.3.x/console-web/examples/organization/create-ephemeral-project-key.md @@ -9,7 +9,7 @@ const organization = new Organization(client); const result = await organization.createEphemeralProjectKey({ projectId: '<PROJECT_ID>', - scopes: [ProjectKeyScopes.ProjectRead], + scopes: [ProjectKeyScopes.UsersRead], duration: 600, }); diff --git a/examples/2.3.x/console-web/examples/organization/create-project-key.md b/examples/2.3.x/console-web/examples/organization/create-project-key.md index 2361bb94a..7e9786a8b 100644 --- a/examples/2.3.x/console-web/examples/organization/create-project-key.md +++ b/examples/2.3.x/console-web/examples/organization/create-project-key.md @@ -11,7 +11,7 @@ const result = await organization.createProjectKey({ projectId: '<PROJECT_ID>', keyId: '<KEY_ID>', name: '<NAME>', - scopes: [ProjectKeyScopes.ProjectRead], + scopes: [ProjectKeyScopes.UsersRead], expire: '2020-10-15T06:38:00.000+00:00', // optional }); diff --git a/examples/2.3.x/console-web/examples/organization/update-project-key.md b/examples/2.3.x/console-web/examples/organization/update-project-key.md index 550ecebd3..dbb0c7edf 100644 --- a/examples/2.3.x/console-web/examples/organization/update-project-key.md +++ b/examples/2.3.x/console-web/examples/organization/update-project-key.md @@ -11,7 +11,7 @@ const result = await organization.updateProjectKey({ projectId: '<PROJECT_ID>', keyId: '<KEY_ID>', name: '<NAME>', - scopes: [ProjectKeyScopes.ProjectRead], + scopes: [ProjectKeyScopes.UsersRead], expire: '2020-10-15T06:38:00.000+00:00', // optional }); diff --git a/examples/2.3.x/console-web/examples/project/create-ephemeral-key.md b/examples/2.3.x/console-web/examples/project/create-ephemeral-key.md index f5f76a425..f86455cf9 100644 --- a/examples/2.3.x/console-web/examples/project/create-ephemeral-key.md +++ b/examples/2.3.x/console-web/examples/project/create-ephemeral-key.md @@ -8,7 +8,7 @@ const client = new Client() const project = new Project(client); const result = await project.createEphemeralKey({ - scopes: [ProjectKeyScopes.ProjectRead], + scopes: [ProjectKeyScopes.UsersRead], duration: 600, }); diff --git a/examples/2.3.x/console-web/examples/project/create-key.md b/examples/2.3.x/console-web/examples/project/create-key.md index 5354d7329..d63412000 100644 --- a/examples/2.3.x/console-web/examples/project/create-key.md +++ b/examples/2.3.x/console-web/examples/project/create-key.md @@ -10,7 +10,7 @@ const project = new Project(client); const result = await project.createKey({ keyId: '<KEY_ID>', name: '<NAME>', - scopes: [ProjectKeyScopes.ProjectRead], + scopes: [ProjectKeyScopes.UsersRead], expire: '2020-10-15T06:38:00.000+00:00', // optional }); diff --git a/examples/2.3.x/console-web/examples/project/create-smtp-test.md b/examples/2.3.x/console-web/examples/project/create-smtp-test.md index 300e972c9..96653785a 100644 --- a/examples/2.3.x/console-web/examples/project/create-smtp-test.md +++ b/examples/2.3.x/console-web/examples/project/create-smtp-test.md @@ -8,7 +8,7 @@ const client = new Client() const project = new Project(client); const result = await project.createSMTPTest({ - emails: [], + emails: ['recipient@example.com'], }); console.log(result); diff --git a/examples/2.3.x/console-web/examples/project/update-key.md b/examples/2.3.x/console-web/examples/project/update-key.md index 3bba96a0c..0be53efe0 100644 --- a/examples/2.3.x/console-web/examples/project/update-key.md +++ b/examples/2.3.x/console-web/examples/project/update-key.md @@ -10,7 +10,7 @@ const project = new Project(client); const result = await project.updateKey({ keyId: '<KEY_ID>', name: '<NAME>', - scopes: [ProjectKeyScopes.ProjectRead], + scopes: [ProjectKeyScopes.UsersRead], expire: '2020-10-15T06:38:00.000+00:00', // optional }); diff --git a/examples/2.3.x/console-web/examples/project/update-labels.md b/examples/2.3.x/console-web/examples/project/update-labels.md index 8df4ffb42..12f8fcebc 100644 --- a/examples/2.3.x/console-web/examples/project/update-labels.md +++ b/examples/2.3.x/console-web/examples/project/update-labels.md @@ -8,7 +8,7 @@ const client = new Client() const project = new Project(client); const result = await project.updateLabels({ - labels: [], + labels: ['production'], }); console.log(result); diff --git a/examples/2.3.x/console-web/examples/project/update-o-auth-2-auth-0.md b/examples/2.3.x/console-web/examples/project/update-o-auth-2-auth-0.md index 7c2898e4c..01abc6ba8 100644 --- a/examples/2.3.x/console-web/examples/project/update-o-auth-2-auth-0.md +++ b/examples/2.3.x/console-web/examples/project/update-o-auth-2-auth-0.md @@ -1,5 +1,9 @@ ```javascript -import { Client, Project } from '@appwrite.io/console'; +import { + Client, + Project, + ProjectOAuth2Auth0Prompt, +} from '@appwrite.io/console'; const client = new Client() .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint @@ -11,6 +15,7 @@ const result = await project.updateOAuth2Auth0({ clientId: '<CLIENT_ID>', // optional clientSecret: '<CLIENT_SECRET>', // optional endpoint: '<ENDPOINT>', // optional + prompt: [ProjectOAuth2Auth0Prompt.None], // optional enabled: false, // optional }); diff --git a/examples/2.3.x/console-web/examples/project/update-o-auth-2-discord.md b/examples/2.3.x/console-web/examples/project/update-o-auth-2-discord.md index 1116db06e..fc7aaa091 100644 --- a/examples/2.3.x/console-web/examples/project/update-o-auth-2-discord.md +++ b/examples/2.3.x/console-web/examples/project/update-o-auth-2-discord.md @@ -1,5 +1,9 @@ ```javascript -import { Client, Project } from '@appwrite.io/console'; +import { + Client, + Project, + ProjectOAuth2DiscordPrompt, +} from '@appwrite.io/console'; const client = new Client() .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint @@ -10,6 +14,7 @@ const project = new Project(client); const result = await project.updateOAuth2Discord({ clientId: '<CLIENT_ID>', // optional clientSecret: '<CLIENT_SECRET>', // optional + prompt: [ProjectOAuth2DiscordPrompt.None], // optional enabled: false, // optional }); diff --git a/examples/2.3.x/console-web/examples/project/update-o-auth-2-git-hub.md b/examples/2.3.x/console-web/examples/project/update-o-auth-2-git-hub.md index f3cc3b132..0c4e20458 100644 --- a/examples/2.3.x/console-web/examples/project/update-o-auth-2-git-hub.md +++ b/examples/2.3.x/console-web/examples/project/update-o-auth-2-git-hub.md @@ -1,5 +1,9 @@ ```javascript -import { Client, Project } from '@appwrite.io/console'; +import { + Client, + Project, + ProjectOAuth2GitHubPrompt, +} from '@appwrite.io/console'; const client = new Client() .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint @@ -10,6 +14,7 @@ const project = new Project(client); const result = await project.updateOAuth2GitHub({ clientId: '<CLIENT_ID>', // optional clientSecret: '<CLIENT_SECRET>', // optional + prompt: [ProjectOAuth2GitHubPrompt.SelectAccount], // optional enabled: false, // optional }); diff --git a/examples/2.3.x/console-web/examples/project/update-o-auth-2-kakao.md b/examples/2.3.x/console-web/examples/project/update-o-auth-2-kakao.md index b92e049df..cf304988e 100644 --- a/examples/2.3.x/console-web/examples/project/update-o-auth-2-kakao.md +++ b/examples/2.3.x/console-web/examples/project/update-o-auth-2-kakao.md @@ -1,5 +1,9 @@ ```javascript -import { Client, Project } from '@appwrite.io/console'; +import { + Client, + Project, + ProjectOAuth2KakaoPrompt, +} from '@appwrite.io/console'; const client = new Client() .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint @@ -10,6 +14,7 @@ const project = new Project(client); const result = await project.updateOAuth2Kakao({ clientId: '<CLIENT_ID>', // optional clientSecret: '<CLIENT_SECRET>', // optional + prompt: [ProjectOAuth2KakaoPrompt.None], // optional enabled: false, // optional }); diff --git a/examples/2.3.x/console-web/examples/project/update-o-auth-2-microsoft.md b/examples/2.3.x/console-web/examples/project/update-o-auth-2-microsoft.md index 18f21fe93..9bbbfa13c 100644 --- a/examples/2.3.x/console-web/examples/project/update-o-auth-2-microsoft.md +++ b/examples/2.3.x/console-web/examples/project/update-o-auth-2-microsoft.md @@ -1,5 +1,9 @@ ```javascript -import { Client, Project } from '@appwrite.io/console'; +import { + Client, + Project, + ProjectOAuth2MicrosoftPrompt, +} from '@appwrite.io/console'; const client = new Client() .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint @@ -11,6 +15,7 @@ const result = await project.updateOAuth2Microsoft({ applicationId: '<APPLICATION_ID>', // optional applicationSecret: '<APPLICATION_SECRET>', // optional tenant: '<TENANT>', // optional + prompt: [ProjectOAuth2MicrosoftPrompt.None], // optional enabled: false, // optional }); diff --git a/examples/2.3.x/console-web/examples/project/update-o-auth-2-okta.md b/examples/2.3.x/console-web/examples/project/update-o-auth-2-okta.md index a94ad691e..da983aca1 100644 --- a/examples/2.3.x/console-web/examples/project/update-o-auth-2-okta.md +++ b/examples/2.3.x/console-web/examples/project/update-o-auth-2-okta.md @@ -1,5 +1,5 @@ ```javascript -import { Client, Project } from '@appwrite.io/console'; +import { Client, Project, ProjectOAuth2OktaPrompt } from '@appwrite.io/console'; const client = new Client() .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint @@ -12,6 +12,7 @@ const result = await project.updateOAuth2Okta({ clientSecret: '<CLIENT_SECRET>', // optional domain: 'example.com', // optional authorizationServerId: '<AUTHORIZATION_SERVER_ID>', // optional + prompt: [ProjectOAuth2OktaPrompt.None], // optional enabled: false, // optional }); diff --git a/examples/2.3.x/console-web/examples/project/update-o-auth-2-salesforce.md b/examples/2.3.x/console-web/examples/project/update-o-auth-2-salesforce.md index 04c3da125..8b19d7647 100644 --- a/examples/2.3.x/console-web/examples/project/update-o-auth-2-salesforce.md +++ b/examples/2.3.x/console-web/examples/project/update-o-auth-2-salesforce.md @@ -1,5 +1,9 @@ ```javascript -import { Client, Project } from '@appwrite.io/console'; +import { + Client, + Project, + ProjectOAuth2SalesforcePrompt, +} from '@appwrite.io/console'; const client = new Client() .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint @@ -10,6 +14,7 @@ const project = new Project(client); const result = await project.updateOAuth2Salesforce({ customerKey: '<CUSTOMER_KEY>', // optional customerSecret: '<CUSTOMER_SECRET>', // optional + prompt: [ProjectOAuth2SalesforcePrompt.Login], // optional enabled: false, // optional }); diff --git a/examples/2.3.x/console-web/examples/project/update-o-auth-2-webflow.md b/examples/2.3.x/console-web/examples/project/update-o-auth-2-webflow.md new file mode 100644 index 000000000..7a70451b9 --- /dev/null +++ b/examples/2.3.x/console-web/examples/project/update-o-auth-2-webflow.md @@ -0,0 +1,17 @@ +```javascript +import { Client, Project } from '@appwrite.io/console'; + +const client = new Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>'); // Your project ID + +const project = new Project(client); + +const result = await project.updateOAuth2Webflow({ + clientId: '<CLIENT_ID>', // optional + clientSecret: '<CLIENT_SECRET>', // optional + enabled: false, // optional +}); + +console.log(result); +``` diff --git a/examples/2.3.x/console-web/examples/project/update-o-auth-2-zoho.md b/examples/2.3.x/console-web/examples/project/update-o-auth-2-zoho.md index 0a1ff8615..524d11855 100644 --- a/examples/2.3.x/console-web/examples/project/update-o-auth-2-zoho.md +++ b/examples/2.3.x/console-web/examples/project/update-o-auth-2-zoho.md @@ -1,5 +1,5 @@ ```javascript -import { Client, Project } from '@appwrite.io/console'; +import { Client, Project, ProjectOAuth2ZohoPrompt } from '@appwrite.io/console'; const client = new Client() .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint @@ -10,6 +10,7 @@ const project = new Project(client); const result = await project.updateOAuth2Zoho({ clientId: '<CLIENT_ID>', // optional clientSecret: '<CLIENT_SECRET>', // optional + prompt: [ProjectOAuth2ZohoPrompt.Consent], // optional enabled: false, // optional }); diff --git a/examples/2.3.x/console-web/examples/sites/list-frameworks.md b/examples/2.3.x/console-web/examples/sites/list-frameworks.md index 26d0e5325..ec1921b28 100644 --- a/examples/2.3.x/console-web/examples/sites/list-frameworks.md +++ b/examples/2.3.x/console-web/examples/sites/list-frameworks.md @@ -7,7 +7,9 @@ const client = new Client() const sites = new Sites(client); -const result = await sites.listFrameworks(); +const result = await sites.listFrameworks({ + total: false, // optional +}); console.log(result); ``` diff --git a/examples/2.3.x/console-web/examples/sites/list-specifications.md b/examples/2.3.x/console-web/examples/sites/list-specifications.md index 1d77721c9..a29beb0fe 100644 --- a/examples/2.3.x/console-web/examples/sites/list-specifications.md +++ b/examples/2.3.x/console-web/examples/sites/list-specifications.md @@ -9,6 +9,7 @@ const sites = new Sites(client); const result = await sites.listSpecifications({ type: 'runtimes', // optional + total: false, // optional }); console.log(result); diff --git a/examples/2.3.x/console-web/examples/sites/list-templates.md b/examples/2.3.x/console-web/examples/sites/list-templates.md index 4832803a9..4047cf9fd 100644 --- a/examples/2.3.x/console-web/examples/sites/list-templates.md +++ b/examples/2.3.x/console-web/examples/sites/list-templates.md @@ -17,6 +17,7 @@ const result = await sites.listTemplates({ useCases: [SiteTemplateUseCase.Portfolio], // optional limit: 1, // optional offset: 0, // optional + total: false, // optional }); console.log(result); diff --git a/examples/2.3.x/console-web/examples/tablesdb/create-index.md b/examples/2.3.x/console-web/examples/tablesdb/create-index.md index 1b4f0aba8..629a8ef16 100644 --- a/examples/2.3.x/console-web/examples/tablesdb/create-index.md +++ b/examples/2.3.x/console-web/examples/tablesdb/create-index.md @@ -17,7 +17,7 @@ const result = await tablesDB.createIndex({ tableId: '<TABLE_ID>', key: '<KEY>', type: TablesDBIndexType.Key, - columns: [], + columns: ['username'], orders: [OrderBy.Asc], // optional lengths: [], // optional }); diff --git a/examples/2.3.x/console-web/examples/tablesdb/create-rows.md b/examples/2.3.x/console-web/examples/tablesdb/create-rows.md index 2c0461357..cd3ca02a1 100644 --- a/examples/2.3.x/console-web/examples/tablesdb/create-rows.md +++ b/examples/2.3.x/console-web/examples/tablesdb/create-rows.md @@ -10,7 +10,16 @@ const tablesDB = new TablesDB(client); const result = await tablesDB.createRows({ databaseId: '<DATABASE_ID>', tableId: '<TABLE_ID>', - rows: [], + rows: [ + { + $id: 'example1', + username: 'walter.obrien', + email: 'walter.obrien@example.com', + fullName: "Walter O'Brien", + age: 30, + isAdmin: false, + }, + ], transactionId: '<TRANSACTION_ID>', // optional }); diff --git a/examples/2.3.x/console-web/examples/tablesdb/delete-rows.md b/examples/2.3.x/console-web/examples/tablesdb/delete-rows.md index 58df6f190..b528d434b 100644 --- a/examples/2.3.x/console-web/examples/tablesdb/delete-rows.md +++ b/examples/2.3.x/console-web/examples/tablesdb/delete-rows.md @@ -10,7 +10,7 @@ const tablesDB = new TablesDB(client); const result = await tablesDB.deleteRows({ databaseId: '<DATABASE_ID>', tableId: '<TABLE_ID>', - queries: [], // optional + queries: ['{"method":"equal", "attribute":"$id", "values":["<ROW_ID>"]}'], // optional transactionId: '<TRANSACTION_ID>', // optional }); diff --git a/examples/2.3.x/console-web/examples/tablesdb/list-transactions.md b/examples/2.3.x/console-web/examples/tablesdb/list-transactions.md index 2d616198b..9070e54e8 100644 --- a/examples/2.3.x/console-web/examples/tablesdb/list-transactions.md +++ b/examples/2.3.x/console-web/examples/tablesdb/list-transactions.md @@ -9,6 +9,7 @@ const tablesDB = new TablesDB(client); const result = await tablesDB.listTransactions({ queries: [], // optional + total: false, // optional }); console.log(result); diff --git a/examples/2.3.x/console-web/examples/tablesdb/upsert-rows.md b/examples/2.3.x/console-web/examples/tablesdb/upsert-rows.md index 005f7b4ee..e42d2d447 100644 --- a/examples/2.3.x/console-web/examples/tablesdb/upsert-rows.md +++ b/examples/2.3.x/console-web/examples/tablesdb/upsert-rows.md @@ -10,7 +10,16 @@ const tablesDB = new TablesDB(client); const result = await tablesDB.upsertRows({ databaseId: '<DATABASE_ID>', tableId: '<TABLE_ID>', - rows: [], + rows: [ + { + $id: 'example1', + username: 'walter.obrien', + email: 'walter.obrien@example.com', + fullName: "Walter O'Brien", + age: 30, + isAdmin: false, + }, + ], transactionId: '<TRANSACTION_ID>', // optional }); diff --git a/examples/2.3.x/console-web/examples/teams/create-membership.md b/examples/2.3.x/console-web/examples/teams/create-membership.md index 35581d303..d06d4894d 100644 --- a/examples/2.3.x/console-web/examples/teams/create-membership.md +++ b/examples/2.3.x/console-web/examples/teams/create-membership.md @@ -9,7 +9,7 @@ const teams = new Teams(client); const result = await teams.createMembership({ teamId: '<TEAM_ID>', - roles: [], + roles: ['editor'], email: 'email@example.com', // optional userId: '<USER_ID>', // optional phone: '+12065550100', // optional diff --git a/examples/2.3.x/console-web/examples/teams/update-membership.md b/examples/2.3.x/console-web/examples/teams/update-membership.md index 6ed365834..efa118100 100644 --- a/examples/2.3.x/console-web/examples/teams/update-membership.md +++ b/examples/2.3.x/console-web/examples/teams/update-membership.md @@ -10,7 +10,7 @@ const teams = new Teams(client); const result = await teams.updateMembership({ teamId: '<TEAM_ID>', membershipId: '<MEMBERSHIP_ID>', - roles: [], + roles: ['editor'], }); console.log(result); diff --git a/examples/2.3.x/console-web/examples/usage/list-events.md b/examples/2.3.x/console-web/examples/usage/list-events.md index 30b8d9755..fe672527c 100644 --- a/examples/2.3.x/console-web/examples/usage/list-events.md +++ b/examples/2.3.x/console-web/examples/usage/list-events.md @@ -16,7 +16,7 @@ const client = new Client() const usage = new Usage(client); const result = await usage.listEvents({ - metrics: [UsageEventMetric.NetworkRequests], + metrics: [UsageEventMetric.AnalyticsEvents], queries: [], // optional interval: UsageInterval.OneMinute, // optional dimensions: [UsageEventDimension.Path], // optional diff --git a/examples/2.3.x/console-web/examples/usage/list-gauges.md b/examples/2.3.x/console-web/examples/usage/list-gauges.md index 745ecf945..3cc965dc2 100644 --- a/examples/2.3.x/console-web/examples/usage/list-gauges.md +++ b/examples/2.3.x/console-web/examples/usage/list-gauges.md @@ -16,7 +16,7 @@ const client = new Client() const usage = new Usage(client); const result = await usage.listGauges({ - metrics: [UsageGaugeMetric.Teams], + metrics: [UsageGaugeMetric.AnalyticsProperties], queries: [], // optional interval: UsageInterval.OneMinute, // optional dimensions: [UsageGaugeDimension.ResourceId], // optional diff --git a/examples/2.3.x/console-web/examples/users/update-labels.md b/examples/2.3.x/console-web/examples/users/update-labels.md index bf287f366..62e2a7e71 100644 --- a/examples/2.3.x/console-web/examples/users/update-labels.md +++ b/examples/2.3.x/console-web/examples/users/update-labels.md @@ -9,7 +9,7 @@ const users = new Users(client); const result = await users.updateLabels({ userId: '<USER_ID>', - labels: [], + labels: ['subscriber'], }); console.log(result); diff --git a/examples/2.3.x/console-web/examples/vcs/list-namespaces.md b/examples/2.3.x/console-web/examples/vcs/list-namespaces.md index a66ffdd03..758a60ab9 100644 --- a/examples/2.3.x/console-web/examples/vcs/list-namespaces.md +++ b/examples/2.3.x/console-web/examples/vcs/list-namespaces.md @@ -11,6 +11,7 @@ const result = await vcs.listNamespaces({ installationId: '<INSTALLATION_ID>', search: '<SEARCH>', // optional queries: [], // optional + total: false, // optional }); console.log(result); diff --git a/examples/2.3.x/console-web/examples/vcs/list-repositories.md b/examples/2.3.x/console-web/examples/vcs/list-repositories.md index 1661cd8c5..dd5ea19f3 100644 --- a/examples/2.3.x/console-web/examples/vcs/list-repositories.md +++ b/examples/2.3.x/console-web/examples/vcs/list-repositories.md @@ -12,6 +12,7 @@ const result = await vcs.listRepositories({ type: VCSDetectionType.Runtime, search: '<SEARCH>', // optional queries: [], // optional + total: false, // optional }); console.log(result); diff --git a/examples/2.3.x/console-web/examples/vcs/list-repository-branches.md b/examples/2.3.x/console-web/examples/vcs/list-repository-branches.md index 2efd905b2..75cc0f23a 100644 --- a/examples/2.3.x/console-web/examples/vcs/list-repository-branches.md +++ b/examples/2.3.x/console-web/examples/vcs/list-repository-branches.md @@ -12,6 +12,7 @@ const result = await vcs.listRepositoryBranches({ providerRepositoryId: '<PROVIDER_REPOSITORY_ID>', search: '<SEARCH>', // optional queries: [], // optional + total: false, // optional }); console.log(result); diff --git a/examples/2.3.x/console-web/examples/vectorsdb/create-collection.md b/examples/2.3.x/console-web/examples/vectorsdb/create-collection.md index b69be570a..12996a2cf 100644 --- a/examples/2.3.x/console-web/examples/vectorsdb/create-collection.md +++ b/examples/2.3.x/console-web/examples/vectorsdb/create-collection.md @@ -11,7 +11,7 @@ const result = await vectorsDB.createCollection({ databaseId: '<DATABASE_ID>', collectionId: '<COLLECTION_ID>', name: '<NAME>', - dimension: 1, + dimension: 4, permissions: [Permission.read(Role.any())], // optional documentSecurity: false, // optional enabled: false, // optional diff --git a/examples/2.3.x/console-web/examples/vectorsdb/create-documents.md b/examples/2.3.x/console-web/examples/vectorsdb/create-documents.md index 6bda5bf18..e49698e81 100644 --- a/examples/2.3.x/console-web/examples/vectorsdb/create-documents.md +++ b/examples/2.3.x/console-web/examples/vectorsdb/create-documents.md @@ -10,7 +10,15 @@ const vectorsDB = new VectorsDB(client); const result = await vectorsDB.createDocuments({ databaseId: '<DATABASE_ID>', collectionId: '<COLLECTION_ID>', - documents: [], + documents: [ + { + $id: 'example1', + embeddings: [0.12, -0.55, 0.88, 1.02], + metadata: { + name: 'First document', + }, + }, + ], transactionId: '<TRANSACTION_ID>', // optional }); diff --git a/examples/2.3.x/console-web/examples/vectorsdb/create-index.md b/examples/2.3.x/console-web/examples/vectorsdb/create-index.md index 1f8b422dc..d02efaebc 100644 --- a/examples/2.3.x/console-web/examples/vectorsdb/create-index.md +++ b/examples/2.3.x/console-web/examples/vectorsdb/create-index.md @@ -17,7 +17,7 @@ const result = await vectorsDB.createIndex({ collectionId: '<COLLECTION_ID>', key: '<KEY>', type: VectorsDBIndexType.HnswEuclidean, - attributes: [], + attributes: ['embeddings'], orders: [OrderBy.Asc], // optional lengths: [], // optional }); diff --git a/examples/2.3.x/console-web/examples/vectorsdb/create-operations.md b/examples/2.3.x/console-web/examples/vectorsdb/create-operations.md index fc90ed8bd..ce27bd39e 100644 --- a/examples/2.3.x/console-web/examples/vectorsdb/create-operations.md +++ b/examples/2.3.x/console-web/examples/vectorsdb/create-operations.md @@ -16,7 +16,10 @@ const result = await vectorsDB.createOperations({ collectionId: '<COLLECTION_ID>', documentId: '<DOCUMENT_ID>', data: { - name: "Walter O'Brien", + embeddings: [0.12, -0.55, 0.88, 1.02], + metadata: { + name: 'First document', + }, }, }, ], // optional diff --git a/examples/2.3.x/console-web/examples/vectorsdb/delete-documents.md b/examples/2.3.x/console-web/examples/vectorsdb/delete-documents.md index e699485bd..98e2d1bf1 100644 --- a/examples/2.3.x/console-web/examples/vectorsdb/delete-documents.md +++ b/examples/2.3.x/console-web/examples/vectorsdb/delete-documents.md @@ -10,7 +10,9 @@ const vectorsDB = new VectorsDB(client); const result = await vectorsDB.deleteDocuments({ databaseId: '<DATABASE_ID>', collectionId: '<COLLECTION_ID>', - queries: [], // optional + queries: [ + '{"method":"equal", "attribute":"$id", "values":["<DOCUMENT_ID>"]}', + ], // optional transactionId: '<TRANSACTION_ID>', // optional }); diff --git a/examples/2.3.x/console-web/examples/vectorsdb/list-transactions.md b/examples/2.3.x/console-web/examples/vectorsdb/list-transactions.md index 02da76869..4902f3e2d 100644 --- a/examples/2.3.x/console-web/examples/vectorsdb/list-transactions.md +++ b/examples/2.3.x/console-web/examples/vectorsdb/list-transactions.md @@ -9,6 +9,7 @@ const vectorsDB = new VectorsDB(client); const result = await vectorsDB.listTransactions({ queries: [], // optional + total: false, // optional }); console.log(result); diff --git a/examples/2.3.x/console-web/examples/vectorsdb/update-collection.md b/examples/2.3.x/console-web/examples/vectorsdb/update-collection.md index 491024410..afa2d357d 100644 --- a/examples/2.3.x/console-web/examples/vectorsdb/update-collection.md +++ b/examples/2.3.x/console-web/examples/vectorsdb/update-collection.md @@ -11,7 +11,7 @@ const result = await vectorsDB.updateCollection({ databaseId: '<DATABASE_ID>', collectionId: '<COLLECTION_ID>', name: '<NAME>', - dimension: 1, // optional + dimension: 4, // optional permissions: [Permission.read(Role.any())], // optional documentSecurity: false, // optional enabled: false, // optional diff --git a/examples/2.3.x/console-web/examples/vectorsdb/upsert-documents.md b/examples/2.3.x/console-web/examples/vectorsdb/upsert-documents.md index af58d1d43..6f13ae74c 100644 --- a/examples/2.3.x/console-web/examples/vectorsdb/upsert-documents.md +++ b/examples/2.3.x/console-web/examples/vectorsdb/upsert-documents.md @@ -10,7 +10,15 @@ const vectorsDB = new VectorsDB(client); const result = await vectorsDB.upsertDocuments({ databaseId: '<DATABASE_ID>', collectionId: '<COLLECTION_ID>', - documents: [], + documents: [ + { + $id: 'example1', + embeddings: [0.12, -0.55, 0.88, 1.02], + metadata: { + name: 'First document', + }, + }, + ], transactionId: '<TRANSACTION_ID>', // optional }); diff --git a/examples/2.3.x/console-web/examples/webhooks/create.md b/examples/2.3.x/console-web/examples/webhooks/create.md index f5817fbe6..393013650 100644 --- a/examples/2.3.x/console-web/examples/webhooks/create.md +++ b/examples/2.3.x/console-web/examples/webhooks/create.md @@ -11,7 +11,7 @@ const result = await webhooks.create({ webhookId: '<WEBHOOK_ID>', url: 'https://example.com/webhook', name: '<NAME>', - events: [], + events: ['users.*.create'], enabled: false, // optional tls: false, // optional authUsername: '<AUTH_USERNAME>', // optional diff --git a/examples/2.3.x/console-web/examples/webhooks/update.md b/examples/2.3.x/console-web/examples/webhooks/update.md index 78071ef4c..058f73e1e 100644 --- a/examples/2.3.x/console-web/examples/webhooks/update.md +++ b/examples/2.3.x/console-web/examples/webhooks/update.md @@ -11,7 +11,7 @@ const result = await webhooks.update({ webhookId: '<WEBHOOK_ID>', name: '<NAME>', url: 'https://example.com/webhook', - events: [], + events: ['users.*.create'], enabled: false, // optional tls: false, // optional authUsername: '<AUTH_USERNAME>', // optional diff --git a/examples/2.3.x/server-dart/examples/account/create-email-password-session.md b/examples/2.3.x/server-dart/examples/account/create-email-password-session.md index bac35a125..feefb53c4 100644 --- a/examples/2.3.x/server-dart/examples/account/create-email-password-session.md +++ b/examples/2.3.x/server-dart/examples/account/create-email-password-session.md @@ -11,5 +11,6 @@ Account account = Account(client); Session result = await account.createEmailPasswordSession( email: 'email@example.com', password: 'password', + duration: 60, // (optional) ); ``` diff --git a/examples/2.3.x/server-dart/examples/account/delete-sessions.md b/examples/2.3.x/server-dart/examples/account/delete-sessions.md index 2b7f5b819..e1f611e3c 100644 --- a/examples/2.3.x/server-dart/examples/account/delete-sessions.md +++ b/examples/2.3.x/server-dart/examples/account/delete-sessions.md @@ -8,5 +8,7 @@ Client client = Client() Account account = Account(client); -await account.deleteSessions(); +await account.deleteSessions( + current: false, // (optional) +); ``` diff --git a/examples/2.3.x/server-dart/examples/account/list-sessions.md b/examples/2.3.x/server-dart/examples/account/list-sessions.md index 53c0d220b..d582ecba6 100644 --- a/examples/2.3.x/server-dart/examples/account/list-sessions.md +++ b/examples/2.3.x/server-dart/examples/account/list-sessions.md @@ -8,5 +8,7 @@ Client client = Client() Account account = Account(client); -SessionList result = await account.listSessions(); +SessionList result = await account.listSessions( + total: false, // (optional) +); ``` diff --git a/examples/2.3.x/server-dart/examples/analytics/create-event.md b/examples/2.3.x/server-dart/examples/analytics/create-event.md new file mode 100644 index 000000000..05e6e4697 --- /dev/null +++ b/examples/2.3.x/server-dart/examples/analytics/create-event.md @@ -0,0 +1,26 @@ +```dart +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +Analytics analytics = Analytics(client); + + result = await analytics.createEvent( + propertyId: '<PROPERTY_ID>', + name: '<NAME>', + url: 'https://example.com', + domain: '<DOMAIN>', // (optional) + referrer: '<REFERRER>', // (optional) + screenWidth: 0, // (optional) + sessionHash: '<SESSION_HASH>', // (optional) + scrollDepth: 0, // (optional) + engagementTime: 0, // (optional) + props: [], // (optional) + userId: '<USER_ID>', // (optional) + ip: '<IP>', // (optional) + userAgent: '<USER_AGENT>', // (optional) +); +``` diff --git a/examples/2.3.x/server-dart/examples/analytics/create-property.md b/examples/2.3.x/server-dart/examples/analytics/create-property.md new file mode 100644 index 000000000..7322912be --- /dev/null +++ b/examples/2.3.x/server-dart/examples/analytics/create-property.md @@ -0,0 +1,20 @@ +```dart +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Analytics analytics = Analytics(client); + +AnalyticsProperty result = await analytics.createProperty( + propertyId: '<PROPERTY_ID>', + name: '<NAME>', + domain: '<DOMAIN>', // (optional) + timezone: '<TIMEZONE>', // (optional) + enabled: false, // (optional) + public: false, // (optional) + allowedOrigins: [], // (optional) +); +``` diff --git a/examples/2.3.x/server-dart/examples/analytics/delete-property.md b/examples/2.3.x/server-dart/examples/analytics/delete-property.md new file mode 100644 index 000000000..f232a6893 --- /dev/null +++ b/examples/2.3.x/server-dart/examples/analytics/delete-property.md @@ -0,0 +1,14 @@ +```dart +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Analytics analytics = Analytics(client); + +await analytics.deleteProperty( + propertyId: '<PROPERTY_ID>', +); +``` diff --git a/examples/2.3.x/server-dart/examples/analytics/get-property.md b/examples/2.3.x/server-dart/examples/analytics/get-property.md new file mode 100644 index 000000000..b7379ee67 --- /dev/null +++ b/examples/2.3.x/server-dart/examples/analytics/get-property.md @@ -0,0 +1,14 @@ +```dart +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Analytics analytics = Analytics(client); + +AnalyticsProperty result = await analytics.getProperty( + propertyId: '<PROPERTY_ID>', +); +``` diff --git a/examples/2.3.x/server-dart/examples/analytics/list-metrics.md b/examples/2.3.x/server-dart/examples/analytics/list-metrics.md new file mode 100644 index 000000000..b1aaebfa9 --- /dev/null +++ b/examples/2.3.x/server-dart/examples/analytics/list-metrics.md @@ -0,0 +1,22 @@ +```dart +import 'package:dart_appwrite/dart_appwrite.dart'; +import 'package:dart_appwrite/enums.dart' as enums; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Analytics analytics = Analytics(client); + +AnalyticsMetricList result = await analytics.listMetrics( + propertyId: '<PROPERTY_ID>', + queries: [], // (optional) + interval: enums.AnalyticsInterval.oneHour, // (optional) + dimensions: [enums.AnalyticsDimension.country], // (optional) + dateRange: '<DATE_RANGE>', // (optional) + startAt: '2020-10-15T06:38:00.000+00:00', // (optional) + endAt: '2020-10-15T06:38:00.000+00:00', // (optional) + limit: 1, // (optional) +); +``` diff --git a/examples/2.3.x/server-dart/examples/analytics/list-properties.md b/examples/2.3.x/server-dart/examples/analytics/list-properties.md new file mode 100644 index 000000000..123a17c7a --- /dev/null +++ b/examples/2.3.x/server-dart/examples/analytics/list-properties.md @@ -0,0 +1,16 @@ +```dart +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Analytics analytics = Analytics(client); + +AnalyticsPropertyList result = await analytics.listProperties( + queries: [], // (optional) + search: '<SEARCH>', // (optional) + total: false, // (optional) +); +``` diff --git a/examples/2.3.x/server-dart/examples/analytics/update-property.md b/examples/2.3.x/server-dart/examples/analytics/update-property.md new file mode 100644 index 000000000..1516660b3 --- /dev/null +++ b/examples/2.3.x/server-dart/examples/analytics/update-property.md @@ -0,0 +1,20 @@ +```dart +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Analytics analytics = Analytics(client); + +AnalyticsProperty result = await analytics.updateProperty( + propertyId: '<PROPERTY_ID>', + name: '<NAME>', // (optional) + domain: '<DOMAIN>', // (optional) + timezone: '<TIMEZONE>', // (optional) + enabled: false, // (optional) + public: false, // (optional) + allowedOrigins: [], // (optional) +); +``` diff --git a/examples/2.3.x/server-dart/examples/avatars/delete-photo.md b/examples/2.3.x/server-dart/examples/avatars/delete-photo.md new file mode 100644 index 000000000..a30443821 --- /dev/null +++ b/examples/2.3.x/server-dart/examples/avatars/delete-photo.md @@ -0,0 +1,12 @@ +```dart +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +Avatars avatars = Avatars(client); + +await avatars.deletePhoto(); +``` diff --git a/examples/2.3.x/server-dart/examples/avatars/get-screenshot.md b/examples/2.3.x/server-dart/examples/avatars/get-screenshot.md index b2c005e37..af9c2eced 100644 --- a/examples/2.3.x/server-dart/examples/avatars/get-screenshot.md +++ b/examples/2.3.x/server-dart/examples/avatars/get-screenshot.md @@ -12,8 +12,7 @@ Avatars avatars = Avatars(client); Uint8List result = await avatars.getScreenshot( url: 'https://example.com', headers: { - "Authorization": "Bearer token123", - "X-Custom-Header": "value" + "Accept-Language": "en-US,en;q=0.9" }, // (optional) viewportWidth: 1920, // (optional) viewportHeight: 1080, // (optional) diff --git a/examples/2.3.x/server-dart/examples/avatars/update-photo.md b/examples/2.3.x/server-dart/examples/avatars/update-photo.md new file mode 100644 index 000000000..118e1d459 --- /dev/null +++ b/examples/2.3.x/server-dart/examples/avatars/update-photo.md @@ -0,0 +1,15 @@ +```dart +import 'dart:io'; +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +Avatars avatars = Avatars(client); + +Account result = await avatars.updatePhoto( + file: InputFile(path: './path-to-files/image.jpg', filename: 'image.jpg'), +); +``` diff --git a/examples/2.3.x/server-dart/examples/databases/create-documents.md b/examples/2.3.x/server-dart/examples/databases/create-documents.md index dd0204676..0a7dad529 100644 --- a/examples/2.3.x/server-dart/examples/databases/create-documents.md +++ b/examples/2.3.x/server-dart/examples/databases/create-documents.md @@ -11,7 +11,16 @@ Databases databases = Databases(client); DocumentList result = await databases.createDocuments( databaseId: '<DATABASE_ID>', collectionId: '<COLLECTION_ID>', - documents: [], + documents: [ + { + "$id": "example1", + "username": "walter.obrien", + "email": "walter.obrien@example.com", + "fullName": "Walter O'Brien", + "age": 30, + "isAdmin": false + } + ], transactionId: '<TRANSACTION_ID>', // (optional) ); ``` diff --git a/examples/2.3.x/server-dart/examples/databases/create-index.md b/examples/2.3.x/server-dart/examples/databases/create-index.md index b1bfb5724..84a3a01a7 100644 --- a/examples/2.3.x/server-dart/examples/databases/create-index.md +++ b/examples/2.3.x/server-dart/examples/databases/create-index.md @@ -14,7 +14,7 @@ Index result = await databases.createIndex( collectionId: '<COLLECTION_ID>', key: '<KEY>', type: enums.DatabasesIndexType.key, - attributes: [], + attributes: ["username"], orders: [enums.OrderBy.asc], // (optional) lengths: [], // (optional) ); diff --git a/examples/2.3.x/server-dart/examples/databases/delete-documents.md b/examples/2.3.x/server-dart/examples/databases/delete-documents.md index 6a8bd5a87..6e3c289f3 100644 --- a/examples/2.3.x/server-dart/examples/databases/delete-documents.md +++ b/examples/2.3.x/server-dart/examples/databases/delete-documents.md @@ -11,7 +11,7 @@ Databases databases = Databases(client); await databases.deleteDocuments( databaseId: '<DATABASE_ID>', collectionId: '<COLLECTION_ID>', - queries: [], // (optional) + queries: ["{\"method\":\"equal\", \"attribute\":\"$id\", \"values\":[\"<DOCUMENT_ID>\"]}"], // (optional) transactionId: '<TRANSACTION_ID>', // (optional) ); ``` diff --git a/examples/2.3.x/server-dart/examples/databases/list-transactions.md b/examples/2.3.x/server-dart/examples/databases/list-transactions.md index 07a73e26d..39b49d5eb 100644 --- a/examples/2.3.x/server-dart/examples/databases/list-transactions.md +++ b/examples/2.3.x/server-dart/examples/databases/list-transactions.md @@ -10,5 +10,6 @@ Databases databases = Databases(client); TransactionList result = await databases.listTransactions( queries: [], // (optional) + total: false, // (optional) ); ``` diff --git a/examples/2.3.x/server-dart/examples/databases/upsert-documents.md b/examples/2.3.x/server-dart/examples/databases/upsert-documents.md index 95806e1ab..705131536 100644 --- a/examples/2.3.x/server-dart/examples/databases/upsert-documents.md +++ b/examples/2.3.x/server-dart/examples/databases/upsert-documents.md @@ -11,7 +11,16 @@ Databases databases = Databases(client); DocumentList result = await databases.upsertDocuments( databaseId: '<DATABASE_ID>', collectionId: '<COLLECTION_ID>', - documents: [], + documents: [ + { + "$id": "example1", + "username": "walter.obrien", + "email": "walter.obrien@example.com", + "fullName": "Walter O'Brien", + "age": 30, + "isAdmin": false + } + ], transactionId: '<TRANSACTION_ID>', // (optional) ); ``` diff --git a/examples/2.3.x/server-dart/examples/documentsdb/create-documents.md b/examples/2.3.x/server-dart/examples/documentsdb/create-documents.md index 6a76e7e0b..625b3eabd 100644 --- a/examples/2.3.x/server-dart/examples/documentsdb/create-documents.md +++ b/examples/2.3.x/server-dart/examples/documentsdb/create-documents.md @@ -11,7 +11,16 @@ DocumentsDB documentsDB = DocumentsDB(client); DocumentList result = await documentsDB.createDocuments( databaseId: '<DATABASE_ID>', collectionId: '<COLLECTION_ID>', - documents: [], + documents: [ + { + "$id": "example1", + "username": "walter.obrien", + "email": "walter.obrien@example.com", + "fullName": "Walter O'Brien", + "age": 30, + "isAdmin": false + } + ], transactionId: '<TRANSACTION_ID>', // (optional) ); ``` diff --git a/examples/2.3.x/server-dart/examples/documentsdb/create-index.md b/examples/2.3.x/server-dart/examples/documentsdb/create-index.md index 3cfaea320..14b7a936a 100644 --- a/examples/2.3.x/server-dart/examples/documentsdb/create-index.md +++ b/examples/2.3.x/server-dart/examples/documentsdb/create-index.md @@ -14,7 +14,7 @@ Index result = await documentsDB.createIndex( collectionId: '<COLLECTION_ID>', key: '<KEY>', type: enums.DocumentsDBIndexType.key, - attributes: [], + attributes: ["username"], orders: [enums.OrderBy.asc], // (optional) lengths: [], // (optional) ); diff --git a/examples/2.3.x/server-dart/examples/documentsdb/delete-documents.md b/examples/2.3.x/server-dart/examples/documentsdb/delete-documents.md index 9218ccd6b..1934a1767 100644 --- a/examples/2.3.x/server-dart/examples/documentsdb/delete-documents.md +++ b/examples/2.3.x/server-dart/examples/documentsdb/delete-documents.md @@ -11,7 +11,7 @@ DocumentsDB documentsDB = DocumentsDB(client); await documentsDB.deleteDocuments( databaseId: '<DATABASE_ID>', collectionId: '<COLLECTION_ID>', - queries: [], // (optional) + queries: ["{\"method\":\"equal\", \"attribute\":\"$id\", \"values\":[\"<DOCUMENT_ID>\"]}"], // (optional) transactionId: '<TRANSACTION_ID>', // (optional) ); ``` diff --git a/examples/2.3.x/server-dart/examples/documentsdb/list-transactions.md b/examples/2.3.x/server-dart/examples/documentsdb/list-transactions.md index 066ebfe5b..76c78ba5a 100644 --- a/examples/2.3.x/server-dart/examples/documentsdb/list-transactions.md +++ b/examples/2.3.x/server-dart/examples/documentsdb/list-transactions.md @@ -10,5 +10,6 @@ DocumentsDB documentsDB = DocumentsDB(client); TransactionList result = await documentsDB.listTransactions( queries: [], // (optional) + total: false, // (optional) ); ``` diff --git a/examples/2.3.x/server-dart/examples/documentsdb/upsert-documents.md b/examples/2.3.x/server-dart/examples/documentsdb/upsert-documents.md index bbf864900..355835fb2 100644 --- a/examples/2.3.x/server-dart/examples/documentsdb/upsert-documents.md +++ b/examples/2.3.x/server-dart/examples/documentsdb/upsert-documents.md @@ -11,7 +11,16 @@ DocumentsDB documentsDB = DocumentsDB(client); DocumentList result = await documentsDB.upsertDocuments( databaseId: '<DATABASE_ID>', collectionId: '<COLLECTION_ID>', - documents: [], + documents: [ + { + "$id": "example1", + "username": "walter.obrien", + "email": "walter.obrien@example.com", + "fullName": "Walter O'Brien", + "age": 30, + "isAdmin": false + } + ], transactionId: '<TRANSACTION_ID>', // (optional) ); ``` diff --git a/examples/2.3.x/server-dart/examples/embeddings/create-text-embeddings.md b/examples/2.3.x/server-dart/examples/embeddings/create-text-embeddings.md index b943468ad..5411e16f2 100644 --- a/examples/2.3.x/server-dart/examples/embeddings/create-text-embeddings.md +++ b/examples/2.3.x/server-dart/examples/embeddings/create-text-embeddings.md @@ -10,7 +10,7 @@ Client client = Client() Embeddings embeddings = Embeddings(client); EmbeddingList result = await embeddings.createTextEmbeddings( - texts: [], + texts: ["Appwrite helps developers build applications.", "Find documents with semantic search."], model: enums.EmbeddingModel.nomicEmbedText, // (optional) ); ``` diff --git a/examples/2.3.x/server-dart/examples/functions/list-runtimes.md b/examples/2.3.x/server-dart/examples/functions/list-runtimes.md index 6325f4e4b..29b84b195 100644 --- a/examples/2.3.x/server-dart/examples/functions/list-runtimes.md +++ b/examples/2.3.x/server-dart/examples/functions/list-runtimes.md @@ -8,5 +8,7 @@ Client client = Client() Functions functions = Functions(client); -RuntimeList result = await functions.listRuntimes(); +RuntimeList result = await functions.listRuntimes( + total: false, // (optional) +); ``` diff --git a/examples/2.3.x/server-dart/examples/functions/list-specifications.md b/examples/2.3.x/server-dart/examples/functions/list-specifications.md index be35d601a..07d82f311 100644 --- a/examples/2.3.x/server-dart/examples/functions/list-specifications.md +++ b/examples/2.3.x/server-dart/examples/functions/list-specifications.md @@ -10,5 +10,6 @@ Functions functions = Functions(client); SpecificationList result = await functions.listSpecifications( type: 'runtimes', // (optional) + total: false, // (optional) ); ``` diff --git a/examples/2.3.x/server-dart/examples/graphql/mutation.md b/examples/2.3.x/server-dart/examples/graphql/mutation.md index cd55d655e..36c626508 100644 --- a/examples/2.3.x/server-dart/examples/graphql/mutation.md +++ b/examples/2.3.x/server-dart/examples/graphql/mutation.md @@ -9,6 +9,8 @@ Client client = Client() Graphql graphql = Graphql(client); Any result = await graphql.mutation( - query: {}, + query: { + "query": "mutation { accountUpdateName(name: \"Walter\") { name } }" + }, ); ``` diff --git a/examples/2.3.x/server-dart/examples/graphql/query.md b/examples/2.3.x/server-dart/examples/graphql/query.md index 7d6fa1841..2d40bd78a 100644 --- a/examples/2.3.x/server-dart/examples/graphql/query.md +++ b/examples/2.3.x/server-dart/examples/graphql/query.md @@ -9,6 +9,8 @@ Client client = Client() Graphql graphql = Graphql(client); Any result = await graphql.query( - query: {}, + query: { + "query": "query { localeGet { ip } }" + }, ); ``` diff --git a/examples/2.3.x/server-dart/examples/locale/list-codes.md b/examples/2.3.x/server-dart/examples/locale/list-codes.md index c8b2490d9..7b7530184 100644 --- a/examples/2.3.x/server-dart/examples/locale/list-codes.md +++ b/examples/2.3.x/server-dart/examples/locale/list-codes.md @@ -8,5 +8,7 @@ Client client = Client() Locale locale = Locale(client); -LocaleCodeList result = await locale.listCodes(); +LocaleCodeList result = await locale.listCodes( + total: false, // (optional) +); ``` diff --git a/examples/2.3.x/server-dart/examples/locale/list-continents.md b/examples/2.3.x/server-dart/examples/locale/list-continents.md index 5d96631bc..09de6d83e 100644 --- a/examples/2.3.x/server-dart/examples/locale/list-continents.md +++ b/examples/2.3.x/server-dart/examples/locale/list-continents.md @@ -8,5 +8,7 @@ Client client = Client() Locale locale = Locale(client); -ContinentList result = await locale.listContinents(); +ContinentList result = await locale.listContinents( + total: false, // (optional) +); ``` diff --git a/examples/2.3.x/server-dart/examples/locale/list-countries-eu.md b/examples/2.3.x/server-dart/examples/locale/list-countries-eu.md index 191be9496..cd49b0bd5 100644 --- a/examples/2.3.x/server-dart/examples/locale/list-countries-eu.md +++ b/examples/2.3.x/server-dart/examples/locale/list-countries-eu.md @@ -8,5 +8,7 @@ Client client = Client() Locale locale = Locale(client); -CountryList result = await locale.listCountriesEU(); +CountryList result = await locale.listCountriesEU( + total: false, // (optional) +); ``` diff --git a/examples/2.3.x/server-dart/examples/locale/list-countries-phones.md b/examples/2.3.x/server-dart/examples/locale/list-countries-phones.md index 00ec7810b..771b6e5cd 100644 --- a/examples/2.3.x/server-dart/examples/locale/list-countries-phones.md +++ b/examples/2.3.x/server-dart/examples/locale/list-countries-phones.md @@ -8,5 +8,7 @@ Client client = Client() Locale locale = Locale(client); -PhoneList result = await locale.listCountriesPhones(); +PhoneList result = await locale.listCountriesPhones( + total: false, // (optional) +); ``` diff --git a/examples/2.3.x/server-dart/examples/locale/list-countries.md b/examples/2.3.x/server-dart/examples/locale/list-countries.md index 62da933f8..207732cde 100644 --- a/examples/2.3.x/server-dart/examples/locale/list-countries.md +++ b/examples/2.3.x/server-dart/examples/locale/list-countries.md @@ -8,5 +8,7 @@ Client client = Client() Locale locale = Locale(client); -CountryList result = await locale.listCountries(); +CountryList result = await locale.listCountries( + total: false, // (optional) +); ``` diff --git a/examples/2.3.x/server-dart/examples/locale/list-currencies.md b/examples/2.3.x/server-dart/examples/locale/list-currencies.md index c10296305..8bc09de28 100644 --- a/examples/2.3.x/server-dart/examples/locale/list-currencies.md +++ b/examples/2.3.x/server-dart/examples/locale/list-currencies.md @@ -8,5 +8,7 @@ Client client = Client() Locale locale = Locale(client); -CurrencyList result = await locale.listCurrencies(); +CurrencyList result = await locale.listCurrencies( + total: false, // (optional) +); ``` diff --git a/examples/2.3.x/server-dart/examples/locale/list-languages.md b/examples/2.3.x/server-dart/examples/locale/list-languages.md index 297128406..2142de0bf 100644 --- a/examples/2.3.x/server-dart/examples/locale/list-languages.md +++ b/examples/2.3.x/server-dart/examples/locale/list-languages.md @@ -8,5 +8,7 @@ Client client = Client() Locale locale = Locale(client); -LanguageList result = await locale.listLanguages(); +LanguageList result = await locale.listLanguages( + total: false, // (optional) +); ``` diff --git a/examples/2.3.x/server-dart/examples/messaging/create-push.md b/examples/2.3.x/server-dart/examples/messaging/create-push.md index 0e28197ba..0518f55f5 100644 --- a/examples/2.3.x/server-dart/examples/messaging/create-push.md +++ b/examples/2.3.x/server-dart/examples/messaging/create-push.md @@ -29,5 +29,6 @@ Message result = await messaging.createPush( contentAvailable: false, // (optional) critical: false, // (optional) priority: enums.MessagePriority.normal, // (optional) + channelId: '<CHANNEL_ID>', // (optional) ); ``` diff --git a/examples/2.3.x/server-dart/examples/messaging/update-email.md b/examples/2.3.x/server-dart/examples/messaging/update-email.md index fec5affc8..479d97fbb 100644 --- a/examples/2.3.x/server-dart/examples/messaging/update-email.md +++ b/examples/2.3.x/server-dart/examples/messaging/update-email.md @@ -10,18 +10,18 @@ Messaging messaging = Messaging(client); Message result = await messaging.updateEmail( messageId: '<MESSAGE_ID>', + subject: '<SUBJECT>', // (optional) + content: '<CONTENT>', // (optional) topics: [], // (optional) users: [], // (optional) targets: [], // (optional) - subject: '<SUBJECT>', // (optional) - content: '<CONTENT>', // (optional) - draft: false, // (optional) - html: false, // (optional) cc: [], // (optional) bcc: [], // (optional) + attachments: [], // (optional) replyToEmail: 'email@example.com', // (optional) replyToName: '<REPLY_TO_NAME>', // (optional) + draft: false, // (optional) + html: false, // (optional) scheduledAt: '2020-10-15T06:38:00.000+00:00', // (optional) - attachments: [], // (optional) ); ``` diff --git a/examples/2.3.x/server-dart/examples/messaging/update-push.md b/examples/2.3.x/server-dart/examples/messaging/update-push.md index 17b347e41..a376cd7de 100644 --- a/examples/2.3.x/server-dart/examples/messaging/update-push.md +++ b/examples/2.3.x/server-dart/examples/messaging/update-push.md @@ -11,11 +11,11 @@ Messaging messaging = Messaging(client); Message result = await messaging.updatePush( messageId: '<MESSAGE_ID>', + title: '<TITLE>', // (optional) + body: '<BODY>', // (optional) topics: [], // (optional) users: [], // (optional) targets: [], // (optional) - title: '<TITLE>', // (optional) - body: '<BODY>', // (optional) data: {}, // (optional) action: '<ACTION>', // (optional) image: '<ID1:ID2>', // (optional) @@ -29,5 +29,6 @@ Message result = await messaging.updatePush( contentAvailable: false, // (optional) critical: false, // (optional) priority: enums.MessagePriority.normal, // (optional) + channelId: '<CHANNEL_ID>', // (optional) ); ``` diff --git a/examples/2.3.x/server-dart/examples/messaging/update-sms.md b/examples/2.3.x/server-dart/examples/messaging/update-sms.md index b8197294a..4b0456135 100644 --- a/examples/2.3.x/server-dart/examples/messaging/update-sms.md +++ b/examples/2.3.x/server-dart/examples/messaging/update-sms.md @@ -10,10 +10,10 @@ Messaging messaging = Messaging(client); Message result = await messaging.updateSMS( messageId: '<MESSAGE_ID>', + content: '<CONTENT>', // (optional) topics: [], // (optional) users: [], // (optional) targets: [], // (optional) - content: '<CONTENT>', // (optional) draft: false, // (optional) scheduledAt: '2020-10-15T06:38:00.000+00:00', // (optional) ); diff --git a/examples/2.3.x/server-dart/examples/oauth2/introspect.md b/examples/2.3.x/server-dart/examples/oauth2/introspect.md new file mode 100644 index 000000000..acb9ed0e2 --- /dev/null +++ b/examples/2.3.x/server-dart/examples/oauth2/introspect.md @@ -0,0 +1,17 @@ +```dart +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Oauth2 oauth2 = Oauth2(client); + +Oauth2Introspection result = await oauth2.introspect( + token: '<TOKEN>', + tokenTypeHint: 'access_token', // (optional) + clientId: '<CLIENT_ID>', // (optional) + clientSecret: '<CLIENT_SECRET>', // (optional) +); +``` diff --git a/examples/2.3.x/server-dart/examples/organization/create-ephemeral-project-key.md b/examples/2.3.x/server-dart/examples/organization/create-ephemeral-project-key.md index 1ecc7ee52..3c0a1463f 100644 --- a/examples/2.3.x/server-dart/examples/organization/create-ephemeral-project-key.md +++ b/examples/2.3.x/server-dart/examples/organization/create-ephemeral-project-key.md @@ -11,7 +11,7 @@ Organization organization = Organization(client); EphemeralKey result = await organization.createEphemeralProjectKey( projectId: '<PROJECT_ID>', - scopes: [enums.ProjectKeyScopes.projectRead], + scopes: [enums.ProjectKeyScopes.usersRead], duration: 600, ); ``` diff --git a/examples/2.3.x/server-dart/examples/organization/update-project-key.md b/examples/2.3.x/server-dart/examples/organization/update-project-key.md index 5ca9c8971..dfe84199d 100644 --- a/examples/2.3.x/server-dart/examples/organization/update-project-key.md +++ b/examples/2.3.x/server-dart/examples/organization/update-project-key.md @@ -13,7 +13,7 @@ Key result = await organization.updateProjectKey( projectId: '<PROJECT_ID>', keyId: '<KEY_ID>', name: '<NAME>', - scopes: [enums.ProjectKeyScopes.projectRead], + scopes: [enums.ProjectKeyScopes.usersRead], expire: '2020-10-15T06:38:00.000+00:00', // (optional) ); ``` diff --git a/examples/2.3.x/server-dart/examples/project/create-ephemeral-key.md b/examples/2.3.x/server-dart/examples/project/create-ephemeral-key.md index cdc4ab77d..0a4699a9b 100644 --- a/examples/2.3.x/server-dart/examples/project/create-ephemeral-key.md +++ b/examples/2.3.x/server-dart/examples/project/create-ephemeral-key.md @@ -10,7 +10,7 @@ Client client = Client() Project project = Project(client); EphemeralKey result = await project.createEphemeralKey( - scopes: [enums.ProjectKeyScopes.projectRead], + scopes: [enums.ProjectKeyScopes.usersRead], duration: 600, ); ``` diff --git a/examples/2.3.x/server-dart/examples/project/create-smtp-test.md b/examples/2.3.x/server-dart/examples/project/create-smtp-test.md index fac73da88..a1cadb9be 100644 --- a/examples/2.3.x/server-dart/examples/project/create-smtp-test.md +++ b/examples/2.3.x/server-dart/examples/project/create-smtp-test.md @@ -9,6 +9,6 @@ Client client = Client() Project project = Project(client); result = await project.createSMTPTest( - emails: [], + emails: ["recipient@example.com"], ); ``` diff --git a/examples/2.3.x/server-dart/examples/project/update-key.md b/examples/2.3.x/server-dart/examples/project/update-key.md index b15aa92f4..0f0a73058 100644 --- a/examples/2.3.x/server-dart/examples/project/update-key.md +++ b/examples/2.3.x/server-dart/examples/project/update-key.md @@ -12,7 +12,7 @@ Project project = Project(client); Key result = await project.updateKey( keyId: '<KEY_ID>', name: '<NAME>', - scopes: [enums.ProjectKeyScopes.projectRead], + scopes: [enums.ProjectKeyScopes.usersRead], expire: '2020-10-15T06:38:00.000+00:00', // (optional) ); ``` diff --git a/examples/2.3.x/server-dart/examples/project/update-labels.md b/examples/2.3.x/server-dart/examples/project/update-labels.md index ec1b51ce3..a4a426c74 100644 --- a/examples/2.3.x/server-dart/examples/project/update-labels.md +++ b/examples/2.3.x/server-dart/examples/project/update-labels.md @@ -9,6 +9,6 @@ Client client = Client() Project project = Project(client); Project result = await project.updateLabels( - labels: [], + labels: ["production"], ); ``` diff --git a/examples/2.3.x/server-dart/examples/project/update-o-auth-2-auth-0.md b/examples/2.3.x/server-dart/examples/project/update-o-auth-2-auth-0.md index e00a59761..1e8d4e7c8 100644 --- a/examples/2.3.x/server-dart/examples/project/update-o-auth-2-auth-0.md +++ b/examples/2.3.x/server-dart/examples/project/update-o-auth-2-auth-0.md @@ -1,5 +1,6 @@ ```dart import 'package:dart_appwrite/dart_appwrite.dart'; +import 'package:dart_appwrite/enums.dart' as enums; Client client = Client() .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint @@ -12,6 +13,7 @@ OAuth2Auth0 result = await project.updateOAuth2Auth0( clientId: '<CLIENT_ID>', // (optional) clientSecret: '<CLIENT_SECRET>', // (optional) endpoint: '<ENDPOINT>', // (optional) + prompt: [enums.ProjectOAuth2Auth0Prompt.none], // (optional) enabled: false, // (optional) ); ``` diff --git a/examples/2.3.x/server-dart/examples/project/update-o-auth-2-discord.md b/examples/2.3.x/server-dart/examples/project/update-o-auth-2-discord.md index 7e06450d2..0f551981c 100644 --- a/examples/2.3.x/server-dart/examples/project/update-o-auth-2-discord.md +++ b/examples/2.3.x/server-dart/examples/project/update-o-auth-2-discord.md @@ -1,5 +1,6 @@ ```dart import 'package:dart_appwrite/dart_appwrite.dart'; +import 'package:dart_appwrite/enums.dart' as enums; Client client = Client() .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint @@ -11,6 +12,7 @@ Project project = Project(client); OAuth2Discord result = await project.updateOAuth2Discord( clientId: '<CLIENT_ID>', // (optional) clientSecret: '<CLIENT_SECRET>', // (optional) + prompt: [enums.ProjectOAuth2DiscordPrompt.none], // (optional) enabled: false, // (optional) ); ``` diff --git a/examples/2.3.x/server-dart/examples/project/update-o-auth-2-git-hub.md b/examples/2.3.x/server-dart/examples/project/update-o-auth-2-git-hub.md index e2830382e..d286b5bc5 100644 --- a/examples/2.3.x/server-dart/examples/project/update-o-auth-2-git-hub.md +++ b/examples/2.3.x/server-dart/examples/project/update-o-auth-2-git-hub.md @@ -1,5 +1,6 @@ ```dart import 'package:dart_appwrite/dart_appwrite.dart'; +import 'package:dart_appwrite/enums.dart' as enums; Client client = Client() .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint @@ -11,6 +12,7 @@ Project project = Project(client); OAuth2Github result = await project.updateOAuth2GitHub( clientId: '<CLIENT_ID>', // (optional) clientSecret: '<CLIENT_SECRET>', // (optional) + prompt: [enums.ProjectOAuth2GitHubPrompt.selectAccount], // (optional) enabled: false, // (optional) ); ``` diff --git a/examples/2.3.x/server-dart/examples/project/update-o-auth-2-kakao.md b/examples/2.3.x/server-dart/examples/project/update-o-auth-2-kakao.md index 1a47e3871..9342c3e73 100644 --- a/examples/2.3.x/server-dart/examples/project/update-o-auth-2-kakao.md +++ b/examples/2.3.x/server-dart/examples/project/update-o-auth-2-kakao.md @@ -1,5 +1,6 @@ ```dart import 'package:dart_appwrite/dart_appwrite.dart'; +import 'package:dart_appwrite/enums.dart' as enums; Client client = Client() .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint @@ -11,6 +12,7 @@ Project project = Project(client); OAuth2Kakao result = await project.updateOAuth2Kakao( clientId: '<CLIENT_ID>', // (optional) clientSecret: '<CLIENT_SECRET>', // (optional) + prompt: [enums.ProjectOAuth2KakaoPrompt.none], // (optional) enabled: false, // (optional) ); ``` diff --git a/examples/2.3.x/server-dart/examples/project/update-o-auth-2-microsoft.md b/examples/2.3.x/server-dart/examples/project/update-o-auth-2-microsoft.md index 7f1aa6ca9..a41245b67 100644 --- a/examples/2.3.x/server-dart/examples/project/update-o-auth-2-microsoft.md +++ b/examples/2.3.x/server-dart/examples/project/update-o-auth-2-microsoft.md @@ -1,5 +1,6 @@ ```dart import 'package:dart_appwrite/dart_appwrite.dart'; +import 'package:dart_appwrite/enums.dart' as enums; Client client = Client() .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint @@ -12,6 +13,7 @@ OAuth2Microsoft result = await project.updateOAuth2Microsoft( applicationId: '<APPLICATION_ID>', // (optional) applicationSecret: '<APPLICATION_SECRET>', // (optional) tenant: '<TENANT>', // (optional) + prompt: [enums.ProjectOAuth2MicrosoftPrompt.none], // (optional) enabled: false, // (optional) ); ``` diff --git a/examples/2.3.x/server-dart/examples/project/update-o-auth-2-okta.md b/examples/2.3.x/server-dart/examples/project/update-o-auth-2-okta.md index cfd9f8cef..eca6d3e06 100644 --- a/examples/2.3.x/server-dart/examples/project/update-o-auth-2-okta.md +++ b/examples/2.3.x/server-dart/examples/project/update-o-auth-2-okta.md @@ -1,5 +1,6 @@ ```dart import 'package:dart_appwrite/dart_appwrite.dart'; +import 'package:dart_appwrite/enums.dart' as enums; Client client = Client() .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint @@ -13,6 +14,7 @@ OAuth2Okta result = await project.updateOAuth2Okta( clientSecret: '<CLIENT_SECRET>', // (optional) domain: 'example.com', // (optional) authorizationServerId: '<AUTHORIZATION_SERVER_ID>', // (optional) + prompt: [enums.ProjectOAuth2OktaPrompt.none], // (optional) enabled: false, // (optional) ); ``` diff --git a/examples/2.3.x/server-dart/examples/project/update-o-auth-2-salesforce.md b/examples/2.3.x/server-dart/examples/project/update-o-auth-2-salesforce.md index 6be026b45..2120fb2a6 100644 --- a/examples/2.3.x/server-dart/examples/project/update-o-auth-2-salesforce.md +++ b/examples/2.3.x/server-dart/examples/project/update-o-auth-2-salesforce.md @@ -1,5 +1,6 @@ ```dart import 'package:dart_appwrite/dart_appwrite.dart'; +import 'package:dart_appwrite/enums.dart' as enums; Client client = Client() .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint @@ -11,6 +12,7 @@ Project project = Project(client); OAuth2Salesforce result = await project.updateOAuth2Salesforce( customerKey: '<CUSTOMER_KEY>', // (optional) customerSecret: '<CUSTOMER_SECRET>', // (optional) + prompt: [enums.ProjectOAuth2SalesforcePrompt.login], // (optional) enabled: false, // (optional) ); ``` diff --git a/examples/2.3.x/server-dart/examples/project/update-o-auth-2-webflow.md b/examples/2.3.x/server-dart/examples/project/update-o-auth-2-webflow.md new file mode 100644 index 000000000..c7e6f0af1 --- /dev/null +++ b/examples/2.3.x/server-dart/examples/project/update-o-auth-2-webflow.md @@ -0,0 +1,16 @@ +```dart +import 'package:dart_appwrite/dart_appwrite.dart'; + +Client client = Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +Project project = Project(client); + +OAuth2Webflow result = await project.updateOAuth2Webflow( + clientId: '<CLIENT_ID>', // (optional) + clientSecret: '<CLIENT_SECRET>', // (optional) + enabled: false, // (optional) +); +``` diff --git a/examples/2.3.x/server-dart/examples/project/update-o-auth-2-zoho.md b/examples/2.3.x/server-dart/examples/project/update-o-auth-2-zoho.md index 69d44d8a2..f89791455 100644 --- a/examples/2.3.x/server-dart/examples/project/update-o-auth-2-zoho.md +++ b/examples/2.3.x/server-dart/examples/project/update-o-auth-2-zoho.md @@ -1,5 +1,6 @@ ```dart import 'package:dart_appwrite/dart_appwrite.dart'; +import 'package:dart_appwrite/enums.dart' as enums; Client client = Client() .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint @@ -11,6 +12,7 @@ Project project = Project(client); OAuth2Zoho result = await project.updateOAuth2Zoho( clientId: '<CLIENT_ID>', // (optional) clientSecret: '<CLIENT_SECRET>', // (optional) + prompt: [enums.ProjectOAuth2ZohoPrompt.consent], // (optional) enabled: false, // (optional) ); ``` diff --git a/examples/2.3.x/server-dart/examples/sites/list-frameworks.md b/examples/2.3.x/server-dart/examples/sites/list-frameworks.md index b3e9bd8b0..19475423d 100644 --- a/examples/2.3.x/server-dart/examples/sites/list-frameworks.md +++ b/examples/2.3.x/server-dart/examples/sites/list-frameworks.md @@ -8,5 +8,7 @@ Client client = Client() Sites sites = Sites(client); -FrameworkList result = await sites.listFrameworks(); +FrameworkList result = await sites.listFrameworks( + total: false, // (optional) +); ``` diff --git a/examples/2.3.x/server-dart/examples/sites/list-specifications.md b/examples/2.3.x/server-dart/examples/sites/list-specifications.md index 7c80f2aad..3335fbd99 100644 --- a/examples/2.3.x/server-dart/examples/sites/list-specifications.md +++ b/examples/2.3.x/server-dart/examples/sites/list-specifications.md @@ -10,5 +10,6 @@ Sites sites = Sites(client); SpecificationList result = await sites.listSpecifications( type: 'runtimes', // (optional) + total: false, // (optional) ); ``` diff --git a/examples/2.3.x/server-dart/examples/tablesdb/create-index.md b/examples/2.3.x/server-dart/examples/tablesdb/create-index.md index 97f2e23a4..54979f52a 100644 --- a/examples/2.3.x/server-dart/examples/tablesdb/create-index.md +++ b/examples/2.3.x/server-dart/examples/tablesdb/create-index.md @@ -14,7 +14,7 @@ ColumnIndex result = await tablesDB.createIndex( tableId: '<TABLE_ID>', key: '<KEY>', type: enums.TablesDBIndexType.key, - columns: [], + columns: ["username"], orders: [enums.OrderBy.asc], // (optional) lengths: [], // (optional) ); diff --git a/examples/2.3.x/server-dart/examples/tablesdb/create-rows.md b/examples/2.3.x/server-dart/examples/tablesdb/create-rows.md index afa7629da..7bfed01e9 100644 --- a/examples/2.3.x/server-dart/examples/tablesdb/create-rows.md +++ b/examples/2.3.x/server-dart/examples/tablesdb/create-rows.md @@ -11,7 +11,16 @@ TablesDB tablesDB = TablesDB(client); RowList result = await tablesDB.createRows( databaseId: '<DATABASE_ID>', tableId: '<TABLE_ID>', - rows: [], + rows: [ + { + "$id": "example1", + "username": "walter.obrien", + "email": "walter.obrien@example.com", + "fullName": "Walter O'Brien", + "age": 30, + "isAdmin": false + } + ], transactionId: '<TRANSACTION_ID>', // (optional) ); ``` diff --git a/examples/2.3.x/server-dart/examples/tablesdb/delete-rows.md b/examples/2.3.x/server-dart/examples/tablesdb/delete-rows.md index 443aee01f..b929cbad8 100644 --- a/examples/2.3.x/server-dart/examples/tablesdb/delete-rows.md +++ b/examples/2.3.x/server-dart/examples/tablesdb/delete-rows.md @@ -11,7 +11,7 @@ TablesDB tablesDB = TablesDB(client); await tablesDB.deleteRows( databaseId: '<DATABASE_ID>', tableId: '<TABLE_ID>', - queries: [], // (optional) + queries: ["{\"method\":\"equal\", \"attribute\":\"$id\", \"values\":[\"<ROW_ID>\"]}"], // (optional) transactionId: '<TRANSACTION_ID>', // (optional) ); ``` diff --git a/examples/2.3.x/server-dart/examples/tablesdb/list-transactions.md b/examples/2.3.x/server-dart/examples/tablesdb/list-transactions.md index fa4782b5b..ff0d673cb 100644 --- a/examples/2.3.x/server-dart/examples/tablesdb/list-transactions.md +++ b/examples/2.3.x/server-dart/examples/tablesdb/list-transactions.md @@ -10,5 +10,6 @@ TablesDB tablesDB = TablesDB(client); TransactionList result = await tablesDB.listTransactions( queries: [], // (optional) + total: false, // (optional) ); ``` diff --git a/examples/2.3.x/server-dart/examples/tablesdb/upsert-rows.md b/examples/2.3.x/server-dart/examples/tablesdb/upsert-rows.md index a457f5e88..9f7dda64c 100644 --- a/examples/2.3.x/server-dart/examples/tablesdb/upsert-rows.md +++ b/examples/2.3.x/server-dart/examples/tablesdb/upsert-rows.md @@ -11,7 +11,16 @@ TablesDB tablesDB = TablesDB(client); RowList result = await tablesDB.upsertRows( databaseId: '<DATABASE_ID>', tableId: '<TABLE_ID>', - rows: [], + rows: [ + { + "$id": "example1", + "username": "walter.obrien", + "email": "walter.obrien@example.com", + "fullName": "Walter O'Brien", + "age": 30, + "isAdmin": false + } + ], transactionId: '<TRANSACTION_ID>', // (optional) ); ``` diff --git a/examples/2.3.x/server-dart/examples/teams/create-membership.md b/examples/2.3.x/server-dart/examples/teams/create-membership.md index 8f95362a7..5afcbc407 100644 --- a/examples/2.3.x/server-dart/examples/teams/create-membership.md +++ b/examples/2.3.x/server-dart/examples/teams/create-membership.md @@ -10,7 +10,7 @@ Teams teams = Teams(client); Membership result = await teams.createMembership( teamId: '<TEAM_ID>', - roles: [], + roles: ["editor"], email: 'email@example.com', // (optional) userId: '<USER_ID>', // (optional) phone: '+12065550100', // (optional) diff --git a/examples/2.3.x/server-dart/examples/teams/update-membership.md b/examples/2.3.x/server-dart/examples/teams/update-membership.md index 961def983..96dc8034e 100644 --- a/examples/2.3.x/server-dart/examples/teams/update-membership.md +++ b/examples/2.3.x/server-dart/examples/teams/update-membership.md @@ -11,6 +11,6 @@ Teams teams = Teams(client); Membership result = await teams.updateMembership( teamId: '<TEAM_ID>', membershipId: '<MEMBERSHIP_ID>', - roles: [], + roles: ["editor"], ); ``` diff --git a/examples/2.3.x/server-dart/examples/users/update-labels.md b/examples/2.3.x/server-dart/examples/users/update-labels.md index efbf657d3..a47cd2e74 100644 --- a/examples/2.3.x/server-dart/examples/users/update-labels.md +++ b/examples/2.3.x/server-dart/examples/users/update-labels.md @@ -10,6 +10,6 @@ Users users = Users(client); User result = await users.updateLabels( userId: '<USER_ID>', - labels: [], + labels: ["subscriber"], ); ``` diff --git a/examples/2.3.x/server-dart/examples/vectorsdb/create-collection.md b/examples/2.3.x/server-dart/examples/vectorsdb/create-collection.md index 373e42edd..2b9952b8d 100644 --- a/examples/2.3.x/server-dart/examples/vectorsdb/create-collection.md +++ b/examples/2.3.x/server-dart/examples/vectorsdb/create-collection.md @@ -14,7 +14,7 @@ VectorsdbCollection result = await vectorsDB.createCollection( databaseId: '<DATABASE_ID>', collectionId: '<COLLECTION_ID>', name: '<NAME>', - dimension: 1, + dimension: 4, permissions: [Permission.read(Role.any())], // (optional) documentSecurity: false, // (optional) enabled: false, // (optional) diff --git a/examples/2.3.x/server-dart/examples/vectorsdb/create-documents.md b/examples/2.3.x/server-dart/examples/vectorsdb/create-documents.md index 61d28281a..9673b5c1d 100644 --- a/examples/2.3.x/server-dart/examples/vectorsdb/create-documents.md +++ b/examples/2.3.x/server-dart/examples/vectorsdb/create-documents.md @@ -11,7 +11,20 @@ VectorsDB vectorsDB = VectorsDB(client); DocumentList result = await vectorsDB.createDocuments( databaseId: '<DATABASE_ID>', collectionId: '<COLLECTION_ID>', - documents: [], + documents: [ + { + "$id": "example1", + "embeddings": [ + 0.12, + -0.55, + 0.88, + 1.02 + ], + "metadata": { + "name": "First document" + } + } + ], transactionId: '<TRANSACTION_ID>', // (optional) ); ``` diff --git a/examples/2.3.x/server-dart/examples/vectorsdb/create-index.md b/examples/2.3.x/server-dart/examples/vectorsdb/create-index.md index 497e69da4..4c277f702 100644 --- a/examples/2.3.x/server-dart/examples/vectorsdb/create-index.md +++ b/examples/2.3.x/server-dart/examples/vectorsdb/create-index.md @@ -14,7 +14,7 @@ Index result = await vectorsDB.createIndex( collectionId: '<COLLECTION_ID>', key: '<KEY>', type: enums.VectorsDBIndexType.hnswEuclidean, - attributes: [], + attributes: ["embeddings"], orders: [enums.OrderBy.asc], // (optional) lengths: [], // (optional) ); diff --git a/examples/2.3.x/server-dart/examples/vectorsdb/create-operations.md b/examples/2.3.x/server-dart/examples/vectorsdb/create-operations.md index 2736f79e3..c1f821da3 100644 --- a/examples/2.3.x/server-dart/examples/vectorsdb/create-operations.md +++ b/examples/2.3.x/server-dart/examples/vectorsdb/create-operations.md @@ -17,7 +17,15 @@ Transaction result = await vectorsDB.createOperations( "collectionId": "<COLLECTION_ID>", "documentId": "<DOCUMENT_ID>", "data": { - "name": "Walter O'Brien" + "embeddings": [ + 0.12, + -0.55, + 0.88, + 1.02 + ], + "metadata": { + "name": "First document" + } } } ], // (optional) diff --git a/examples/2.3.x/server-dart/examples/vectorsdb/delete-documents.md b/examples/2.3.x/server-dart/examples/vectorsdb/delete-documents.md index a2d7b1f9d..270074bca 100644 --- a/examples/2.3.x/server-dart/examples/vectorsdb/delete-documents.md +++ b/examples/2.3.x/server-dart/examples/vectorsdb/delete-documents.md @@ -11,7 +11,7 @@ VectorsDB vectorsDB = VectorsDB(client); await vectorsDB.deleteDocuments( databaseId: '<DATABASE_ID>', collectionId: '<COLLECTION_ID>', - queries: [], // (optional) + queries: ["{\"method\":\"equal\", \"attribute\":\"$id\", \"values\":[\"<DOCUMENT_ID>\"]}"], // (optional) transactionId: '<TRANSACTION_ID>', // (optional) ); ``` diff --git a/examples/2.3.x/server-dart/examples/vectorsdb/list-transactions.md b/examples/2.3.x/server-dart/examples/vectorsdb/list-transactions.md index eb5058755..e23b48ea9 100644 --- a/examples/2.3.x/server-dart/examples/vectorsdb/list-transactions.md +++ b/examples/2.3.x/server-dart/examples/vectorsdb/list-transactions.md @@ -10,5 +10,6 @@ VectorsDB vectorsDB = VectorsDB(client); TransactionList result = await vectorsDB.listTransactions( queries: [], // (optional) + total: false, // (optional) ); ``` diff --git a/examples/2.3.x/server-dart/examples/vectorsdb/update-collection.md b/examples/2.3.x/server-dart/examples/vectorsdb/update-collection.md index e7e90abe7..b1da6cfba 100644 --- a/examples/2.3.x/server-dart/examples/vectorsdb/update-collection.md +++ b/examples/2.3.x/server-dart/examples/vectorsdb/update-collection.md @@ -14,7 +14,7 @@ VectorsdbCollection result = await vectorsDB.updateCollection( databaseId: '<DATABASE_ID>', collectionId: '<COLLECTION_ID>', name: '<NAME>', - dimension: 1, // (optional) + dimension: 4, // (optional) permissions: [Permission.read(Role.any())], // (optional) documentSecurity: false, // (optional) enabled: false, // (optional) diff --git a/examples/2.3.x/server-dart/examples/vectorsdb/upsert-documents.md b/examples/2.3.x/server-dart/examples/vectorsdb/upsert-documents.md index d6bd3309a..37d1c97d0 100644 --- a/examples/2.3.x/server-dart/examples/vectorsdb/upsert-documents.md +++ b/examples/2.3.x/server-dart/examples/vectorsdb/upsert-documents.md @@ -11,7 +11,20 @@ VectorsDB vectorsDB = VectorsDB(client); DocumentList result = await vectorsDB.upsertDocuments( databaseId: '<DATABASE_ID>', collectionId: '<COLLECTION_ID>', - documents: [], + documents: [ + { + "$id": "example1", + "embeddings": [ + 0.12, + -0.55, + 0.88, + 1.02 + ], + "metadata": { + "name": "First document" + } + } + ], transactionId: '<TRANSACTION_ID>', // (optional) ); ``` diff --git a/examples/2.3.x/server-dart/examples/webhooks/create.md b/examples/2.3.x/server-dart/examples/webhooks/create.md index fe07d9d6d..9f60e8cfc 100644 --- a/examples/2.3.x/server-dart/examples/webhooks/create.md +++ b/examples/2.3.x/server-dart/examples/webhooks/create.md @@ -12,7 +12,7 @@ Webhook result = await webhooks.create( webhookId: '<WEBHOOK_ID>', url: 'https://example.com/webhook', name: '<NAME>', - events: [], + events: ["users.*.create"], enabled: false, // (optional) tls: false, // (optional) authUsername: '<AUTH_USERNAME>', // (optional) diff --git a/examples/2.3.x/server-dart/examples/webhooks/update.md b/examples/2.3.x/server-dart/examples/webhooks/update.md index 99bc21df8..e4f7fd293 100644 --- a/examples/2.3.x/server-dart/examples/webhooks/update.md +++ b/examples/2.3.x/server-dart/examples/webhooks/update.md @@ -12,7 +12,7 @@ Webhook result = await webhooks.update( webhookId: '<WEBHOOK_ID>', name: '<NAME>', url: 'https://example.com/webhook', - events: [], + events: ["users.*.create"], enabled: false, // (optional) tls: false, // (optional) authUsername: '<AUTH_USERNAME>', // (optional) diff --git a/examples/2.3.x/server-dotnet/examples/account/create-anonymous-session.md b/examples/2.3.x/server-dotnet/examples/account/create-anonymous-session.md index 35b3aab46..81dc71b44 100644 --- a/examples/2.3.x/server-dotnet/examples/account/create-anonymous-session.md +++ b/examples/2.3.x/server-dotnet/examples/account/create-anonymous-session.md @@ -10,7 +10,7 @@ Client client = new Client() Account account = new Account(client); -Session result = await account.CreateAnonymousSession(); +Appwrite.Models.Session result = await account.CreateAnonymousSession(); ``` diff --git a/examples/2.3.x/server-dotnet/examples/account/create-email-password-session.md b/examples/2.3.x/server-dotnet/examples/account/create-email-password-session.md index f24e35ca3..06f70f33f 100644 --- a/examples/2.3.x/server-dotnet/examples/account/create-email-password-session.md +++ b/examples/2.3.x/server-dotnet/examples/account/create-email-password-session.md @@ -10,9 +10,10 @@ Client client = new Client() Account account = new Account(client); -Session result = await account.CreateEmailPasswordSession( +Appwrite.Models.Session result = await account.CreateEmailPasswordSession( email: "email@example.com", - password: "password" + password: "password", + duration: 60 // optional ); ``` diff --git a/examples/2.3.x/server-dotnet/examples/account/create-email-token.md b/examples/2.3.x/server-dotnet/examples/account/create-email-token.md index be003ffe1..a43eb0bb3 100644 --- a/examples/2.3.x/server-dotnet/examples/account/create-email-token.md +++ b/examples/2.3.x/server-dotnet/examples/account/create-email-token.md @@ -10,7 +10,7 @@ Client client = new Client() Account account = new Account(client); -Token result = await account.CreateEmailToken( +Appwrite.Models.Token result = await account.CreateEmailToken( userId: "<USER_ID>", email: "email@example.com", phrase: false // optional diff --git a/examples/2.3.x/server-dotnet/examples/account/create-email-verification-otp.md b/examples/2.3.x/server-dotnet/examples/account/create-email-verification-otp.md index 537193b26..13e565432 100644 --- a/examples/2.3.x/server-dotnet/examples/account/create-email-verification-otp.md +++ b/examples/2.3.x/server-dotnet/examples/account/create-email-verification-otp.md @@ -10,7 +10,7 @@ Client client = new Client() Account account = new Account(client); -Token result = await account.CreateEmailVerificationOTP( +Appwrite.Models.Token result = await account.CreateEmailVerificationOTP( phrase: false // optional ); diff --git a/examples/2.3.x/server-dotnet/examples/account/create-email-verification.md b/examples/2.3.x/server-dotnet/examples/account/create-email-verification.md index b5c4aad48..b3b841bee 100644 --- a/examples/2.3.x/server-dotnet/examples/account/create-email-verification.md +++ b/examples/2.3.x/server-dotnet/examples/account/create-email-verification.md @@ -10,7 +10,7 @@ Client client = new Client() Account account = new Account(client); -Token result = await account.CreateEmailVerification( +Appwrite.Models.Token result = await account.CreateEmailVerification( url: "https://example.com" ); diff --git a/examples/2.3.x/server-dotnet/examples/account/create-id-token-session.md b/examples/2.3.x/server-dotnet/examples/account/create-id-token-session.md index 121d06845..fd3945bad 100644 --- a/examples/2.3.x/server-dotnet/examples/account/create-id-token-session.md +++ b/examples/2.3.x/server-dotnet/examples/account/create-id-token-session.md @@ -11,7 +11,7 @@ Client client = new Client() Account account = new Account(client); -Session result = await account.CreateIdTokenSession( +Appwrite.Models.Session result = await account.CreateIdTokenSession( provider: IdTokenProvider.Apple, idToken: "<ID_TOKEN>", nonce: "<NONCE>", // optional diff --git a/examples/2.3.x/server-dotnet/examples/account/create-magic-url-token.md b/examples/2.3.x/server-dotnet/examples/account/create-magic-url-token.md index 85e771646..845624310 100644 --- a/examples/2.3.x/server-dotnet/examples/account/create-magic-url-token.md +++ b/examples/2.3.x/server-dotnet/examples/account/create-magic-url-token.md @@ -10,7 +10,7 @@ Client client = new Client() Account account = new Account(client); -Token result = await account.CreateMagicURLToken( +Appwrite.Models.Token result = await account.CreateMagicURLToken( userId: "<USER_ID>", email: "email@example.com", url: "https://example.com", // optional diff --git a/examples/2.3.x/server-dotnet/examples/account/create-mfa-authenticator.md b/examples/2.3.x/server-dotnet/examples/account/create-mfa-authenticator.md index 74e3d1053..8405427dc 100644 --- a/examples/2.3.x/server-dotnet/examples/account/create-mfa-authenticator.md +++ b/examples/2.3.x/server-dotnet/examples/account/create-mfa-authenticator.md @@ -11,7 +11,7 @@ Client client = new Client() Account account = new Account(client); -MfaType result = await account.CreateMFAAuthenticator( +Appwrite.Models.MfaType result = await account.CreateMFAAuthenticator( type: AuthenticatorType.Totp ); diff --git a/examples/2.3.x/server-dotnet/examples/account/create-mfa-challenge.md b/examples/2.3.x/server-dotnet/examples/account/create-mfa-challenge.md index 8f7a9208b..7ca2d569d 100644 --- a/examples/2.3.x/server-dotnet/examples/account/create-mfa-challenge.md +++ b/examples/2.3.x/server-dotnet/examples/account/create-mfa-challenge.md @@ -11,7 +11,7 @@ Client client = new Client() Account account = new Account(client); -MfaChallenge result = await account.CreateMFAChallenge( +Appwrite.Models.MfaChallenge result = await account.CreateMFAChallenge( factor: AuthenticationFactor.Email ); diff --git a/examples/2.3.x/server-dotnet/examples/account/create-mfa-recovery-codes.md b/examples/2.3.x/server-dotnet/examples/account/create-mfa-recovery-codes.md index 6869828db..37dd3a899 100644 --- a/examples/2.3.x/server-dotnet/examples/account/create-mfa-recovery-codes.md +++ b/examples/2.3.x/server-dotnet/examples/account/create-mfa-recovery-codes.md @@ -10,7 +10,7 @@ Client client = new Client() Account account = new Account(client); -MfaRecoveryCodes result = await account.CreateMFARecoveryCodes(); +Appwrite.Models.MfaRecoveryCodes result = await account.CreateMFARecoveryCodes(); ``` diff --git a/examples/2.3.x/server-dotnet/examples/account/create-phone-token.md b/examples/2.3.x/server-dotnet/examples/account/create-phone-token.md index e296f8ed7..5f3e5bb56 100644 --- a/examples/2.3.x/server-dotnet/examples/account/create-phone-token.md +++ b/examples/2.3.x/server-dotnet/examples/account/create-phone-token.md @@ -10,7 +10,7 @@ Client client = new Client() Account account = new Account(client); -Token result = await account.CreatePhoneToken( +Appwrite.Models.Token result = await account.CreatePhoneToken( userId: "<USER_ID>", phone: "+12065550100" ); diff --git a/examples/2.3.x/server-dotnet/examples/account/create-phone-verification.md b/examples/2.3.x/server-dotnet/examples/account/create-phone-verification.md index e5f1144da..f6cd2d1b9 100644 --- a/examples/2.3.x/server-dotnet/examples/account/create-phone-verification.md +++ b/examples/2.3.x/server-dotnet/examples/account/create-phone-verification.md @@ -10,7 +10,7 @@ Client client = new Client() Account account = new Account(client); -Token result = await account.CreatePhoneVerification(); +Appwrite.Models.Token result = await account.CreatePhoneVerification(); ``` diff --git a/examples/2.3.x/server-dotnet/examples/account/create-recovery-otp.md b/examples/2.3.x/server-dotnet/examples/account/create-recovery-otp.md index db9dc0ce7..93602e463 100644 --- a/examples/2.3.x/server-dotnet/examples/account/create-recovery-otp.md +++ b/examples/2.3.x/server-dotnet/examples/account/create-recovery-otp.md @@ -10,7 +10,7 @@ Client client = new Client() Account account = new Account(client); -Token result = await account.CreateRecoveryOTP( +Appwrite.Models.Token result = await account.CreateRecoveryOTP( email: "email@example.com", phrase: false // optional ); diff --git a/examples/2.3.x/server-dotnet/examples/account/create-recovery.md b/examples/2.3.x/server-dotnet/examples/account/create-recovery.md index 7951fcb60..df9fba03b 100644 --- a/examples/2.3.x/server-dotnet/examples/account/create-recovery.md +++ b/examples/2.3.x/server-dotnet/examples/account/create-recovery.md @@ -10,7 +10,7 @@ Client client = new Client() Account account = new Account(client); -Token result = await account.CreateRecovery( +Appwrite.Models.Token result = await account.CreateRecovery( email: "email@example.com", url: "https://example.com" ); diff --git a/examples/2.3.x/server-dotnet/examples/account/create-session.md b/examples/2.3.x/server-dotnet/examples/account/create-session.md index 9cd8558a9..b3a0cae63 100644 --- a/examples/2.3.x/server-dotnet/examples/account/create-session.md +++ b/examples/2.3.x/server-dotnet/examples/account/create-session.md @@ -10,7 +10,7 @@ Client client = new Client() Account account = new Account(client); -Session result = await account.CreateSession( +Appwrite.Models.Session result = await account.CreateSession( userId: "<USER_ID>", secret: "<SECRET>" ); diff --git a/examples/2.3.x/server-dotnet/examples/account/create-verification.md b/examples/2.3.x/server-dotnet/examples/account/create-verification.md index a25aa0de2..c7b6112ff 100644 --- a/examples/2.3.x/server-dotnet/examples/account/create-verification.md +++ b/examples/2.3.x/server-dotnet/examples/account/create-verification.md @@ -10,7 +10,7 @@ Client client = new Client() Account account = new Account(client); -Token result = await account.CreateVerification( +Appwrite.Models.Token result = await account.CreateVerification( url: "https://example.com" ); diff --git a/examples/2.3.x/server-dotnet/examples/account/create.md b/examples/2.3.x/server-dotnet/examples/account/create.md index b068e0c36..4f136558b 100644 --- a/examples/2.3.x/server-dotnet/examples/account/create.md +++ b/examples/2.3.x/server-dotnet/examples/account/create.md @@ -10,7 +10,7 @@ Client client = new Client() Account account = new Account(client); -User result = await account.Create( +Appwrite.Models.User result = await account.Create( userId: "<USER_ID>", email: "email@example.com", password: "password", diff --git a/examples/2.3.x/server-dotnet/examples/account/delete-sessions.md b/examples/2.3.x/server-dotnet/examples/account/delete-sessions.md index 31bd03a12..1dba1fce1 100644 --- a/examples/2.3.x/server-dotnet/examples/account/delete-sessions.md +++ b/examples/2.3.x/server-dotnet/examples/account/delete-sessions.md @@ -10,7 +10,8 @@ Client client = new Client() Account account = new Account(client); -await account.DeleteSessions(); - +await account.DeleteSessions( + current: false // optional +); ``` diff --git a/examples/2.3.x/server-dotnet/examples/account/get-consent-token.md b/examples/2.3.x/server-dotnet/examples/account/get-consent-token.md index d348e155e..6e4df6d15 100644 --- a/examples/2.3.x/server-dotnet/examples/account/get-consent-token.md +++ b/examples/2.3.x/server-dotnet/examples/account/get-consent-token.md @@ -10,7 +10,7 @@ Client client = new Client() Account account = new Account(client); -Oauth2ConsentToken result = await account.GetConsentToken( +Appwrite.Models.Oauth2ConsentToken result = await account.GetConsentToken( consentId: "<CONSENT_ID>", tokenId: "<TOKEN_ID>" ); diff --git a/examples/2.3.x/server-dotnet/examples/account/get-consent.md b/examples/2.3.x/server-dotnet/examples/account/get-consent.md index 816f6d5e4..d5780f089 100644 --- a/examples/2.3.x/server-dotnet/examples/account/get-consent.md +++ b/examples/2.3.x/server-dotnet/examples/account/get-consent.md @@ -10,7 +10,7 @@ Client client = new Client() Account account = new Account(client); -Oauth2Consent result = await account.GetConsent( +Appwrite.Models.Oauth2Consent result = await account.GetConsent( consentId: "<CONSENT_ID>" ); diff --git a/examples/2.3.x/server-dotnet/examples/account/get-mfa-recovery-codes.md b/examples/2.3.x/server-dotnet/examples/account/get-mfa-recovery-codes.md index 54ffda453..479dea142 100644 --- a/examples/2.3.x/server-dotnet/examples/account/get-mfa-recovery-codes.md +++ b/examples/2.3.x/server-dotnet/examples/account/get-mfa-recovery-codes.md @@ -10,7 +10,7 @@ Client client = new Client() Account account = new Account(client); -MfaRecoveryCodes result = await account.GetMFARecoveryCodes(); +Appwrite.Models.MfaRecoveryCodes result = await account.GetMFARecoveryCodes(); ``` diff --git a/examples/2.3.x/server-dotnet/examples/account/get-prefs.md b/examples/2.3.x/server-dotnet/examples/account/get-prefs.md index fb891b6e2..b95905bfd 100644 --- a/examples/2.3.x/server-dotnet/examples/account/get-prefs.md +++ b/examples/2.3.x/server-dotnet/examples/account/get-prefs.md @@ -10,7 +10,7 @@ Client client = new Client() Account account = new Account(client); -Preferences result = await account.GetPrefs(); +Appwrite.Models.Preferences result = await account.GetPrefs(); ``` diff --git a/examples/2.3.x/server-dotnet/examples/account/get-session.md b/examples/2.3.x/server-dotnet/examples/account/get-session.md index dee7ad1b1..6dcd4501a 100644 --- a/examples/2.3.x/server-dotnet/examples/account/get-session.md +++ b/examples/2.3.x/server-dotnet/examples/account/get-session.md @@ -10,7 +10,7 @@ Client client = new Client() Account account = new Account(client); -Session result = await account.GetSession( +Appwrite.Models.Session result = await account.GetSession( sessionId: "<SESSION_ID>" ); diff --git a/examples/2.3.x/server-dotnet/examples/account/get.md b/examples/2.3.x/server-dotnet/examples/account/get.md index ba7c848bf..bb80674a1 100644 --- a/examples/2.3.x/server-dotnet/examples/account/get.md +++ b/examples/2.3.x/server-dotnet/examples/account/get.md @@ -10,7 +10,7 @@ Client client = new Client() Account account = new Account(client); -User result = await account.Get(); +Appwrite.Models.User result = await account.Get(); ``` diff --git a/examples/2.3.x/server-dotnet/examples/account/list-consent-tokens.md b/examples/2.3.x/server-dotnet/examples/account/list-consent-tokens.md index 5f1f36d49..38371315d 100644 --- a/examples/2.3.x/server-dotnet/examples/account/list-consent-tokens.md +++ b/examples/2.3.x/server-dotnet/examples/account/list-consent-tokens.md @@ -10,7 +10,7 @@ Client client = new Client() Account account = new Account(client); -Oauth2ConsentTokenList result = await account.ListConsentTokens( +Appwrite.Models.Oauth2ConsentTokenList result = await account.ListConsentTokens( consentId: "<CONSENT_ID>", queries: new List<string>(), // optional total: false // optional diff --git a/examples/2.3.x/server-dotnet/examples/account/list-consents.md b/examples/2.3.x/server-dotnet/examples/account/list-consents.md index ca7eb65a2..475d93ff9 100644 --- a/examples/2.3.x/server-dotnet/examples/account/list-consents.md +++ b/examples/2.3.x/server-dotnet/examples/account/list-consents.md @@ -10,7 +10,7 @@ Client client = new Client() Account account = new Account(client); -Oauth2ConsentList result = await account.ListConsents( +Appwrite.Models.Oauth2ConsentList result = await account.ListConsents( queries: new List<string>(), // optional total: false // optional ); diff --git a/examples/2.3.x/server-dotnet/examples/account/list-identities.md b/examples/2.3.x/server-dotnet/examples/account/list-identities.md index f64b03b0a..913d5b98d 100644 --- a/examples/2.3.x/server-dotnet/examples/account/list-identities.md +++ b/examples/2.3.x/server-dotnet/examples/account/list-identities.md @@ -10,7 +10,7 @@ Client client = new Client() Account account = new Account(client); -IdentityList result = await account.ListIdentities( +Appwrite.Models.IdentityList result = await account.ListIdentities( queries: new List<string>(), // optional total: false // optional ); diff --git a/examples/2.3.x/server-dotnet/examples/account/list-mfa-factors.md b/examples/2.3.x/server-dotnet/examples/account/list-mfa-factors.md index 5fa29c29e..8146e6445 100644 --- a/examples/2.3.x/server-dotnet/examples/account/list-mfa-factors.md +++ b/examples/2.3.x/server-dotnet/examples/account/list-mfa-factors.md @@ -10,7 +10,7 @@ Client client = new Client() Account account = new Account(client); -MfaFactors result = await account.ListMFAFactors(); +Appwrite.Models.MfaFactors result = await account.ListMFAFactors(); ``` diff --git a/examples/2.3.x/server-dotnet/examples/account/list-sessions.md b/examples/2.3.x/server-dotnet/examples/account/list-sessions.md index 81402bccf..c24270ef8 100644 --- a/examples/2.3.x/server-dotnet/examples/account/list-sessions.md +++ b/examples/2.3.x/server-dotnet/examples/account/list-sessions.md @@ -10,7 +10,8 @@ Client client = new Client() Account account = new Account(client); -SessionList result = await account.ListSessions(); - +Appwrite.Models.SessionList result = await account.ListSessions( + total: false // optional +); ``` diff --git a/examples/2.3.x/server-dotnet/examples/account/update-email-verification-otp.md b/examples/2.3.x/server-dotnet/examples/account/update-email-verification-otp.md index 384fdeeb9..988084bd0 100644 --- a/examples/2.3.x/server-dotnet/examples/account/update-email-verification-otp.md +++ b/examples/2.3.x/server-dotnet/examples/account/update-email-verification-otp.md @@ -10,7 +10,7 @@ Client client = new Client() Account account = new Account(client); -Token result = await account.UpdateEmailVerificationOTP( +Appwrite.Models.Token result = await account.UpdateEmailVerificationOTP( userId: "<USER_ID>", secret: "<SECRET>" ); diff --git a/examples/2.3.x/server-dotnet/examples/account/update-email-verification.md b/examples/2.3.x/server-dotnet/examples/account/update-email-verification.md index 3b4214e6c..aa14f20b3 100644 --- a/examples/2.3.x/server-dotnet/examples/account/update-email-verification.md +++ b/examples/2.3.x/server-dotnet/examples/account/update-email-verification.md @@ -10,7 +10,7 @@ Client client = new Client() Account account = new Account(client); -Token result = await account.UpdateEmailVerification( +Appwrite.Models.Token result = await account.UpdateEmailVerification( userId: "<USER_ID>", secret: "<SECRET>" ); diff --git a/examples/2.3.x/server-dotnet/examples/account/update-email.md b/examples/2.3.x/server-dotnet/examples/account/update-email.md index 9135dc1c1..30cefbc1a 100644 --- a/examples/2.3.x/server-dotnet/examples/account/update-email.md +++ b/examples/2.3.x/server-dotnet/examples/account/update-email.md @@ -10,7 +10,7 @@ Client client = new Client() Account account = new Account(client); -User result = await account.UpdateEmail( +Appwrite.Models.User result = await account.UpdateEmail( email: "email@example.com", password: "password" ); diff --git a/examples/2.3.x/server-dotnet/examples/account/update-magic-url-session.md b/examples/2.3.x/server-dotnet/examples/account/update-magic-url-session.md index 06f707ee5..1c8d0b558 100644 --- a/examples/2.3.x/server-dotnet/examples/account/update-magic-url-session.md +++ b/examples/2.3.x/server-dotnet/examples/account/update-magic-url-session.md @@ -10,7 +10,7 @@ Client client = new Client() Account account = new Account(client); -Session result = await account.UpdateMagicURLSession( +Appwrite.Models.Session result = await account.UpdateMagicURLSession( userId: "<USER_ID>", secret: "<SECRET>" ); diff --git a/examples/2.3.x/server-dotnet/examples/account/update-mfa-authenticator.md b/examples/2.3.x/server-dotnet/examples/account/update-mfa-authenticator.md index a9cdba19d..40bd083ea 100644 --- a/examples/2.3.x/server-dotnet/examples/account/update-mfa-authenticator.md +++ b/examples/2.3.x/server-dotnet/examples/account/update-mfa-authenticator.md @@ -11,7 +11,7 @@ Client client = new Client() Account account = new Account(client); -User result = await account.UpdateMFAAuthenticator( +Appwrite.Models.User result = await account.UpdateMFAAuthenticator( type: AuthenticatorType.Totp, otp: "<OTP>" ); diff --git a/examples/2.3.x/server-dotnet/examples/account/update-mfa-challenge.md b/examples/2.3.x/server-dotnet/examples/account/update-mfa-challenge.md index d74d8d58c..918bc3f2b 100644 --- a/examples/2.3.x/server-dotnet/examples/account/update-mfa-challenge.md +++ b/examples/2.3.x/server-dotnet/examples/account/update-mfa-challenge.md @@ -10,7 +10,7 @@ Client client = new Client() Account account = new Account(client); -Session result = await account.UpdateMFAChallenge( +Appwrite.Models.Session result = await account.UpdateMFAChallenge( challengeId: "<CHALLENGE_ID>", otp: "<OTP>" ); diff --git a/examples/2.3.x/server-dotnet/examples/account/update-mfa-recovery-codes.md b/examples/2.3.x/server-dotnet/examples/account/update-mfa-recovery-codes.md index eefede0f5..f4ac2db3c 100644 --- a/examples/2.3.x/server-dotnet/examples/account/update-mfa-recovery-codes.md +++ b/examples/2.3.x/server-dotnet/examples/account/update-mfa-recovery-codes.md @@ -10,7 +10,7 @@ Client client = new Client() Account account = new Account(client); -MfaRecoveryCodes result = await account.UpdateMFARecoveryCodes(); +Appwrite.Models.MfaRecoveryCodes result = await account.UpdateMFARecoveryCodes(); ``` diff --git a/examples/2.3.x/server-dotnet/examples/account/update-mfa.md b/examples/2.3.x/server-dotnet/examples/account/update-mfa.md index 449edcb39..21fda9c51 100644 --- a/examples/2.3.x/server-dotnet/examples/account/update-mfa.md +++ b/examples/2.3.x/server-dotnet/examples/account/update-mfa.md @@ -10,7 +10,7 @@ Client client = new Client() Account account = new Account(client); -User result = await account.UpdateMFA( +Appwrite.Models.User result = await account.UpdateMFA( mfa: false ); diff --git a/examples/2.3.x/server-dotnet/examples/account/update-name.md b/examples/2.3.x/server-dotnet/examples/account/update-name.md index bf88c6626..623e95841 100644 --- a/examples/2.3.x/server-dotnet/examples/account/update-name.md +++ b/examples/2.3.x/server-dotnet/examples/account/update-name.md @@ -10,7 +10,7 @@ Client client = new Client() Account account = new Account(client); -User result = await account.UpdateName( +Appwrite.Models.User result = await account.UpdateName( name: "<NAME>" ); diff --git a/examples/2.3.x/server-dotnet/examples/account/update-password.md b/examples/2.3.x/server-dotnet/examples/account/update-password.md index 323934abc..78ddd2354 100644 --- a/examples/2.3.x/server-dotnet/examples/account/update-password.md +++ b/examples/2.3.x/server-dotnet/examples/account/update-password.md @@ -10,7 +10,7 @@ Client client = new Client() Account account = new Account(client); -User result = await account.UpdatePassword( +Appwrite.Models.User result = await account.UpdatePassword( password: "password", oldPassword: "password" // optional ); diff --git a/examples/2.3.x/server-dotnet/examples/account/update-phone-session.md b/examples/2.3.x/server-dotnet/examples/account/update-phone-session.md index dd7ab0487..ddd7759fb 100644 --- a/examples/2.3.x/server-dotnet/examples/account/update-phone-session.md +++ b/examples/2.3.x/server-dotnet/examples/account/update-phone-session.md @@ -10,7 +10,7 @@ Client client = new Client() Account account = new Account(client); -Session result = await account.UpdatePhoneSession( +Appwrite.Models.Session result = await account.UpdatePhoneSession( userId: "<USER_ID>", secret: "<SECRET>" ); diff --git a/examples/2.3.x/server-dotnet/examples/account/update-phone-verification.md b/examples/2.3.x/server-dotnet/examples/account/update-phone-verification.md index c2b7eebb5..587b51e5f 100644 --- a/examples/2.3.x/server-dotnet/examples/account/update-phone-verification.md +++ b/examples/2.3.x/server-dotnet/examples/account/update-phone-verification.md @@ -10,7 +10,7 @@ Client client = new Client() Account account = new Account(client); -Token result = await account.UpdatePhoneVerification( +Appwrite.Models.Token result = await account.UpdatePhoneVerification( userId: "<USER_ID>", secret: "<SECRET>" ); diff --git a/examples/2.3.x/server-dotnet/examples/account/update-phone.md b/examples/2.3.x/server-dotnet/examples/account/update-phone.md index d2b7276b4..e4b03db91 100644 --- a/examples/2.3.x/server-dotnet/examples/account/update-phone.md +++ b/examples/2.3.x/server-dotnet/examples/account/update-phone.md @@ -10,7 +10,7 @@ Client client = new Client() Account account = new Account(client); -User result = await account.UpdatePhone( +Appwrite.Models.User result = await account.UpdatePhone( phone: "+12065550100", password: "password" ); diff --git a/examples/2.3.x/server-dotnet/examples/account/update-prefs.md b/examples/2.3.x/server-dotnet/examples/account/update-prefs.md index 105e69888..db944690d 100644 --- a/examples/2.3.x/server-dotnet/examples/account/update-prefs.md +++ b/examples/2.3.x/server-dotnet/examples/account/update-prefs.md @@ -10,7 +10,7 @@ Client client = new Client() Account account = new Account(client); -User result = await account.UpdatePrefs( +Appwrite.Models.User result = await account.UpdatePrefs( prefs: new { language = "en", timezone = "UTC", diff --git a/examples/2.3.x/server-dotnet/examples/account/update-recovery-otp.md b/examples/2.3.x/server-dotnet/examples/account/update-recovery-otp.md index 9232fb371..ad31785eb 100644 --- a/examples/2.3.x/server-dotnet/examples/account/update-recovery-otp.md +++ b/examples/2.3.x/server-dotnet/examples/account/update-recovery-otp.md @@ -10,7 +10,7 @@ Client client = new Client() Account account = new Account(client); -Token result = await account.UpdateRecoveryOTP( +Appwrite.Models.Token result = await account.UpdateRecoveryOTP( userId: "<USER_ID>", secret: "<SECRET>", password: "password" diff --git a/examples/2.3.x/server-dotnet/examples/account/update-recovery.md b/examples/2.3.x/server-dotnet/examples/account/update-recovery.md index 5875c5b09..c0e87c28c 100644 --- a/examples/2.3.x/server-dotnet/examples/account/update-recovery.md +++ b/examples/2.3.x/server-dotnet/examples/account/update-recovery.md @@ -10,7 +10,7 @@ Client client = new Client() Account account = new Account(client); -Token result = await account.UpdateRecovery( +Appwrite.Models.Token result = await account.UpdateRecovery( userId: "<USER_ID>", secret: "<SECRET>", password: "password" diff --git a/examples/2.3.x/server-dotnet/examples/account/update-session.md b/examples/2.3.x/server-dotnet/examples/account/update-session.md index d49e556f0..b9bdd0f51 100644 --- a/examples/2.3.x/server-dotnet/examples/account/update-session.md +++ b/examples/2.3.x/server-dotnet/examples/account/update-session.md @@ -10,7 +10,7 @@ Client client = new Client() Account account = new Account(client); -Session result = await account.UpdateSession( +Appwrite.Models.Session result = await account.UpdateSession( sessionId: "<SESSION_ID>" ); diff --git a/examples/2.3.x/server-dotnet/examples/account/update-status.md b/examples/2.3.x/server-dotnet/examples/account/update-status.md index 95ac938dd..e6cf94968 100644 --- a/examples/2.3.x/server-dotnet/examples/account/update-status.md +++ b/examples/2.3.x/server-dotnet/examples/account/update-status.md @@ -10,7 +10,7 @@ Client client = new Client() Account account = new Account(client); -User result = await account.UpdateStatus(); +Appwrite.Models.User result = await account.UpdateStatus(); ``` diff --git a/examples/2.3.x/server-dotnet/examples/account/update-verification.md b/examples/2.3.x/server-dotnet/examples/account/update-verification.md index 16fbc2ce5..ab345bf16 100644 --- a/examples/2.3.x/server-dotnet/examples/account/update-verification.md +++ b/examples/2.3.x/server-dotnet/examples/account/update-verification.md @@ -10,7 +10,7 @@ Client client = new Client() Account account = new Account(client); -Token result = await account.UpdateVerification( +Appwrite.Models.Token result = await account.UpdateVerification( userId: "<USER_ID>", secret: "<SECRET>" ); diff --git a/examples/2.3.x/server-dotnet/examples/activities/get-event.md b/examples/2.3.x/server-dotnet/examples/activities/get-event.md index 82e50a0b1..38bee825f 100644 --- a/examples/2.3.x/server-dotnet/examples/activities/get-event.md +++ b/examples/2.3.x/server-dotnet/examples/activities/get-event.md @@ -10,7 +10,7 @@ Client client = new Client() Activities activities = new Activities(client); -ActivityEvent result = await activities.GetEvent( +Appwrite.Models.ActivityEvent result = await activities.GetEvent( eventId: "<EVENT_ID>" ); diff --git a/examples/2.3.x/server-dotnet/examples/activities/list-events.md b/examples/2.3.x/server-dotnet/examples/activities/list-events.md index c3d2ba2fd..2df308415 100644 --- a/examples/2.3.x/server-dotnet/examples/activities/list-events.md +++ b/examples/2.3.x/server-dotnet/examples/activities/list-events.md @@ -10,7 +10,7 @@ Client client = new Client() Activities activities = new Activities(client); -ActivityEventList result = await activities.ListEvents( +Appwrite.Models.ActivityEventList result = await activities.ListEvents( queries: new List<string>() // optional ); diff --git a/examples/2.3.x/server-dotnet/examples/advisor/get-insight.md b/examples/2.3.x/server-dotnet/examples/advisor/get-insight.md index 29543bdc8..baa37a268 100644 --- a/examples/2.3.x/server-dotnet/examples/advisor/get-insight.md +++ b/examples/2.3.x/server-dotnet/examples/advisor/get-insight.md @@ -10,7 +10,7 @@ Client client = new Client() Advisor advisor = new Advisor(client); -Insight result = await advisor.GetInsight( +Appwrite.Models.Insight result = await advisor.GetInsight( reportId: "<REPORT_ID>", insightId: "<INSIGHT_ID>" ); diff --git a/examples/2.3.x/server-dotnet/examples/advisor/get-report.md b/examples/2.3.x/server-dotnet/examples/advisor/get-report.md index 2143cbc0a..41b8828fd 100644 --- a/examples/2.3.x/server-dotnet/examples/advisor/get-report.md +++ b/examples/2.3.x/server-dotnet/examples/advisor/get-report.md @@ -10,7 +10,7 @@ Client client = new Client() Advisor advisor = new Advisor(client); -Report result = await advisor.GetReport( +Appwrite.Models.Report result = await advisor.GetReport( reportId: "<REPORT_ID>" ); diff --git a/examples/2.3.x/server-dotnet/examples/advisor/list-insights.md b/examples/2.3.x/server-dotnet/examples/advisor/list-insights.md index 00322495d..eaae4c1c6 100644 --- a/examples/2.3.x/server-dotnet/examples/advisor/list-insights.md +++ b/examples/2.3.x/server-dotnet/examples/advisor/list-insights.md @@ -10,7 +10,7 @@ Client client = new Client() Advisor advisor = new Advisor(client); -InsightList result = await advisor.ListInsights( +Appwrite.Models.InsightList result = await advisor.ListInsights( reportId: "<REPORT_ID>", queries: new List<string>(), // optional total: false // optional diff --git a/examples/2.3.x/server-dotnet/examples/advisor/list-reports.md b/examples/2.3.x/server-dotnet/examples/advisor/list-reports.md index e610e521d..dcaf6415f 100644 --- a/examples/2.3.x/server-dotnet/examples/advisor/list-reports.md +++ b/examples/2.3.x/server-dotnet/examples/advisor/list-reports.md @@ -10,7 +10,7 @@ Client client = new Client() Advisor advisor = new Advisor(client); -ReportList result = await advisor.ListReports( +Appwrite.Models.ReportList result = await advisor.ListReports( queries: new List<string>(), // optional total: false // optional ); diff --git a/examples/2.3.x/server-dotnet/examples/analytics/create-event.md b/examples/2.3.x/server-dotnet/examples/analytics/create-event.md new file mode 100644 index 000000000..119fe1d74 --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/analytics/create-event.md @@ -0,0 +1,29 @@ +```csharp +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetSession(""); // The user session to authenticate with + +Analytics analytics = new Analytics(client); + +Appwrite.Models. result = await analytics.CreateEvent( + propertyId: "<PROPERTY_ID>", + name: "<NAME>", + url: "https://example.com", + domain: "<DOMAIN>", // optional + referrer: "<REFERRER>", // optional + screenWidth: 0, // optional + sessionHash: "<SESSION_HASH>", // optional + scrollDepth: 0, // optional + engagementTime: 0, // optional + props: new List<string>(), // optional + userId: "<USER_ID>", // optional + ip: "<IP>", // optional + userAgent: "<USER_AGENT>" // optional +); + +``` diff --git a/examples/2.3.x/server-dotnet/examples/analytics/create-property.md b/examples/2.3.x/server-dotnet/examples/analytics/create-property.md new file mode 100644 index 000000000..a4d0e2965 --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/analytics/create-property.md @@ -0,0 +1,23 @@ +```csharp +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Analytics analytics = new Analytics(client); + +Appwrite.Models.AnalyticsProperty result = await analytics.CreateProperty( + propertyId: "<PROPERTY_ID>", + name: "<NAME>", + domain: "<DOMAIN>", // optional + timezone: "<TIMEZONE>", // optional + enabled: false, // optional + public: false, // optional + allowedOrigins: new List<string>() // optional +); + +``` diff --git a/examples/2.3.x/server-dotnet/examples/analytics/delete-property.md b/examples/2.3.x/server-dotnet/examples/analytics/delete-property.md new file mode 100644 index 000000000..11e934e06 --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/analytics/delete-property.md @@ -0,0 +1,17 @@ +```csharp +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Analytics analytics = new Analytics(client); + +await analytics.DeleteProperty( + propertyId: "<PROPERTY_ID>" +); + +``` diff --git a/examples/2.3.x/server-dotnet/examples/analytics/get-property.md b/examples/2.3.x/server-dotnet/examples/analytics/get-property.md new file mode 100644 index 000000000..ad7aab331 --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/analytics/get-property.md @@ -0,0 +1,17 @@ +```csharp +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Analytics analytics = new Analytics(client); + +Appwrite.Models.AnalyticsProperty result = await analytics.GetProperty( + propertyId: "<PROPERTY_ID>" +); + +``` diff --git a/examples/2.3.x/server-dotnet/examples/analytics/list-metrics.md b/examples/2.3.x/server-dotnet/examples/analytics/list-metrics.md new file mode 100644 index 000000000..12b194696 --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/analytics/list-metrics.md @@ -0,0 +1,25 @@ +```csharp +using Appwrite; +using Appwrite.Enums; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Analytics analytics = new Analytics(client); + +Appwrite.Models.AnalyticsMetricList result = await analytics.ListMetrics( + propertyId: "<PROPERTY_ID>", + queries: new List<string>(), // optional + interval: AnalyticsInterval.OneHour, // optional + dimensions: new List<AnalyticsDimension> { AnalyticsDimension.Country }, // optional + dateRange: "<DATE_RANGE>", // optional + startAt: "2020-10-15T06:38:00.000+00:00", // optional + endAt: "2020-10-15T06:38:00.000+00:00", // optional + limit: 1 // optional +); + +``` diff --git a/examples/2.3.x/server-dotnet/examples/analytics/list-properties.md b/examples/2.3.x/server-dotnet/examples/analytics/list-properties.md new file mode 100644 index 000000000..4e5c7ca06 --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/analytics/list-properties.md @@ -0,0 +1,19 @@ +```csharp +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Analytics analytics = new Analytics(client); + +Appwrite.Models.AnalyticsPropertyList result = await analytics.ListProperties( + queries: new List<string>(), // optional + search: "<SEARCH>", // optional + total: false // optional +); + +``` diff --git a/examples/2.3.x/server-dotnet/examples/analytics/update-property.md b/examples/2.3.x/server-dotnet/examples/analytics/update-property.md new file mode 100644 index 000000000..3197e31eb --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/analytics/update-property.md @@ -0,0 +1,23 @@ +```csharp +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Analytics analytics = new Analytics(client); + +Appwrite.Models.AnalyticsProperty result = await analytics.UpdateProperty( + propertyId: "<PROPERTY_ID>", + name: "<NAME>", // optional + domain: "<DOMAIN>", // optional + timezone: "<TIMEZONE>", // optional + enabled: false, // optional + public: false, // optional + allowedOrigins: new List<string>() // optional +); + +``` diff --git a/examples/2.3.x/server-dotnet/examples/apps/create-installation-token.md b/examples/2.3.x/server-dotnet/examples/apps/create-installation-token.md index 0aabf4b1d..87d8cba11 100644 --- a/examples/2.3.x/server-dotnet/examples/apps/create-installation-token.md +++ b/examples/2.3.x/server-dotnet/examples/apps/create-installation-token.md @@ -10,7 +10,7 @@ Client client = new Client() Apps apps = new Apps(client); -Oauth2Token result = await apps.CreateInstallationToken( +Appwrite.Models.Oauth2Token result = await apps.CreateInstallationToken( appId: "<APP_ID>", installationId: "<INSTALLATION_ID>" ); diff --git a/examples/2.3.x/server-dotnet/examples/apps/create-key.md b/examples/2.3.x/server-dotnet/examples/apps/create-key.md index a4e53d1e4..f3fd184ce 100644 --- a/examples/2.3.x/server-dotnet/examples/apps/create-key.md +++ b/examples/2.3.x/server-dotnet/examples/apps/create-key.md @@ -10,7 +10,7 @@ Client client = new Client() Apps apps = new Apps(client); -AppKey result = await apps.CreateKey( +Appwrite.Models.AppKey result = await apps.CreateKey( appId: "<APP_ID>" ); diff --git a/examples/2.3.x/server-dotnet/examples/apps/create-secret.md b/examples/2.3.x/server-dotnet/examples/apps/create-secret.md index 12553ab66..3a4327f6e 100644 --- a/examples/2.3.x/server-dotnet/examples/apps/create-secret.md +++ b/examples/2.3.x/server-dotnet/examples/apps/create-secret.md @@ -10,7 +10,7 @@ Client client = new Client() Apps apps = new Apps(client); -AppSecretPlaintext result = await apps.CreateSecret( +Appwrite.Models.AppSecretPlaintext result = await apps.CreateSecret( appId: "<APP_ID>" ); diff --git a/examples/2.3.x/server-dotnet/examples/apps/create.md b/examples/2.3.x/server-dotnet/examples/apps/create.md index 18adab455..48ae90724 100644 --- a/examples/2.3.x/server-dotnet/examples/apps/create.md +++ b/examples/2.3.x/server-dotnet/examples/apps/create.md @@ -10,7 +10,7 @@ Client client = new Client() Apps apps = new Apps(client); -App result = await apps.Create( +Appwrite.Models.App result = await apps.Create( appId: "<APP_ID>", name: "<NAME>", redirectUris: new List<string>(), diff --git a/examples/2.3.x/server-dotnet/examples/apps/get-installation.md b/examples/2.3.x/server-dotnet/examples/apps/get-installation.md index 16221bdce..cc3aa7b26 100644 --- a/examples/2.3.x/server-dotnet/examples/apps/get-installation.md +++ b/examples/2.3.x/server-dotnet/examples/apps/get-installation.md @@ -10,7 +10,7 @@ Client client = new Client() Apps apps = new Apps(client); -AppInstallation result = await apps.GetInstallation( +Appwrite.Models.AppInstallation result = await apps.GetInstallation( appId: "<APP_ID>", installationId: "<INSTALLATION_ID>" ); diff --git a/examples/2.3.x/server-dotnet/examples/apps/get-key.md b/examples/2.3.x/server-dotnet/examples/apps/get-key.md index 4bfe168c2..037a1f516 100644 --- a/examples/2.3.x/server-dotnet/examples/apps/get-key.md +++ b/examples/2.3.x/server-dotnet/examples/apps/get-key.md @@ -10,7 +10,7 @@ Client client = new Client() Apps apps = new Apps(client); -AppKey result = await apps.GetKey( +Appwrite.Models.AppKey result = await apps.GetKey( appId: "<APP_ID>", keyId: "<KEY_ID>" ); diff --git a/examples/2.3.x/server-dotnet/examples/apps/get-secret.md b/examples/2.3.x/server-dotnet/examples/apps/get-secret.md index e1f6e4fc1..1ef7d29f5 100644 --- a/examples/2.3.x/server-dotnet/examples/apps/get-secret.md +++ b/examples/2.3.x/server-dotnet/examples/apps/get-secret.md @@ -10,7 +10,7 @@ Client client = new Client() Apps apps = new Apps(client); -AppSecret result = await apps.GetSecret( +Appwrite.Models.AppSecret result = await apps.GetSecret( appId: "<APP_ID>", secretId: "<SECRET_ID>" ); diff --git a/examples/2.3.x/server-dotnet/examples/apps/get.md b/examples/2.3.x/server-dotnet/examples/apps/get.md index df6aefd07..52df40d2c 100644 --- a/examples/2.3.x/server-dotnet/examples/apps/get.md +++ b/examples/2.3.x/server-dotnet/examples/apps/get.md @@ -10,7 +10,7 @@ Client client = new Client() Apps apps = new Apps(client); -App result = await apps.Get( +Appwrite.Models.App result = await apps.Get( appId: "<APP_ID>" ); diff --git a/examples/2.3.x/server-dotnet/examples/apps/list-installation-scopes.md b/examples/2.3.x/server-dotnet/examples/apps/list-installation-scopes.md index 2ba341f0d..94de8be27 100644 --- a/examples/2.3.x/server-dotnet/examples/apps/list-installation-scopes.md +++ b/examples/2.3.x/server-dotnet/examples/apps/list-installation-scopes.md @@ -10,7 +10,7 @@ Client client = new Client() Apps apps = new Apps(client); -AppScopeList result = await apps.ListInstallationScopes(); +Appwrite.Models.AppScopeList result = await apps.ListInstallationScopes(); ``` diff --git a/examples/2.3.x/server-dotnet/examples/apps/list-installations.md b/examples/2.3.x/server-dotnet/examples/apps/list-installations.md index 1a1bdf8d9..3176180ee 100644 --- a/examples/2.3.x/server-dotnet/examples/apps/list-installations.md +++ b/examples/2.3.x/server-dotnet/examples/apps/list-installations.md @@ -10,7 +10,7 @@ Client client = new Client() Apps apps = new Apps(client); -AppInstallationList result = await apps.ListInstallations( +Appwrite.Models.AppInstallationList result = await apps.ListInstallations( appId: "<APP_ID>", queries: new List<string>(), // optional total: false // optional diff --git a/examples/2.3.x/server-dotnet/examples/apps/list-keys.md b/examples/2.3.x/server-dotnet/examples/apps/list-keys.md index e6e8522f6..1a3f5b625 100644 --- a/examples/2.3.x/server-dotnet/examples/apps/list-keys.md +++ b/examples/2.3.x/server-dotnet/examples/apps/list-keys.md @@ -10,7 +10,7 @@ Client client = new Client() Apps apps = new Apps(client); -AppKeyList result = await apps.ListKeys( +Appwrite.Models.AppKeyList result = await apps.ListKeys( appId: "<APP_ID>", queries: new List<string>(), // optional total: false // optional diff --git a/examples/2.3.x/server-dotnet/examples/apps/list-o-auth-2-scopes.md b/examples/2.3.x/server-dotnet/examples/apps/list-o-auth-2-scopes.md index 6efd85034..ce048e46e 100644 --- a/examples/2.3.x/server-dotnet/examples/apps/list-o-auth-2-scopes.md +++ b/examples/2.3.x/server-dotnet/examples/apps/list-o-auth-2-scopes.md @@ -10,7 +10,7 @@ Client client = new Client() Apps apps = new Apps(client); -AppScopeList result = await apps.ListOAuth2Scopes(); +Appwrite.Models.AppScopeList result = await apps.ListOAuth2Scopes(); ``` diff --git a/examples/2.3.x/server-dotnet/examples/apps/list-secrets.md b/examples/2.3.x/server-dotnet/examples/apps/list-secrets.md index ab831c0a5..d7be65ff0 100644 --- a/examples/2.3.x/server-dotnet/examples/apps/list-secrets.md +++ b/examples/2.3.x/server-dotnet/examples/apps/list-secrets.md @@ -10,7 +10,7 @@ Client client = new Client() Apps apps = new Apps(client); -AppSecretList result = await apps.ListSecrets( +Appwrite.Models.AppSecretList result = await apps.ListSecrets( appId: "<APP_ID>", queries: new List<string>(), // optional total: false // optional diff --git a/examples/2.3.x/server-dotnet/examples/apps/list.md b/examples/2.3.x/server-dotnet/examples/apps/list.md index 724cfd910..bfe493343 100644 --- a/examples/2.3.x/server-dotnet/examples/apps/list.md +++ b/examples/2.3.x/server-dotnet/examples/apps/list.md @@ -10,7 +10,7 @@ Client client = new Client() Apps apps = new Apps(client); -AppsList result = await apps.List( +Appwrite.Models.AppsList result = await apps.List( queries: new List<string>(), // optional total: false // optional ); diff --git a/examples/2.3.x/server-dotnet/examples/apps/update-labels.md b/examples/2.3.x/server-dotnet/examples/apps/update-labels.md index 3a311d252..171321b1d 100644 --- a/examples/2.3.x/server-dotnet/examples/apps/update-labels.md +++ b/examples/2.3.x/server-dotnet/examples/apps/update-labels.md @@ -10,7 +10,7 @@ Client client = new Client() Apps apps = new Apps(client); -App result = await apps.UpdateLabels( +Appwrite.Models.App result = await apps.UpdateLabels( appId: "<APP_ID>", labels: new List<string>() ); diff --git a/examples/2.3.x/server-dotnet/examples/apps/update-team.md b/examples/2.3.x/server-dotnet/examples/apps/update-team.md index ac6fc92d7..a7e185cbd 100644 --- a/examples/2.3.x/server-dotnet/examples/apps/update-team.md +++ b/examples/2.3.x/server-dotnet/examples/apps/update-team.md @@ -10,7 +10,7 @@ Client client = new Client() Apps apps = new Apps(client); -App result = await apps.UpdateTeam( +Appwrite.Models.App result = await apps.UpdateTeam( appId: "<APP_ID>", teamId: "<TEAM_ID>" ); diff --git a/examples/2.3.x/server-dotnet/examples/apps/update.md b/examples/2.3.x/server-dotnet/examples/apps/update.md index 20de7ef0b..58d3f05e1 100644 --- a/examples/2.3.x/server-dotnet/examples/apps/update.md +++ b/examples/2.3.x/server-dotnet/examples/apps/update.md @@ -10,7 +10,7 @@ Client client = new Client() Apps apps = new Apps(client); -App result = await apps.Update( +Appwrite.Models.App result = await apps.Update( appId: "<APP_ID>", name: "<NAME>", description: "<DESCRIPTION>", // optional diff --git a/examples/2.3.x/server-dotnet/examples/avatars/delete-photo.md b/examples/2.3.x/server-dotnet/examples/avatars/delete-photo.md new file mode 100644 index 000000000..b1a7e9a34 --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/avatars/delete-photo.md @@ -0,0 +1,16 @@ +```csharp +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetSession(""); // The user session to authenticate with + +Avatars avatars = new Avatars(client); + +await avatars.DeletePhoto(); + + +``` diff --git a/examples/2.3.x/server-dotnet/examples/avatars/get-screenshot.md b/examples/2.3.x/server-dotnet/examples/avatars/get-screenshot.md index 92828bf71..24481df2a 100644 --- a/examples/2.3.x/server-dotnet/examples/avatars/get-screenshot.md +++ b/examples/2.3.x/server-dotnet/examples/avatars/get-screenshot.md @@ -13,10 +13,7 @@ Avatars avatars = new Avatars(client); byte[] result = await avatars.GetScreenshot( url: "https://example.com", - headers: new { - Authorization = "Bearer token123", - X-Custom-Header = "value" - }, // optional + headers: new { Accept-Language = "en-US,en;q=0.9" }, // optional viewportWidth: 1920, // optional viewportHeight: 1080, // optional scale: 2, // optional diff --git a/examples/2.3.x/server-dotnet/examples/avatars/update-photo.md b/examples/2.3.x/server-dotnet/examples/avatars/update-photo.md new file mode 100644 index 000000000..652d66184 --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/avatars/update-photo.md @@ -0,0 +1,17 @@ +```csharp +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetSession(""); // The user session to authenticate with + +Avatars avatars = new Avatars(client); + +Appwrite.Models.Account result = await avatars.UpdatePhoto( + file: InputFile.FromPath("./path-to-files/image.jpg") +); + +``` diff --git a/examples/2.3.x/server-dotnet/examples/backups/create-archive.md b/examples/2.3.x/server-dotnet/examples/backups/create-archive.md index 6cb210455..6d655cc40 100644 --- a/examples/2.3.x/server-dotnet/examples/backups/create-archive.md +++ b/examples/2.3.x/server-dotnet/examples/backups/create-archive.md @@ -11,7 +11,7 @@ Client client = new Client() Backups backups = new Backups(client); -BackupArchive result = await backups.CreateArchive( +Appwrite.Models.BackupArchive result = await backups.CreateArchive( services: new List<BackupServices> { BackupServices.Databases }, resourceId: "<RESOURCE_ID>" // optional ); diff --git a/examples/2.3.x/server-dotnet/examples/backups/create-policy.md b/examples/2.3.x/server-dotnet/examples/backups/create-policy.md index cee682ed9..708651cdb 100644 --- a/examples/2.3.x/server-dotnet/examples/backups/create-policy.md +++ b/examples/2.3.x/server-dotnet/examples/backups/create-policy.md @@ -11,7 +11,7 @@ Client client = new Client() Backups backups = new Backups(client); -BackupPolicy result = await backups.CreatePolicy( +Appwrite.Models.BackupPolicy result = await backups.CreatePolicy( policyId: "<POLICY_ID>", services: new List<BackupServices> { BackupServices.Databases }, retention: 1, diff --git a/examples/2.3.x/server-dotnet/examples/backups/create-restoration.md b/examples/2.3.x/server-dotnet/examples/backups/create-restoration.md index f3649c174..4fd80e471 100644 --- a/examples/2.3.x/server-dotnet/examples/backups/create-restoration.md +++ b/examples/2.3.x/server-dotnet/examples/backups/create-restoration.md @@ -11,7 +11,7 @@ Client client = new Client() Backups backups = new Backups(client); -BackupRestoration result = await backups.CreateRestoration( +Appwrite.Models.BackupRestoration result = await backups.CreateRestoration( archiveId: "<ARCHIVE_ID>", services: new List<BackupServices> { BackupServices.Databases }, newResourceId: "<NEW_RESOURCE_ID>", // optional diff --git a/examples/2.3.x/server-dotnet/examples/backups/get-archive.md b/examples/2.3.x/server-dotnet/examples/backups/get-archive.md index 15c9b83db..305887c20 100644 --- a/examples/2.3.x/server-dotnet/examples/backups/get-archive.md +++ b/examples/2.3.x/server-dotnet/examples/backups/get-archive.md @@ -10,7 +10,7 @@ Client client = new Client() Backups backups = new Backups(client); -BackupArchive result = await backups.GetArchive( +Appwrite.Models.BackupArchive result = await backups.GetArchive( archiveId: "<ARCHIVE_ID>" ); diff --git a/examples/2.3.x/server-dotnet/examples/backups/get-policy.md b/examples/2.3.x/server-dotnet/examples/backups/get-policy.md index 0fe94d970..e4867fbb8 100644 --- a/examples/2.3.x/server-dotnet/examples/backups/get-policy.md +++ b/examples/2.3.x/server-dotnet/examples/backups/get-policy.md @@ -10,7 +10,7 @@ Client client = new Client() Backups backups = new Backups(client); -BackupPolicy result = await backups.GetPolicy( +Appwrite.Models.BackupPolicy result = await backups.GetPolicy( policyId: "<POLICY_ID>" ); diff --git a/examples/2.3.x/server-dotnet/examples/backups/get-restoration.md b/examples/2.3.x/server-dotnet/examples/backups/get-restoration.md index e48d04ee1..a1fb53b10 100644 --- a/examples/2.3.x/server-dotnet/examples/backups/get-restoration.md +++ b/examples/2.3.x/server-dotnet/examples/backups/get-restoration.md @@ -10,7 +10,7 @@ Client client = new Client() Backups backups = new Backups(client); -BackupRestoration result = await backups.GetRestoration( +Appwrite.Models.BackupRestoration result = await backups.GetRestoration( restorationId: "<RESTORATION_ID>" ); diff --git a/examples/2.3.x/server-dotnet/examples/backups/list-archives.md b/examples/2.3.x/server-dotnet/examples/backups/list-archives.md index 15f69c287..5c1eebbb9 100644 --- a/examples/2.3.x/server-dotnet/examples/backups/list-archives.md +++ b/examples/2.3.x/server-dotnet/examples/backups/list-archives.md @@ -10,7 +10,7 @@ Client client = new Client() Backups backups = new Backups(client); -BackupArchiveList result = await backups.ListArchives( +Appwrite.Models.BackupArchiveList result = await backups.ListArchives( queries: new List<string>() // optional ); diff --git a/examples/2.3.x/server-dotnet/examples/backups/list-policies.md b/examples/2.3.x/server-dotnet/examples/backups/list-policies.md index f16955198..89da023f9 100644 --- a/examples/2.3.x/server-dotnet/examples/backups/list-policies.md +++ b/examples/2.3.x/server-dotnet/examples/backups/list-policies.md @@ -10,7 +10,7 @@ Client client = new Client() Backups backups = new Backups(client); -BackupPolicyList result = await backups.ListPolicies( +Appwrite.Models.BackupPolicyList result = await backups.ListPolicies( queries: new List<string>() // optional ); diff --git a/examples/2.3.x/server-dotnet/examples/backups/list-restorations.md b/examples/2.3.x/server-dotnet/examples/backups/list-restorations.md index ee286a753..a579a1fba 100644 --- a/examples/2.3.x/server-dotnet/examples/backups/list-restorations.md +++ b/examples/2.3.x/server-dotnet/examples/backups/list-restorations.md @@ -10,7 +10,7 @@ Client client = new Client() Backups backups = new Backups(client); -BackupRestorationList result = await backups.ListRestorations( +Appwrite.Models.BackupRestorationList result = await backups.ListRestorations( queries: new List<string>() // optional ); diff --git a/examples/2.3.x/server-dotnet/examples/backups/update-policy.md b/examples/2.3.x/server-dotnet/examples/backups/update-policy.md index 93d1233b0..abce40132 100644 --- a/examples/2.3.x/server-dotnet/examples/backups/update-policy.md +++ b/examples/2.3.x/server-dotnet/examples/backups/update-policy.md @@ -10,7 +10,7 @@ Client client = new Client() Backups backups = new Backups(client); -BackupPolicy result = await backups.UpdatePolicy( +Appwrite.Models.BackupPolicy result = await backups.UpdatePolicy( policyId: "<POLICY_ID>", name: "<NAME>", // optional retention: 1, // optional diff --git a/examples/2.3.x/server-dotnet/examples/databases/create-big-int-attribute.md b/examples/2.3.x/server-dotnet/examples/databases/create-big-int-attribute.md index db06ba5d1..4ab2421e7 100644 --- a/examples/2.3.x/server-dotnet/examples/databases/create-big-int-attribute.md +++ b/examples/2.3.x/server-dotnet/examples/databases/create-big-int-attribute.md @@ -10,7 +10,7 @@ Client client = new Client() Databases databases = new Databases(client); -AttributeBigint result = await databases.CreateBigIntAttribute( +Appwrite.Models.AttributeBigint result = await databases.CreateBigIntAttribute( databaseId: "<DATABASE_ID>", collectionId: "<COLLECTION_ID>", key: "<KEY>", diff --git a/examples/2.3.x/server-dotnet/examples/databases/create-boolean-attribute.md b/examples/2.3.x/server-dotnet/examples/databases/create-boolean-attribute.md index ba2df46c6..6354c2ff4 100644 --- a/examples/2.3.x/server-dotnet/examples/databases/create-boolean-attribute.md +++ b/examples/2.3.x/server-dotnet/examples/databases/create-boolean-attribute.md @@ -10,7 +10,7 @@ Client client = new Client() Databases databases = new Databases(client); -AttributeBoolean result = await databases.CreateBooleanAttribute( +Appwrite.Models.AttributeBoolean result = await databases.CreateBooleanAttribute( databaseId: "<DATABASE_ID>", collectionId: "<COLLECTION_ID>", key: "<KEY>", diff --git a/examples/2.3.x/server-dotnet/examples/databases/create-collection.md b/examples/2.3.x/server-dotnet/examples/databases/create-collection.md index 8fbf9538e..7ffe46bb4 100644 --- a/examples/2.3.x/server-dotnet/examples/databases/create-collection.md +++ b/examples/2.3.x/server-dotnet/examples/databases/create-collection.md @@ -10,7 +10,7 @@ Client client = new Client() Databases databases = new Databases(client); -Collection result = await databases.CreateCollection( +Appwrite.Models.Collection result = await databases.CreateCollection( databaseId: "<DATABASE_ID>", collectionId: "<COLLECTION_ID>", name: "<NAME>", diff --git a/examples/2.3.x/server-dotnet/examples/databases/create-datetime-attribute.md b/examples/2.3.x/server-dotnet/examples/databases/create-datetime-attribute.md index f9248808b..67aba7693 100644 --- a/examples/2.3.x/server-dotnet/examples/databases/create-datetime-attribute.md +++ b/examples/2.3.x/server-dotnet/examples/databases/create-datetime-attribute.md @@ -10,7 +10,7 @@ Client client = new Client() Databases databases = new Databases(client); -AttributeDatetime result = await databases.CreateDatetimeAttribute( +Appwrite.Models.AttributeDatetime result = await databases.CreateDatetimeAttribute( databaseId: "<DATABASE_ID>", collectionId: "<COLLECTION_ID>", key: "<KEY>", diff --git a/examples/2.3.x/server-dotnet/examples/databases/create-document.md b/examples/2.3.x/server-dotnet/examples/databases/create-document.md index 54730c8d0..6c65cedbc 100644 --- a/examples/2.3.x/server-dotnet/examples/databases/create-document.md +++ b/examples/2.3.x/server-dotnet/examples/databases/create-document.md @@ -10,7 +10,7 @@ Client client = new Client() Databases databases = new Databases(client); -Document result = await databases.CreateDocument( +Appwrite.Models.Document result = await databases.CreateDocument( databaseId: "<DATABASE_ID>", collectionId: "<COLLECTION_ID>", documentId: "<DOCUMENT_ID>", diff --git a/examples/2.3.x/server-dotnet/examples/databases/create-documents.md b/examples/2.3.x/server-dotnet/examples/databases/create-documents.md index e490a0b89..6f278379f 100644 --- a/examples/2.3.x/server-dotnet/examples/databases/create-documents.md +++ b/examples/2.3.x/server-dotnet/examples/databases/create-documents.md @@ -10,10 +10,19 @@ Client client = new Client() Databases databases = new Databases(client); -DocumentList result = await databases.CreateDocuments( +Appwrite.Models.DocumentList result = await databases.CreateDocuments( databaseId: "<DATABASE_ID>", collectionId: "<COLLECTION_ID>", - documents: new List<object>(), + documents: [ + { + "$id": "example1", + "username": "walter.obrien", + "email": "walter.obrien@example.com", + "fullName": "Walter O'Brien", + "age": 30, + "isAdmin": false + } + ], transactionId: "<TRANSACTION_ID>" // optional ); diff --git a/examples/2.3.x/server-dotnet/examples/databases/create-email-attribute.md b/examples/2.3.x/server-dotnet/examples/databases/create-email-attribute.md index 94757f049..ef068ae83 100644 --- a/examples/2.3.x/server-dotnet/examples/databases/create-email-attribute.md +++ b/examples/2.3.x/server-dotnet/examples/databases/create-email-attribute.md @@ -10,7 +10,7 @@ Client client = new Client() Databases databases = new Databases(client); -AttributeEmail result = await databases.CreateEmailAttribute( +Appwrite.Models.AttributeEmail result = await databases.CreateEmailAttribute( databaseId: "<DATABASE_ID>", collectionId: "<COLLECTION_ID>", key: "<KEY>", diff --git a/examples/2.3.x/server-dotnet/examples/databases/create-enum-attribute.md b/examples/2.3.x/server-dotnet/examples/databases/create-enum-attribute.md index d66cb3ac8..bb7d6ce70 100644 --- a/examples/2.3.x/server-dotnet/examples/databases/create-enum-attribute.md +++ b/examples/2.3.x/server-dotnet/examples/databases/create-enum-attribute.md @@ -10,7 +10,7 @@ Client client = new Client() Databases databases = new Databases(client); -AttributeEnum result = await databases.CreateEnumAttribute( +Appwrite.Models.AttributeEnum result = await databases.CreateEnumAttribute( databaseId: "<DATABASE_ID>", collectionId: "<COLLECTION_ID>", key: "<KEY>", diff --git a/examples/2.3.x/server-dotnet/examples/databases/create-float-attribute.md b/examples/2.3.x/server-dotnet/examples/databases/create-float-attribute.md index 26fb95a76..22f21b62d 100644 --- a/examples/2.3.x/server-dotnet/examples/databases/create-float-attribute.md +++ b/examples/2.3.x/server-dotnet/examples/databases/create-float-attribute.md @@ -10,7 +10,7 @@ Client client = new Client() Databases databases = new Databases(client); -AttributeFloat result = await databases.CreateFloatAttribute( +Appwrite.Models.AttributeFloat result = await databases.CreateFloatAttribute( databaseId: "<DATABASE_ID>", collectionId: "<COLLECTION_ID>", key: "<KEY>", diff --git a/examples/2.3.x/server-dotnet/examples/databases/create-index.md b/examples/2.3.x/server-dotnet/examples/databases/create-index.md index 748394d95..95e878bca 100644 --- a/examples/2.3.x/server-dotnet/examples/databases/create-index.md +++ b/examples/2.3.x/server-dotnet/examples/databases/create-index.md @@ -11,12 +11,12 @@ Client client = new Client() Databases databases = new Databases(client); -Index result = await databases.CreateIndex( +Appwrite.Models.Index result = await databases.CreateIndex( databaseId: "<DATABASE_ID>", collectionId: "<COLLECTION_ID>", key: "<KEY>", type: DatabasesIndexType.Key, - attributes: new List<string>(), + attributes: ["username"], orders: new List<OrderBy> { OrderBy.Asc }, // optional lengths: new List<long>() // optional ); diff --git a/examples/2.3.x/server-dotnet/examples/databases/create-integer-attribute.md b/examples/2.3.x/server-dotnet/examples/databases/create-integer-attribute.md index 04678b940..1b7075297 100644 --- a/examples/2.3.x/server-dotnet/examples/databases/create-integer-attribute.md +++ b/examples/2.3.x/server-dotnet/examples/databases/create-integer-attribute.md @@ -10,7 +10,7 @@ Client client = new Client() Databases databases = new Databases(client); -AttributeInteger result = await databases.CreateIntegerAttribute( +Appwrite.Models.AttributeInteger result = await databases.CreateIntegerAttribute( databaseId: "<DATABASE_ID>", collectionId: "<COLLECTION_ID>", key: "<KEY>", diff --git a/examples/2.3.x/server-dotnet/examples/databases/create-ip-attribute.md b/examples/2.3.x/server-dotnet/examples/databases/create-ip-attribute.md index b5de19bed..7a1b824bc 100644 --- a/examples/2.3.x/server-dotnet/examples/databases/create-ip-attribute.md +++ b/examples/2.3.x/server-dotnet/examples/databases/create-ip-attribute.md @@ -10,7 +10,7 @@ Client client = new Client() Databases databases = new Databases(client); -AttributeIp result = await databases.CreateIpAttribute( +Appwrite.Models.AttributeIp result = await databases.CreateIpAttribute( databaseId: "<DATABASE_ID>", collectionId: "<COLLECTION_ID>", key: "<KEY>", diff --git a/examples/2.3.x/server-dotnet/examples/databases/create-line-attribute.md b/examples/2.3.x/server-dotnet/examples/databases/create-line-attribute.md index 53f1ada4b..21931af33 100644 --- a/examples/2.3.x/server-dotnet/examples/databases/create-line-attribute.md +++ b/examples/2.3.x/server-dotnet/examples/databases/create-line-attribute.md @@ -10,7 +10,7 @@ Client client = new Client() Databases databases = new Databases(client); -AttributeLine result = await databases.CreateLineAttribute( +Appwrite.Models.AttributeLine result = await databases.CreateLineAttribute( databaseId: "<DATABASE_ID>", collectionId: "<COLLECTION_ID>", key: "<KEY>", diff --git a/examples/2.3.x/server-dotnet/examples/databases/create-longtext-attribute.md b/examples/2.3.x/server-dotnet/examples/databases/create-longtext-attribute.md index 3bf127aa4..a75a41c02 100644 --- a/examples/2.3.x/server-dotnet/examples/databases/create-longtext-attribute.md +++ b/examples/2.3.x/server-dotnet/examples/databases/create-longtext-attribute.md @@ -10,7 +10,7 @@ Client client = new Client() Databases databases = new Databases(client); -AttributeLongtext result = await databases.CreateLongtextAttribute( +Appwrite.Models.AttributeLongtext result = await databases.CreateLongtextAttribute( databaseId: "<DATABASE_ID>", collectionId: "<COLLECTION_ID>", key: "<KEY>", diff --git a/examples/2.3.x/server-dotnet/examples/databases/create-mediumtext-attribute.md b/examples/2.3.x/server-dotnet/examples/databases/create-mediumtext-attribute.md index 2e758f7bd..4e176ac6e 100644 --- a/examples/2.3.x/server-dotnet/examples/databases/create-mediumtext-attribute.md +++ b/examples/2.3.x/server-dotnet/examples/databases/create-mediumtext-attribute.md @@ -10,7 +10,7 @@ Client client = new Client() Databases databases = new Databases(client); -AttributeMediumtext result = await databases.CreateMediumtextAttribute( +Appwrite.Models.AttributeMediumtext result = await databases.CreateMediumtextAttribute( databaseId: "<DATABASE_ID>", collectionId: "<COLLECTION_ID>", key: "<KEY>", diff --git a/examples/2.3.x/server-dotnet/examples/databases/create-operations.md b/examples/2.3.x/server-dotnet/examples/databases/create-operations.md index 7b1501942..bc7204771 100644 --- a/examples/2.3.x/server-dotnet/examples/databases/create-operations.md +++ b/examples/2.3.x/server-dotnet/examples/databases/create-operations.md @@ -10,7 +10,7 @@ Client client = new Client() Databases databases = new Databases(client); -Transaction result = await databases.CreateOperations( +Appwrite.Models.Transaction result = await databases.CreateOperations( transactionId: "<TRANSACTION_ID>", operations: [ { diff --git a/examples/2.3.x/server-dotnet/examples/databases/create-point-attribute.md b/examples/2.3.x/server-dotnet/examples/databases/create-point-attribute.md index a08e2b9a6..16c7e2344 100644 --- a/examples/2.3.x/server-dotnet/examples/databases/create-point-attribute.md +++ b/examples/2.3.x/server-dotnet/examples/databases/create-point-attribute.md @@ -10,7 +10,7 @@ Client client = new Client() Databases databases = new Databases(client); -AttributePoint result = await databases.CreatePointAttribute( +Appwrite.Models.AttributePoint result = await databases.CreatePointAttribute( databaseId: "<DATABASE_ID>", collectionId: "<COLLECTION_ID>", key: "<KEY>", diff --git a/examples/2.3.x/server-dotnet/examples/databases/create-polygon-attribute.md b/examples/2.3.x/server-dotnet/examples/databases/create-polygon-attribute.md index 917a45c98..f2ba53f1c 100644 --- a/examples/2.3.x/server-dotnet/examples/databases/create-polygon-attribute.md +++ b/examples/2.3.x/server-dotnet/examples/databases/create-polygon-attribute.md @@ -10,7 +10,7 @@ Client client = new Client() Databases databases = new Databases(client); -AttributePolygon result = await databases.CreatePolygonAttribute( +Appwrite.Models.AttributePolygon result = await databases.CreatePolygonAttribute( databaseId: "<DATABASE_ID>", collectionId: "<COLLECTION_ID>", key: "<KEY>", diff --git a/examples/2.3.x/server-dotnet/examples/databases/create-relationship-attribute.md b/examples/2.3.x/server-dotnet/examples/databases/create-relationship-attribute.md index 6f8ac6211..202e2bec4 100644 --- a/examples/2.3.x/server-dotnet/examples/databases/create-relationship-attribute.md +++ b/examples/2.3.x/server-dotnet/examples/databases/create-relationship-attribute.md @@ -11,7 +11,7 @@ Client client = new Client() Databases databases = new Databases(client); -AttributeRelationship result = await databases.CreateRelationshipAttribute( +Appwrite.Models.AttributeRelationship result = await databases.CreateRelationshipAttribute( databaseId: "<DATABASE_ID>", collectionId: "<COLLECTION_ID>", relatedCollectionId: "<RELATED_COLLECTION_ID>", diff --git a/examples/2.3.x/server-dotnet/examples/databases/create-string-attribute.md b/examples/2.3.x/server-dotnet/examples/databases/create-string-attribute.md index ea547aaa6..b11b5e474 100644 --- a/examples/2.3.x/server-dotnet/examples/databases/create-string-attribute.md +++ b/examples/2.3.x/server-dotnet/examples/databases/create-string-attribute.md @@ -10,7 +10,7 @@ Client client = new Client() Databases databases = new Databases(client); -AttributeString result = await databases.CreateStringAttribute( +Appwrite.Models.AttributeString result = await databases.CreateStringAttribute( databaseId: "<DATABASE_ID>", collectionId: "<COLLECTION_ID>", key: "<KEY>", diff --git a/examples/2.3.x/server-dotnet/examples/databases/create-text-attribute.md b/examples/2.3.x/server-dotnet/examples/databases/create-text-attribute.md index dd6fe3cb1..0f8790a42 100644 --- a/examples/2.3.x/server-dotnet/examples/databases/create-text-attribute.md +++ b/examples/2.3.x/server-dotnet/examples/databases/create-text-attribute.md @@ -10,7 +10,7 @@ Client client = new Client() Databases databases = new Databases(client); -AttributeText result = await databases.CreateTextAttribute( +Appwrite.Models.AttributeText result = await databases.CreateTextAttribute( databaseId: "<DATABASE_ID>", collectionId: "<COLLECTION_ID>", key: "<KEY>", diff --git a/examples/2.3.x/server-dotnet/examples/databases/create-transaction.md b/examples/2.3.x/server-dotnet/examples/databases/create-transaction.md index 29b18cd4b..592acce76 100644 --- a/examples/2.3.x/server-dotnet/examples/databases/create-transaction.md +++ b/examples/2.3.x/server-dotnet/examples/databases/create-transaction.md @@ -10,7 +10,7 @@ Client client = new Client() Databases databases = new Databases(client); -Transaction result = await databases.CreateTransaction( +Appwrite.Models.Transaction result = await databases.CreateTransaction( ttl: 60 // optional ); diff --git a/examples/2.3.x/server-dotnet/examples/databases/create-url-attribute.md b/examples/2.3.x/server-dotnet/examples/databases/create-url-attribute.md index dd0e356b9..a830e411b 100644 --- a/examples/2.3.x/server-dotnet/examples/databases/create-url-attribute.md +++ b/examples/2.3.x/server-dotnet/examples/databases/create-url-attribute.md @@ -10,7 +10,7 @@ Client client = new Client() Databases databases = new Databases(client); -AttributeUrl result = await databases.CreateUrlAttribute( +Appwrite.Models.AttributeUrl result = await databases.CreateUrlAttribute( databaseId: "<DATABASE_ID>", collectionId: "<COLLECTION_ID>", key: "<KEY>", diff --git a/examples/2.3.x/server-dotnet/examples/databases/create-varchar-attribute.md b/examples/2.3.x/server-dotnet/examples/databases/create-varchar-attribute.md index 4c3f3a1e5..85576fa4e 100644 --- a/examples/2.3.x/server-dotnet/examples/databases/create-varchar-attribute.md +++ b/examples/2.3.x/server-dotnet/examples/databases/create-varchar-attribute.md @@ -10,7 +10,7 @@ Client client = new Client() Databases databases = new Databases(client); -AttributeVarchar result = await databases.CreateVarcharAttribute( +Appwrite.Models.AttributeVarchar result = await databases.CreateVarcharAttribute( databaseId: "<DATABASE_ID>", collectionId: "<COLLECTION_ID>", key: "<KEY>", diff --git a/examples/2.3.x/server-dotnet/examples/databases/create.md b/examples/2.3.x/server-dotnet/examples/databases/create.md index 6d0a504c8..4e80d1a51 100644 --- a/examples/2.3.x/server-dotnet/examples/databases/create.md +++ b/examples/2.3.x/server-dotnet/examples/databases/create.md @@ -10,7 +10,7 @@ Client client = new Client() Databases databases = new Databases(client); -Database result = await databases.Create( +Appwrite.Models.Database result = await databases.Create( databaseId: "<DATABASE_ID>", name: "<NAME>", enabled: false // optional diff --git a/examples/2.3.x/server-dotnet/examples/databases/decrement-document-attribute.md b/examples/2.3.x/server-dotnet/examples/databases/decrement-document-attribute.md index 46dd163d6..bf7ed4491 100644 --- a/examples/2.3.x/server-dotnet/examples/databases/decrement-document-attribute.md +++ b/examples/2.3.x/server-dotnet/examples/databases/decrement-document-attribute.md @@ -10,7 +10,7 @@ Client client = new Client() Databases databases = new Databases(client); -Document result = await databases.DecrementDocumentAttribute( +Appwrite.Models.Document result = await databases.DecrementDocumentAttribute( databaseId: "<DATABASE_ID>", collectionId: "<COLLECTION_ID>", documentId: "<DOCUMENT_ID>", diff --git a/examples/2.3.x/server-dotnet/examples/databases/delete-documents.md b/examples/2.3.x/server-dotnet/examples/databases/delete-documents.md index 4b14b138a..f749abe15 100644 --- a/examples/2.3.x/server-dotnet/examples/databases/delete-documents.md +++ b/examples/2.3.x/server-dotnet/examples/databases/delete-documents.md @@ -13,7 +13,7 @@ Databases databases = new Databases(client); await databases.DeleteDocuments( databaseId: "<DATABASE_ID>", collectionId: "<COLLECTION_ID>", - queries: new List<string>(), // optional + queries: ["{\"method\":\"equal\", \"attribute\":\"$id\", \"values\":[\"<DOCUMENT_ID>\"]}"], // optional transactionId: "<TRANSACTION_ID>" // optional ); diff --git a/examples/2.3.x/server-dotnet/examples/databases/get-collection.md b/examples/2.3.x/server-dotnet/examples/databases/get-collection.md index 0798f68e5..36c364766 100644 --- a/examples/2.3.x/server-dotnet/examples/databases/get-collection.md +++ b/examples/2.3.x/server-dotnet/examples/databases/get-collection.md @@ -10,7 +10,7 @@ Client client = new Client() Databases databases = new Databases(client); -Collection result = await databases.GetCollection( +Appwrite.Models.Collection result = await databases.GetCollection( databaseId: "<DATABASE_ID>", collectionId: "<COLLECTION_ID>" ); diff --git a/examples/2.3.x/server-dotnet/examples/databases/get-document.md b/examples/2.3.x/server-dotnet/examples/databases/get-document.md index 102cbb5b4..70625ad68 100644 --- a/examples/2.3.x/server-dotnet/examples/databases/get-document.md +++ b/examples/2.3.x/server-dotnet/examples/databases/get-document.md @@ -10,7 +10,7 @@ Client client = new Client() Databases databases = new Databases(client); -Document result = await databases.GetDocument( +Appwrite.Models.Document result = await databases.GetDocument( databaseId: "<DATABASE_ID>", collectionId: "<COLLECTION_ID>", documentId: "<DOCUMENT_ID>", diff --git a/examples/2.3.x/server-dotnet/examples/databases/get-index.md b/examples/2.3.x/server-dotnet/examples/databases/get-index.md index ad06f1fb3..b9f268698 100644 --- a/examples/2.3.x/server-dotnet/examples/databases/get-index.md +++ b/examples/2.3.x/server-dotnet/examples/databases/get-index.md @@ -10,7 +10,7 @@ Client client = new Client() Databases databases = new Databases(client); -Index result = await databases.GetIndex( +Appwrite.Models.Index result = await databases.GetIndex( databaseId: "<DATABASE_ID>", collectionId: "<COLLECTION_ID>", key: "<KEY>" diff --git a/examples/2.3.x/server-dotnet/examples/databases/get-transaction.md b/examples/2.3.x/server-dotnet/examples/databases/get-transaction.md index fe449961f..f6e28c44b 100644 --- a/examples/2.3.x/server-dotnet/examples/databases/get-transaction.md +++ b/examples/2.3.x/server-dotnet/examples/databases/get-transaction.md @@ -10,7 +10,7 @@ Client client = new Client() Databases databases = new Databases(client); -Transaction result = await databases.GetTransaction( +Appwrite.Models.Transaction result = await databases.GetTransaction( transactionId: "<TRANSACTION_ID>" ); diff --git a/examples/2.3.x/server-dotnet/examples/databases/get.md b/examples/2.3.x/server-dotnet/examples/databases/get.md index 91d9a0ec1..454b1a0f0 100644 --- a/examples/2.3.x/server-dotnet/examples/databases/get.md +++ b/examples/2.3.x/server-dotnet/examples/databases/get.md @@ -10,7 +10,7 @@ Client client = new Client() Databases databases = new Databases(client); -Database result = await databases.Get( +Appwrite.Models.Database result = await databases.Get( databaseId: "<DATABASE_ID>" ); diff --git a/examples/2.3.x/server-dotnet/examples/databases/increment-document-attribute.md b/examples/2.3.x/server-dotnet/examples/databases/increment-document-attribute.md index 230784d7f..7df9b120b 100644 --- a/examples/2.3.x/server-dotnet/examples/databases/increment-document-attribute.md +++ b/examples/2.3.x/server-dotnet/examples/databases/increment-document-attribute.md @@ -10,7 +10,7 @@ Client client = new Client() Databases databases = new Databases(client); -Document result = await databases.IncrementDocumentAttribute( +Appwrite.Models.Document result = await databases.IncrementDocumentAttribute( databaseId: "<DATABASE_ID>", collectionId: "<COLLECTION_ID>", documentId: "<DOCUMENT_ID>", diff --git a/examples/2.3.x/server-dotnet/examples/databases/list-attributes.md b/examples/2.3.x/server-dotnet/examples/databases/list-attributes.md index ff57878ce..f704a63a6 100644 --- a/examples/2.3.x/server-dotnet/examples/databases/list-attributes.md +++ b/examples/2.3.x/server-dotnet/examples/databases/list-attributes.md @@ -10,7 +10,7 @@ Client client = new Client() Databases databases = new Databases(client); -AttributeList result = await databases.ListAttributes( +Appwrite.Models.AttributeList result = await databases.ListAttributes( databaseId: "<DATABASE_ID>", collectionId: "<COLLECTION_ID>", queries: new List<string>(), // optional diff --git a/examples/2.3.x/server-dotnet/examples/databases/list-collections.md b/examples/2.3.x/server-dotnet/examples/databases/list-collections.md index ed856f6eb..3b44d07ea 100644 --- a/examples/2.3.x/server-dotnet/examples/databases/list-collections.md +++ b/examples/2.3.x/server-dotnet/examples/databases/list-collections.md @@ -10,7 +10,7 @@ Client client = new Client() Databases databases = new Databases(client); -CollectionList result = await databases.ListCollections( +Appwrite.Models.CollectionList result = await databases.ListCollections( databaseId: "<DATABASE_ID>", queries: new List<string>(), // optional search: "<SEARCH>", // optional diff --git a/examples/2.3.x/server-dotnet/examples/databases/list-documents.md b/examples/2.3.x/server-dotnet/examples/databases/list-documents.md index d8cdff0ab..414789aa4 100644 --- a/examples/2.3.x/server-dotnet/examples/databases/list-documents.md +++ b/examples/2.3.x/server-dotnet/examples/databases/list-documents.md @@ -10,7 +10,7 @@ Client client = new Client() Databases databases = new Databases(client); -DocumentList result = await databases.ListDocuments( +Appwrite.Models.DocumentList result = await databases.ListDocuments( databaseId: "<DATABASE_ID>", collectionId: "<COLLECTION_ID>", queries: new List<string>(), // optional diff --git a/examples/2.3.x/server-dotnet/examples/databases/list-indexes.md b/examples/2.3.x/server-dotnet/examples/databases/list-indexes.md index 80f4bcf2a..9eb8c0052 100644 --- a/examples/2.3.x/server-dotnet/examples/databases/list-indexes.md +++ b/examples/2.3.x/server-dotnet/examples/databases/list-indexes.md @@ -10,7 +10,7 @@ Client client = new Client() Databases databases = new Databases(client); -IndexList result = await databases.ListIndexes( +Appwrite.Models.IndexList result = await databases.ListIndexes( databaseId: "<DATABASE_ID>", collectionId: "<COLLECTION_ID>", queries: new List<string>(), // optional diff --git a/examples/2.3.x/server-dotnet/examples/databases/list-transactions.md b/examples/2.3.x/server-dotnet/examples/databases/list-transactions.md index fc1416744..c619c59d1 100644 --- a/examples/2.3.x/server-dotnet/examples/databases/list-transactions.md +++ b/examples/2.3.x/server-dotnet/examples/databases/list-transactions.md @@ -10,8 +10,9 @@ Client client = new Client() Databases databases = new Databases(client); -TransactionList result = await databases.ListTransactions( - queries: new List<string>() // optional +Appwrite.Models.TransactionList result = await databases.ListTransactions( + queries: new List<string>(), // optional + total: false // optional ); ``` diff --git a/examples/2.3.x/server-dotnet/examples/databases/list.md b/examples/2.3.x/server-dotnet/examples/databases/list.md index 57095184a..f1d94f285 100644 --- a/examples/2.3.x/server-dotnet/examples/databases/list.md +++ b/examples/2.3.x/server-dotnet/examples/databases/list.md @@ -10,7 +10,7 @@ Client client = new Client() Databases databases = new Databases(client); -DatabaseList result = await databases.List( +Appwrite.Models.DatabaseList result = await databases.List( queries: new List<string>(), // optional search: "<SEARCH>", // optional total: false // optional diff --git a/examples/2.3.x/server-dotnet/examples/databases/update-big-int-attribute.md b/examples/2.3.x/server-dotnet/examples/databases/update-big-int-attribute.md index 7fea78b58..83b16f364 100644 --- a/examples/2.3.x/server-dotnet/examples/databases/update-big-int-attribute.md +++ b/examples/2.3.x/server-dotnet/examples/databases/update-big-int-attribute.md @@ -10,7 +10,7 @@ Client client = new Client() Databases databases = new Databases(client); -AttributeBigint result = await databases.UpdateBigIntAttribute( +Appwrite.Models.AttributeBigint result = await databases.UpdateBigIntAttribute( databaseId: "<DATABASE_ID>", collectionId: "<COLLECTION_ID>", key: "<KEY>", diff --git a/examples/2.3.x/server-dotnet/examples/databases/update-boolean-attribute.md b/examples/2.3.x/server-dotnet/examples/databases/update-boolean-attribute.md index 52b0a767e..e096f73e6 100644 --- a/examples/2.3.x/server-dotnet/examples/databases/update-boolean-attribute.md +++ b/examples/2.3.x/server-dotnet/examples/databases/update-boolean-attribute.md @@ -10,7 +10,7 @@ Client client = new Client() Databases databases = new Databases(client); -AttributeBoolean result = await databases.UpdateBooleanAttribute( +Appwrite.Models.AttributeBoolean result = await databases.UpdateBooleanAttribute( databaseId: "<DATABASE_ID>", collectionId: "<COLLECTION_ID>", key: "<KEY>", diff --git a/examples/2.3.x/server-dotnet/examples/databases/update-collection.md b/examples/2.3.x/server-dotnet/examples/databases/update-collection.md index 7e3378faa..22e3bd591 100644 --- a/examples/2.3.x/server-dotnet/examples/databases/update-collection.md +++ b/examples/2.3.x/server-dotnet/examples/databases/update-collection.md @@ -10,7 +10,7 @@ Client client = new Client() Databases databases = new Databases(client); -Collection result = await databases.UpdateCollection( +Appwrite.Models.Collection result = await databases.UpdateCollection( databaseId: "<DATABASE_ID>", collectionId: "<COLLECTION_ID>", name: "<NAME>", // optional diff --git a/examples/2.3.x/server-dotnet/examples/databases/update-datetime-attribute.md b/examples/2.3.x/server-dotnet/examples/databases/update-datetime-attribute.md index 2a1df23fb..08d000f83 100644 --- a/examples/2.3.x/server-dotnet/examples/databases/update-datetime-attribute.md +++ b/examples/2.3.x/server-dotnet/examples/databases/update-datetime-attribute.md @@ -10,7 +10,7 @@ Client client = new Client() Databases databases = new Databases(client); -AttributeDatetime result = await databases.UpdateDatetimeAttribute( +Appwrite.Models.AttributeDatetime result = await databases.UpdateDatetimeAttribute( databaseId: "<DATABASE_ID>", collectionId: "<COLLECTION_ID>", key: "<KEY>", diff --git a/examples/2.3.x/server-dotnet/examples/databases/update-document.md b/examples/2.3.x/server-dotnet/examples/databases/update-document.md index e18a6ef9e..e6c44e7b9 100644 --- a/examples/2.3.x/server-dotnet/examples/databases/update-document.md +++ b/examples/2.3.x/server-dotnet/examples/databases/update-document.md @@ -10,7 +10,7 @@ Client client = new Client() Databases databases = new Databases(client); -Document result = await databases.UpdateDocument( +Appwrite.Models.Document result = await databases.UpdateDocument( databaseId: "<DATABASE_ID>", collectionId: "<COLLECTION_ID>", documentId: "<DOCUMENT_ID>", diff --git a/examples/2.3.x/server-dotnet/examples/databases/update-documents.md b/examples/2.3.x/server-dotnet/examples/databases/update-documents.md index db3133dfe..01b10915f 100644 --- a/examples/2.3.x/server-dotnet/examples/databases/update-documents.md +++ b/examples/2.3.x/server-dotnet/examples/databases/update-documents.md @@ -10,7 +10,7 @@ Client client = new Client() Databases databases = new Databases(client); -DocumentList result = await databases.UpdateDocuments( +Appwrite.Models.DocumentList result = await databases.UpdateDocuments( databaseId: "<DATABASE_ID>", collectionId: "<COLLECTION_ID>", data: new { diff --git a/examples/2.3.x/server-dotnet/examples/databases/update-email-attribute.md b/examples/2.3.x/server-dotnet/examples/databases/update-email-attribute.md index b1f0e37fa..98a5b6987 100644 --- a/examples/2.3.x/server-dotnet/examples/databases/update-email-attribute.md +++ b/examples/2.3.x/server-dotnet/examples/databases/update-email-attribute.md @@ -10,7 +10,7 @@ Client client = new Client() Databases databases = new Databases(client); -AttributeEmail result = await databases.UpdateEmailAttribute( +Appwrite.Models.AttributeEmail result = await databases.UpdateEmailAttribute( databaseId: "<DATABASE_ID>", collectionId: "<COLLECTION_ID>", key: "<KEY>", diff --git a/examples/2.3.x/server-dotnet/examples/databases/update-enum-attribute.md b/examples/2.3.x/server-dotnet/examples/databases/update-enum-attribute.md index d009b5c79..e732660db 100644 --- a/examples/2.3.x/server-dotnet/examples/databases/update-enum-attribute.md +++ b/examples/2.3.x/server-dotnet/examples/databases/update-enum-attribute.md @@ -10,7 +10,7 @@ Client client = new Client() Databases databases = new Databases(client); -AttributeEnum result = await databases.UpdateEnumAttribute( +Appwrite.Models.AttributeEnum result = await databases.UpdateEnumAttribute( databaseId: "<DATABASE_ID>", collectionId: "<COLLECTION_ID>", key: "<KEY>", diff --git a/examples/2.3.x/server-dotnet/examples/databases/update-float-attribute.md b/examples/2.3.x/server-dotnet/examples/databases/update-float-attribute.md index fd8dc4271..116e7c77f 100644 --- a/examples/2.3.x/server-dotnet/examples/databases/update-float-attribute.md +++ b/examples/2.3.x/server-dotnet/examples/databases/update-float-attribute.md @@ -10,7 +10,7 @@ Client client = new Client() Databases databases = new Databases(client); -AttributeFloat result = await databases.UpdateFloatAttribute( +Appwrite.Models.AttributeFloat result = await databases.UpdateFloatAttribute( databaseId: "<DATABASE_ID>", collectionId: "<COLLECTION_ID>", key: "<KEY>", diff --git a/examples/2.3.x/server-dotnet/examples/databases/update-integer-attribute.md b/examples/2.3.x/server-dotnet/examples/databases/update-integer-attribute.md index 17a0cc8bd..5c13aa75e 100644 --- a/examples/2.3.x/server-dotnet/examples/databases/update-integer-attribute.md +++ b/examples/2.3.x/server-dotnet/examples/databases/update-integer-attribute.md @@ -10,7 +10,7 @@ Client client = new Client() Databases databases = new Databases(client); -AttributeInteger result = await databases.UpdateIntegerAttribute( +Appwrite.Models.AttributeInteger result = await databases.UpdateIntegerAttribute( databaseId: "<DATABASE_ID>", collectionId: "<COLLECTION_ID>", key: "<KEY>", diff --git a/examples/2.3.x/server-dotnet/examples/databases/update-ip-attribute.md b/examples/2.3.x/server-dotnet/examples/databases/update-ip-attribute.md index 432bb4d43..b9c9982de 100644 --- a/examples/2.3.x/server-dotnet/examples/databases/update-ip-attribute.md +++ b/examples/2.3.x/server-dotnet/examples/databases/update-ip-attribute.md @@ -10,7 +10,7 @@ Client client = new Client() Databases databases = new Databases(client); -AttributeIp result = await databases.UpdateIpAttribute( +Appwrite.Models.AttributeIp result = await databases.UpdateIpAttribute( databaseId: "<DATABASE_ID>", collectionId: "<COLLECTION_ID>", key: "<KEY>", diff --git a/examples/2.3.x/server-dotnet/examples/databases/update-line-attribute.md b/examples/2.3.x/server-dotnet/examples/databases/update-line-attribute.md index 11dc38400..c7c40756c 100644 --- a/examples/2.3.x/server-dotnet/examples/databases/update-line-attribute.md +++ b/examples/2.3.x/server-dotnet/examples/databases/update-line-attribute.md @@ -10,7 +10,7 @@ Client client = new Client() Databases databases = new Databases(client); -AttributeLine result = await databases.UpdateLineAttribute( +Appwrite.Models.AttributeLine result = await databases.UpdateLineAttribute( databaseId: "<DATABASE_ID>", collectionId: "<COLLECTION_ID>", key: "<KEY>", diff --git a/examples/2.3.x/server-dotnet/examples/databases/update-longtext-attribute.md b/examples/2.3.x/server-dotnet/examples/databases/update-longtext-attribute.md index 2dba9171f..138dae8a7 100644 --- a/examples/2.3.x/server-dotnet/examples/databases/update-longtext-attribute.md +++ b/examples/2.3.x/server-dotnet/examples/databases/update-longtext-attribute.md @@ -10,7 +10,7 @@ Client client = new Client() Databases databases = new Databases(client); -AttributeLongtext result = await databases.UpdateLongtextAttribute( +Appwrite.Models.AttributeLongtext result = await databases.UpdateLongtextAttribute( databaseId: "<DATABASE_ID>", collectionId: "<COLLECTION_ID>", key: "<KEY>", diff --git a/examples/2.3.x/server-dotnet/examples/databases/update-mediumtext-attribute.md b/examples/2.3.x/server-dotnet/examples/databases/update-mediumtext-attribute.md index ba356254e..b8cedadf1 100644 --- a/examples/2.3.x/server-dotnet/examples/databases/update-mediumtext-attribute.md +++ b/examples/2.3.x/server-dotnet/examples/databases/update-mediumtext-attribute.md @@ -10,7 +10,7 @@ Client client = new Client() Databases databases = new Databases(client); -AttributeMediumtext result = await databases.UpdateMediumtextAttribute( +Appwrite.Models.AttributeMediumtext result = await databases.UpdateMediumtextAttribute( databaseId: "<DATABASE_ID>", collectionId: "<COLLECTION_ID>", key: "<KEY>", diff --git a/examples/2.3.x/server-dotnet/examples/databases/update-point-attribute.md b/examples/2.3.x/server-dotnet/examples/databases/update-point-attribute.md index 7bbf9fb6b..895443c3d 100644 --- a/examples/2.3.x/server-dotnet/examples/databases/update-point-attribute.md +++ b/examples/2.3.x/server-dotnet/examples/databases/update-point-attribute.md @@ -10,7 +10,7 @@ Client client = new Client() Databases databases = new Databases(client); -AttributePoint result = await databases.UpdatePointAttribute( +Appwrite.Models.AttributePoint result = await databases.UpdatePointAttribute( databaseId: "<DATABASE_ID>", collectionId: "<COLLECTION_ID>", key: "<KEY>", diff --git a/examples/2.3.x/server-dotnet/examples/databases/update-polygon-attribute.md b/examples/2.3.x/server-dotnet/examples/databases/update-polygon-attribute.md index f35fdcff3..c5fa13239 100644 --- a/examples/2.3.x/server-dotnet/examples/databases/update-polygon-attribute.md +++ b/examples/2.3.x/server-dotnet/examples/databases/update-polygon-attribute.md @@ -10,7 +10,7 @@ Client client = new Client() Databases databases = new Databases(client); -AttributePolygon result = await databases.UpdatePolygonAttribute( +Appwrite.Models.AttributePolygon result = await databases.UpdatePolygonAttribute( databaseId: "<DATABASE_ID>", collectionId: "<COLLECTION_ID>", key: "<KEY>", diff --git a/examples/2.3.x/server-dotnet/examples/databases/update-relationship-attribute.md b/examples/2.3.x/server-dotnet/examples/databases/update-relationship-attribute.md index aa7fd0308..c3d5cded0 100644 --- a/examples/2.3.x/server-dotnet/examples/databases/update-relationship-attribute.md +++ b/examples/2.3.x/server-dotnet/examples/databases/update-relationship-attribute.md @@ -11,7 +11,7 @@ Client client = new Client() Databases databases = new Databases(client); -AttributeRelationship result = await databases.UpdateRelationshipAttribute( +Appwrite.Models.AttributeRelationship result = await databases.UpdateRelationshipAttribute( databaseId: "<DATABASE_ID>", collectionId: "<COLLECTION_ID>", key: "<KEY>", diff --git a/examples/2.3.x/server-dotnet/examples/databases/update-string-attribute.md b/examples/2.3.x/server-dotnet/examples/databases/update-string-attribute.md index 00bf4aed6..d683be9f9 100644 --- a/examples/2.3.x/server-dotnet/examples/databases/update-string-attribute.md +++ b/examples/2.3.x/server-dotnet/examples/databases/update-string-attribute.md @@ -10,7 +10,7 @@ Client client = new Client() Databases databases = new Databases(client); -AttributeString result = await databases.UpdateStringAttribute( +Appwrite.Models.AttributeString result = await databases.UpdateStringAttribute( databaseId: "<DATABASE_ID>", collectionId: "<COLLECTION_ID>", key: "<KEY>", diff --git a/examples/2.3.x/server-dotnet/examples/databases/update-text-attribute.md b/examples/2.3.x/server-dotnet/examples/databases/update-text-attribute.md index e041f96e0..1c6861ac7 100644 --- a/examples/2.3.x/server-dotnet/examples/databases/update-text-attribute.md +++ b/examples/2.3.x/server-dotnet/examples/databases/update-text-attribute.md @@ -10,7 +10,7 @@ Client client = new Client() Databases databases = new Databases(client); -AttributeText result = await databases.UpdateTextAttribute( +Appwrite.Models.AttributeText result = await databases.UpdateTextAttribute( databaseId: "<DATABASE_ID>", collectionId: "<COLLECTION_ID>", key: "<KEY>", diff --git a/examples/2.3.x/server-dotnet/examples/databases/update-transaction.md b/examples/2.3.x/server-dotnet/examples/databases/update-transaction.md index b30589352..8ababfa13 100644 --- a/examples/2.3.x/server-dotnet/examples/databases/update-transaction.md +++ b/examples/2.3.x/server-dotnet/examples/databases/update-transaction.md @@ -10,7 +10,7 @@ Client client = new Client() Databases databases = new Databases(client); -Transaction result = await databases.UpdateTransaction( +Appwrite.Models.Transaction result = await databases.UpdateTransaction( transactionId: "<TRANSACTION_ID>", commit: false, // optional rollback: false // optional diff --git a/examples/2.3.x/server-dotnet/examples/databases/update-url-attribute.md b/examples/2.3.x/server-dotnet/examples/databases/update-url-attribute.md index 4beafd13a..07ae4efdc 100644 --- a/examples/2.3.x/server-dotnet/examples/databases/update-url-attribute.md +++ b/examples/2.3.x/server-dotnet/examples/databases/update-url-attribute.md @@ -10,7 +10,7 @@ Client client = new Client() Databases databases = new Databases(client); -AttributeUrl result = await databases.UpdateUrlAttribute( +Appwrite.Models.AttributeUrl result = await databases.UpdateUrlAttribute( databaseId: "<DATABASE_ID>", collectionId: "<COLLECTION_ID>", key: "<KEY>", diff --git a/examples/2.3.x/server-dotnet/examples/databases/update-varchar-attribute.md b/examples/2.3.x/server-dotnet/examples/databases/update-varchar-attribute.md index 2d7215129..87b8955f9 100644 --- a/examples/2.3.x/server-dotnet/examples/databases/update-varchar-attribute.md +++ b/examples/2.3.x/server-dotnet/examples/databases/update-varchar-attribute.md @@ -10,7 +10,7 @@ Client client = new Client() Databases databases = new Databases(client); -AttributeVarchar result = await databases.UpdateVarcharAttribute( +Appwrite.Models.AttributeVarchar result = await databases.UpdateVarcharAttribute( databaseId: "<DATABASE_ID>", collectionId: "<COLLECTION_ID>", key: "<KEY>", diff --git a/examples/2.3.x/server-dotnet/examples/databases/update.md b/examples/2.3.x/server-dotnet/examples/databases/update.md index 1439c1cea..33831f359 100644 --- a/examples/2.3.x/server-dotnet/examples/databases/update.md +++ b/examples/2.3.x/server-dotnet/examples/databases/update.md @@ -10,7 +10,7 @@ Client client = new Client() Databases databases = new Databases(client); -Database result = await databases.Update( +Appwrite.Models.Database result = await databases.Update( databaseId: "<DATABASE_ID>", name: "<NAME>", // optional enabled: false // optional diff --git a/examples/2.3.x/server-dotnet/examples/databases/upsert-document.md b/examples/2.3.x/server-dotnet/examples/databases/upsert-document.md index 3eff270e4..31cd45806 100644 --- a/examples/2.3.x/server-dotnet/examples/databases/upsert-document.md +++ b/examples/2.3.x/server-dotnet/examples/databases/upsert-document.md @@ -10,7 +10,7 @@ Client client = new Client() Databases databases = new Databases(client); -Document result = await databases.UpsertDocument( +Appwrite.Models.Document result = await databases.UpsertDocument( databaseId: "<DATABASE_ID>", collectionId: "<COLLECTION_ID>", documentId: "<DOCUMENT_ID>", diff --git a/examples/2.3.x/server-dotnet/examples/databases/upsert-documents.md b/examples/2.3.x/server-dotnet/examples/databases/upsert-documents.md index d22184b8f..58b9e62da 100644 --- a/examples/2.3.x/server-dotnet/examples/databases/upsert-documents.md +++ b/examples/2.3.x/server-dotnet/examples/databases/upsert-documents.md @@ -10,10 +10,19 @@ Client client = new Client() Databases databases = new Databases(client); -DocumentList result = await databases.UpsertDocuments( +Appwrite.Models.DocumentList result = await databases.UpsertDocuments( databaseId: "<DATABASE_ID>", collectionId: "<COLLECTION_ID>", - documents: new List<object>(), + documents: [ + { + "$id": "example1", + "username": "walter.obrien", + "email": "walter.obrien@example.com", + "fullName": "Walter O'Brien", + "age": 30, + "isAdmin": false + } + ], transactionId: "<TRANSACTION_ID>" // optional ); diff --git a/examples/2.3.x/server-dotnet/examples/documentsdb/create-collection.md b/examples/2.3.x/server-dotnet/examples/documentsdb/create-collection.md index 5c42dc563..42dba6f60 100644 --- a/examples/2.3.x/server-dotnet/examples/documentsdb/create-collection.md +++ b/examples/2.3.x/server-dotnet/examples/documentsdb/create-collection.md @@ -10,7 +10,7 @@ Client client = new Client() DocumentsDB documentsDB = new DocumentsDB(client); -Collection result = await documentsDB.CreateCollection( +Appwrite.Models.Collection result = await documentsDB.CreateCollection( databaseId: "<DATABASE_ID>", collectionId: "<COLLECTION_ID>", name: "<NAME>", diff --git a/examples/2.3.x/server-dotnet/examples/documentsdb/create-document.md b/examples/2.3.x/server-dotnet/examples/documentsdb/create-document.md index ccc8bc36b..ce6b3921d 100644 --- a/examples/2.3.x/server-dotnet/examples/documentsdb/create-document.md +++ b/examples/2.3.x/server-dotnet/examples/documentsdb/create-document.md @@ -10,7 +10,7 @@ Client client = new Client() DocumentsDB documentsDB = new DocumentsDB(client); -Document result = await documentsDB.CreateDocument( +Appwrite.Models.Document result = await documentsDB.CreateDocument( databaseId: "<DATABASE_ID>", collectionId: "<COLLECTION_ID>", documentId: "<DOCUMENT_ID>", diff --git a/examples/2.3.x/server-dotnet/examples/documentsdb/create-documents.md b/examples/2.3.x/server-dotnet/examples/documentsdb/create-documents.md index 6b98311b0..aa2ec5778 100644 --- a/examples/2.3.x/server-dotnet/examples/documentsdb/create-documents.md +++ b/examples/2.3.x/server-dotnet/examples/documentsdb/create-documents.md @@ -10,10 +10,19 @@ Client client = new Client() DocumentsDB documentsDB = new DocumentsDB(client); -DocumentList result = await documentsDB.CreateDocuments( +Appwrite.Models.DocumentList result = await documentsDB.CreateDocuments( databaseId: "<DATABASE_ID>", collectionId: "<COLLECTION_ID>", - documents: new List<object>(), + documents: [ + { + "$id": "example1", + "username": "walter.obrien", + "email": "walter.obrien@example.com", + "fullName": "Walter O'Brien", + "age": 30, + "isAdmin": false + } + ], transactionId: "<TRANSACTION_ID>" // optional ); diff --git a/examples/2.3.x/server-dotnet/examples/documentsdb/create-failover.md b/examples/2.3.x/server-dotnet/examples/documentsdb/create-failover.md index 5a22d1c77..2d0b75c4b 100644 --- a/examples/2.3.x/server-dotnet/examples/documentsdb/create-failover.md +++ b/examples/2.3.x/server-dotnet/examples/documentsdb/create-failover.md @@ -10,7 +10,7 @@ Client client = new Client() DocumentsDB documentsDB = new DocumentsDB(client); -DedicatedDatabase result = await documentsDB.CreateFailover( +Appwrite.Models.DedicatedDatabase result = await documentsDB.CreateFailover( databaseId: "<DATABASE_ID>", targetReplicaId: "<TARGET_REPLICA_ID>" // optional ); diff --git a/examples/2.3.x/server-dotnet/examples/documentsdb/create-index.md b/examples/2.3.x/server-dotnet/examples/documentsdb/create-index.md index 31a062921..c24bd4d01 100644 --- a/examples/2.3.x/server-dotnet/examples/documentsdb/create-index.md +++ b/examples/2.3.x/server-dotnet/examples/documentsdb/create-index.md @@ -11,12 +11,12 @@ Client client = new Client() DocumentsDB documentsDB = new DocumentsDB(client); -Index result = await documentsDB.CreateIndex( +Appwrite.Models.Index result = await documentsDB.CreateIndex( databaseId: "<DATABASE_ID>", collectionId: "<COLLECTION_ID>", key: "<KEY>", type: DocumentsDBIndexType.Key, - attributes: new List<string>(), + attributes: ["username"], orders: new List<OrderBy> { OrderBy.Asc }, // optional lengths: new List<long>() // optional ); diff --git a/examples/2.3.x/server-dotnet/examples/documentsdb/create-operations.md b/examples/2.3.x/server-dotnet/examples/documentsdb/create-operations.md index abe507f31..ca9d74d7a 100644 --- a/examples/2.3.x/server-dotnet/examples/documentsdb/create-operations.md +++ b/examples/2.3.x/server-dotnet/examples/documentsdb/create-operations.md @@ -10,7 +10,7 @@ Client client = new Client() DocumentsDB documentsDB = new DocumentsDB(client); -Transaction result = await documentsDB.CreateOperations( +Appwrite.Models.Transaction result = await documentsDB.CreateOperations( transactionId: "<TRANSACTION_ID>", operations: [ { diff --git a/examples/2.3.x/server-dotnet/examples/documentsdb/create-transaction.md b/examples/2.3.x/server-dotnet/examples/documentsdb/create-transaction.md index a948934b1..8d8c15764 100644 --- a/examples/2.3.x/server-dotnet/examples/documentsdb/create-transaction.md +++ b/examples/2.3.x/server-dotnet/examples/documentsdb/create-transaction.md @@ -10,7 +10,7 @@ Client client = new Client() DocumentsDB documentsDB = new DocumentsDB(client); -Transaction result = await documentsDB.CreateTransaction( +Appwrite.Models.Transaction result = await documentsDB.CreateTransaction( ttl: 60 // optional ); diff --git a/examples/2.3.x/server-dotnet/examples/documentsdb/create.md b/examples/2.3.x/server-dotnet/examples/documentsdb/create.md index 8c1fa6b51..b4ed7ec69 100644 --- a/examples/2.3.x/server-dotnet/examples/documentsdb/create.md +++ b/examples/2.3.x/server-dotnet/examples/documentsdb/create.md @@ -10,7 +10,7 @@ Client client = new Client() DocumentsDB documentsDB = new DocumentsDB(client); -Database result = await documentsDB.Create( +Appwrite.Models.Database result = await documentsDB.Create( databaseId: "<DATABASE_ID>", name: "<NAME>", enabled: false, // optional diff --git a/examples/2.3.x/server-dotnet/examples/documentsdb/decrement-document-attribute.md b/examples/2.3.x/server-dotnet/examples/documentsdb/decrement-document-attribute.md index 5ab49cdd7..4cce51d6f 100644 --- a/examples/2.3.x/server-dotnet/examples/documentsdb/decrement-document-attribute.md +++ b/examples/2.3.x/server-dotnet/examples/documentsdb/decrement-document-attribute.md @@ -10,7 +10,7 @@ Client client = new Client() DocumentsDB documentsDB = new DocumentsDB(client); -Document result = await documentsDB.DecrementDocumentAttribute( +Appwrite.Models.Document result = await documentsDB.DecrementDocumentAttribute( databaseId: "<DATABASE_ID>", collectionId: "<COLLECTION_ID>", documentId: "<DOCUMENT_ID>", diff --git a/examples/2.3.x/server-dotnet/examples/documentsdb/delete-documents.md b/examples/2.3.x/server-dotnet/examples/documentsdb/delete-documents.md index c1c885aa9..2cd23c631 100644 --- a/examples/2.3.x/server-dotnet/examples/documentsdb/delete-documents.md +++ b/examples/2.3.x/server-dotnet/examples/documentsdb/delete-documents.md @@ -13,7 +13,7 @@ DocumentsDB documentsDB = new DocumentsDB(client); await documentsDB.DeleteDocuments( databaseId: "<DATABASE_ID>", collectionId: "<COLLECTION_ID>", - queries: new List<string>(), // optional + queries: ["{\"method\":\"equal\", \"attribute\":\"$id\", \"values\":[\"<DOCUMENT_ID>\"]}"], // optional transactionId: "<TRANSACTION_ID>" // optional ); diff --git a/examples/2.3.x/server-dotnet/examples/documentsdb/get-collection.md b/examples/2.3.x/server-dotnet/examples/documentsdb/get-collection.md index f50e03a1b..32f93a1ad 100644 --- a/examples/2.3.x/server-dotnet/examples/documentsdb/get-collection.md +++ b/examples/2.3.x/server-dotnet/examples/documentsdb/get-collection.md @@ -10,7 +10,7 @@ Client client = new Client() DocumentsDB documentsDB = new DocumentsDB(client); -Collection result = await documentsDB.GetCollection( +Appwrite.Models.Collection result = await documentsDB.GetCollection( databaseId: "<DATABASE_ID>", collectionId: "<COLLECTION_ID>" ); diff --git a/examples/2.3.x/server-dotnet/examples/documentsdb/get-document.md b/examples/2.3.x/server-dotnet/examples/documentsdb/get-document.md index 1e3bfa5c2..be8b0849d 100644 --- a/examples/2.3.x/server-dotnet/examples/documentsdb/get-document.md +++ b/examples/2.3.x/server-dotnet/examples/documentsdb/get-document.md @@ -10,7 +10,7 @@ Client client = new Client() DocumentsDB documentsDB = new DocumentsDB(client); -Document result = await documentsDB.GetDocument( +Appwrite.Models.Document result = await documentsDB.GetDocument( databaseId: "<DATABASE_ID>", collectionId: "<COLLECTION_ID>", documentId: "<DOCUMENT_ID>", diff --git a/examples/2.3.x/server-dotnet/examples/documentsdb/get-index.md b/examples/2.3.x/server-dotnet/examples/documentsdb/get-index.md index e8c99e38c..58b080efa 100644 --- a/examples/2.3.x/server-dotnet/examples/documentsdb/get-index.md +++ b/examples/2.3.x/server-dotnet/examples/documentsdb/get-index.md @@ -10,7 +10,7 @@ Client client = new Client() DocumentsDB documentsDB = new DocumentsDB(client); -Index result = await documentsDB.GetIndex( +Appwrite.Models.Index result = await documentsDB.GetIndex( databaseId: "<DATABASE_ID>", collectionId: "<COLLECTION_ID>", key: "<KEY>" diff --git a/examples/2.3.x/server-dotnet/examples/documentsdb/get-replicas.md b/examples/2.3.x/server-dotnet/examples/documentsdb/get-replicas.md index abe669993..847b934a9 100644 --- a/examples/2.3.x/server-dotnet/examples/documentsdb/get-replicas.md +++ b/examples/2.3.x/server-dotnet/examples/documentsdb/get-replicas.md @@ -10,7 +10,7 @@ Client client = new Client() DocumentsDB documentsDB = new DocumentsDB(client); -DedicatedDatabaseReplicas result = await documentsDB.GetReplicas( +Appwrite.Models.DedicatedDatabaseReplicas result = await documentsDB.GetReplicas( databaseId: "<DATABASE_ID>" ); diff --git a/examples/2.3.x/server-dotnet/examples/documentsdb/get-status.md b/examples/2.3.x/server-dotnet/examples/documentsdb/get-status.md index 418a76133..ed1f40b2d 100644 --- a/examples/2.3.x/server-dotnet/examples/documentsdb/get-status.md +++ b/examples/2.3.x/server-dotnet/examples/documentsdb/get-status.md @@ -10,7 +10,7 @@ Client client = new Client() DocumentsDB documentsDB = new DocumentsDB(client); -DatabaseStatus result = await documentsDB.GetStatus( +Appwrite.Models.DatabaseStatus result = await documentsDB.GetStatus( databaseId: "<DATABASE_ID>" ); diff --git a/examples/2.3.x/server-dotnet/examples/documentsdb/get-transaction.md b/examples/2.3.x/server-dotnet/examples/documentsdb/get-transaction.md index 800897c22..644380e76 100644 --- a/examples/2.3.x/server-dotnet/examples/documentsdb/get-transaction.md +++ b/examples/2.3.x/server-dotnet/examples/documentsdb/get-transaction.md @@ -10,7 +10,7 @@ Client client = new Client() DocumentsDB documentsDB = new DocumentsDB(client); -Transaction result = await documentsDB.GetTransaction( +Appwrite.Models.Transaction result = await documentsDB.GetTransaction( transactionId: "<TRANSACTION_ID>" ); diff --git a/examples/2.3.x/server-dotnet/examples/documentsdb/get.md b/examples/2.3.x/server-dotnet/examples/documentsdb/get.md index f8d06919c..5e1d70475 100644 --- a/examples/2.3.x/server-dotnet/examples/documentsdb/get.md +++ b/examples/2.3.x/server-dotnet/examples/documentsdb/get.md @@ -10,7 +10,7 @@ Client client = new Client() DocumentsDB documentsDB = new DocumentsDB(client); -Database result = await documentsDB.Get( +Appwrite.Models.Database result = await documentsDB.Get( databaseId: "<DATABASE_ID>" ); diff --git a/examples/2.3.x/server-dotnet/examples/documentsdb/increment-document-attribute.md b/examples/2.3.x/server-dotnet/examples/documentsdb/increment-document-attribute.md index fc9d0795c..1c8c69b6f 100644 --- a/examples/2.3.x/server-dotnet/examples/documentsdb/increment-document-attribute.md +++ b/examples/2.3.x/server-dotnet/examples/documentsdb/increment-document-attribute.md @@ -10,7 +10,7 @@ Client client = new Client() DocumentsDB documentsDB = new DocumentsDB(client); -Document result = await documentsDB.IncrementDocumentAttribute( +Appwrite.Models.Document result = await documentsDB.IncrementDocumentAttribute( databaseId: "<DATABASE_ID>", collectionId: "<COLLECTION_ID>", documentId: "<DOCUMENT_ID>", diff --git a/examples/2.3.x/server-dotnet/examples/documentsdb/list-collections.md b/examples/2.3.x/server-dotnet/examples/documentsdb/list-collections.md index 1227361b2..0cde0814a 100644 --- a/examples/2.3.x/server-dotnet/examples/documentsdb/list-collections.md +++ b/examples/2.3.x/server-dotnet/examples/documentsdb/list-collections.md @@ -10,7 +10,7 @@ Client client = new Client() DocumentsDB documentsDB = new DocumentsDB(client); -CollectionList result = await documentsDB.ListCollections( +Appwrite.Models.CollectionList result = await documentsDB.ListCollections( databaseId: "<DATABASE_ID>", queries: new List<string>(), // optional search: "<SEARCH>", // optional diff --git a/examples/2.3.x/server-dotnet/examples/documentsdb/list-documents.md b/examples/2.3.x/server-dotnet/examples/documentsdb/list-documents.md index 0838c9c1a..cf6cdb580 100644 --- a/examples/2.3.x/server-dotnet/examples/documentsdb/list-documents.md +++ b/examples/2.3.x/server-dotnet/examples/documentsdb/list-documents.md @@ -10,7 +10,7 @@ Client client = new Client() DocumentsDB documentsDB = new DocumentsDB(client); -DocumentList result = await documentsDB.ListDocuments( +Appwrite.Models.DocumentList result = await documentsDB.ListDocuments( databaseId: "<DATABASE_ID>", collectionId: "<COLLECTION_ID>", queries: new List<string>(), // optional diff --git a/examples/2.3.x/server-dotnet/examples/documentsdb/list-indexes.md b/examples/2.3.x/server-dotnet/examples/documentsdb/list-indexes.md index aa8435ca5..6a33ad696 100644 --- a/examples/2.3.x/server-dotnet/examples/documentsdb/list-indexes.md +++ b/examples/2.3.x/server-dotnet/examples/documentsdb/list-indexes.md @@ -10,7 +10,7 @@ Client client = new Client() DocumentsDB documentsDB = new DocumentsDB(client); -IndexList result = await documentsDB.ListIndexes( +Appwrite.Models.IndexList result = await documentsDB.ListIndexes( databaseId: "<DATABASE_ID>", collectionId: "<COLLECTION_ID>", queries: new List<string>(), // optional diff --git a/examples/2.3.x/server-dotnet/examples/documentsdb/list-operations.md b/examples/2.3.x/server-dotnet/examples/documentsdb/list-operations.md index 5e274792f..da845f735 100644 --- a/examples/2.3.x/server-dotnet/examples/documentsdb/list-operations.md +++ b/examples/2.3.x/server-dotnet/examples/documentsdb/list-operations.md @@ -10,7 +10,7 @@ Client client = new Client() DocumentsDB documentsDB = new DocumentsDB(client); -DedicatedDatabaseOperationList result = await documentsDB.ListOperations( +Appwrite.Models.DedicatedDatabaseOperationList result = await documentsDB.ListOperations( databaseId: "<DATABASE_ID>", status: "queued", // optional limit: 1, // optional diff --git a/examples/2.3.x/server-dotnet/examples/documentsdb/list-specifications.md b/examples/2.3.x/server-dotnet/examples/documentsdb/list-specifications.md index 33e4c32a2..ba218f8cb 100644 --- a/examples/2.3.x/server-dotnet/examples/documentsdb/list-specifications.md +++ b/examples/2.3.x/server-dotnet/examples/documentsdb/list-specifications.md @@ -10,7 +10,7 @@ Client client = new Client() DocumentsDB documentsDB = new DocumentsDB(client); -DedicatedDatabaseSpecificationList result = await documentsDB.ListSpecifications(); +Appwrite.Models.DedicatedDatabaseSpecificationList result = await documentsDB.ListSpecifications(); ``` diff --git a/examples/2.3.x/server-dotnet/examples/documentsdb/list-transactions.md b/examples/2.3.x/server-dotnet/examples/documentsdb/list-transactions.md index 84539069c..d884292d7 100644 --- a/examples/2.3.x/server-dotnet/examples/documentsdb/list-transactions.md +++ b/examples/2.3.x/server-dotnet/examples/documentsdb/list-transactions.md @@ -10,8 +10,9 @@ Client client = new Client() DocumentsDB documentsDB = new DocumentsDB(client); -TransactionList result = await documentsDB.ListTransactions( - queries: new List<string>() // optional +Appwrite.Models.TransactionList result = await documentsDB.ListTransactions( + queries: new List<string>(), // optional + total: false // optional ); ``` diff --git a/examples/2.3.x/server-dotnet/examples/documentsdb/list.md b/examples/2.3.x/server-dotnet/examples/documentsdb/list.md index 79bfce24d..34ef67fb8 100644 --- a/examples/2.3.x/server-dotnet/examples/documentsdb/list.md +++ b/examples/2.3.x/server-dotnet/examples/documentsdb/list.md @@ -10,7 +10,7 @@ Client client = new Client() DocumentsDB documentsDB = new DocumentsDB(client); -DatabaseList result = await documentsDB.List( +Appwrite.Models.DatabaseList result = await documentsDB.List( queries: new List<string>(), // optional total: false // optional ); diff --git a/examples/2.3.x/server-dotnet/examples/documentsdb/update-collection.md b/examples/2.3.x/server-dotnet/examples/documentsdb/update-collection.md index 093d9db90..97ee4643f 100644 --- a/examples/2.3.x/server-dotnet/examples/documentsdb/update-collection.md +++ b/examples/2.3.x/server-dotnet/examples/documentsdb/update-collection.md @@ -10,7 +10,7 @@ Client client = new Client() DocumentsDB documentsDB = new DocumentsDB(client); -Collection result = await documentsDB.UpdateCollection( +Appwrite.Models.Collection result = await documentsDB.UpdateCollection( databaseId: "<DATABASE_ID>", collectionId: "<COLLECTION_ID>", name: "<NAME>", diff --git a/examples/2.3.x/server-dotnet/examples/documentsdb/update-document.md b/examples/2.3.x/server-dotnet/examples/documentsdb/update-document.md index 87172a6e5..be80182b2 100644 --- a/examples/2.3.x/server-dotnet/examples/documentsdb/update-document.md +++ b/examples/2.3.x/server-dotnet/examples/documentsdb/update-document.md @@ -10,7 +10,7 @@ Client client = new Client() DocumentsDB documentsDB = new DocumentsDB(client); -Document result = await documentsDB.UpdateDocument( +Appwrite.Models.Document result = await documentsDB.UpdateDocument( databaseId: "<DATABASE_ID>", collectionId: "<COLLECTION_ID>", documentId: "<DOCUMENT_ID>", diff --git a/examples/2.3.x/server-dotnet/examples/documentsdb/update-documents.md b/examples/2.3.x/server-dotnet/examples/documentsdb/update-documents.md index f325b2eac..7ba53e776 100644 --- a/examples/2.3.x/server-dotnet/examples/documentsdb/update-documents.md +++ b/examples/2.3.x/server-dotnet/examples/documentsdb/update-documents.md @@ -10,7 +10,7 @@ Client client = new Client() DocumentsDB documentsDB = new DocumentsDB(client); -DocumentList result = await documentsDB.UpdateDocuments( +Appwrite.Models.DocumentList result = await documentsDB.UpdateDocuments( databaseId: "<DATABASE_ID>", collectionId: "<COLLECTION_ID>", data: [object], // optional diff --git a/examples/2.3.x/server-dotnet/examples/documentsdb/update-transaction.md b/examples/2.3.x/server-dotnet/examples/documentsdb/update-transaction.md index b4a306872..18a93bdfd 100644 --- a/examples/2.3.x/server-dotnet/examples/documentsdb/update-transaction.md +++ b/examples/2.3.x/server-dotnet/examples/documentsdb/update-transaction.md @@ -10,7 +10,7 @@ Client client = new Client() DocumentsDB documentsDB = new DocumentsDB(client); -Transaction result = await documentsDB.UpdateTransaction( +Appwrite.Models.Transaction result = await documentsDB.UpdateTransaction( transactionId: "<TRANSACTION_ID>", commit: false, // optional rollback: false // optional diff --git a/examples/2.3.x/server-dotnet/examples/documentsdb/update.md b/examples/2.3.x/server-dotnet/examples/documentsdb/update.md index e9fd54c5e..61d5347dd 100644 --- a/examples/2.3.x/server-dotnet/examples/documentsdb/update.md +++ b/examples/2.3.x/server-dotnet/examples/documentsdb/update.md @@ -10,7 +10,7 @@ Client client = new Client() DocumentsDB documentsDB = new DocumentsDB(client); -Database result = await documentsDB.Update( +Appwrite.Models.Database result = await documentsDB.Update( databaseId: "<DATABASE_ID>", name: "<NAME>", enabled: false, // optional diff --git a/examples/2.3.x/server-dotnet/examples/documentsdb/upsert-document.md b/examples/2.3.x/server-dotnet/examples/documentsdb/upsert-document.md index a5de788f0..3fcdeda73 100644 --- a/examples/2.3.x/server-dotnet/examples/documentsdb/upsert-document.md +++ b/examples/2.3.x/server-dotnet/examples/documentsdb/upsert-document.md @@ -10,7 +10,7 @@ Client client = new Client() DocumentsDB documentsDB = new DocumentsDB(client); -Document result = await documentsDB.UpsertDocument( +Appwrite.Models.Document result = await documentsDB.UpsertDocument( databaseId: "<DATABASE_ID>", collectionId: "<COLLECTION_ID>", documentId: "<DOCUMENT_ID>", diff --git a/examples/2.3.x/server-dotnet/examples/documentsdb/upsert-documents.md b/examples/2.3.x/server-dotnet/examples/documentsdb/upsert-documents.md index 66f738cf0..6a5cf7a53 100644 --- a/examples/2.3.x/server-dotnet/examples/documentsdb/upsert-documents.md +++ b/examples/2.3.x/server-dotnet/examples/documentsdb/upsert-documents.md @@ -10,10 +10,19 @@ Client client = new Client() DocumentsDB documentsDB = new DocumentsDB(client); -DocumentList result = await documentsDB.UpsertDocuments( +Appwrite.Models.DocumentList result = await documentsDB.UpsertDocuments( databaseId: "<DATABASE_ID>", collectionId: "<COLLECTION_ID>", - documents: new List<object>(), + documents: [ + { + "$id": "example1", + "username": "walter.obrien", + "email": "walter.obrien@example.com", + "fullName": "Walter O'Brien", + "age": 30, + "isAdmin": false + } + ], transactionId: "<TRANSACTION_ID>" // optional ); diff --git a/examples/2.3.x/server-dotnet/examples/domains/create-preset-google-workspace.md b/examples/2.3.x/server-dotnet/examples/domains/create-preset-google-workspace.md index cec5f5d09..03b72f3e9 100644 --- a/examples/2.3.x/server-dotnet/examples/domains/create-preset-google-workspace.md +++ b/examples/2.3.x/server-dotnet/examples/domains/create-preset-google-workspace.md @@ -10,7 +10,7 @@ Client client = new Client() Domains domains = new Domains(client); -DnsRecordsList result = await domains.CreatePresetGoogleWorkspace( +Appwrite.Models.DnsRecordsList result = await domains.CreatePresetGoogleWorkspace( domainId: "<DOMAIN_ID>" ); diff --git a/examples/2.3.x/server-dotnet/examples/domains/create-preset-i-cloud.md b/examples/2.3.x/server-dotnet/examples/domains/create-preset-i-cloud.md index d797ed424..bfbaab5d4 100644 --- a/examples/2.3.x/server-dotnet/examples/domains/create-preset-i-cloud.md +++ b/examples/2.3.x/server-dotnet/examples/domains/create-preset-i-cloud.md @@ -10,7 +10,7 @@ Client client = new Client() Domains domains = new Domains(client); -DnsRecordsList result = await domains.CreatePresetICloud( +Appwrite.Models.DnsRecordsList result = await domains.CreatePresetICloud( domainId: "<DOMAIN_ID>" ); diff --git a/examples/2.3.x/server-dotnet/examples/domains/create-preset-mailgun.md b/examples/2.3.x/server-dotnet/examples/domains/create-preset-mailgun.md index 256ceb709..053ca91ab 100644 --- a/examples/2.3.x/server-dotnet/examples/domains/create-preset-mailgun.md +++ b/examples/2.3.x/server-dotnet/examples/domains/create-preset-mailgun.md @@ -10,7 +10,7 @@ Client client = new Client() Domains domains = new Domains(client); -DnsRecordsList result = await domains.CreatePresetMailgun( +Appwrite.Models.DnsRecordsList result = await domains.CreatePresetMailgun( domainId: "<DOMAIN_ID>" ); diff --git a/examples/2.3.x/server-dotnet/examples/domains/create-preset-outlook.md b/examples/2.3.x/server-dotnet/examples/domains/create-preset-outlook.md index 4723c66a4..81fe1c687 100644 --- a/examples/2.3.x/server-dotnet/examples/domains/create-preset-outlook.md +++ b/examples/2.3.x/server-dotnet/examples/domains/create-preset-outlook.md @@ -10,7 +10,7 @@ Client client = new Client() Domains domains = new Domains(client); -DnsRecordsList result = await domains.CreatePresetOutlook( +Appwrite.Models.DnsRecordsList result = await domains.CreatePresetOutlook( domainId: "<DOMAIN_ID>" ); diff --git a/examples/2.3.x/server-dotnet/examples/domains/create-preset-proton-mail.md b/examples/2.3.x/server-dotnet/examples/domains/create-preset-proton-mail.md index 11906f93c..fbfa38275 100644 --- a/examples/2.3.x/server-dotnet/examples/domains/create-preset-proton-mail.md +++ b/examples/2.3.x/server-dotnet/examples/domains/create-preset-proton-mail.md @@ -10,7 +10,7 @@ Client client = new Client() Domains domains = new Domains(client); -DnsRecordsList result = await domains.CreatePresetProtonMail( +Appwrite.Models.DnsRecordsList result = await domains.CreatePresetProtonMail( domainId: "<DOMAIN_ID>" ); diff --git a/examples/2.3.x/server-dotnet/examples/domains/create-preset-zoho.md b/examples/2.3.x/server-dotnet/examples/domains/create-preset-zoho.md index feaa2d453..e13ff80a5 100644 --- a/examples/2.3.x/server-dotnet/examples/domains/create-preset-zoho.md +++ b/examples/2.3.x/server-dotnet/examples/domains/create-preset-zoho.md @@ -10,7 +10,7 @@ Client client = new Client() Domains domains = new Domains(client); -DnsRecordsList result = await domains.CreatePresetZoho( +Appwrite.Models.DnsRecordsList result = await domains.CreatePresetZoho( domainId: "<DOMAIN_ID>" ); diff --git a/examples/2.3.x/server-dotnet/examples/domains/create-record-a.md b/examples/2.3.x/server-dotnet/examples/domains/create-record-a.md index 481c3b18c..c615a8985 100644 --- a/examples/2.3.x/server-dotnet/examples/domains/create-record-a.md +++ b/examples/2.3.x/server-dotnet/examples/domains/create-record-a.md @@ -10,7 +10,7 @@ Client client = new Client() Domains domains = new Domains(client); -DnsRecord result = await domains.CreateRecordA( +Appwrite.Models.DnsRecord result = await domains.CreateRecordA( domainId: "<DOMAIN_ID>", name: "", value: "", diff --git a/examples/2.3.x/server-dotnet/examples/domains/create-record-aaaa.md b/examples/2.3.x/server-dotnet/examples/domains/create-record-aaaa.md index fafe52a3a..ffd800a50 100644 --- a/examples/2.3.x/server-dotnet/examples/domains/create-record-aaaa.md +++ b/examples/2.3.x/server-dotnet/examples/domains/create-record-aaaa.md @@ -10,7 +10,7 @@ Client client = new Client() Domains domains = new Domains(client); -DnsRecord result = await domains.CreateRecordAAAA( +Appwrite.Models.DnsRecord result = await domains.CreateRecordAAAA( domainId: "<DOMAIN_ID>", name: "", value: "", diff --git a/examples/2.3.x/server-dotnet/examples/domains/create-record-alias.md b/examples/2.3.x/server-dotnet/examples/domains/create-record-alias.md index 938806372..3cea72b01 100644 --- a/examples/2.3.x/server-dotnet/examples/domains/create-record-alias.md +++ b/examples/2.3.x/server-dotnet/examples/domains/create-record-alias.md @@ -10,7 +10,7 @@ Client client = new Client() Domains domains = new Domains(client); -DnsRecord result = await domains.CreateRecordAlias( +Appwrite.Models.DnsRecord result = await domains.CreateRecordAlias( domainId: "<DOMAIN_ID>", name: "", value: "<VALUE>", diff --git a/examples/2.3.x/server-dotnet/examples/domains/create-record-caa.md b/examples/2.3.x/server-dotnet/examples/domains/create-record-caa.md index 46d868130..6f4834773 100644 --- a/examples/2.3.x/server-dotnet/examples/domains/create-record-caa.md +++ b/examples/2.3.x/server-dotnet/examples/domains/create-record-caa.md @@ -10,7 +10,7 @@ Client client = new Client() Domains domains = new Domains(client); -DnsRecord result = await domains.CreateRecordCAA( +Appwrite.Models.DnsRecord result = await domains.CreateRecordCAA( domainId: "<DOMAIN_ID>", name: "", value: "", diff --git a/examples/2.3.x/server-dotnet/examples/domains/create-record-cname.md b/examples/2.3.x/server-dotnet/examples/domains/create-record-cname.md index 229b19e7f..c4057935e 100644 --- a/examples/2.3.x/server-dotnet/examples/domains/create-record-cname.md +++ b/examples/2.3.x/server-dotnet/examples/domains/create-record-cname.md @@ -10,7 +10,7 @@ Client client = new Client() Domains domains = new Domains(client); -DnsRecord result = await domains.CreateRecordCNAME( +Appwrite.Models.DnsRecord result = await domains.CreateRecordCNAME( domainId: "<DOMAIN_ID>", name: "", value: "<VALUE>", diff --git a/examples/2.3.x/server-dotnet/examples/domains/create-record-https.md b/examples/2.3.x/server-dotnet/examples/domains/create-record-https.md index 6421a4e8e..2a3c27c34 100644 --- a/examples/2.3.x/server-dotnet/examples/domains/create-record-https.md +++ b/examples/2.3.x/server-dotnet/examples/domains/create-record-https.md @@ -10,7 +10,7 @@ Client client = new Client() Domains domains = new Domains(client); -DnsRecord result = await domains.CreateRecordHTTPS( +Appwrite.Models.DnsRecord result = await domains.CreateRecordHTTPS( domainId: "<DOMAIN_ID>", name: "", value: "<VALUE>", diff --git a/examples/2.3.x/server-dotnet/examples/domains/create-record-mx.md b/examples/2.3.x/server-dotnet/examples/domains/create-record-mx.md index b7f1c0ffa..b1a7ba207 100644 --- a/examples/2.3.x/server-dotnet/examples/domains/create-record-mx.md +++ b/examples/2.3.x/server-dotnet/examples/domains/create-record-mx.md @@ -10,7 +10,7 @@ Client client = new Client() Domains domains = new Domains(client); -DnsRecord result = await domains.CreateRecordMX( +Appwrite.Models.DnsRecord result = await domains.CreateRecordMX( domainId: "<DOMAIN_ID>", name: "", value: "<VALUE>", diff --git a/examples/2.3.x/server-dotnet/examples/domains/create-record-ns.md b/examples/2.3.x/server-dotnet/examples/domains/create-record-ns.md index 05cf13218..9b77ed935 100644 --- a/examples/2.3.x/server-dotnet/examples/domains/create-record-ns.md +++ b/examples/2.3.x/server-dotnet/examples/domains/create-record-ns.md @@ -10,7 +10,7 @@ Client client = new Client() Domains domains = new Domains(client); -DnsRecord result = await domains.CreateRecordNS( +Appwrite.Models.DnsRecord result = await domains.CreateRecordNS( domainId: "<DOMAIN_ID>", name: "", value: "<VALUE>", diff --git a/examples/2.3.x/server-dotnet/examples/domains/create-record-srv.md b/examples/2.3.x/server-dotnet/examples/domains/create-record-srv.md index 001d9faa2..95ac8875e 100644 --- a/examples/2.3.x/server-dotnet/examples/domains/create-record-srv.md +++ b/examples/2.3.x/server-dotnet/examples/domains/create-record-srv.md @@ -10,7 +10,7 @@ Client client = new Client() Domains domains = new Domains(client); -DnsRecord result = await domains.CreateRecordSRV( +Appwrite.Models.DnsRecord result = await domains.CreateRecordSRV( domainId: "<DOMAIN_ID>", name: "", value: "<VALUE>", diff --git a/examples/2.3.x/server-dotnet/examples/domains/create-record-txt.md b/examples/2.3.x/server-dotnet/examples/domains/create-record-txt.md index 269241728..9681d5e68 100644 --- a/examples/2.3.x/server-dotnet/examples/domains/create-record-txt.md +++ b/examples/2.3.x/server-dotnet/examples/domains/create-record-txt.md @@ -10,7 +10,7 @@ Client client = new Client() Domains domains = new Domains(client); -DnsRecord result = await domains.CreateRecordTXT( +Appwrite.Models.DnsRecord result = await domains.CreateRecordTXT( domainId: "<DOMAIN_ID>", name: "", ttl: 1, diff --git a/examples/2.3.x/server-dotnet/examples/domains/create.md b/examples/2.3.x/server-dotnet/examples/domains/create.md index 9c5acec0d..99fbdfab7 100644 --- a/examples/2.3.x/server-dotnet/examples/domains/create.md +++ b/examples/2.3.x/server-dotnet/examples/domains/create.md @@ -10,7 +10,7 @@ Client client = new Client() Domains domains = new Domains(client); -XDomain result = await domains.Create( +Appwrite.Models.XDomain result = await domains.Create( teamId: "<TEAM_ID>", domain: "example.com" ); diff --git a/examples/2.3.x/server-dotnet/examples/domains/get-preset-google-workspace.md b/examples/2.3.x/server-dotnet/examples/domains/get-preset-google-workspace.md index 92ead1166..cb5dbc120 100644 --- a/examples/2.3.x/server-dotnet/examples/domains/get-preset-google-workspace.md +++ b/examples/2.3.x/server-dotnet/examples/domains/get-preset-google-workspace.md @@ -10,7 +10,7 @@ Client client = new Client() Domains domains = new Domains(client); -DnsRecordsList result = await domains.GetPresetGoogleWorkspace( +Appwrite.Models.DnsRecordsList result = await domains.GetPresetGoogleWorkspace( domainId: "<DOMAIN_ID>" ); diff --git a/examples/2.3.x/server-dotnet/examples/domains/get-preset-i-cloud.md b/examples/2.3.x/server-dotnet/examples/domains/get-preset-i-cloud.md index 126597c93..04497d58e 100644 --- a/examples/2.3.x/server-dotnet/examples/domains/get-preset-i-cloud.md +++ b/examples/2.3.x/server-dotnet/examples/domains/get-preset-i-cloud.md @@ -10,7 +10,7 @@ Client client = new Client() Domains domains = new Domains(client); -DnsRecordsList result = await domains.GetPresetICloud( +Appwrite.Models.DnsRecordsList result = await domains.GetPresetICloud( domainId: "<DOMAIN_ID>" ); diff --git a/examples/2.3.x/server-dotnet/examples/domains/get-preset-mailgun.md b/examples/2.3.x/server-dotnet/examples/domains/get-preset-mailgun.md index 4d8ff21aa..3157168fd 100644 --- a/examples/2.3.x/server-dotnet/examples/domains/get-preset-mailgun.md +++ b/examples/2.3.x/server-dotnet/examples/domains/get-preset-mailgun.md @@ -10,7 +10,7 @@ Client client = new Client() Domains domains = new Domains(client); -DnsRecordsList result = await domains.GetPresetMailgun( +Appwrite.Models.DnsRecordsList result = await domains.GetPresetMailgun( domainId: "<DOMAIN_ID>" ); diff --git a/examples/2.3.x/server-dotnet/examples/domains/get-preset-outlook.md b/examples/2.3.x/server-dotnet/examples/domains/get-preset-outlook.md index 38c47e16b..d446cf848 100644 --- a/examples/2.3.x/server-dotnet/examples/domains/get-preset-outlook.md +++ b/examples/2.3.x/server-dotnet/examples/domains/get-preset-outlook.md @@ -10,7 +10,7 @@ Client client = new Client() Domains domains = new Domains(client); -DnsRecordsList result = await domains.GetPresetOutlook( +Appwrite.Models.DnsRecordsList result = await domains.GetPresetOutlook( domainId: "<DOMAIN_ID>" ); diff --git a/examples/2.3.x/server-dotnet/examples/domains/get-preset-proton-mail.md b/examples/2.3.x/server-dotnet/examples/domains/get-preset-proton-mail.md index de17c9f98..dbba99dd3 100644 --- a/examples/2.3.x/server-dotnet/examples/domains/get-preset-proton-mail.md +++ b/examples/2.3.x/server-dotnet/examples/domains/get-preset-proton-mail.md @@ -10,7 +10,7 @@ Client client = new Client() Domains domains = new Domains(client); -DnsRecordsList result = await domains.GetPresetProtonMail( +Appwrite.Models.DnsRecordsList result = await domains.GetPresetProtonMail( domainId: "<DOMAIN_ID>" ); diff --git a/examples/2.3.x/server-dotnet/examples/domains/get-preset-zoho.md b/examples/2.3.x/server-dotnet/examples/domains/get-preset-zoho.md index a2a352485..8df965a37 100644 --- a/examples/2.3.x/server-dotnet/examples/domains/get-preset-zoho.md +++ b/examples/2.3.x/server-dotnet/examples/domains/get-preset-zoho.md @@ -10,7 +10,7 @@ Client client = new Client() Domains domains = new Domains(client); -DnsRecordsList result = await domains.GetPresetZoho( +Appwrite.Models.DnsRecordsList result = await domains.GetPresetZoho( domainId: "<DOMAIN_ID>" ); diff --git a/examples/2.3.x/server-dotnet/examples/domains/get-price.md b/examples/2.3.x/server-dotnet/examples/domains/get-price.md index fec9cadc7..fb0d5c4c6 100644 --- a/examples/2.3.x/server-dotnet/examples/domains/get-price.md +++ b/examples/2.3.x/server-dotnet/examples/domains/get-price.md @@ -11,7 +11,7 @@ Client client = new Client() Domains domains = new Domains(client); -DomainPrice result = await domains.GetPrice( +Appwrite.Models.DomainPrice result = await domains.GetPrice( domain: "example.com", periodYears: 0, // optional registrationType: DomainRegistrationType.New // optional diff --git a/examples/2.3.x/server-dotnet/examples/domains/get-record.md b/examples/2.3.x/server-dotnet/examples/domains/get-record.md index 92d7faa6f..4cc61bb99 100644 --- a/examples/2.3.x/server-dotnet/examples/domains/get-record.md +++ b/examples/2.3.x/server-dotnet/examples/domains/get-record.md @@ -10,7 +10,7 @@ Client client = new Client() Domains domains = new Domains(client); -DnsRecord result = await domains.GetRecord( +Appwrite.Models.DnsRecord result = await domains.GetRecord( domainId: "<DOMAIN_ID>", recordId: "<RECORD_ID>" ); diff --git a/examples/2.3.x/server-dotnet/examples/domains/get-transfer-status.md b/examples/2.3.x/server-dotnet/examples/domains/get-transfer-status.md index 3ba0f2452..2b3552dbd 100644 --- a/examples/2.3.x/server-dotnet/examples/domains/get-transfer-status.md +++ b/examples/2.3.x/server-dotnet/examples/domains/get-transfer-status.md @@ -10,7 +10,7 @@ Client client = new Client() Domains domains = new Domains(client); -DomainTransferStatus result = await domains.GetTransferStatus( +Appwrite.Models.DomainTransferStatus result = await domains.GetTransferStatus( domainId: "<DOMAIN_ID>" ); diff --git a/examples/2.3.x/server-dotnet/examples/domains/get-zone.md b/examples/2.3.x/server-dotnet/examples/domains/get-zone.md index 89bd6a2a0..98e321389 100644 --- a/examples/2.3.x/server-dotnet/examples/domains/get-zone.md +++ b/examples/2.3.x/server-dotnet/examples/domains/get-zone.md @@ -10,7 +10,7 @@ Client client = new Client() Domains domains = new Domains(client); - result = await domains.GetZone( +string result = await domains.GetZone( domainId: "<DOMAIN_ID>" ); diff --git a/examples/2.3.x/server-dotnet/examples/domains/get.md b/examples/2.3.x/server-dotnet/examples/domains/get.md index 871986ef3..9db5eba4a 100644 --- a/examples/2.3.x/server-dotnet/examples/domains/get.md +++ b/examples/2.3.x/server-dotnet/examples/domains/get.md @@ -10,7 +10,7 @@ Client client = new Client() Domains domains = new Domains(client); -XDomain result = await domains.Get( +Appwrite.Models.XDomain result = await domains.Get( domainId: "<DOMAIN_ID>" ); diff --git a/examples/2.3.x/server-dotnet/examples/domains/list-prices.md b/examples/2.3.x/server-dotnet/examples/domains/list-prices.md index 55140596c..6f32123e3 100644 --- a/examples/2.3.x/server-dotnet/examples/domains/list-prices.md +++ b/examples/2.3.x/server-dotnet/examples/domains/list-prices.md @@ -11,7 +11,7 @@ Client client = new Client() Domains domains = new Domains(client); -DomainPricesList result = await domains.ListPrices( +Appwrite.Models.DomainPricesList result = await domains.ListPrices( domains: new List<string>(), periodYears: 0, // optional registrationType: DomainRegistrationType.New // optional diff --git a/examples/2.3.x/server-dotnet/examples/domains/list-records.md b/examples/2.3.x/server-dotnet/examples/domains/list-records.md index 9c2985eb2..2376de7fd 100644 --- a/examples/2.3.x/server-dotnet/examples/domains/list-records.md +++ b/examples/2.3.x/server-dotnet/examples/domains/list-records.md @@ -10,7 +10,7 @@ Client client = new Client() Domains domains = new Domains(client); -DnsRecordsList result = await domains.ListRecords( +Appwrite.Models.DnsRecordsList result = await domains.ListRecords( domainId: "<DOMAIN_ID>", queries: new List<string>() // optional ); diff --git a/examples/2.3.x/server-dotnet/examples/domains/list.md b/examples/2.3.x/server-dotnet/examples/domains/list.md index 3760f30a3..b92de6144 100644 --- a/examples/2.3.x/server-dotnet/examples/domains/list.md +++ b/examples/2.3.x/server-dotnet/examples/domains/list.md @@ -10,7 +10,7 @@ Client client = new Client() Domains domains = new Domains(client); -DomainsList result = await domains.List( +Appwrite.Models.DomainsList result = await domains.List( queries: new List<string>(), // optional search: "<SEARCH>" // optional ); diff --git a/examples/2.3.x/server-dotnet/examples/domains/update-nameservers.md b/examples/2.3.x/server-dotnet/examples/domains/update-nameservers.md index f860d1486..fead4405c 100644 --- a/examples/2.3.x/server-dotnet/examples/domains/update-nameservers.md +++ b/examples/2.3.x/server-dotnet/examples/domains/update-nameservers.md @@ -10,7 +10,7 @@ Client client = new Client() Domains domains = new Domains(client); -XDomain result = await domains.UpdateNameservers( +Appwrite.Models.XDomain result = await domains.UpdateNameservers( domainId: "<DOMAIN_ID>", nameservers: new List<string>() // optional ); diff --git a/examples/2.3.x/server-dotnet/examples/domains/update-record-a.md b/examples/2.3.x/server-dotnet/examples/domains/update-record-a.md index d4fde3d71..54e0d4013 100644 --- a/examples/2.3.x/server-dotnet/examples/domains/update-record-a.md +++ b/examples/2.3.x/server-dotnet/examples/domains/update-record-a.md @@ -10,7 +10,7 @@ Client client = new Client() Domains domains = new Domains(client); -DnsRecord result = await domains.UpdateRecordA( +Appwrite.Models.DnsRecord result = await domains.UpdateRecordA( domainId: "<DOMAIN_ID>", recordId: "<RECORD_ID>", name: "", diff --git a/examples/2.3.x/server-dotnet/examples/domains/update-record-aaaa.md b/examples/2.3.x/server-dotnet/examples/domains/update-record-aaaa.md index bd75bb2b4..0f9512660 100644 --- a/examples/2.3.x/server-dotnet/examples/domains/update-record-aaaa.md +++ b/examples/2.3.x/server-dotnet/examples/domains/update-record-aaaa.md @@ -10,7 +10,7 @@ Client client = new Client() Domains domains = new Domains(client); -DnsRecord result = await domains.UpdateRecordAAAA( +Appwrite.Models.DnsRecord result = await domains.UpdateRecordAAAA( domainId: "<DOMAIN_ID>", recordId: "<RECORD_ID>", name: "", diff --git a/examples/2.3.x/server-dotnet/examples/domains/update-record-alias.md b/examples/2.3.x/server-dotnet/examples/domains/update-record-alias.md index af86dad22..cc877d2b7 100644 --- a/examples/2.3.x/server-dotnet/examples/domains/update-record-alias.md +++ b/examples/2.3.x/server-dotnet/examples/domains/update-record-alias.md @@ -10,7 +10,7 @@ Client client = new Client() Domains domains = new Domains(client); -DnsRecord result = await domains.UpdateRecordAlias( +Appwrite.Models.DnsRecord result = await domains.UpdateRecordAlias( domainId: "<DOMAIN_ID>", recordId: "<RECORD_ID>", name: "", diff --git a/examples/2.3.x/server-dotnet/examples/domains/update-record-caa.md b/examples/2.3.x/server-dotnet/examples/domains/update-record-caa.md index f5f4d0274..9c824c2cd 100644 --- a/examples/2.3.x/server-dotnet/examples/domains/update-record-caa.md +++ b/examples/2.3.x/server-dotnet/examples/domains/update-record-caa.md @@ -10,7 +10,7 @@ Client client = new Client() Domains domains = new Domains(client); -DnsRecord result = await domains.UpdateRecordCAA( +Appwrite.Models.DnsRecord result = await domains.UpdateRecordCAA( domainId: "<DOMAIN_ID>", recordId: "<RECORD_ID>", name: "", diff --git a/examples/2.3.x/server-dotnet/examples/domains/update-record-cname.md b/examples/2.3.x/server-dotnet/examples/domains/update-record-cname.md index 0ade67379..8044947d8 100644 --- a/examples/2.3.x/server-dotnet/examples/domains/update-record-cname.md +++ b/examples/2.3.x/server-dotnet/examples/domains/update-record-cname.md @@ -10,7 +10,7 @@ Client client = new Client() Domains domains = new Domains(client); -DnsRecord result = await domains.UpdateRecordCNAME( +Appwrite.Models.DnsRecord result = await domains.UpdateRecordCNAME( domainId: "<DOMAIN_ID>", recordId: "<RECORD_ID>", name: "", diff --git a/examples/2.3.x/server-dotnet/examples/domains/update-record-https.md b/examples/2.3.x/server-dotnet/examples/domains/update-record-https.md index d7285b6b3..9c9f9ac71 100644 --- a/examples/2.3.x/server-dotnet/examples/domains/update-record-https.md +++ b/examples/2.3.x/server-dotnet/examples/domains/update-record-https.md @@ -10,7 +10,7 @@ Client client = new Client() Domains domains = new Domains(client); -DnsRecord result = await domains.UpdateRecordHTTPS( +Appwrite.Models.DnsRecord result = await domains.UpdateRecordHTTPS( domainId: "<DOMAIN_ID>", recordId: "<RECORD_ID>", name: "", diff --git a/examples/2.3.x/server-dotnet/examples/domains/update-record-mx.md b/examples/2.3.x/server-dotnet/examples/domains/update-record-mx.md index e8c545c59..2c1951190 100644 --- a/examples/2.3.x/server-dotnet/examples/domains/update-record-mx.md +++ b/examples/2.3.x/server-dotnet/examples/domains/update-record-mx.md @@ -10,7 +10,7 @@ Client client = new Client() Domains domains = new Domains(client); -DnsRecord result = await domains.UpdateRecordMX( +Appwrite.Models.DnsRecord result = await domains.UpdateRecordMX( domainId: "<DOMAIN_ID>", recordId: "<RECORD_ID>", name: "", diff --git a/examples/2.3.x/server-dotnet/examples/domains/update-record-ns.md b/examples/2.3.x/server-dotnet/examples/domains/update-record-ns.md index 193fe5551..b7a08392f 100644 --- a/examples/2.3.x/server-dotnet/examples/domains/update-record-ns.md +++ b/examples/2.3.x/server-dotnet/examples/domains/update-record-ns.md @@ -10,7 +10,7 @@ Client client = new Client() Domains domains = new Domains(client); -DnsRecord result = await domains.UpdateRecordNS( +Appwrite.Models.DnsRecord result = await domains.UpdateRecordNS( domainId: "<DOMAIN_ID>", recordId: "<RECORD_ID>", name: "", diff --git a/examples/2.3.x/server-dotnet/examples/domains/update-record-srv.md b/examples/2.3.x/server-dotnet/examples/domains/update-record-srv.md index 8c865f73e..537c89a6c 100644 --- a/examples/2.3.x/server-dotnet/examples/domains/update-record-srv.md +++ b/examples/2.3.x/server-dotnet/examples/domains/update-record-srv.md @@ -10,7 +10,7 @@ Client client = new Client() Domains domains = new Domains(client); -DnsRecord result = await domains.UpdateRecordSRV( +Appwrite.Models.DnsRecord result = await domains.UpdateRecordSRV( domainId: "<DOMAIN_ID>", recordId: "<RECORD_ID>", name: "", diff --git a/examples/2.3.x/server-dotnet/examples/domains/update-record-txt.md b/examples/2.3.x/server-dotnet/examples/domains/update-record-txt.md index a9fd5090c..bfd734cf2 100644 --- a/examples/2.3.x/server-dotnet/examples/domains/update-record-txt.md +++ b/examples/2.3.x/server-dotnet/examples/domains/update-record-txt.md @@ -10,7 +10,7 @@ Client client = new Client() Domains domains = new Domains(client); -DnsRecord result = await domains.UpdateRecordTXT( +Appwrite.Models.DnsRecord result = await domains.UpdateRecordTXT( domainId: "<DOMAIN_ID>", recordId: "<RECORD_ID>", name: "", diff --git a/examples/2.3.x/server-dotnet/examples/domains/update-team.md b/examples/2.3.x/server-dotnet/examples/domains/update-team.md index 49d81eac2..3481d46c2 100644 --- a/examples/2.3.x/server-dotnet/examples/domains/update-team.md +++ b/examples/2.3.x/server-dotnet/examples/domains/update-team.md @@ -10,7 +10,7 @@ Client client = new Client() Domains domains = new Domains(client); -XDomain result = await domains.UpdateTeam( +Appwrite.Models.XDomain result = await domains.UpdateTeam( domainId: "<DOMAIN_ID>", teamId: "<TEAM_ID>" ); diff --git a/examples/2.3.x/server-dotnet/examples/domains/update-zone.md b/examples/2.3.x/server-dotnet/examples/domains/update-zone.md index 908bc2339..0e4444e8d 100644 --- a/examples/2.3.x/server-dotnet/examples/domains/update-zone.md +++ b/examples/2.3.x/server-dotnet/examples/domains/update-zone.md @@ -10,7 +10,7 @@ Client client = new Client() Domains domains = new Domains(client); -XDomain result = await domains.UpdateZone( +Appwrite.Models.XDomain result = await domains.UpdateZone( domainId: "<DOMAIN_ID>", content: "<CONTENT>" ); diff --git a/examples/2.3.x/server-dotnet/examples/domains/verify-nameservers.md b/examples/2.3.x/server-dotnet/examples/domains/verify-nameservers.md index 67273c482..6857f8097 100644 --- a/examples/2.3.x/server-dotnet/examples/domains/verify-nameservers.md +++ b/examples/2.3.x/server-dotnet/examples/domains/verify-nameservers.md @@ -10,7 +10,7 @@ Client client = new Client() Domains domains = new Domains(client); -XDomain result = await domains.VerifyNameservers( +Appwrite.Models.XDomain result = await domains.VerifyNameservers( domainId: "<DOMAIN_ID>" ); diff --git a/examples/2.3.x/server-dotnet/examples/embeddings/create-text-embeddings.md b/examples/2.3.x/server-dotnet/examples/embeddings/create-text-embeddings.md index 95b97cc0d..1934363f1 100644 --- a/examples/2.3.x/server-dotnet/examples/embeddings/create-text-embeddings.md +++ b/examples/2.3.x/server-dotnet/examples/embeddings/create-text-embeddings.md @@ -11,8 +11,8 @@ Client client = new Client() Embeddings embeddings = new Embeddings(client); -EmbeddingList result = await embeddings.CreateTextEmbeddings( - texts: new List<string>(), +Appwrite.Models.EmbeddingList result = await embeddings.CreateTextEmbeddings( + texts: ["Appwrite helps developers build applications.", "Find documents with semantic search."], model: EmbeddingModel.NomicEmbedText // optional ); diff --git a/examples/2.3.x/server-dotnet/examples/functions/create-deployment.md b/examples/2.3.x/server-dotnet/examples/functions/create-deployment.md index a445e35f8..cd3bcbca6 100644 --- a/examples/2.3.x/server-dotnet/examples/functions/create-deployment.md +++ b/examples/2.3.x/server-dotnet/examples/functions/create-deployment.md @@ -10,7 +10,7 @@ Client client = new Client() Functions functions = new Functions(client); -Deployment result = await functions.CreateDeployment( +Appwrite.Models.Deployment result = await functions.CreateDeployment( functionId: "<FUNCTION_ID>", code: InputFile.FromPath("./path-to-files/image.jpg"), activate: false, diff --git a/examples/2.3.x/server-dotnet/examples/functions/create-duplicate-deployment.md b/examples/2.3.x/server-dotnet/examples/functions/create-duplicate-deployment.md index 20ba6fabe..04ab5f1fb 100644 --- a/examples/2.3.x/server-dotnet/examples/functions/create-duplicate-deployment.md +++ b/examples/2.3.x/server-dotnet/examples/functions/create-duplicate-deployment.md @@ -10,7 +10,7 @@ Client client = new Client() Functions functions = new Functions(client); -Deployment result = await functions.CreateDuplicateDeployment( +Appwrite.Models.Deployment result = await functions.CreateDuplicateDeployment( functionId: "<FUNCTION_ID>", deploymentId: "<DEPLOYMENT_ID>", buildId: "<BUILD_ID>" // optional diff --git a/examples/2.3.x/server-dotnet/examples/functions/create-execution.md b/examples/2.3.x/server-dotnet/examples/functions/create-execution.md index 38e0b69b3..f497b2e3f 100644 --- a/examples/2.3.x/server-dotnet/examples/functions/create-execution.md +++ b/examples/2.3.x/server-dotnet/examples/functions/create-execution.md @@ -11,7 +11,7 @@ Client client = new Client() Functions functions = new Functions(client); -Execution result = await functions.CreateExecution( +Appwrite.Models.Execution result = await functions.CreateExecution( functionId: "<FUNCTION_ID>", body: "<BODY>", // optional async: false, // optional diff --git a/examples/2.3.x/server-dotnet/examples/functions/create-template-deployment.md b/examples/2.3.x/server-dotnet/examples/functions/create-template-deployment.md index 47edfa96e..de916b4f1 100644 --- a/examples/2.3.x/server-dotnet/examples/functions/create-template-deployment.md +++ b/examples/2.3.x/server-dotnet/examples/functions/create-template-deployment.md @@ -11,7 +11,7 @@ Client client = new Client() Functions functions = new Functions(client); -Deployment result = await functions.CreateTemplateDeployment( +Appwrite.Models.Deployment result = await functions.CreateTemplateDeployment( functionId: "<FUNCTION_ID>", repository: "<REPOSITORY>", owner: "<OWNER>", diff --git a/examples/2.3.x/server-dotnet/examples/functions/create-variable.md b/examples/2.3.x/server-dotnet/examples/functions/create-variable.md index 7e3d32f6f..a69d17dd2 100644 --- a/examples/2.3.x/server-dotnet/examples/functions/create-variable.md +++ b/examples/2.3.x/server-dotnet/examples/functions/create-variable.md @@ -10,7 +10,7 @@ Client client = new Client() Functions functions = new Functions(client); -Variable result = await functions.CreateVariable( +Appwrite.Models.Variable result = await functions.CreateVariable( functionId: "<FUNCTION_ID>", variableId: "<VARIABLE_ID>", key: "<KEY>", diff --git a/examples/2.3.x/server-dotnet/examples/functions/create-vcs-deployment.md b/examples/2.3.x/server-dotnet/examples/functions/create-vcs-deployment.md index bfc068889..a21acc9d4 100644 --- a/examples/2.3.x/server-dotnet/examples/functions/create-vcs-deployment.md +++ b/examples/2.3.x/server-dotnet/examples/functions/create-vcs-deployment.md @@ -11,7 +11,7 @@ Client client = new Client() Functions functions = new Functions(client); -Deployment result = await functions.CreateVcsDeployment( +Appwrite.Models.Deployment result = await functions.CreateVcsDeployment( functionId: "<FUNCTION_ID>", type: VCSReferenceType.Branch, reference: "<REFERENCE>", diff --git a/examples/2.3.x/server-dotnet/examples/functions/create.md b/examples/2.3.x/server-dotnet/examples/functions/create.md index 741a659a7..464c813a2 100644 --- a/examples/2.3.x/server-dotnet/examples/functions/create.md +++ b/examples/2.3.x/server-dotnet/examples/functions/create.md @@ -11,7 +11,7 @@ Client client = new Client() Functions functions = new Functions(client); -Function result = await functions.Create( +Appwrite.Models.Function result = await functions.Create( functionId: "<FUNCTION_ID>", name: "<NAME>", runtime: Runtime.Node145, diff --git a/examples/2.3.x/server-dotnet/examples/functions/get-deployment.md b/examples/2.3.x/server-dotnet/examples/functions/get-deployment.md index fb0905f58..e14da69de 100644 --- a/examples/2.3.x/server-dotnet/examples/functions/get-deployment.md +++ b/examples/2.3.x/server-dotnet/examples/functions/get-deployment.md @@ -10,7 +10,7 @@ Client client = new Client() Functions functions = new Functions(client); -Deployment result = await functions.GetDeployment( +Appwrite.Models.Deployment result = await functions.GetDeployment( functionId: "<FUNCTION_ID>", deploymentId: "<DEPLOYMENT_ID>" ); diff --git a/examples/2.3.x/server-dotnet/examples/functions/get-execution.md b/examples/2.3.x/server-dotnet/examples/functions/get-execution.md index 6f2871b4d..162f9e142 100644 --- a/examples/2.3.x/server-dotnet/examples/functions/get-execution.md +++ b/examples/2.3.x/server-dotnet/examples/functions/get-execution.md @@ -10,7 +10,7 @@ Client client = new Client() Functions functions = new Functions(client); -Execution result = await functions.GetExecution( +Appwrite.Models.Execution result = await functions.GetExecution( functionId: "<FUNCTION_ID>", executionId: "<EXECUTION_ID>" ); diff --git a/examples/2.3.x/server-dotnet/examples/functions/get-variable.md b/examples/2.3.x/server-dotnet/examples/functions/get-variable.md index 7b383b0b7..61de1e4ad 100644 --- a/examples/2.3.x/server-dotnet/examples/functions/get-variable.md +++ b/examples/2.3.x/server-dotnet/examples/functions/get-variable.md @@ -10,7 +10,7 @@ Client client = new Client() Functions functions = new Functions(client); -Variable result = await functions.GetVariable( +Appwrite.Models.Variable result = await functions.GetVariable( functionId: "<FUNCTION_ID>", variableId: "<VARIABLE_ID>" ); diff --git a/examples/2.3.x/server-dotnet/examples/functions/get.md b/examples/2.3.x/server-dotnet/examples/functions/get.md index 86ffaa29e..ae8147c1e 100644 --- a/examples/2.3.x/server-dotnet/examples/functions/get.md +++ b/examples/2.3.x/server-dotnet/examples/functions/get.md @@ -10,7 +10,7 @@ Client client = new Client() Functions functions = new Functions(client); -Function result = await functions.Get( +Appwrite.Models.Function result = await functions.Get( functionId: "<FUNCTION_ID>" ); diff --git a/examples/2.3.x/server-dotnet/examples/functions/list-deployments.md b/examples/2.3.x/server-dotnet/examples/functions/list-deployments.md index 8e368f9fa..f3769d168 100644 --- a/examples/2.3.x/server-dotnet/examples/functions/list-deployments.md +++ b/examples/2.3.x/server-dotnet/examples/functions/list-deployments.md @@ -10,7 +10,7 @@ Client client = new Client() Functions functions = new Functions(client); -DeploymentList result = await functions.ListDeployments( +Appwrite.Models.DeploymentList result = await functions.ListDeployments( functionId: "<FUNCTION_ID>", queries: new List<string>(), // optional search: "<SEARCH>", // optional diff --git a/examples/2.3.x/server-dotnet/examples/functions/list-executions.md b/examples/2.3.x/server-dotnet/examples/functions/list-executions.md index 85cc2ab48..ed7b9d428 100644 --- a/examples/2.3.x/server-dotnet/examples/functions/list-executions.md +++ b/examples/2.3.x/server-dotnet/examples/functions/list-executions.md @@ -10,7 +10,7 @@ Client client = new Client() Functions functions = new Functions(client); -ExecutionList result = await functions.ListExecutions( +Appwrite.Models.ExecutionList result = await functions.ListExecutions( functionId: "<FUNCTION_ID>", queries: new List<string>(), // optional total: false // optional diff --git a/examples/2.3.x/server-dotnet/examples/functions/list-runtimes.md b/examples/2.3.x/server-dotnet/examples/functions/list-runtimes.md index b0b686256..391e345a7 100644 --- a/examples/2.3.x/server-dotnet/examples/functions/list-runtimes.md +++ b/examples/2.3.x/server-dotnet/examples/functions/list-runtimes.md @@ -10,7 +10,8 @@ Client client = new Client() Functions functions = new Functions(client); -RuntimeList result = await functions.ListRuntimes(); - +Appwrite.Models.RuntimeList result = await functions.ListRuntimes( + total: false // optional +); ``` diff --git a/examples/2.3.x/server-dotnet/examples/functions/list-specifications.md b/examples/2.3.x/server-dotnet/examples/functions/list-specifications.md index b97f4cf42..2cf4f3604 100644 --- a/examples/2.3.x/server-dotnet/examples/functions/list-specifications.md +++ b/examples/2.3.x/server-dotnet/examples/functions/list-specifications.md @@ -10,8 +10,9 @@ Client client = new Client() Functions functions = new Functions(client); -SpecificationList result = await functions.ListSpecifications( - type: "runtimes" // optional +Appwrite.Models.SpecificationList result = await functions.ListSpecifications( + type: "runtimes", // optional + total: false // optional ); ``` diff --git a/examples/2.3.x/server-dotnet/examples/functions/list-variables.md b/examples/2.3.x/server-dotnet/examples/functions/list-variables.md index df8029e3f..fa78593e2 100644 --- a/examples/2.3.x/server-dotnet/examples/functions/list-variables.md +++ b/examples/2.3.x/server-dotnet/examples/functions/list-variables.md @@ -10,7 +10,7 @@ Client client = new Client() Functions functions = new Functions(client); -VariableList result = await functions.ListVariables( +Appwrite.Models.VariableList result = await functions.ListVariables( functionId: "<FUNCTION_ID>", queries: new List<string>(), // optional total: false // optional diff --git a/examples/2.3.x/server-dotnet/examples/functions/list.md b/examples/2.3.x/server-dotnet/examples/functions/list.md index b09d8ee62..180de0856 100644 --- a/examples/2.3.x/server-dotnet/examples/functions/list.md +++ b/examples/2.3.x/server-dotnet/examples/functions/list.md @@ -10,7 +10,7 @@ Client client = new Client() Functions functions = new Functions(client); -FunctionList result = await functions.List( +Appwrite.Models.FunctionList result = await functions.List( queries: new List<string>(), // optional search: "<SEARCH>", // optional total: false // optional diff --git a/examples/2.3.x/server-dotnet/examples/functions/update-deployment-status.md b/examples/2.3.x/server-dotnet/examples/functions/update-deployment-status.md index ee782aed6..ea1acd235 100644 --- a/examples/2.3.x/server-dotnet/examples/functions/update-deployment-status.md +++ b/examples/2.3.x/server-dotnet/examples/functions/update-deployment-status.md @@ -10,7 +10,7 @@ Client client = new Client() Functions functions = new Functions(client); -Deployment result = await functions.UpdateDeploymentStatus( +Appwrite.Models.Deployment result = await functions.UpdateDeploymentStatus( functionId: "<FUNCTION_ID>", deploymentId: "<DEPLOYMENT_ID>" ); diff --git a/examples/2.3.x/server-dotnet/examples/functions/update-function-deployment.md b/examples/2.3.x/server-dotnet/examples/functions/update-function-deployment.md index 563d5a216..ee24e774d 100644 --- a/examples/2.3.x/server-dotnet/examples/functions/update-function-deployment.md +++ b/examples/2.3.x/server-dotnet/examples/functions/update-function-deployment.md @@ -10,7 +10,7 @@ Client client = new Client() Functions functions = new Functions(client); -Function result = await functions.UpdateFunctionDeployment( +Appwrite.Models.Function result = await functions.UpdateFunctionDeployment( functionId: "<FUNCTION_ID>", deploymentId: "<DEPLOYMENT_ID>" ); diff --git a/examples/2.3.x/server-dotnet/examples/functions/update-variable.md b/examples/2.3.x/server-dotnet/examples/functions/update-variable.md index a1fd20ee2..af8f71edd 100644 --- a/examples/2.3.x/server-dotnet/examples/functions/update-variable.md +++ b/examples/2.3.x/server-dotnet/examples/functions/update-variable.md @@ -10,7 +10,7 @@ Client client = new Client() Functions functions = new Functions(client); -Variable result = await functions.UpdateVariable( +Appwrite.Models.Variable result = await functions.UpdateVariable( functionId: "<FUNCTION_ID>", variableId: "<VARIABLE_ID>", key: "<KEY>", // optional diff --git a/examples/2.3.x/server-dotnet/examples/functions/update.md b/examples/2.3.x/server-dotnet/examples/functions/update.md index 10d4a96bb..367b51bad 100644 --- a/examples/2.3.x/server-dotnet/examples/functions/update.md +++ b/examples/2.3.x/server-dotnet/examples/functions/update.md @@ -11,7 +11,7 @@ Client client = new Client() Functions functions = new Functions(client); -Function result = await functions.Update( +Appwrite.Models.Function result = await functions.Update( functionId: "<FUNCTION_ID>", name: "<NAME>", runtime: Runtime.Node145, // optional diff --git a/examples/2.3.x/server-dotnet/examples/graphql/mutation.md b/examples/2.3.x/server-dotnet/examples/graphql/mutation.md index 0145c03c7..cf72da6aa 100644 --- a/examples/2.3.x/server-dotnet/examples/graphql/mutation.md +++ b/examples/2.3.x/server-dotnet/examples/graphql/mutation.md @@ -10,8 +10,8 @@ Client client = new Client() Graphql graphql = new Graphql(client); -Any result = await graphql.Mutation( - query: [object] +Appwrite.Models.Any result = await graphql.Mutation( + query: new { query = "mutation { accountUpdateName(name: "Walter") { name } }" } ); ``` diff --git a/examples/2.3.x/server-dotnet/examples/graphql/query.md b/examples/2.3.x/server-dotnet/examples/graphql/query.md index 88c82162b..8c5a28574 100644 --- a/examples/2.3.x/server-dotnet/examples/graphql/query.md +++ b/examples/2.3.x/server-dotnet/examples/graphql/query.md @@ -10,8 +10,8 @@ Client client = new Client() Graphql graphql = new Graphql(client); -Any result = await graphql.Query( - query: [object] +Appwrite.Models.Any result = await graphql.Query( + query: new { query = "query { localeGet { ip } }" } ); ``` diff --git a/examples/2.3.x/server-dotnet/examples/locale/get.md b/examples/2.3.x/server-dotnet/examples/locale/get.md index a1dcbcc94..045bbb063 100644 --- a/examples/2.3.x/server-dotnet/examples/locale/get.md +++ b/examples/2.3.x/server-dotnet/examples/locale/get.md @@ -10,7 +10,7 @@ Client client = new Client() Locale locale = new Locale(client); -Locale result = await locale.Get(); +Appwrite.Models.Locale result = await locale.Get(); ``` diff --git a/examples/2.3.x/server-dotnet/examples/locale/list-codes.md b/examples/2.3.x/server-dotnet/examples/locale/list-codes.md index a3bfeff55..e99c1b421 100644 --- a/examples/2.3.x/server-dotnet/examples/locale/list-codes.md +++ b/examples/2.3.x/server-dotnet/examples/locale/list-codes.md @@ -10,7 +10,8 @@ Client client = new Client() Locale locale = new Locale(client); -LocaleCodeList result = await locale.ListCodes(); - +Appwrite.Models.LocaleCodeList result = await locale.ListCodes( + total: false // optional +); ``` diff --git a/examples/2.3.x/server-dotnet/examples/locale/list-continents.md b/examples/2.3.x/server-dotnet/examples/locale/list-continents.md index 02b861166..77c6a5c44 100644 --- a/examples/2.3.x/server-dotnet/examples/locale/list-continents.md +++ b/examples/2.3.x/server-dotnet/examples/locale/list-continents.md @@ -10,7 +10,8 @@ Client client = new Client() Locale locale = new Locale(client); -ContinentList result = await locale.ListContinents(); - +Appwrite.Models.ContinentList result = await locale.ListContinents( + total: false // optional +); ``` diff --git a/examples/2.3.x/server-dotnet/examples/locale/list-countries-eu.md b/examples/2.3.x/server-dotnet/examples/locale/list-countries-eu.md index 9452cd0e4..2446952cc 100644 --- a/examples/2.3.x/server-dotnet/examples/locale/list-countries-eu.md +++ b/examples/2.3.x/server-dotnet/examples/locale/list-countries-eu.md @@ -10,7 +10,8 @@ Client client = new Client() Locale locale = new Locale(client); -CountryList result = await locale.ListCountriesEU(); - +Appwrite.Models.CountryList result = await locale.ListCountriesEU( + total: false // optional +); ``` diff --git a/examples/2.3.x/server-dotnet/examples/locale/list-countries-phones.md b/examples/2.3.x/server-dotnet/examples/locale/list-countries-phones.md index e3b5346e1..9dedad0a9 100644 --- a/examples/2.3.x/server-dotnet/examples/locale/list-countries-phones.md +++ b/examples/2.3.x/server-dotnet/examples/locale/list-countries-phones.md @@ -10,7 +10,8 @@ Client client = new Client() Locale locale = new Locale(client); -PhoneList result = await locale.ListCountriesPhones(); - +Appwrite.Models.PhoneList result = await locale.ListCountriesPhones( + total: false // optional +); ``` diff --git a/examples/2.3.x/server-dotnet/examples/locale/list-countries.md b/examples/2.3.x/server-dotnet/examples/locale/list-countries.md index c9c1fb946..6f17e8053 100644 --- a/examples/2.3.x/server-dotnet/examples/locale/list-countries.md +++ b/examples/2.3.x/server-dotnet/examples/locale/list-countries.md @@ -10,7 +10,8 @@ Client client = new Client() Locale locale = new Locale(client); -CountryList result = await locale.ListCountries(); - +Appwrite.Models.CountryList result = await locale.ListCountries( + total: false // optional +); ``` diff --git a/examples/2.3.x/server-dotnet/examples/locale/list-currencies.md b/examples/2.3.x/server-dotnet/examples/locale/list-currencies.md index 18d04a69f..5e5f6ae49 100644 --- a/examples/2.3.x/server-dotnet/examples/locale/list-currencies.md +++ b/examples/2.3.x/server-dotnet/examples/locale/list-currencies.md @@ -10,7 +10,8 @@ Client client = new Client() Locale locale = new Locale(client); -CurrencyList result = await locale.ListCurrencies(); - +Appwrite.Models.CurrencyList result = await locale.ListCurrencies( + total: false // optional +); ``` diff --git a/examples/2.3.x/server-dotnet/examples/locale/list-languages.md b/examples/2.3.x/server-dotnet/examples/locale/list-languages.md index 83ed0241c..1cafaa169 100644 --- a/examples/2.3.x/server-dotnet/examples/locale/list-languages.md +++ b/examples/2.3.x/server-dotnet/examples/locale/list-languages.md @@ -10,7 +10,8 @@ Client client = new Client() Locale locale = new Locale(client); -LanguageList result = await locale.ListLanguages(); - +Appwrite.Models.LanguageList result = await locale.ListLanguages( + total: false // optional +); ``` diff --git a/examples/2.3.x/server-dotnet/examples/messaging/create-apns-provider.md b/examples/2.3.x/server-dotnet/examples/messaging/create-apns-provider.md index 55be57aab..c52f54bce 100644 --- a/examples/2.3.x/server-dotnet/examples/messaging/create-apns-provider.md +++ b/examples/2.3.x/server-dotnet/examples/messaging/create-apns-provider.md @@ -10,7 +10,7 @@ Client client = new Client() Messaging messaging = new Messaging(client); -Provider result = await messaging.CreateAPNSProvider( +Appwrite.Models.Provider result = await messaging.CreateAPNSProvider( providerId: "<PROVIDER_ID>", name: "<NAME>", authKey: "<AUTH_KEY>", // optional diff --git a/examples/2.3.x/server-dotnet/examples/messaging/create-appwrite-provider.md b/examples/2.3.x/server-dotnet/examples/messaging/create-appwrite-provider.md index 47d5596df..c030a5828 100644 --- a/examples/2.3.x/server-dotnet/examples/messaging/create-appwrite-provider.md +++ b/examples/2.3.x/server-dotnet/examples/messaging/create-appwrite-provider.md @@ -10,7 +10,7 @@ Client client = new Client() Messaging messaging = new Messaging(client); -Provider result = await messaging.CreateAppwriteProvider( +Appwrite.Models.Provider result = await messaging.CreateAppwriteProvider( providerId: "<PROVIDER_ID>", name: "<NAME>", enabled: false, // optional diff --git a/examples/2.3.x/server-dotnet/examples/messaging/create-email.md b/examples/2.3.x/server-dotnet/examples/messaging/create-email.md index c9475204a..b1b5610ac 100644 --- a/examples/2.3.x/server-dotnet/examples/messaging/create-email.md +++ b/examples/2.3.x/server-dotnet/examples/messaging/create-email.md @@ -10,7 +10,7 @@ Client client = new Client() Messaging messaging = new Messaging(client); -Message result = await messaging.CreateEmail( +Appwrite.Models.Message result = await messaging.CreateEmail( messageId: "<MESSAGE_ID>", subject: "<SUBJECT>", content: "<CONTENT>", diff --git a/examples/2.3.x/server-dotnet/examples/messaging/create-fcm-provider.md b/examples/2.3.x/server-dotnet/examples/messaging/create-fcm-provider.md index 4ef0b591f..7319e1b42 100644 --- a/examples/2.3.x/server-dotnet/examples/messaging/create-fcm-provider.md +++ b/examples/2.3.x/server-dotnet/examples/messaging/create-fcm-provider.md @@ -10,7 +10,7 @@ Client client = new Client() Messaging messaging = new Messaging(client); -Provider result = await messaging.CreateFCMProvider( +Appwrite.Models.Provider result = await messaging.CreateFCMProvider( providerId: "<PROVIDER_ID>", name: "<NAME>", serviceAccountJSON: [object], // optional diff --git a/examples/2.3.x/server-dotnet/examples/messaging/create-mailgun-provider.md b/examples/2.3.x/server-dotnet/examples/messaging/create-mailgun-provider.md index ba278efe1..d4ff36689 100644 --- a/examples/2.3.x/server-dotnet/examples/messaging/create-mailgun-provider.md +++ b/examples/2.3.x/server-dotnet/examples/messaging/create-mailgun-provider.md @@ -10,7 +10,7 @@ Client client = new Client() Messaging messaging = new Messaging(client); -Provider result = await messaging.CreateMailgunProvider( +Appwrite.Models.Provider result = await messaging.CreateMailgunProvider( providerId: "<PROVIDER_ID>", name: "<NAME>", apiKey: "<API_KEY>", // optional diff --git a/examples/2.3.x/server-dotnet/examples/messaging/create-msg-91-provider.md b/examples/2.3.x/server-dotnet/examples/messaging/create-msg-91-provider.md index e7638b6ec..d247aa8e8 100644 --- a/examples/2.3.x/server-dotnet/examples/messaging/create-msg-91-provider.md +++ b/examples/2.3.x/server-dotnet/examples/messaging/create-msg-91-provider.md @@ -10,7 +10,7 @@ Client client = new Client() Messaging messaging = new Messaging(client); -Provider result = await messaging.CreateMsg91Provider( +Appwrite.Models.Provider result = await messaging.CreateMsg91Provider( providerId: "<PROVIDER_ID>", name: "<NAME>", templateId: "<TEMPLATE_ID>", // optional diff --git a/examples/2.3.x/server-dotnet/examples/messaging/create-push.md b/examples/2.3.x/server-dotnet/examples/messaging/create-push.md index 3ee6e4230..e9c79a579 100644 --- a/examples/2.3.x/server-dotnet/examples/messaging/create-push.md +++ b/examples/2.3.x/server-dotnet/examples/messaging/create-push.md @@ -11,7 +11,7 @@ Client client = new Client() Messaging messaging = new Messaging(client); -Message result = await messaging.CreatePush( +Appwrite.Models.Message result = await messaging.CreatePush( messageId: "<MESSAGE_ID>", title: "<TITLE>", // optional body: "<BODY>", // optional @@ -30,7 +30,8 @@ Message result = await messaging.CreatePush( scheduledAt: "2020-10-15T06:38:00.000+00:00", // optional contentAvailable: false, // optional critical: false, // optional - priority: MessagePriority.Normal // optional + priority: MessagePriority.Normal, // optional + channelId: "<CHANNEL_ID>" // optional ); ``` diff --git a/examples/2.3.x/server-dotnet/examples/messaging/create-resend-provider.md b/examples/2.3.x/server-dotnet/examples/messaging/create-resend-provider.md index e2400c9f9..46d1d7552 100644 --- a/examples/2.3.x/server-dotnet/examples/messaging/create-resend-provider.md +++ b/examples/2.3.x/server-dotnet/examples/messaging/create-resend-provider.md @@ -10,7 +10,7 @@ Client client = new Client() Messaging messaging = new Messaging(client); -Provider result = await messaging.CreateResendProvider( +Appwrite.Models.Provider result = await messaging.CreateResendProvider( providerId: "<PROVIDER_ID>", name: "<NAME>", apiKey: "<API_KEY>", // optional diff --git a/examples/2.3.x/server-dotnet/examples/messaging/create-sendgrid-provider.md b/examples/2.3.x/server-dotnet/examples/messaging/create-sendgrid-provider.md index f18e9a05c..682f15ef8 100644 --- a/examples/2.3.x/server-dotnet/examples/messaging/create-sendgrid-provider.md +++ b/examples/2.3.x/server-dotnet/examples/messaging/create-sendgrid-provider.md @@ -10,7 +10,7 @@ Client client = new Client() Messaging messaging = new Messaging(client); -Provider result = await messaging.CreateSendgridProvider( +Appwrite.Models.Provider result = await messaging.CreateSendgridProvider( providerId: "<PROVIDER_ID>", name: "<NAME>", apiKey: "<API_KEY>", // optional diff --git a/examples/2.3.x/server-dotnet/examples/messaging/create-ses-provider.md b/examples/2.3.x/server-dotnet/examples/messaging/create-ses-provider.md index ef5697694..7505ba5fe 100644 --- a/examples/2.3.x/server-dotnet/examples/messaging/create-ses-provider.md +++ b/examples/2.3.x/server-dotnet/examples/messaging/create-ses-provider.md @@ -10,7 +10,7 @@ Client client = new Client() Messaging messaging = new Messaging(client); -Provider result = await messaging.CreateSesProvider( +Appwrite.Models.Provider result = await messaging.CreateSesProvider( providerId: "<PROVIDER_ID>", name: "<NAME>", accessKey: "<ACCESS_KEY>", // optional diff --git a/examples/2.3.x/server-dotnet/examples/messaging/create-sms.md b/examples/2.3.x/server-dotnet/examples/messaging/create-sms.md index 2756f28c9..40844cac1 100644 --- a/examples/2.3.x/server-dotnet/examples/messaging/create-sms.md +++ b/examples/2.3.x/server-dotnet/examples/messaging/create-sms.md @@ -10,7 +10,7 @@ Client client = new Client() Messaging messaging = new Messaging(client); -Message result = await messaging.CreateSMS( +Appwrite.Models.Message result = await messaging.CreateSMS( messageId: "<MESSAGE_ID>", content: "<CONTENT>", topics: new List<string>(), // optional diff --git a/examples/2.3.x/server-dotnet/examples/messaging/create-smtp-provider.md b/examples/2.3.x/server-dotnet/examples/messaging/create-smtp-provider.md index bbe343568..b7ac179e9 100644 --- a/examples/2.3.x/server-dotnet/examples/messaging/create-smtp-provider.md +++ b/examples/2.3.x/server-dotnet/examples/messaging/create-smtp-provider.md @@ -11,7 +11,7 @@ Client client = new Client() Messaging messaging = new Messaging(client); -Provider result = await messaging.CreateSMTPProvider( +Appwrite.Models.Provider result = await messaging.CreateSMTPProvider( providerId: "<PROVIDER_ID>", name: "<NAME>", host: "<HOST>", diff --git a/examples/2.3.x/server-dotnet/examples/messaging/create-subscriber.md b/examples/2.3.x/server-dotnet/examples/messaging/create-subscriber.md index 619abf20e..b48e65013 100644 --- a/examples/2.3.x/server-dotnet/examples/messaging/create-subscriber.md +++ b/examples/2.3.x/server-dotnet/examples/messaging/create-subscriber.md @@ -10,7 +10,7 @@ Client client = new Client() Messaging messaging = new Messaging(client); -Subscriber result = await messaging.CreateSubscriber( +Appwrite.Models.Subscriber result = await messaging.CreateSubscriber( topicId: "<TOPIC_ID>", subscriberId: "<SUBSCRIBER_ID>", targetId: "<TARGET_ID>" diff --git a/examples/2.3.x/server-dotnet/examples/messaging/create-telesign-provider.md b/examples/2.3.x/server-dotnet/examples/messaging/create-telesign-provider.md index 68c37c332..34feffd8d 100644 --- a/examples/2.3.x/server-dotnet/examples/messaging/create-telesign-provider.md +++ b/examples/2.3.x/server-dotnet/examples/messaging/create-telesign-provider.md @@ -10,7 +10,7 @@ Client client = new Client() Messaging messaging = new Messaging(client); -Provider result = await messaging.CreateTelesignProvider( +Appwrite.Models.Provider result = await messaging.CreateTelesignProvider( providerId: "<PROVIDER_ID>", name: "<NAME>", from: "+12065550100", // optional diff --git a/examples/2.3.x/server-dotnet/examples/messaging/create-textmagic-provider.md b/examples/2.3.x/server-dotnet/examples/messaging/create-textmagic-provider.md index d549516ce..9ba1b6334 100644 --- a/examples/2.3.x/server-dotnet/examples/messaging/create-textmagic-provider.md +++ b/examples/2.3.x/server-dotnet/examples/messaging/create-textmagic-provider.md @@ -10,7 +10,7 @@ Client client = new Client() Messaging messaging = new Messaging(client); -Provider result = await messaging.CreateTextmagicProvider( +Appwrite.Models.Provider result = await messaging.CreateTextmagicProvider( providerId: "<PROVIDER_ID>", name: "<NAME>", from: "+12065550100", // optional diff --git a/examples/2.3.x/server-dotnet/examples/messaging/create-topic.md b/examples/2.3.x/server-dotnet/examples/messaging/create-topic.md index 1f322933f..dc9f03384 100644 --- a/examples/2.3.x/server-dotnet/examples/messaging/create-topic.md +++ b/examples/2.3.x/server-dotnet/examples/messaging/create-topic.md @@ -10,7 +10,7 @@ Client client = new Client() Messaging messaging = new Messaging(client); -Topic result = await messaging.CreateTopic( +Appwrite.Models.Topic result = await messaging.CreateTopic( topicId: "<TOPIC_ID>", name: "<NAME>", subscribe: ["any"], // optional diff --git a/examples/2.3.x/server-dotnet/examples/messaging/create-twilio-provider.md b/examples/2.3.x/server-dotnet/examples/messaging/create-twilio-provider.md index 167d83e34..21a87211a 100644 --- a/examples/2.3.x/server-dotnet/examples/messaging/create-twilio-provider.md +++ b/examples/2.3.x/server-dotnet/examples/messaging/create-twilio-provider.md @@ -10,7 +10,7 @@ Client client = new Client() Messaging messaging = new Messaging(client); -Provider result = await messaging.CreateTwilioProvider( +Appwrite.Models.Provider result = await messaging.CreateTwilioProvider( providerId: "<PROVIDER_ID>", name: "<NAME>", from: "<FROM>", // optional diff --git a/examples/2.3.x/server-dotnet/examples/messaging/create-vonage-provider.md b/examples/2.3.x/server-dotnet/examples/messaging/create-vonage-provider.md index 8fc8335b2..6e559e1e7 100644 --- a/examples/2.3.x/server-dotnet/examples/messaging/create-vonage-provider.md +++ b/examples/2.3.x/server-dotnet/examples/messaging/create-vonage-provider.md @@ -10,7 +10,7 @@ Client client = new Client() Messaging messaging = new Messaging(client); -Provider result = await messaging.CreateVonageProvider( +Appwrite.Models.Provider result = await messaging.CreateVonageProvider( providerId: "<PROVIDER_ID>", name: "<NAME>", from: "+12065550100", // optional diff --git a/examples/2.3.x/server-dotnet/examples/messaging/get-message.md b/examples/2.3.x/server-dotnet/examples/messaging/get-message.md index 535971270..506f4eecd 100644 --- a/examples/2.3.x/server-dotnet/examples/messaging/get-message.md +++ b/examples/2.3.x/server-dotnet/examples/messaging/get-message.md @@ -10,7 +10,7 @@ Client client = new Client() Messaging messaging = new Messaging(client); -Message result = await messaging.GetMessage( +Appwrite.Models.Message result = await messaging.GetMessage( messageId: "<MESSAGE_ID>" ); diff --git a/examples/2.3.x/server-dotnet/examples/messaging/get-provider.md b/examples/2.3.x/server-dotnet/examples/messaging/get-provider.md index fb9c334e8..a4105c924 100644 --- a/examples/2.3.x/server-dotnet/examples/messaging/get-provider.md +++ b/examples/2.3.x/server-dotnet/examples/messaging/get-provider.md @@ -10,7 +10,7 @@ Client client = new Client() Messaging messaging = new Messaging(client); -Provider result = await messaging.GetProvider( +Appwrite.Models.Provider result = await messaging.GetProvider( providerId: "<PROVIDER_ID>" ); diff --git a/examples/2.3.x/server-dotnet/examples/messaging/get-subscriber.md b/examples/2.3.x/server-dotnet/examples/messaging/get-subscriber.md index 79e6bb079..89906e50b 100644 --- a/examples/2.3.x/server-dotnet/examples/messaging/get-subscriber.md +++ b/examples/2.3.x/server-dotnet/examples/messaging/get-subscriber.md @@ -10,7 +10,7 @@ Client client = new Client() Messaging messaging = new Messaging(client); -Subscriber result = await messaging.GetSubscriber( +Appwrite.Models.Subscriber result = await messaging.GetSubscriber( topicId: "<TOPIC_ID>", subscriberId: "<SUBSCRIBER_ID>" ); diff --git a/examples/2.3.x/server-dotnet/examples/messaging/get-topic.md b/examples/2.3.x/server-dotnet/examples/messaging/get-topic.md index 6fc890d05..cea35bf78 100644 --- a/examples/2.3.x/server-dotnet/examples/messaging/get-topic.md +++ b/examples/2.3.x/server-dotnet/examples/messaging/get-topic.md @@ -10,7 +10,7 @@ Client client = new Client() Messaging messaging = new Messaging(client); -Topic result = await messaging.GetTopic( +Appwrite.Models.Topic result = await messaging.GetTopic( topicId: "<TOPIC_ID>" ); diff --git a/examples/2.3.x/server-dotnet/examples/messaging/list-messages.md b/examples/2.3.x/server-dotnet/examples/messaging/list-messages.md index 6bc43ea9d..4fb4f60f4 100644 --- a/examples/2.3.x/server-dotnet/examples/messaging/list-messages.md +++ b/examples/2.3.x/server-dotnet/examples/messaging/list-messages.md @@ -10,7 +10,7 @@ Client client = new Client() Messaging messaging = new Messaging(client); -MessageList result = await messaging.ListMessages( +Appwrite.Models.MessageList result = await messaging.ListMessages( queries: new List<string>(), // optional search: "<SEARCH>", // optional total: false // optional diff --git a/examples/2.3.x/server-dotnet/examples/messaging/list-providers.md b/examples/2.3.x/server-dotnet/examples/messaging/list-providers.md index 5d2867448..bef14a1ee 100644 --- a/examples/2.3.x/server-dotnet/examples/messaging/list-providers.md +++ b/examples/2.3.x/server-dotnet/examples/messaging/list-providers.md @@ -10,7 +10,7 @@ Client client = new Client() Messaging messaging = new Messaging(client); -ProviderList result = await messaging.ListProviders( +Appwrite.Models.ProviderList result = await messaging.ListProviders( queries: new List<string>(), // optional search: "<SEARCH>", // optional total: false // optional diff --git a/examples/2.3.x/server-dotnet/examples/messaging/list-subscribers.md b/examples/2.3.x/server-dotnet/examples/messaging/list-subscribers.md index 15773d007..e9f1702b1 100644 --- a/examples/2.3.x/server-dotnet/examples/messaging/list-subscribers.md +++ b/examples/2.3.x/server-dotnet/examples/messaging/list-subscribers.md @@ -10,7 +10,7 @@ Client client = new Client() Messaging messaging = new Messaging(client); -SubscriberList result = await messaging.ListSubscribers( +Appwrite.Models.SubscriberList result = await messaging.ListSubscribers( topicId: "<TOPIC_ID>", queries: new List<string>(), // optional search: "<SEARCH>", // optional diff --git a/examples/2.3.x/server-dotnet/examples/messaging/list-targets.md b/examples/2.3.x/server-dotnet/examples/messaging/list-targets.md index e5b2cd943..a64792325 100644 --- a/examples/2.3.x/server-dotnet/examples/messaging/list-targets.md +++ b/examples/2.3.x/server-dotnet/examples/messaging/list-targets.md @@ -10,7 +10,7 @@ Client client = new Client() Messaging messaging = new Messaging(client); -TargetList result = await messaging.ListTargets( +Appwrite.Models.TargetList result = await messaging.ListTargets( messageId: "<MESSAGE_ID>", queries: new List<string>(), // optional total: false // optional diff --git a/examples/2.3.x/server-dotnet/examples/messaging/list-topics.md b/examples/2.3.x/server-dotnet/examples/messaging/list-topics.md index 4fa6f4df1..29f7d3124 100644 --- a/examples/2.3.x/server-dotnet/examples/messaging/list-topics.md +++ b/examples/2.3.x/server-dotnet/examples/messaging/list-topics.md @@ -10,7 +10,7 @@ Client client = new Client() Messaging messaging = new Messaging(client); -TopicList result = await messaging.ListTopics( +Appwrite.Models.TopicList result = await messaging.ListTopics( queries: new List<string>(), // optional search: "<SEARCH>", // optional total: false // optional diff --git a/examples/2.3.x/server-dotnet/examples/messaging/update-apns-provider.md b/examples/2.3.x/server-dotnet/examples/messaging/update-apns-provider.md index d8a04a49d..ae7df0d83 100644 --- a/examples/2.3.x/server-dotnet/examples/messaging/update-apns-provider.md +++ b/examples/2.3.x/server-dotnet/examples/messaging/update-apns-provider.md @@ -10,7 +10,7 @@ Client client = new Client() Messaging messaging = new Messaging(client); -Provider result = await messaging.UpdateAPNSProvider( +Appwrite.Models.Provider result = await messaging.UpdateAPNSProvider( providerId: "<PROVIDER_ID>", name: "<NAME>", // optional enabled: false, // optional diff --git a/examples/2.3.x/server-dotnet/examples/messaging/update-appwrite-provider.md b/examples/2.3.x/server-dotnet/examples/messaging/update-appwrite-provider.md index 4db615a0e..54969ff62 100644 --- a/examples/2.3.x/server-dotnet/examples/messaging/update-appwrite-provider.md +++ b/examples/2.3.x/server-dotnet/examples/messaging/update-appwrite-provider.md @@ -10,7 +10,7 @@ Client client = new Client() Messaging messaging = new Messaging(client); -Provider result = await messaging.UpdateAppwriteProvider( +Appwrite.Models.Provider result = await messaging.UpdateAppwriteProvider( providerId: "<PROVIDER_ID>", name: "<NAME>", // optional enabled: false, // optional diff --git a/examples/2.3.x/server-dotnet/examples/messaging/update-email.md b/examples/2.3.x/server-dotnet/examples/messaging/update-email.md index 44accfc2a..4b268563c 100644 --- a/examples/2.3.x/server-dotnet/examples/messaging/update-email.md +++ b/examples/2.3.x/server-dotnet/examples/messaging/update-email.md @@ -10,21 +10,21 @@ Client client = new Client() Messaging messaging = new Messaging(client); -Message result = await messaging.UpdateEmail( +Appwrite.Models.Message result = await messaging.UpdateEmail( messageId: "<MESSAGE_ID>", + subject: "<SUBJECT>", // optional + content: "<CONTENT>", // optional topics: new List<string>(), // optional users: new List<string>(), // optional targets: new List<string>(), // optional - subject: "<SUBJECT>", // optional - content: "<CONTENT>", // optional - draft: false, // optional - html: false, // optional cc: new List<string>(), // optional bcc: new List<string>(), // optional + attachments: new List<string>(), // optional replyToEmail: "email@example.com", // optional replyToName: "<REPLY_TO_NAME>", // optional - scheduledAt: "2020-10-15T06:38:00.000+00:00", // optional - attachments: new List<string>() // optional + draft: false, // optional + html: false, // optional + scheduledAt: "2020-10-15T06:38:00.000+00:00" // optional ); ``` diff --git a/examples/2.3.x/server-dotnet/examples/messaging/update-fcm-provider.md b/examples/2.3.x/server-dotnet/examples/messaging/update-fcm-provider.md index c7381ed28..2245d5a02 100644 --- a/examples/2.3.x/server-dotnet/examples/messaging/update-fcm-provider.md +++ b/examples/2.3.x/server-dotnet/examples/messaging/update-fcm-provider.md @@ -10,7 +10,7 @@ Client client = new Client() Messaging messaging = new Messaging(client); -Provider result = await messaging.UpdateFCMProvider( +Appwrite.Models.Provider result = await messaging.UpdateFCMProvider( providerId: "<PROVIDER_ID>", name: "<NAME>", // optional enabled: false, // optional diff --git a/examples/2.3.x/server-dotnet/examples/messaging/update-mailgun-provider.md b/examples/2.3.x/server-dotnet/examples/messaging/update-mailgun-provider.md index 95b8466d2..fd46baf8c 100644 --- a/examples/2.3.x/server-dotnet/examples/messaging/update-mailgun-provider.md +++ b/examples/2.3.x/server-dotnet/examples/messaging/update-mailgun-provider.md @@ -10,7 +10,7 @@ Client client = new Client() Messaging messaging = new Messaging(client); -Provider result = await messaging.UpdateMailgunProvider( +Appwrite.Models.Provider result = await messaging.UpdateMailgunProvider( providerId: "<PROVIDER_ID>", name: "<NAME>", // optional apiKey: "<API_KEY>", // optional diff --git a/examples/2.3.x/server-dotnet/examples/messaging/update-msg-91-provider.md b/examples/2.3.x/server-dotnet/examples/messaging/update-msg-91-provider.md index 3652c6a0a..2e6382d59 100644 --- a/examples/2.3.x/server-dotnet/examples/messaging/update-msg-91-provider.md +++ b/examples/2.3.x/server-dotnet/examples/messaging/update-msg-91-provider.md @@ -10,7 +10,7 @@ Client client = new Client() Messaging messaging = new Messaging(client); -Provider result = await messaging.UpdateMsg91Provider( +Appwrite.Models.Provider result = await messaging.UpdateMsg91Provider( providerId: "<PROVIDER_ID>", name: "<NAME>", // optional enabled: false, // optional diff --git a/examples/2.3.x/server-dotnet/examples/messaging/update-push.md b/examples/2.3.x/server-dotnet/examples/messaging/update-push.md index 6a151cca7..366c3f444 100644 --- a/examples/2.3.x/server-dotnet/examples/messaging/update-push.md +++ b/examples/2.3.x/server-dotnet/examples/messaging/update-push.md @@ -11,13 +11,13 @@ Client client = new Client() Messaging messaging = new Messaging(client); -Message result = await messaging.UpdatePush( +Appwrite.Models.Message result = await messaging.UpdatePush( messageId: "<MESSAGE_ID>", + title: "<TITLE>", // optional + body: "<BODY>", // optional topics: new List<string>(), // optional users: new List<string>(), // optional targets: new List<string>(), // optional - title: "<TITLE>", // optional - body: "<BODY>", // optional data: [object], // optional action: "<ACTION>", // optional image: "<ID1:ID2>", // optional @@ -30,7 +30,8 @@ Message result = await messaging.UpdatePush( scheduledAt: "2020-10-15T06:38:00.000+00:00", // optional contentAvailable: false, // optional critical: false, // optional - priority: MessagePriority.Normal // optional + priority: MessagePriority.Normal, // optional + channelId: "<CHANNEL_ID>" // optional ); ``` diff --git a/examples/2.3.x/server-dotnet/examples/messaging/update-resend-provider.md b/examples/2.3.x/server-dotnet/examples/messaging/update-resend-provider.md index 9bef411a5..ea4f2e5d9 100644 --- a/examples/2.3.x/server-dotnet/examples/messaging/update-resend-provider.md +++ b/examples/2.3.x/server-dotnet/examples/messaging/update-resend-provider.md @@ -10,7 +10,7 @@ Client client = new Client() Messaging messaging = new Messaging(client); -Provider result = await messaging.UpdateResendProvider( +Appwrite.Models.Provider result = await messaging.UpdateResendProvider( providerId: "<PROVIDER_ID>", name: "<NAME>", // optional enabled: false, // optional diff --git a/examples/2.3.x/server-dotnet/examples/messaging/update-sendgrid-provider.md b/examples/2.3.x/server-dotnet/examples/messaging/update-sendgrid-provider.md index b98feaa13..dbfe4d62b 100644 --- a/examples/2.3.x/server-dotnet/examples/messaging/update-sendgrid-provider.md +++ b/examples/2.3.x/server-dotnet/examples/messaging/update-sendgrid-provider.md @@ -10,7 +10,7 @@ Client client = new Client() Messaging messaging = new Messaging(client); -Provider result = await messaging.UpdateSendgridProvider( +Appwrite.Models.Provider result = await messaging.UpdateSendgridProvider( providerId: "<PROVIDER_ID>", name: "<NAME>", // optional enabled: false, // optional diff --git a/examples/2.3.x/server-dotnet/examples/messaging/update-ses-provider.md b/examples/2.3.x/server-dotnet/examples/messaging/update-ses-provider.md index 982cd5493..65350d1b8 100644 --- a/examples/2.3.x/server-dotnet/examples/messaging/update-ses-provider.md +++ b/examples/2.3.x/server-dotnet/examples/messaging/update-ses-provider.md @@ -10,7 +10,7 @@ Client client = new Client() Messaging messaging = new Messaging(client); -Provider result = await messaging.UpdateSesProvider( +Appwrite.Models.Provider result = await messaging.UpdateSesProvider( providerId: "<PROVIDER_ID>", name: "<NAME>", // optional enabled: false, // optional diff --git a/examples/2.3.x/server-dotnet/examples/messaging/update-sms.md b/examples/2.3.x/server-dotnet/examples/messaging/update-sms.md index 3d38d9fb6..3699a49e9 100644 --- a/examples/2.3.x/server-dotnet/examples/messaging/update-sms.md +++ b/examples/2.3.x/server-dotnet/examples/messaging/update-sms.md @@ -10,12 +10,12 @@ Client client = new Client() Messaging messaging = new Messaging(client); -Message result = await messaging.UpdateSMS( +Appwrite.Models.Message result = await messaging.UpdateSMS( messageId: "<MESSAGE_ID>", + content: "<CONTENT>", // optional topics: new List<string>(), // optional users: new List<string>(), // optional targets: new List<string>(), // optional - content: "<CONTENT>", // optional draft: false, // optional scheduledAt: "2020-10-15T06:38:00.000+00:00" // optional ); diff --git a/examples/2.3.x/server-dotnet/examples/messaging/update-smtp-provider.md b/examples/2.3.x/server-dotnet/examples/messaging/update-smtp-provider.md index 2d9da6ca5..70b427e06 100644 --- a/examples/2.3.x/server-dotnet/examples/messaging/update-smtp-provider.md +++ b/examples/2.3.x/server-dotnet/examples/messaging/update-smtp-provider.md @@ -11,7 +11,7 @@ Client client = new Client() Messaging messaging = new Messaging(client); -Provider result = await messaging.UpdateSMTPProvider( +Appwrite.Models.Provider result = await messaging.UpdateSMTPProvider( providerId: "<PROVIDER_ID>", name: "<NAME>", // optional host: "<HOST>", // optional diff --git a/examples/2.3.x/server-dotnet/examples/messaging/update-telesign-provider.md b/examples/2.3.x/server-dotnet/examples/messaging/update-telesign-provider.md index 5a7048b1e..a285bc54b 100644 --- a/examples/2.3.x/server-dotnet/examples/messaging/update-telesign-provider.md +++ b/examples/2.3.x/server-dotnet/examples/messaging/update-telesign-provider.md @@ -10,7 +10,7 @@ Client client = new Client() Messaging messaging = new Messaging(client); -Provider result = await messaging.UpdateTelesignProvider( +Appwrite.Models.Provider result = await messaging.UpdateTelesignProvider( providerId: "<PROVIDER_ID>", name: "<NAME>", // optional enabled: false, // optional diff --git a/examples/2.3.x/server-dotnet/examples/messaging/update-textmagic-provider.md b/examples/2.3.x/server-dotnet/examples/messaging/update-textmagic-provider.md index 4f0a7a0dc..ce92a7f49 100644 --- a/examples/2.3.x/server-dotnet/examples/messaging/update-textmagic-provider.md +++ b/examples/2.3.x/server-dotnet/examples/messaging/update-textmagic-provider.md @@ -10,7 +10,7 @@ Client client = new Client() Messaging messaging = new Messaging(client); -Provider result = await messaging.UpdateTextmagicProvider( +Appwrite.Models.Provider result = await messaging.UpdateTextmagicProvider( providerId: "<PROVIDER_ID>", name: "<NAME>", // optional enabled: false, // optional diff --git a/examples/2.3.x/server-dotnet/examples/messaging/update-topic.md b/examples/2.3.x/server-dotnet/examples/messaging/update-topic.md index a63f52e9c..aa80861b9 100644 --- a/examples/2.3.x/server-dotnet/examples/messaging/update-topic.md +++ b/examples/2.3.x/server-dotnet/examples/messaging/update-topic.md @@ -10,7 +10,7 @@ Client client = new Client() Messaging messaging = new Messaging(client); -Topic result = await messaging.UpdateTopic( +Appwrite.Models.Topic result = await messaging.UpdateTopic( topicId: "<TOPIC_ID>", name: "<NAME>", // optional subscribe: ["any"], // optional diff --git a/examples/2.3.x/server-dotnet/examples/messaging/update-twilio-provider.md b/examples/2.3.x/server-dotnet/examples/messaging/update-twilio-provider.md index a1d51e9e2..2b161d26f 100644 --- a/examples/2.3.x/server-dotnet/examples/messaging/update-twilio-provider.md +++ b/examples/2.3.x/server-dotnet/examples/messaging/update-twilio-provider.md @@ -10,7 +10,7 @@ Client client = new Client() Messaging messaging = new Messaging(client); -Provider result = await messaging.UpdateTwilioProvider( +Appwrite.Models.Provider result = await messaging.UpdateTwilioProvider( providerId: "<PROVIDER_ID>", name: "<NAME>", // optional enabled: false, // optional diff --git a/examples/2.3.x/server-dotnet/examples/messaging/update-vonage-provider.md b/examples/2.3.x/server-dotnet/examples/messaging/update-vonage-provider.md index d26a17dd8..d154a90ba 100644 --- a/examples/2.3.x/server-dotnet/examples/messaging/update-vonage-provider.md +++ b/examples/2.3.x/server-dotnet/examples/messaging/update-vonage-provider.md @@ -10,7 +10,7 @@ Client client = new Client() Messaging messaging = new Messaging(client); -Provider result = await messaging.UpdateVonageProvider( +Appwrite.Models.Provider result = await messaging.UpdateVonageProvider( providerId: "<PROVIDER_ID>", name: "<NAME>", // optional enabled: false, // optional diff --git a/examples/2.3.x/server-dotnet/examples/mongo/create-backup-policy.md b/examples/2.3.x/server-dotnet/examples/mongo/create-backup-policy.md index 41e2ed4b2..a43b84b31 100644 --- a/examples/2.3.x/server-dotnet/examples/mongo/create-backup-policy.md +++ b/examples/2.3.x/server-dotnet/examples/mongo/create-backup-policy.md @@ -10,7 +10,7 @@ Client client = new Client() Mongo mongo = new Mongo(client); -BackupPolicy result = await mongo.CreateBackupPolicy( +Appwrite.Models.BackupPolicy result = await mongo.CreateBackupPolicy( databaseId: "<DATABASE_ID>", policyId: "<POLICY_ID>", name: "<NAME>", diff --git a/examples/2.3.x/server-dotnet/examples/mongo/create-backup.md b/examples/2.3.x/server-dotnet/examples/mongo/create-backup.md index e25efa993..96570471c 100644 --- a/examples/2.3.x/server-dotnet/examples/mongo/create-backup.md +++ b/examples/2.3.x/server-dotnet/examples/mongo/create-backup.md @@ -10,7 +10,7 @@ Client client = new Client() Mongo mongo = new Mongo(client); -DedicatedDatabaseBackup result = await mongo.CreateBackup( +Appwrite.Models.DedicatedDatabaseBackup result = await mongo.CreateBackup( databaseId: "<DATABASE_ID>", type: "full" // optional ); diff --git a/examples/2.3.x/server-dotnet/examples/mongo/create-branch.md b/examples/2.3.x/server-dotnet/examples/mongo/create-branch.md index 8c01df43b..f3190494d 100644 --- a/examples/2.3.x/server-dotnet/examples/mongo/create-branch.md +++ b/examples/2.3.x/server-dotnet/examples/mongo/create-branch.md @@ -10,7 +10,7 @@ Client client = new Client() Mongo mongo = new Mongo(client); -DedicatedDatabase result = await mongo.CreateBranch( +Appwrite.Models.DedicatedDatabase result = await mongo.CreateBranch( databaseId: "<DATABASE_ID>", branchId: "<BRANCH_ID>", // optional ttl: 300 // optional diff --git a/examples/2.3.x/server-dotnet/examples/mongo/create-failover.md b/examples/2.3.x/server-dotnet/examples/mongo/create-failover.md index d4a6686e8..1bde932e6 100644 --- a/examples/2.3.x/server-dotnet/examples/mongo/create-failover.md +++ b/examples/2.3.x/server-dotnet/examples/mongo/create-failover.md @@ -10,7 +10,7 @@ Client client = new Client() Mongo mongo = new Mongo(client); -DedicatedDatabase result = await mongo.CreateFailover( +Appwrite.Models.DedicatedDatabase result = await mongo.CreateFailover( databaseId: "<DATABASE_ID>", targetReplicaId: "<TARGET_REPLICA_ID>" // optional ); diff --git a/examples/2.3.x/server-dotnet/examples/mongo/create-migration.md b/examples/2.3.x/server-dotnet/examples/mongo/create-migration.md index b7fbcc7a5..7cc6a7c5b 100644 --- a/examples/2.3.x/server-dotnet/examples/mongo/create-migration.md +++ b/examples/2.3.x/server-dotnet/examples/mongo/create-migration.md @@ -10,7 +10,7 @@ Client client = new Client() Mongo mongo = new Mongo(client); -DedicatedDatabase result = await mongo.CreateMigration( +Appwrite.Models.DedicatedDatabase result = await mongo.CreateMigration( databaseId: "<DATABASE_ID>", targetType: "shared", specification: "<SPECIFICATION>" // optional diff --git a/examples/2.3.x/server-dotnet/examples/mongo/create-restoration.md b/examples/2.3.x/server-dotnet/examples/mongo/create-restoration.md index 8e9358eb1..999f0b094 100644 --- a/examples/2.3.x/server-dotnet/examples/mongo/create-restoration.md +++ b/examples/2.3.x/server-dotnet/examples/mongo/create-restoration.md @@ -10,7 +10,7 @@ Client client = new Client() Mongo mongo = new Mongo(client); -DedicatedDatabaseRestoration result = await mongo.CreateRestoration( +Appwrite.Models.DedicatedDatabaseRestoration result = await mongo.CreateRestoration( databaseId: "<DATABASE_ID>", type: "backup", // optional backupId: "<BACKUP_ID>", // optional diff --git a/examples/2.3.x/server-dotnet/examples/mongo/create-upgrade.md b/examples/2.3.x/server-dotnet/examples/mongo/create-upgrade.md index c18e2d627..a7d17cef0 100644 --- a/examples/2.3.x/server-dotnet/examples/mongo/create-upgrade.md +++ b/examples/2.3.x/server-dotnet/examples/mongo/create-upgrade.md @@ -10,7 +10,7 @@ Client client = new Client() Mongo mongo = new Mongo(client); -DedicatedDatabase result = await mongo.CreateUpgrade( +Appwrite.Models.DedicatedDatabase result = await mongo.CreateUpgrade( databaseId: "<DATABASE_ID>", targetVersion: "<TARGET_VERSION>" ); diff --git a/examples/2.3.x/server-dotnet/examples/mongo/create.md b/examples/2.3.x/server-dotnet/examples/mongo/create.md index c6ef970c5..a251a3dd4 100644 --- a/examples/2.3.x/server-dotnet/examples/mongo/create.md +++ b/examples/2.3.x/server-dotnet/examples/mongo/create.md @@ -10,7 +10,7 @@ Client client = new Client() Mongo mongo = new Mongo(client); -DedicatedDatabase result = await mongo.Create( +Appwrite.Models.DedicatedDatabase result = await mongo.Create( databaseId: "<DATABASE_ID>", name: "<NAME>", version: "17", // optional diff --git a/examples/2.3.x/server-dotnet/examples/mongo/get-backup-policy.md b/examples/2.3.x/server-dotnet/examples/mongo/get-backup-policy.md index d05d979d2..c2256ff50 100644 --- a/examples/2.3.x/server-dotnet/examples/mongo/get-backup-policy.md +++ b/examples/2.3.x/server-dotnet/examples/mongo/get-backup-policy.md @@ -10,7 +10,7 @@ Client client = new Client() Mongo mongo = new Mongo(client); -BackupPolicy result = await mongo.GetBackupPolicy( +Appwrite.Models.BackupPolicy result = await mongo.GetBackupPolicy( databaseId: "<DATABASE_ID>", policyId: "<POLICY_ID>" ); diff --git a/examples/2.3.x/server-dotnet/examples/mongo/get-backup.md b/examples/2.3.x/server-dotnet/examples/mongo/get-backup.md index ced57a21f..7969404c8 100644 --- a/examples/2.3.x/server-dotnet/examples/mongo/get-backup.md +++ b/examples/2.3.x/server-dotnet/examples/mongo/get-backup.md @@ -10,7 +10,7 @@ Client client = new Client() Mongo mongo = new Mongo(client); -DedicatedDatabaseBackup result = await mongo.GetBackup( +Appwrite.Models.DedicatedDatabaseBackup result = await mongo.GetBackup( databaseId: "<DATABASE_ID>", backupId: "<BACKUP_ID>" ); diff --git a/examples/2.3.x/server-dotnet/examples/mongo/get-pitr.md b/examples/2.3.x/server-dotnet/examples/mongo/get-pitr.md index 55a1e64e8..28172a8bb 100644 --- a/examples/2.3.x/server-dotnet/examples/mongo/get-pitr.md +++ b/examples/2.3.x/server-dotnet/examples/mongo/get-pitr.md @@ -10,7 +10,7 @@ Client client = new Client() Mongo mongo = new Mongo(client); -DedicatedDatabasePITRWindows result = await mongo.GetPitr( +Appwrite.Models.DedicatedDatabasePITRWindows result = await mongo.GetPitr( databaseId: "<DATABASE_ID>" ); diff --git a/examples/2.3.x/server-dotnet/examples/mongo/get-replicas.md b/examples/2.3.x/server-dotnet/examples/mongo/get-replicas.md index 7c52eceed..530186f24 100644 --- a/examples/2.3.x/server-dotnet/examples/mongo/get-replicas.md +++ b/examples/2.3.x/server-dotnet/examples/mongo/get-replicas.md @@ -10,7 +10,7 @@ Client client = new Client() Mongo mongo = new Mongo(client); -DedicatedDatabaseReplicas result = await mongo.GetReplicas( +Appwrite.Models.DedicatedDatabaseReplicas result = await mongo.GetReplicas( databaseId: "<DATABASE_ID>" ); diff --git a/examples/2.3.x/server-dotnet/examples/mongo/get-restoration.md b/examples/2.3.x/server-dotnet/examples/mongo/get-restoration.md index 32e830080..42de6a4ab 100644 --- a/examples/2.3.x/server-dotnet/examples/mongo/get-restoration.md +++ b/examples/2.3.x/server-dotnet/examples/mongo/get-restoration.md @@ -10,7 +10,7 @@ Client client = new Client() Mongo mongo = new Mongo(client); -DedicatedDatabaseRestoration result = await mongo.GetRestoration( +Appwrite.Models.DedicatedDatabaseRestoration result = await mongo.GetRestoration( databaseId: "<DATABASE_ID>", restorationId: "<RESTORATION_ID>" ); diff --git a/examples/2.3.x/server-dotnet/examples/mongo/get-status.md b/examples/2.3.x/server-dotnet/examples/mongo/get-status.md index 883f3b97c..f10d3b88d 100644 --- a/examples/2.3.x/server-dotnet/examples/mongo/get-status.md +++ b/examples/2.3.x/server-dotnet/examples/mongo/get-status.md @@ -10,7 +10,7 @@ Client client = new Client() Mongo mongo = new Mongo(client); -DatabaseStatus result = await mongo.GetStatus( +Appwrite.Models.DatabaseStatus result = await mongo.GetStatus( databaseId: "<DATABASE_ID>" ); diff --git a/examples/2.3.x/server-dotnet/examples/mongo/get.md b/examples/2.3.x/server-dotnet/examples/mongo/get.md index 86e0b80c8..a5a98afbc 100644 --- a/examples/2.3.x/server-dotnet/examples/mongo/get.md +++ b/examples/2.3.x/server-dotnet/examples/mongo/get.md @@ -10,7 +10,7 @@ Client client = new Client() Mongo mongo = new Mongo(client); -DedicatedDatabase result = await mongo.Get( +Appwrite.Models.DedicatedDatabase result = await mongo.Get( databaseId: "<DATABASE_ID>" ); diff --git a/examples/2.3.x/server-dotnet/examples/mongo/list-backup-policies.md b/examples/2.3.x/server-dotnet/examples/mongo/list-backup-policies.md index 9b56913a9..00b0781be 100644 --- a/examples/2.3.x/server-dotnet/examples/mongo/list-backup-policies.md +++ b/examples/2.3.x/server-dotnet/examples/mongo/list-backup-policies.md @@ -10,7 +10,7 @@ Client client = new Client() Mongo mongo = new Mongo(client); -BackupPolicyList result = await mongo.ListBackupPolicies( +Appwrite.Models.BackupPolicyList result = await mongo.ListBackupPolicies( databaseId: "<DATABASE_ID>", queries: new List<string>() // optional ); diff --git a/examples/2.3.x/server-dotnet/examples/mongo/list-backups.md b/examples/2.3.x/server-dotnet/examples/mongo/list-backups.md index 6da449f88..5a0268346 100644 --- a/examples/2.3.x/server-dotnet/examples/mongo/list-backups.md +++ b/examples/2.3.x/server-dotnet/examples/mongo/list-backups.md @@ -10,7 +10,7 @@ Client client = new Client() Mongo mongo = new Mongo(client); -DedicatedDatabaseBackupList result = await mongo.ListBackups( +Appwrite.Models.DedicatedDatabaseBackupList result = await mongo.ListBackups( databaseId: "<DATABASE_ID>", queries: new List<string>() // optional ); diff --git a/examples/2.3.x/server-dotnet/examples/mongo/list-branches.md b/examples/2.3.x/server-dotnet/examples/mongo/list-branches.md index f68102dca..40086f77b 100644 --- a/examples/2.3.x/server-dotnet/examples/mongo/list-branches.md +++ b/examples/2.3.x/server-dotnet/examples/mongo/list-branches.md @@ -10,7 +10,7 @@ Client client = new Client() Mongo mongo = new Mongo(client); -DedicatedDatabaseBranchList result = await mongo.ListBranches( +Appwrite.Models.DedicatedDatabaseBranchList result = await mongo.ListBranches( databaseId: "<DATABASE_ID>" ); diff --git a/examples/2.3.x/server-dotnet/examples/mongo/list-operations.md b/examples/2.3.x/server-dotnet/examples/mongo/list-operations.md index c2dc679f1..dfea09218 100644 --- a/examples/2.3.x/server-dotnet/examples/mongo/list-operations.md +++ b/examples/2.3.x/server-dotnet/examples/mongo/list-operations.md @@ -10,7 +10,7 @@ Client client = new Client() Mongo mongo = new Mongo(client); -DedicatedDatabaseOperationList result = await mongo.ListOperations( +Appwrite.Models.DedicatedDatabaseOperationList result = await mongo.ListOperations( databaseId: "<DATABASE_ID>", status: "queued", // optional limit: 1, // optional diff --git a/examples/2.3.x/server-dotnet/examples/mongo/list-restorations.md b/examples/2.3.x/server-dotnet/examples/mongo/list-restorations.md index b5655c374..4ee274b9e 100644 --- a/examples/2.3.x/server-dotnet/examples/mongo/list-restorations.md +++ b/examples/2.3.x/server-dotnet/examples/mongo/list-restorations.md @@ -10,7 +10,7 @@ Client client = new Client() Mongo mongo = new Mongo(client); -DedicatedDatabaseRestorationList result = await mongo.ListRestorations( +Appwrite.Models.DedicatedDatabaseRestorationList result = await mongo.ListRestorations( databaseId: "<DATABASE_ID>", status: "pending", // optional type: "backup", // optional diff --git a/examples/2.3.x/server-dotnet/examples/mongo/list-specifications.md b/examples/2.3.x/server-dotnet/examples/mongo/list-specifications.md index 474e61230..77b66296e 100644 --- a/examples/2.3.x/server-dotnet/examples/mongo/list-specifications.md +++ b/examples/2.3.x/server-dotnet/examples/mongo/list-specifications.md @@ -10,7 +10,7 @@ Client client = new Client() Mongo mongo = new Mongo(client); -DedicatedDatabaseSpecificationList result = await mongo.ListSpecifications(); +Appwrite.Models.DedicatedDatabaseSpecificationList result = await mongo.ListSpecifications(); ``` diff --git a/examples/2.3.x/server-dotnet/examples/mongo/list.md b/examples/2.3.x/server-dotnet/examples/mongo/list.md index bd222419e..6f7eae353 100644 --- a/examples/2.3.x/server-dotnet/examples/mongo/list.md +++ b/examples/2.3.x/server-dotnet/examples/mongo/list.md @@ -10,7 +10,7 @@ Client client = new Client() Mongo mongo = new Mongo(client); -DedicatedDatabaseList result = await mongo.List( +Appwrite.Models.DedicatedDatabaseList result = await mongo.List( queries: new List<string>() // optional ); diff --git a/examples/2.3.x/server-dotnet/examples/mongo/update-backup-policy.md b/examples/2.3.x/server-dotnet/examples/mongo/update-backup-policy.md index 7bec7bf3c..b58ad2660 100644 --- a/examples/2.3.x/server-dotnet/examples/mongo/update-backup-policy.md +++ b/examples/2.3.x/server-dotnet/examples/mongo/update-backup-policy.md @@ -10,7 +10,7 @@ Client client = new Client() Mongo mongo = new Mongo(client); -BackupPolicy result = await mongo.UpdateBackupPolicy( +Appwrite.Models.BackupPolicy result = await mongo.UpdateBackupPolicy( databaseId: "<DATABASE_ID>", policyId: "<POLICY_ID>", name: "<NAME>", // optional diff --git a/examples/2.3.x/server-dotnet/examples/mongo/update-backup-storage.md b/examples/2.3.x/server-dotnet/examples/mongo/update-backup-storage.md index 27f365d41..24954f1a0 100644 --- a/examples/2.3.x/server-dotnet/examples/mongo/update-backup-storage.md +++ b/examples/2.3.x/server-dotnet/examples/mongo/update-backup-storage.md @@ -10,7 +10,7 @@ Client client = new Client() Mongo mongo = new Mongo(client); -DedicatedDatabaseBackupStorage result = await mongo.UpdateBackupStorage( +Appwrite.Models.DedicatedDatabaseBackupStorage result = await mongo.UpdateBackupStorage( databaseId: "<DATABASE_ID>", provider: "s3", bucket: "<BUCKET>", diff --git a/examples/2.3.x/server-dotnet/examples/mongo/update-credentials.md b/examples/2.3.x/server-dotnet/examples/mongo/update-credentials.md index 9dafd042d..c28f62777 100644 --- a/examples/2.3.x/server-dotnet/examples/mongo/update-credentials.md +++ b/examples/2.3.x/server-dotnet/examples/mongo/update-credentials.md @@ -10,7 +10,7 @@ Client client = new Client() Mongo mongo = new Mongo(client); -DedicatedDatabaseOperation result = await mongo.UpdateCredentials( +Appwrite.Models.DedicatedDatabaseOperation result = await mongo.UpdateCredentials( databaseId: "<DATABASE_ID>" ); diff --git a/examples/2.3.x/server-dotnet/examples/mongo/update-maintenance.md b/examples/2.3.x/server-dotnet/examples/mongo/update-maintenance.md index e64faec63..a8fd32ba7 100644 --- a/examples/2.3.x/server-dotnet/examples/mongo/update-maintenance.md +++ b/examples/2.3.x/server-dotnet/examples/mongo/update-maintenance.md @@ -10,7 +10,7 @@ Client client = new Client() Mongo mongo = new Mongo(client); -DedicatedDatabase result = await mongo.UpdateMaintenance( +Appwrite.Models.DedicatedDatabase result = await mongo.UpdateMaintenance( databaseId: "<DATABASE_ID>", day: "sun", hourUtc: 0 diff --git a/examples/2.3.x/server-dotnet/examples/mongo/update.md b/examples/2.3.x/server-dotnet/examples/mongo/update.md index 6c9b8d0a3..fea909c0d 100644 --- a/examples/2.3.x/server-dotnet/examples/mongo/update.md +++ b/examples/2.3.x/server-dotnet/examples/mongo/update.md @@ -10,7 +10,7 @@ Client client = new Client() Mongo mongo = new Mongo(client); -DedicatedDatabase result = await mongo.Update( +Appwrite.Models.DedicatedDatabase result = await mongo.Update( databaseId: "<DATABASE_ID>", name: "<NAME>", // optional status: "ready", // optional diff --git a/examples/2.3.x/server-dotnet/examples/mysql/create-backup-policy.md b/examples/2.3.x/server-dotnet/examples/mysql/create-backup-policy.md index ca410dc06..0239bf179 100644 --- a/examples/2.3.x/server-dotnet/examples/mysql/create-backup-policy.md +++ b/examples/2.3.x/server-dotnet/examples/mysql/create-backup-policy.md @@ -10,7 +10,7 @@ Client client = new Client() Mysql mysql = new Mysql(client); -BackupPolicy result = await mysql.CreateBackupPolicy( +Appwrite.Models.BackupPolicy result = await mysql.CreateBackupPolicy( databaseId: "<DATABASE_ID>", policyId: "<POLICY_ID>", name: "<NAME>", diff --git a/examples/2.3.x/server-dotnet/examples/mysql/create-backup.md b/examples/2.3.x/server-dotnet/examples/mysql/create-backup.md index f5e271dfb..a2ecf9c22 100644 --- a/examples/2.3.x/server-dotnet/examples/mysql/create-backup.md +++ b/examples/2.3.x/server-dotnet/examples/mysql/create-backup.md @@ -10,7 +10,7 @@ Client client = new Client() Mysql mysql = new Mysql(client); -DedicatedDatabaseBackup result = await mysql.CreateBackup( +Appwrite.Models.DedicatedDatabaseBackup result = await mysql.CreateBackup( databaseId: "<DATABASE_ID>", type: "full" // optional ); diff --git a/examples/2.3.x/server-dotnet/examples/mysql/create-branch.md b/examples/2.3.x/server-dotnet/examples/mysql/create-branch.md index a4d9283f1..1862572d7 100644 --- a/examples/2.3.x/server-dotnet/examples/mysql/create-branch.md +++ b/examples/2.3.x/server-dotnet/examples/mysql/create-branch.md @@ -10,7 +10,7 @@ Client client = new Client() Mysql mysql = new Mysql(client); -DedicatedDatabase result = await mysql.CreateBranch( +Appwrite.Models.DedicatedDatabase result = await mysql.CreateBranch( databaseId: "<DATABASE_ID>", branchId: "<BRANCH_ID>", // optional ttl: 300 // optional diff --git a/examples/2.3.x/server-dotnet/examples/mysql/create-execution.md b/examples/2.3.x/server-dotnet/examples/mysql/create-execution.md index 364fd3029..1f6362ed1 100644 --- a/examples/2.3.x/server-dotnet/examples/mysql/create-execution.md +++ b/examples/2.3.x/server-dotnet/examples/mysql/create-execution.md @@ -10,7 +10,7 @@ Client client = new Client() Mysql mysql = new Mysql(client); -DedicatedDatabaseExecution result = await mysql.CreateExecution( +Appwrite.Models.DedicatedDatabaseExecution result = await mysql.CreateExecution( databaseId: "<DATABASE_ID>", sql: "<SQL>", bindings: [object], // optional diff --git a/examples/2.3.x/server-dotnet/examples/mysql/create-failover.md b/examples/2.3.x/server-dotnet/examples/mysql/create-failover.md index e30720bad..6cf227068 100644 --- a/examples/2.3.x/server-dotnet/examples/mysql/create-failover.md +++ b/examples/2.3.x/server-dotnet/examples/mysql/create-failover.md @@ -10,7 +10,7 @@ Client client = new Client() Mysql mysql = new Mysql(client); -DedicatedDatabase result = await mysql.CreateFailover( +Appwrite.Models.DedicatedDatabase result = await mysql.CreateFailover( databaseId: "<DATABASE_ID>", targetReplicaId: "<TARGET_REPLICA_ID>" // optional ); diff --git a/examples/2.3.x/server-dotnet/examples/mysql/create-migration.md b/examples/2.3.x/server-dotnet/examples/mysql/create-migration.md index c0b943c8f..38a4e807e 100644 --- a/examples/2.3.x/server-dotnet/examples/mysql/create-migration.md +++ b/examples/2.3.x/server-dotnet/examples/mysql/create-migration.md @@ -10,7 +10,7 @@ Client client = new Client() Mysql mysql = new Mysql(client); -DedicatedDatabase result = await mysql.CreateMigration( +Appwrite.Models.DedicatedDatabase result = await mysql.CreateMigration( databaseId: "<DATABASE_ID>", targetType: "shared", specification: "<SPECIFICATION>" // optional diff --git a/examples/2.3.x/server-dotnet/examples/mysql/create-restoration.md b/examples/2.3.x/server-dotnet/examples/mysql/create-restoration.md index d6f1fa35c..a240fc77e 100644 --- a/examples/2.3.x/server-dotnet/examples/mysql/create-restoration.md +++ b/examples/2.3.x/server-dotnet/examples/mysql/create-restoration.md @@ -10,7 +10,7 @@ Client client = new Client() Mysql mysql = new Mysql(client); -DedicatedDatabaseRestoration result = await mysql.CreateRestoration( +Appwrite.Models.DedicatedDatabaseRestoration result = await mysql.CreateRestoration( databaseId: "<DATABASE_ID>", type: "backup", // optional backupId: "<BACKUP_ID>", // optional diff --git a/examples/2.3.x/server-dotnet/examples/mysql/create-upgrade.md b/examples/2.3.x/server-dotnet/examples/mysql/create-upgrade.md index 4b408cee5..cafd4c0b1 100644 --- a/examples/2.3.x/server-dotnet/examples/mysql/create-upgrade.md +++ b/examples/2.3.x/server-dotnet/examples/mysql/create-upgrade.md @@ -10,7 +10,7 @@ Client client = new Client() Mysql mysql = new Mysql(client); -DedicatedDatabase result = await mysql.CreateUpgrade( +Appwrite.Models.DedicatedDatabase result = await mysql.CreateUpgrade( databaseId: "<DATABASE_ID>", targetVersion: "<TARGET_VERSION>" ); diff --git a/examples/2.3.x/server-dotnet/examples/mysql/create.md b/examples/2.3.x/server-dotnet/examples/mysql/create.md index 23bcc79e7..d679464f6 100644 --- a/examples/2.3.x/server-dotnet/examples/mysql/create.md +++ b/examples/2.3.x/server-dotnet/examples/mysql/create.md @@ -10,7 +10,7 @@ Client client = new Client() Mysql mysql = new Mysql(client); -DedicatedDatabase result = await mysql.Create( +Appwrite.Models.DedicatedDatabase result = await mysql.Create( databaseId: "<DATABASE_ID>", name: "<NAME>", version: "17", // optional diff --git a/examples/2.3.x/server-dotnet/examples/mysql/get-backup-policy.md b/examples/2.3.x/server-dotnet/examples/mysql/get-backup-policy.md index 524bd066d..9ffda9028 100644 --- a/examples/2.3.x/server-dotnet/examples/mysql/get-backup-policy.md +++ b/examples/2.3.x/server-dotnet/examples/mysql/get-backup-policy.md @@ -10,7 +10,7 @@ Client client = new Client() Mysql mysql = new Mysql(client); -BackupPolicy result = await mysql.GetBackupPolicy( +Appwrite.Models.BackupPolicy result = await mysql.GetBackupPolicy( databaseId: "<DATABASE_ID>", policyId: "<POLICY_ID>" ); diff --git a/examples/2.3.x/server-dotnet/examples/mysql/get-backup.md b/examples/2.3.x/server-dotnet/examples/mysql/get-backup.md index 1c81ffc41..ae5792a15 100644 --- a/examples/2.3.x/server-dotnet/examples/mysql/get-backup.md +++ b/examples/2.3.x/server-dotnet/examples/mysql/get-backup.md @@ -10,7 +10,7 @@ Client client = new Client() Mysql mysql = new Mysql(client); -DedicatedDatabaseBackup result = await mysql.GetBackup( +Appwrite.Models.DedicatedDatabaseBackup result = await mysql.GetBackup( databaseId: "<DATABASE_ID>", backupId: "<BACKUP_ID>" ); diff --git a/examples/2.3.x/server-dotnet/examples/mysql/get-pitr.md b/examples/2.3.x/server-dotnet/examples/mysql/get-pitr.md index 3f1d3fcc4..81fbad52e 100644 --- a/examples/2.3.x/server-dotnet/examples/mysql/get-pitr.md +++ b/examples/2.3.x/server-dotnet/examples/mysql/get-pitr.md @@ -10,7 +10,7 @@ Client client = new Client() Mysql mysql = new Mysql(client); -DedicatedDatabasePITRWindows result = await mysql.GetPitr( +Appwrite.Models.DedicatedDatabasePITRWindows result = await mysql.GetPitr( databaseId: "<DATABASE_ID>" ); diff --git a/examples/2.3.x/server-dotnet/examples/mysql/get-pooler.md b/examples/2.3.x/server-dotnet/examples/mysql/get-pooler.md index c88ec9c84..ac0433bfc 100644 --- a/examples/2.3.x/server-dotnet/examples/mysql/get-pooler.md +++ b/examples/2.3.x/server-dotnet/examples/mysql/get-pooler.md @@ -10,7 +10,7 @@ Client client = new Client() Mysql mysql = new Mysql(client); -DedicatedDatabasePooler result = await mysql.GetPooler( +Appwrite.Models.DedicatedDatabasePooler result = await mysql.GetPooler( databaseId: "<DATABASE_ID>" ); diff --git a/examples/2.3.x/server-dotnet/examples/mysql/get-replicas.md b/examples/2.3.x/server-dotnet/examples/mysql/get-replicas.md index 4033dc586..76bb2aff4 100644 --- a/examples/2.3.x/server-dotnet/examples/mysql/get-replicas.md +++ b/examples/2.3.x/server-dotnet/examples/mysql/get-replicas.md @@ -10,7 +10,7 @@ Client client = new Client() Mysql mysql = new Mysql(client); -DedicatedDatabaseReplicas result = await mysql.GetReplicas( +Appwrite.Models.DedicatedDatabaseReplicas result = await mysql.GetReplicas( databaseId: "<DATABASE_ID>" ); diff --git a/examples/2.3.x/server-dotnet/examples/mysql/get-restoration.md b/examples/2.3.x/server-dotnet/examples/mysql/get-restoration.md index 11f18fc1b..84964a591 100644 --- a/examples/2.3.x/server-dotnet/examples/mysql/get-restoration.md +++ b/examples/2.3.x/server-dotnet/examples/mysql/get-restoration.md @@ -10,7 +10,7 @@ Client client = new Client() Mysql mysql = new Mysql(client); -DedicatedDatabaseRestoration result = await mysql.GetRestoration( +Appwrite.Models.DedicatedDatabaseRestoration result = await mysql.GetRestoration( databaseId: "<DATABASE_ID>", restorationId: "<RESTORATION_ID>" ); diff --git a/examples/2.3.x/server-dotnet/examples/mysql/get-status.md b/examples/2.3.x/server-dotnet/examples/mysql/get-status.md index a6adb9a2d..89bf24e65 100644 --- a/examples/2.3.x/server-dotnet/examples/mysql/get-status.md +++ b/examples/2.3.x/server-dotnet/examples/mysql/get-status.md @@ -10,7 +10,7 @@ Client client = new Client() Mysql mysql = new Mysql(client); -DatabaseStatus result = await mysql.GetStatus( +Appwrite.Models.DatabaseStatus result = await mysql.GetStatus( databaseId: "<DATABASE_ID>" ); diff --git a/examples/2.3.x/server-dotnet/examples/mysql/get.md b/examples/2.3.x/server-dotnet/examples/mysql/get.md index 0ae1db334..5f475751d 100644 --- a/examples/2.3.x/server-dotnet/examples/mysql/get.md +++ b/examples/2.3.x/server-dotnet/examples/mysql/get.md @@ -10,7 +10,7 @@ Client client = new Client() Mysql mysql = new Mysql(client); -DedicatedDatabase result = await mysql.Get( +Appwrite.Models.DedicatedDatabase result = await mysql.Get( databaseId: "<DATABASE_ID>" ); diff --git a/examples/2.3.x/server-dotnet/examples/mysql/list-backup-policies.md b/examples/2.3.x/server-dotnet/examples/mysql/list-backup-policies.md index 546c276a4..8993fdd40 100644 --- a/examples/2.3.x/server-dotnet/examples/mysql/list-backup-policies.md +++ b/examples/2.3.x/server-dotnet/examples/mysql/list-backup-policies.md @@ -10,7 +10,7 @@ Client client = new Client() Mysql mysql = new Mysql(client); -BackupPolicyList result = await mysql.ListBackupPolicies( +Appwrite.Models.BackupPolicyList result = await mysql.ListBackupPolicies( databaseId: "<DATABASE_ID>", queries: new List<string>() // optional ); diff --git a/examples/2.3.x/server-dotnet/examples/mysql/list-backups.md b/examples/2.3.x/server-dotnet/examples/mysql/list-backups.md index 11fda3e8d..77d8aea75 100644 --- a/examples/2.3.x/server-dotnet/examples/mysql/list-backups.md +++ b/examples/2.3.x/server-dotnet/examples/mysql/list-backups.md @@ -10,7 +10,7 @@ Client client = new Client() Mysql mysql = new Mysql(client); -DedicatedDatabaseBackupList result = await mysql.ListBackups( +Appwrite.Models.DedicatedDatabaseBackupList result = await mysql.ListBackups( databaseId: "<DATABASE_ID>", queries: new List<string>() // optional ); diff --git a/examples/2.3.x/server-dotnet/examples/mysql/list-branches.md b/examples/2.3.x/server-dotnet/examples/mysql/list-branches.md index 471fececd..1003ac29e 100644 --- a/examples/2.3.x/server-dotnet/examples/mysql/list-branches.md +++ b/examples/2.3.x/server-dotnet/examples/mysql/list-branches.md @@ -10,7 +10,7 @@ Client client = new Client() Mysql mysql = new Mysql(client); -DedicatedDatabaseBranchList result = await mysql.ListBranches( +Appwrite.Models.DedicatedDatabaseBranchList result = await mysql.ListBranches( databaseId: "<DATABASE_ID>" ); diff --git a/examples/2.3.x/server-dotnet/examples/mysql/list-operations.md b/examples/2.3.x/server-dotnet/examples/mysql/list-operations.md index 5b3f342a9..2b3c60b31 100644 --- a/examples/2.3.x/server-dotnet/examples/mysql/list-operations.md +++ b/examples/2.3.x/server-dotnet/examples/mysql/list-operations.md @@ -10,7 +10,7 @@ Client client = new Client() Mysql mysql = new Mysql(client); -DedicatedDatabaseOperationList result = await mysql.ListOperations( +Appwrite.Models.DedicatedDatabaseOperationList result = await mysql.ListOperations( databaseId: "<DATABASE_ID>", status: "queued", // optional limit: 1, // optional diff --git a/examples/2.3.x/server-dotnet/examples/mysql/list-restorations.md b/examples/2.3.x/server-dotnet/examples/mysql/list-restorations.md index 0238c2ce5..3153c4b6e 100644 --- a/examples/2.3.x/server-dotnet/examples/mysql/list-restorations.md +++ b/examples/2.3.x/server-dotnet/examples/mysql/list-restorations.md @@ -10,7 +10,7 @@ Client client = new Client() Mysql mysql = new Mysql(client); -DedicatedDatabaseRestorationList result = await mysql.ListRestorations( +Appwrite.Models.DedicatedDatabaseRestorationList result = await mysql.ListRestorations( databaseId: "<DATABASE_ID>", status: "pending", // optional type: "backup", // optional diff --git a/examples/2.3.x/server-dotnet/examples/mysql/list-specifications.md b/examples/2.3.x/server-dotnet/examples/mysql/list-specifications.md index a469ff043..38153e47d 100644 --- a/examples/2.3.x/server-dotnet/examples/mysql/list-specifications.md +++ b/examples/2.3.x/server-dotnet/examples/mysql/list-specifications.md @@ -10,7 +10,7 @@ Client client = new Client() Mysql mysql = new Mysql(client); -DedicatedDatabaseSpecificationList result = await mysql.ListSpecifications(); +Appwrite.Models.DedicatedDatabaseSpecificationList result = await mysql.ListSpecifications(); ``` diff --git a/examples/2.3.x/server-dotnet/examples/mysql/list.md b/examples/2.3.x/server-dotnet/examples/mysql/list.md index f49707d1c..bac475709 100644 --- a/examples/2.3.x/server-dotnet/examples/mysql/list.md +++ b/examples/2.3.x/server-dotnet/examples/mysql/list.md @@ -10,7 +10,7 @@ Client client = new Client() Mysql mysql = new Mysql(client); -DedicatedDatabaseList result = await mysql.List( +Appwrite.Models.DedicatedDatabaseList result = await mysql.List( queries: new List<string>() // optional ); diff --git a/examples/2.3.x/server-dotnet/examples/mysql/update-backup-policy.md b/examples/2.3.x/server-dotnet/examples/mysql/update-backup-policy.md index c812e9eae..bb0c9683a 100644 --- a/examples/2.3.x/server-dotnet/examples/mysql/update-backup-policy.md +++ b/examples/2.3.x/server-dotnet/examples/mysql/update-backup-policy.md @@ -10,7 +10,7 @@ Client client = new Client() Mysql mysql = new Mysql(client); -BackupPolicy result = await mysql.UpdateBackupPolicy( +Appwrite.Models.BackupPolicy result = await mysql.UpdateBackupPolicy( databaseId: "<DATABASE_ID>", policyId: "<POLICY_ID>", name: "<NAME>", // optional diff --git a/examples/2.3.x/server-dotnet/examples/mysql/update-backup-storage.md b/examples/2.3.x/server-dotnet/examples/mysql/update-backup-storage.md index 6efbdc499..35eaf8fd5 100644 --- a/examples/2.3.x/server-dotnet/examples/mysql/update-backup-storage.md +++ b/examples/2.3.x/server-dotnet/examples/mysql/update-backup-storage.md @@ -10,7 +10,7 @@ Client client = new Client() Mysql mysql = new Mysql(client); -DedicatedDatabaseBackupStorage result = await mysql.UpdateBackupStorage( +Appwrite.Models.DedicatedDatabaseBackupStorage result = await mysql.UpdateBackupStorage( databaseId: "<DATABASE_ID>", provider: "s3", bucket: "<BUCKET>", diff --git a/examples/2.3.x/server-dotnet/examples/mysql/update-credentials.md b/examples/2.3.x/server-dotnet/examples/mysql/update-credentials.md index 7bf74cb37..4e027804b 100644 --- a/examples/2.3.x/server-dotnet/examples/mysql/update-credentials.md +++ b/examples/2.3.x/server-dotnet/examples/mysql/update-credentials.md @@ -10,7 +10,7 @@ Client client = new Client() Mysql mysql = new Mysql(client); -DedicatedDatabaseOperation result = await mysql.UpdateCredentials( +Appwrite.Models.DedicatedDatabaseOperation result = await mysql.UpdateCredentials( databaseId: "<DATABASE_ID>" ); diff --git a/examples/2.3.x/server-dotnet/examples/mysql/update-maintenance.md b/examples/2.3.x/server-dotnet/examples/mysql/update-maintenance.md index 4a28819ac..447c78cf5 100644 --- a/examples/2.3.x/server-dotnet/examples/mysql/update-maintenance.md +++ b/examples/2.3.x/server-dotnet/examples/mysql/update-maintenance.md @@ -10,7 +10,7 @@ Client client = new Client() Mysql mysql = new Mysql(client); -DedicatedDatabase result = await mysql.UpdateMaintenance( +Appwrite.Models.DedicatedDatabase result = await mysql.UpdateMaintenance( databaseId: "<DATABASE_ID>", day: "sun", hourUtc: 0 diff --git a/examples/2.3.x/server-dotnet/examples/mysql/update-pooler.md b/examples/2.3.x/server-dotnet/examples/mysql/update-pooler.md index 455b6d2b2..585ff5a7a 100644 --- a/examples/2.3.x/server-dotnet/examples/mysql/update-pooler.md +++ b/examples/2.3.x/server-dotnet/examples/mysql/update-pooler.md @@ -10,7 +10,7 @@ Client client = new Client() Mysql mysql = new Mysql(client); -DedicatedDatabasePooler result = await mysql.UpdatePooler( +Appwrite.Models.DedicatedDatabasePooler result = await mysql.UpdatePooler( databaseId: "<DATABASE_ID>", mode: "transaction", // optional maxConnections: 10, // optional diff --git a/examples/2.3.x/server-dotnet/examples/mysql/update.md b/examples/2.3.x/server-dotnet/examples/mysql/update.md index 4e9e8adb6..287ca113a 100644 --- a/examples/2.3.x/server-dotnet/examples/mysql/update.md +++ b/examples/2.3.x/server-dotnet/examples/mysql/update.md @@ -10,7 +10,7 @@ Client client = new Client() Mysql mysql = new Mysql(client); -DedicatedDatabase result = await mysql.Update( +Appwrite.Models.DedicatedDatabase result = await mysql.Update( databaseId: "<DATABASE_ID>", name: "<NAME>", // optional status: "ready", // optional diff --git a/examples/2.3.x/server-dotnet/examples/oauth2/approve.md b/examples/2.3.x/server-dotnet/examples/oauth2/approve.md index 0c832ff61..64ba33e63 100644 --- a/examples/2.3.x/server-dotnet/examples/oauth2/approve.md +++ b/examples/2.3.x/server-dotnet/examples/oauth2/approve.md @@ -10,7 +10,7 @@ Client client = new Client() Oauth2 oauth2 = new Oauth2(client); -Oauth2Approve result = await oauth2.Approve( +Appwrite.Models.Oauth2Approve result = await oauth2.Approve( grant_id: "<GRANT_ID>", authorization_details: "<AUTHORIZATION_DETAILS>", // optional scope: "<SCOPE>" // optional diff --git a/examples/2.3.x/server-dotnet/examples/oauth2/authorize-post.md b/examples/2.3.x/server-dotnet/examples/oauth2/authorize-post.md index d067b8346..7ef874c96 100644 --- a/examples/2.3.x/server-dotnet/examples/oauth2/authorize-post.md +++ b/examples/2.3.x/server-dotnet/examples/oauth2/authorize-post.md @@ -10,7 +10,7 @@ Client client = new Client() Oauth2 oauth2 = new Oauth2(client); -Oauth2Authorize result = await oauth2.AuthorizePost( +Appwrite.Models.Oauth2Authorize result = await oauth2.AuthorizePost( client_id: "<CLIENT_ID>", // optional redirect_uri: "https://example.com", // optional response_type: "", // optional diff --git a/examples/2.3.x/server-dotnet/examples/oauth2/authorize.md b/examples/2.3.x/server-dotnet/examples/oauth2/authorize.md index 77a0f3bc2..ab37830b8 100644 --- a/examples/2.3.x/server-dotnet/examples/oauth2/authorize.md +++ b/examples/2.3.x/server-dotnet/examples/oauth2/authorize.md @@ -10,7 +10,7 @@ Client client = new Client() Oauth2 oauth2 = new Oauth2(client); -Oauth2Authorize result = await oauth2.Authorize( +Appwrite.Models.Oauth2Authorize result = await oauth2.Authorize( client_id: "<CLIENT_ID>", // optional redirect_uri: "https://example.com", // optional response_type: "", // optional diff --git a/examples/2.3.x/server-dotnet/examples/oauth2/create-device-authorization.md b/examples/2.3.x/server-dotnet/examples/oauth2/create-device-authorization.md index a257690aa..94b4c3a1e 100644 --- a/examples/2.3.x/server-dotnet/examples/oauth2/create-device-authorization.md +++ b/examples/2.3.x/server-dotnet/examples/oauth2/create-device-authorization.md @@ -10,7 +10,7 @@ Client client = new Client() Oauth2 oauth2 = new Oauth2(client); -Oauth2DeviceAuthorization result = await oauth2.CreateDeviceAuthorization( +Appwrite.Models.Oauth2DeviceAuthorization result = await oauth2.CreateDeviceAuthorization( client_id: "<CLIENT_ID>", // optional scope: "<SCOPE>", // optional authorization_details: "<AUTHORIZATION_DETAILS>", // optional diff --git a/examples/2.3.x/server-dotnet/examples/oauth2/create-grant.md b/examples/2.3.x/server-dotnet/examples/oauth2/create-grant.md index cf1ad6969..5f987551c 100644 --- a/examples/2.3.x/server-dotnet/examples/oauth2/create-grant.md +++ b/examples/2.3.x/server-dotnet/examples/oauth2/create-grant.md @@ -10,7 +10,7 @@ Client client = new Client() Oauth2 oauth2 = new Oauth2(client); -Oauth2Grant result = await oauth2.CreateGrant( +Appwrite.Models.Oauth2Grant result = await oauth2.CreateGrant( user_code: "<USER_CODE>" ); diff --git a/examples/2.3.x/server-dotnet/examples/oauth2/create-par.md b/examples/2.3.x/server-dotnet/examples/oauth2/create-par.md index 214f85753..59858076b 100644 --- a/examples/2.3.x/server-dotnet/examples/oauth2/create-par.md +++ b/examples/2.3.x/server-dotnet/examples/oauth2/create-par.md @@ -10,7 +10,7 @@ Client client = new Client() Oauth2 oauth2 = new Oauth2(client); -Oauth2PAR result = await oauth2.CreatePAR( +Appwrite.Models.Oauth2PAR result = await oauth2.CreatePAR( client_id: "<CLIENT_ID>", redirect_uri: "https://example.com", response_type: "code", diff --git a/examples/2.3.x/server-dotnet/examples/oauth2/create-token.md b/examples/2.3.x/server-dotnet/examples/oauth2/create-token.md index 27639a8e6..32fb35134 100644 --- a/examples/2.3.x/server-dotnet/examples/oauth2/create-token.md +++ b/examples/2.3.x/server-dotnet/examples/oauth2/create-token.md @@ -10,7 +10,7 @@ Client client = new Client() Oauth2 oauth2 = new Oauth2(client); -Oauth2Token result = await oauth2.CreateToken( +Appwrite.Models.Oauth2Token result = await oauth2.CreateToken( grant_type: "<GRANT_TYPE>", code: "<CODE>", // optional refresh_token: "<REFRESH_TOKEN>", // optional diff --git a/examples/2.3.x/server-dotnet/examples/oauth2/get-grant.md b/examples/2.3.x/server-dotnet/examples/oauth2/get-grant.md index e289b80de..a64ac0077 100644 --- a/examples/2.3.x/server-dotnet/examples/oauth2/get-grant.md +++ b/examples/2.3.x/server-dotnet/examples/oauth2/get-grant.md @@ -10,7 +10,7 @@ Client client = new Client() Oauth2 oauth2 = new Oauth2(client); -Oauth2Grant result = await oauth2.GetGrant( +Appwrite.Models.Oauth2Grant result = await oauth2.GetGrant( grant_id: "<GRANT_ID>" ); diff --git a/examples/2.3.x/server-dotnet/examples/oauth2/introspect.md b/examples/2.3.x/server-dotnet/examples/oauth2/introspect.md new file mode 100644 index 000000000..f74b57d67 --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/oauth2/introspect.md @@ -0,0 +1,20 @@ +```csharp +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Oauth2 oauth2 = new Oauth2(client); + +Appwrite.Models.Oauth2Introspection result = await oauth2.Introspect( + token: "<TOKEN>", + token_type_hint: "access_token", // optional + client_id: "<CLIENT_ID>", // optional + client_secret: "<CLIENT_SECRET>" // optional +); + +``` diff --git a/examples/2.3.x/server-dotnet/examples/oauth2/list-organizations.md b/examples/2.3.x/server-dotnet/examples/oauth2/list-organizations.md index dd5f160cf..b710dc6eb 100644 --- a/examples/2.3.x/server-dotnet/examples/oauth2/list-organizations.md +++ b/examples/2.3.x/server-dotnet/examples/oauth2/list-organizations.md @@ -10,7 +10,7 @@ Client client = new Client() Oauth2 oauth2 = new Oauth2(client); -Oauth2OrganizationList result = await oauth2.ListOrganizations( +Appwrite.Models.Oauth2OrganizationList result = await oauth2.ListOrganizations( limit: 1, // optional offset: 0, // optional search: "<SEARCH>" // optional diff --git a/examples/2.3.x/server-dotnet/examples/oauth2/list-projects.md b/examples/2.3.x/server-dotnet/examples/oauth2/list-projects.md index 71472878e..c5760c133 100644 --- a/examples/2.3.x/server-dotnet/examples/oauth2/list-projects.md +++ b/examples/2.3.x/server-dotnet/examples/oauth2/list-projects.md @@ -10,7 +10,7 @@ Client client = new Client() Oauth2 oauth2 = new Oauth2(client); -Oauth2ProjectList result = await oauth2.ListProjects( +Appwrite.Models.Oauth2ProjectList result = await oauth2.ListProjects( limit: 1, // optional offset: 0, // optional search: "<SEARCH>" // optional diff --git a/examples/2.3.x/server-dotnet/examples/oauth2/reject.md b/examples/2.3.x/server-dotnet/examples/oauth2/reject.md index 3bdc64573..9347771fc 100644 --- a/examples/2.3.x/server-dotnet/examples/oauth2/reject.md +++ b/examples/2.3.x/server-dotnet/examples/oauth2/reject.md @@ -10,7 +10,7 @@ Client client = new Client() Oauth2 oauth2 = new Oauth2(client); -Oauth2Reject result = await oauth2.Reject( +Appwrite.Models.Oauth2Reject result = await oauth2.Reject( grant_id: "<GRANT_ID>" ); diff --git a/examples/2.3.x/server-dotnet/examples/oauth2/revoke.md b/examples/2.3.x/server-dotnet/examples/oauth2/revoke.md index 5f94763d3..f75a85b57 100644 --- a/examples/2.3.x/server-dotnet/examples/oauth2/revoke.md +++ b/examples/2.3.x/server-dotnet/examples/oauth2/revoke.md @@ -10,7 +10,7 @@ Client client = new Client() Oauth2 oauth2 = new Oauth2(client); - result = await oauth2.Revoke( +Appwrite.Models. result = await oauth2.Revoke( token: "<TOKEN>", token_type_hint: "access_token", // optional client_id: "<CLIENT_ID>", // optional diff --git a/examples/2.3.x/server-dotnet/examples/organization/create-ephemeral-project-key.md b/examples/2.3.x/server-dotnet/examples/organization/create-ephemeral-project-key.md index 16a1950ef..d26654af7 100644 --- a/examples/2.3.x/server-dotnet/examples/organization/create-ephemeral-project-key.md +++ b/examples/2.3.x/server-dotnet/examples/organization/create-ephemeral-project-key.md @@ -11,9 +11,9 @@ Client client = new Client() Organization organization = new Organization(client); -EphemeralKey result = await organization.CreateEphemeralProjectKey( +Appwrite.Models.EphemeralKey result = await organization.CreateEphemeralProjectKey( projectId: "<PROJECT_ID>", - scopes: new List<ProjectKeyScopes> { ProjectKeyScopes.ProjectRead }, + scopes: new List<ProjectKeyScopes> { ProjectKeyScopes.UsersRead }, duration: 600 ); diff --git a/examples/2.3.x/server-dotnet/examples/organization/create-installation.md b/examples/2.3.x/server-dotnet/examples/organization/create-installation.md index 78aa2c38c..75abe99ab 100644 --- a/examples/2.3.x/server-dotnet/examples/organization/create-installation.md +++ b/examples/2.3.x/server-dotnet/examples/organization/create-installation.md @@ -10,7 +10,7 @@ Client client = new Client() Organization organization = new Organization(client); -AppInstallation result = await organization.CreateInstallation( +Appwrite.Models.AppInstallation result = await organization.CreateInstallation( appId: "<APP_ID>", authorizationDetails: "<AUTHORIZATION_DETAILS>" // optional ); diff --git a/examples/2.3.x/server-dotnet/examples/organization/create-membership.md b/examples/2.3.x/server-dotnet/examples/organization/create-membership.md index bbeb4a1f0..863e78b55 100644 --- a/examples/2.3.x/server-dotnet/examples/organization/create-membership.md +++ b/examples/2.3.x/server-dotnet/examples/organization/create-membership.md @@ -10,7 +10,7 @@ Client client = new Client() Organization organization = new Organization(client); -Membership result = await organization.CreateMembership( +Appwrite.Models.Membership result = await organization.CreateMembership( roles: new List<string>(), email: "email@example.com", // optional userId: "<USER_ID>", // optional diff --git a/examples/2.3.x/server-dotnet/examples/organization/create-project.md b/examples/2.3.x/server-dotnet/examples/organization/create-project.md index c4f2e6274..956b7b5ca 100644 --- a/examples/2.3.x/server-dotnet/examples/organization/create-project.md +++ b/examples/2.3.x/server-dotnet/examples/organization/create-project.md @@ -11,7 +11,7 @@ Client client = new Client() Organization organization = new Organization(client); -Project result = await organization.CreateProject( +Appwrite.Models.Project result = await organization.CreateProject( projectId: "<PROJECT_ID>", name: "<NAME>", region: Region.Fra // optional diff --git a/examples/2.3.x/server-dotnet/examples/organization/get-installation.md b/examples/2.3.x/server-dotnet/examples/organization/get-installation.md index c324528b8..a9ea1c667 100644 --- a/examples/2.3.x/server-dotnet/examples/organization/get-installation.md +++ b/examples/2.3.x/server-dotnet/examples/organization/get-installation.md @@ -10,7 +10,7 @@ Client client = new Client() Organization organization = new Organization(client); -AppInstallation result = await organization.GetInstallation( +Appwrite.Models.AppInstallation result = await organization.GetInstallation( installationId: "<INSTALLATION_ID>" ); diff --git a/examples/2.3.x/server-dotnet/examples/organization/get-membership.md b/examples/2.3.x/server-dotnet/examples/organization/get-membership.md index 44d6363e1..561fa51ba 100644 --- a/examples/2.3.x/server-dotnet/examples/organization/get-membership.md +++ b/examples/2.3.x/server-dotnet/examples/organization/get-membership.md @@ -10,7 +10,7 @@ Client client = new Client() Organization organization = new Organization(client); -Membership result = await organization.GetMembership( +Appwrite.Models.Membership result = await organization.GetMembership( membershipId: "<MEMBERSHIP_ID>" ); diff --git a/examples/2.3.x/server-dotnet/examples/organization/get-project-key.md b/examples/2.3.x/server-dotnet/examples/organization/get-project-key.md index d85c9acd3..af2b38ddd 100644 --- a/examples/2.3.x/server-dotnet/examples/organization/get-project-key.md +++ b/examples/2.3.x/server-dotnet/examples/organization/get-project-key.md @@ -10,7 +10,7 @@ Client client = new Client() Organization organization = new Organization(client); -Key result = await organization.GetProjectKey( +Appwrite.Models.Key result = await organization.GetProjectKey( projectId: "<PROJECT_ID>", keyId: "<KEY_ID>" ); diff --git a/examples/2.3.x/server-dotnet/examples/organization/get-project.md b/examples/2.3.x/server-dotnet/examples/organization/get-project.md index 3d64fe0c7..eb45c7c93 100644 --- a/examples/2.3.x/server-dotnet/examples/organization/get-project.md +++ b/examples/2.3.x/server-dotnet/examples/organization/get-project.md @@ -10,7 +10,7 @@ Client client = new Client() Organization organization = new Organization(client); -Project result = await organization.GetProject( +Appwrite.Models.Project result = await organization.GetProject( projectId: "<PROJECT_ID>" ); diff --git a/examples/2.3.x/server-dotnet/examples/organization/get.md b/examples/2.3.x/server-dotnet/examples/organization/get.md index 4c3c2b76a..99163f309 100644 --- a/examples/2.3.x/server-dotnet/examples/organization/get.md +++ b/examples/2.3.x/server-dotnet/examples/organization/get.md @@ -10,7 +10,7 @@ Client client = new Client() Organization organization = new Organization(client); -Organization result = await organization.Get(); +Appwrite.Models.Organization result = await organization.Get(); ``` diff --git a/examples/2.3.x/server-dotnet/examples/organization/list-installations.md b/examples/2.3.x/server-dotnet/examples/organization/list-installations.md index 2890e3367..e802baa3d 100644 --- a/examples/2.3.x/server-dotnet/examples/organization/list-installations.md +++ b/examples/2.3.x/server-dotnet/examples/organization/list-installations.md @@ -10,7 +10,7 @@ Client client = new Client() Organization organization = new Organization(client); -AppInstallationList result = await organization.ListInstallations( +Appwrite.Models.AppInstallationList result = await organization.ListInstallations( queries: new List<string>(), // optional total: false // optional ); diff --git a/examples/2.3.x/server-dotnet/examples/organization/list-memberships.md b/examples/2.3.x/server-dotnet/examples/organization/list-memberships.md index 69c357b78..fc95861a0 100644 --- a/examples/2.3.x/server-dotnet/examples/organization/list-memberships.md +++ b/examples/2.3.x/server-dotnet/examples/organization/list-memberships.md @@ -10,7 +10,7 @@ Client client = new Client() Organization organization = new Organization(client); -MembershipList result = await organization.ListMemberships( +Appwrite.Models.MembershipList result = await organization.ListMemberships( queries: new List<string>(), // optional search: "<SEARCH>", // optional total: false // optional diff --git a/examples/2.3.x/server-dotnet/examples/organization/list-project-keys.md b/examples/2.3.x/server-dotnet/examples/organization/list-project-keys.md index ab0f06d10..07b36f2d7 100644 --- a/examples/2.3.x/server-dotnet/examples/organization/list-project-keys.md +++ b/examples/2.3.x/server-dotnet/examples/organization/list-project-keys.md @@ -10,7 +10,7 @@ Client client = new Client() Organization organization = new Organization(client); -KeyList result = await organization.ListProjectKeys( +Appwrite.Models.KeyList result = await organization.ListProjectKeys( projectId: "<PROJECT_ID>", queries: new List<string>(), // optional total: false // optional diff --git a/examples/2.3.x/server-dotnet/examples/organization/list-projects.md b/examples/2.3.x/server-dotnet/examples/organization/list-projects.md index c61a3341a..c1d9b20fa 100644 --- a/examples/2.3.x/server-dotnet/examples/organization/list-projects.md +++ b/examples/2.3.x/server-dotnet/examples/organization/list-projects.md @@ -10,7 +10,7 @@ Client client = new Client() Organization organization = new Organization(client); -ProjectList result = await organization.ListProjects( +Appwrite.Models.ProjectList result = await organization.ListProjects( queries: new List<string>(), // optional search: "<SEARCH>", // optional total: false // optional diff --git a/examples/2.3.x/server-dotnet/examples/organization/update-installation.md b/examples/2.3.x/server-dotnet/examples/organization/update-installation.md index c79ee8b52..d78ba1016 100644 --- a/examples/2.3.x/server-dotnet/examples/organization/update-installation.md +++ b/examples/2.3.x/server-dotnet/examples/organization/update-installation.md @@ -10,7 +10,7 @@ Client client = new Client() Organization organization = new Organization(client); -AppInstallation result = await organization.UpdateInstallation( +Appwrite.Models.AppInstallation result = await organization.UpdateInstallation( installationId: "<INSTALLATION_ID>", authorizationDetails: "<AUTHORIZATION_DETAILS>" // optional ); diff --git a/examples/2.3.x/server-dotnet/examples/organization/update-membership.md b/examples/2.3.x/server-dotnet/examples/organization/update-membership.md index d1faf7f00..33105d9a3 100644 --- a/examples/2.3.x/server-dotnet/examples/organization/update-membership.md +++ b/examples/2.3.x/server-dotnet/examples/organization/update-membership.md @@ -10,7 +10,7 @@ Client client = new Client() Organization organization = new Organization(client); -Membership result = await organization.UpdateMembership( +Appwrite.Models.Membership result = await organization.UpdateMembership( membershipId: "<MEMBERSHIP_ID>", roles: new List<string>() ); diff --git a/examples/2.3.x/server-dotnet/examples/organization/update-project-key.md b/examples/2.3.x/server-dotnet/examples/organization/update-project-key.md index 265002909..541343b31 100644 --- a/examples/2.3.x/server-dotnet/examples/organization/update-project-key.md +++ b/examples/2.3.x/server-dotnet/examples/organization/update-project-key.md @@ -11,11 +11,11 @@ Client client = new Client() Organization organization = new Organization(client); -Key result = await organization.UpdateProjectKey( +Appwrite.Models.Key result = await organization.UpdateProjectKey( projectId: "<PROJECT_ID>", keyId: "<KEY_ID>", name: "<NAME>", - scopes: new List<ProjectKeyScopes> { ProjectKeyScopes.ProjectRead }, + scopes: new List<ProjectKeyScopes> { ProjectKeyScopes.UsersRead }, expire: "2020-10-15T06:38:00.000+00:00" // optional ); diff --git a/examples/2.3.x/server-dotnet/examples/organization/update-project.md b/examples/2.3.x/server-dotnet/examples/organization/update-project.md index ae8e2664d..42abd5478 100644 --- a/examples/2.3.x/server-dotnet/examples/organization/update-project.md +++ b/examples/2.3.x/server-dotnet/examples/organization/update-project.md @@ -10,7 +10,7 @@ Client client = new Client() Organization organization = new Organization(client); -Project result = await organization.UpdateProject( +Appwrite.Models.Project result = await organization.UpdateProject( projectId: "<PROJECT_ID>", name: "<NAME>" ); diff --git a/examples/2.3.x/server-dotnet/examples/organization/update.md b/examples/2.3.x/server-dotnet/examples/organization/update.md index 8b559ce18..8ba851eab 100644 --- a/examples/2.3.x/server-dotnet/examples/organization/update.md +++ b/examples/2.3.x/server-dotnet/examples/organization/update.md @@ -10,7 +10,7 @@ Client client = new Client() Organization organization = new Organization(client); -Organization result = await organization.Update( +Appwrite.Models.Organization result = await organization.Update( name: "<NAME>" ); diff --git a/examples/2.3.x/server-dotnet/examples/postgresql/create-backup-policy.md b/examples/2.3.x/server-dotnet/examples/postgresql/create-backup-policy.md index ba827ae71..80f7abc11 100644 --- a/examples/2.3.x/server-dotnet/examples/postgresql/create-backup-policy.md +++ b/examples/2.3.x/server-dotnet/examples/postgresql/create-backup-policy.md @@ -10,7 +10,7 @@ Client client = new Client() Postgresql postgresql = new Postgresql(client); -BackupPolicy result = await postgresql.CreateBackupPolicy( +Appwrite.Models.BackupPolicy result = await postgresql.CreateBackupPolicy( databaseId: "<DATABASE_ID>", policyId: "<POLICY_ID>", name: "<NAME>", diff --git a/examples/2.3.x/server-dotnet/examples/postgresql/create-backup.md b/examples/2.3.x/server-dotnet/examples/postgresql/create-backup.md index de70d5c5a..6e49fcc3c 100644 --- a/examples/2.3.x/server-dotnet/examples/postgresql/create-backup.md +++ b/examples/2.3.x/server-dotnet/examples/postgresql/create-backup.md @@ -10,7 +10,7 @@ Client client = new Client() Postgresql postgresql = new Postgresql(client); -DedicatedDatabaseBackup result = await postgresql.CreateBackup( +Appwrite.Models.DedicatedDatabaseBackup result = await postgresql.CreateBackup( databaseId: "<DATABASE_ID>", type: "full" // optional ); diff --git a/examples/2.3.x/server-dotnet/examples/postgresql/create-branch.md b/examples/2.3.x/server-dotnet/examples/postgresql/create-branch.md index f4e8d5663..29d694b4a 100644 --- a/examples/2.3.x/server-dotnet/examples/postgresql/create-branch.md +++ b/examples/2.3.x/server-dotnet/examples/postgresql/create-branch.md @@ -10,7 +10,7 @@ Client client = new Client() Postgresql postgresql = new Postgresql(client); -DedicatedDatabase result = await postgresql.CreateBranch( +Appwrite.Models.DedicatedDatabase result = await postgresql.CreateBranch( databaseId: "<DATABASE_ID>", branchId: "<BRANCH_ID>", // optional ttl: 300 // optional diff --git a/examples/2.3.x/server-dotnet/examples/postgresql/create-execution.md b/examples/2.3.x/server-dotnet/examples/postgresql/create-execution.md index 14804cc08..688714b15 100644 --- a/examples/2.3.x/server-dotnet/examples/postgresql/create-execution.md +++ b/examples/2.3.x/server-dotnet/examples/postgresql/create-execution.md @@ -10,7 +10,7 @@ Client client = new Client() Postgresql postgresql = new Postgresql(client); -DedicatedDatabaseExecution result = await postgresql.CreateExecution( +Appwrite.Models.DedicatedDatabaseExecution result = await postgresql.CreateExecution( databaseId: "<DATABASE_ID>", sql: "<SQL>", bindings: [object], // optional diff --git a/examples/2.3.x/server-dotnet/examples/postgresql/create-extension.md b/examples/2.3.x/server-dotnet/examples/postgresql/create-extension.md index d7a6e6fdf..574f720e0 100644 --- a/examples/2.3.x/server-dotnet/examples/postgresql/create-extension.md +++ b/examples/2.3.x/server-dotnet/examples/postgresql/create-extension.md @@ -10,7 +10,7 @@ Client client = new Client() Postgresql postgresql = new Postgresql(client); -DedicatedDatabase result = await postgresql.CreateExtension( +Appwrite.Models.DedicatedDatabase result = await postgresql.CreateExtension( databaseId: "<DATABASE_ID>", name: "<NAME>" ); diff --git a/examples/2.3.x/server-dotnet/examples/postgresql/create-failover.md b/examples/2.3.x/server-dotnet/examples/postgresql/create-failover.md index b798844f1..f6019e77a 100644 --- a/examples/2.3.x/server-dotnet/examples/postgresql/create-failover.md +++ b/examples/2.3.x/server-dotnet/examples/postgresql/create-failover.md @@ -10,7 +10,7 @@ Client client = new Client() Postgresql postgresql = new Postgresql(client); -DedicatedDatabase result = await postgresql.CreateFailover( +Appwrite.Models.DedicatedDatabase result = await postgresql.CreateFailover( databaseId: "<DATABASE_ID>", targetReplicaId: "<TARGET_REPLICA_ID>" // optional ); diff --git a/examples/2.3.x/server-dotnet/examples/postgresql/create-migration.md b/examples/2.3.x/server-dotnet/examples/postgresql/create-migration.md index 1868ba84c..0aa6d252f 100644 --- a/examples/2.3.x/server-dotnet/examples/postgresql/create-migration.md +++ b/examples/2.3.x/server-dotnet/examples/postgresql/create-migration.md @@ -10,7 +10,7 @@ Client client = new Client() Postgresql postgresql = new Postgresql(client); -DedicatedDatabase result = await postgresql.CreateMigration( +Appwrite.Models.DedicatedDatabase result = await postgresql.CreateMigration( databaseId: "<DATABASE_ID>", targetType: "shared", specification: "<SPECIFICATION>" // optional diff --git a/examples/2.3.x/server-dotnet/examples/postgresql/create-restoration.md b/examples/2.3.x/server-dotnet/examples/postgresql/create-restoration.md index fdd094844..ab018c303 100644 --- a/examples/2.3.x/server-dotnet/examples/postgresql/create-restoration.md +++ b/examples/2.3.x/server-dotnet/examples/postgresql/create-restoration.md @@ -10,7 +10,7 @@ Client client = new Client() Postgresql postgresql = new Postgresql(client); -DedicatedDatabaseRestoration result = await postgresql.CreateRestoration( +Appwrite.Models.DedicatedDatabaseRestoration result = await postgresql.CreateRestoration( databaseId: "<DATABASE_ID>", type: "backup", // optional backupId: "<BACKUP_ID>", // optional diff --git a/examples/2.3.x/server-dotnet/examples/postgresql/create-upgrade.md b/examples/2.3.x/server-dotnet/examples/postgresql/create-upgrade.md index c81ca922b..18cf2369c 100644 --- a/examples/2.3.x/server-dotnet/examples/postgresql/create-upgrade.md +++ b/examples/2.3.x/server-dotnet/examples/postgresql/create-upgrade.md @@ -10,7 +10,7 @@ Client client = new Client() Postgresql postgresql = new Postgresql(client); -DedicatedDatabase result = await postgresql.CreateUpgrade( +Appwrite.Models.DedicatedDatabase result = await postgresql.CreateUpgrade( databaseId: "<DATABASE_ID>", targetVersion: "<TARGET_VERSION>" ); diff --git a/examples/2.3.x/server-dotnet/examples/postgresql/create.md b/examples/2.3.x/server-dotnet/examples/postgresql/create.md index b4c3a49bb..7177b4241 100644 --- a/examples/2.3.x/server-dotnet/examples/postgresql/create.md +++ b/examples/2.3.x/server-dotnet/examples/postgresql/create.md @@ -10,7 +10,7 @@ Client client = new Client() Postgresql postgresql = new Postgresql(client); -DedicatedDatabase result = await postgresql.Create( +Appwrite.Models.DedicatedDatabase result = await postgresql.Create( databaseId: "<DATABASE_ID>", name: "<NAME>", version: "17", // optional diff --git a/examples/2.3.x/server-dotnet/examples/postgresql/get-backup-policy.md b/examples/2.3.x/server-dotnet/examples/postgresql/get-backup-policy.md index e58d4e215..e13bcc3fa 100644 --- a/examples/2.3.x/server-dotnet/examples/postgresql/get-backup-policy.md +++ b/examples/2.3.x/server-dotnet/examples/postgresql/get-backup-policy.md @@ -10,7 +10,7 @@ Client client = new Client() Postgresql postgresql = new Postgresql(client); -BackupPolicy result = await postgresql.GetBackupPolicy( +Appwrite.Models.BackupPolicy result = await postgresql.GetBackupPolicy( databaseId: "<DATABASE_ID>", policyId: "<POLICY_ID>" ); diff --git a/examples/2.3.x/server-dotnet/examples/postgresql/get-backup.md b/examples/2.3.x/server-dotnet/examples/postgresql/get-backup.md index 4091ac393..44af120cf 100644 --- a/examples/2.3.x/server-dotnet/examples/postgresql/get-backup.md +++ b/examples/2.3.x/server-dotnet/examples/postgresql/get-backup.md @@ -10,7 +10,7 @@ Client client = new Client() Postgresql postgresql = new Postgresql(client); -DedicatedDatabaseBackup result = await postgresql.GetBackup( +Appwrite.Models.DedicatedDatabaseBackup result = await postgresql.GetBackup( databaseId: "<DATABASE_ID>", backupId: "<BACKUP_ID>" ); diff --git a/examples/2.3.x/server-dotnet/examples/postgresql/get-pitr.md b/examples/2.3.x/server-dotnet/examples/postgresql/get-pitr.md index aaabade0a..aa56fbffd 100644 --- a/examples/2.3.x/server-dotnet/examples/postgresql/get-pitr.md +++ b/examples/2.3.x/server-dotnet/examples/postgresql/get-pitr.md @@ -10,7 +10,7 @@ Client client = new Client() Postgresql postgresql = new Postgresql(client); -DedicatedDatabasePITRWindows result = await postgresql.GetPitr( +Appwrite.Models.DedicatedDatabasePITRWindows result = await postgresql.GetPitr( databaseId: "<DATABASE_ID>" ); diff --git a/examples/2.3.x/server-dotnet/examples/postgresql/get-pooler.md b/examples/2.3.x/server-dotnet/examples/postgresql/get-pooler.md index b42fd7804..1f9301794 100644 --- a/examples/2.3.x/server-dotnet/examples/postgresql/get-pooler.md +++ b/examples/2.3.x/server-dotnet/examples/postgresql/get-pooler.md @@ -10,7 +10,7 @@ Client client = new Client() Postgresql postgresql = new Postgresql(client); -DedicatedDatabasePooler result = await postgresql.GetPooler( +Appwrite.Models.DedicatedDatabasePooler result = await postgresql.GetPooler( databaseId: "<DATABASE_ID>" ); diff --git a/examples/2.3.x/server-dotnet/examples/postgresql/get-replicas.md b/examples/2.3.x/server-dotnet/examples/postgresql/get-replicas.md index 62475f36f..be8a461d5 100644 --- a/examples/2.3.x/server-dotnet/examples/postgresql/get-replicas.md +++ b/examples/2.3.x/server-dotnet/examples/postgresql/get-replicas.md @@ -10,7 +10,7 @@ Client client = new Client() Postgresql postgresql = new Postgresql(client); -DedicatedDatabaseReplicas result = await postgresql.GetReplicas( +Appwrite.Models.DedicatedDatabaseReplicas result = await postgresql.GetReplicas( databaseId: "<DATABASE_ID>" ); diff --git a/examples/2.3.x/server-dotnet/examples/postgresql/get-restoration.md b/examples/2.3.x/server-dotnet/examples/postgresql/get-restoration.md index 40a23f038..cafd36138 100644 --- a/examples/2.3.x/server-dotnet/examples/postgresql/get-restoration.md +++ b/examples/2.3.x/server-dotnet/examples/postgresql/get-restoration.md @@ -10,7 +10,7 @@ Client client = new Client() Postgresql postgresql = new Postgresql(client); -DedicatedDatabaseRestoration result = await postgresql.GetRestoration( +Appwrite.Models.DedicatedDatabaseRestoration result = await postgresql.GetRestoration( databaseId: "<DATABASE_ID>", restorationId: "<RESTORATION_ID>" ); diff --git a/examples/2.3.x/server-dotnet/examples/postgresql/get-status.md b/examples/2.3.x/server-dotnet/examples/postgresql/get-status.md index 0101abcb5..423f902e1 100644 --- a/examples/2.3.x/server-dotnet/examples/postgresql/get-status.md +++ b/examples/2.3.x/server-dotnet/examples/postgresql/get-status.md @@ -10,7 +10,7 @@ Client client = new Client() Postgresql postgresql = new Postgresql(client); -DatabaseStatus result = await postgresql.GetStatus( +Appwrite.Models.DatabaseStatus result = await postgresql.GetStatus( databaseId: "<DATABASE_ID>" ); diff --git a/examples/2.3.x/server-dotnet/examples/postgresql/get.md b/examples/2.3.x/server-dotnet/examples/postgresql/get.md index 67bd780f3..351c81df6 100644 --- a/examples/2.3.x/server-dotnet/examples/postgresql/get.md +++ b/examples/2.3.x/server-dotnet/examples/postgresql/get.md @@ -10,7 +10,7 @@ Client client = new Client() Postgresql postgresql = new Postgresql(client); -DedicatedDatabase result = await postgresql.Get( +Appwrite.Models.DedicatedDatabase result = await postgresql.Get( databaseId: "<DATABASE_ID>" ); diff --git a/examples/2.3.x/server-dotnet/examples/postgresql/list-backup-policies.md b/examples/2.3.x/server-dotnet/examples/postgresql/list-backup-policies.md index 7fe5d3f71..93a26c183 100644 --- a/examples/2.3.x/server-dotnet/examples/postgresql/list-backup-policies.md +++ b/examples/2.3.x/server-dotnet/examples/postgresql/list-backup-policies.md @@ -10,7 +10,7 @@ Client client = new Client() Postgresql postgresql = new Postgresql(client); -BackupPolicyList result = await postgresql.ListBackupPolicies( +Appwrite.Models.BackupPolicyList result = await postgresql.ListBackupPolicies( databaseId: "<DATABASE_ID>", queries: new List<string>() // optional ); diff --git a/examples/2.3.x/server-dotnet/examples/postgresql/list-backups.md b/examples/2.3.x/server-dotnet/examples/postgresql/list-backups.md index f3b66895e..9fd5f8b7b 100644 --- a/examples/2.3.x/server-dotnet/examples/postgresql/list-backups.md +++ b/examples/2.3.x/server-dotnet/examples/postgresql/list-backups.md @@ -10,7 +10,7 @@ Client client = new Client() Postgresql postgresql = new Postgresql(client); -DedicatedDatabaseBackupList result = await postgresql.ListBackups( +Appwrite.Models.DedicatedDatabaseBackupList result = await postgresql.ListBackups( databaseId: "<DATABASE_ID>", queries: new List<string>() // optional ); diff --git a/examples/2.3.x/server-dotnet/examples/postgresql/list-branches.md b/examples/2.3.x/server-dotnet/examples/postgresql/list-branches.md index 1c092d456..b8572e603 100644 --- a/examples/2.3.x/server-dotnet/examples/postgresql/list-branches.md +++ b/examples/2.3.x/server-dotnet/examples/postgresql/list-branches.md @@ -10,7 +10,7 @@ Client client = new Client() Postgresql postgresql = new Postgresql(client); -DedicatedDatabaseBranchList result = await postgresql.ListBranches( +Appwrite.Models.DedicatedDatabaseBranchList result = await postgresql.ListBranches( databaseId: "<DATABASE_ID>" ); diff --git a/examples/2.3.x/server-dotnet/examples/postgresql/list-extensions.md b/examples/2.3.x/server-dotnet/examples/postgresql/list-extensions.md index a7ca3908d..b2a744fdc 100644 --- a/examples/2.3.x/server-dotnet/examples/postgresql/list-extensions.md +++ b/examples/2.3.x/server-dotnet/examples/postgresql/list-extensions.md @@ -10,7 +10,7 @@ Client client = new Client() Postgresql postgresql = new Postgresql(client); -DedicatedDatabaseExtensions result = await postgresql.ListExtensions( +Appwrite.Models.DedicatedDatabaseExtensions result = await postgresql.ListExtensions( databaseId: "<DATABASE_ID>" ); diff --git a/examples/2.3.x/server-dotnet/examples/postgresql/list-operations.md b/examples/2.3.x/server-dotnet/examples/postgresql/list-operations.md index cb745eaa4..7494343cb 100644 --- a/examples/2.3.x/server-dotnet/examples/postgresql/list-operations.md +++ b/examples/2.3.x/server-dotnet/examples/postgresql/list-operations.md @@ -10,7 +10,7 @@ Client client = new Client() Postgresql postgresql = new Postgresql(client); -DedicatedDatabaseOperationList result = await postgresql.ListOperations( +Appwrite.Models.DedicatedDatabaseOperationList result = await postgresql.ListOperations( databaseId: "<DATABASE_ID>", status: "queued", // optional limit: 1, // optional diff --git a/examples/2.3.x/server-dotnet/examples/postgresql/list-restorations.md b/examples/2.3.x/server-dotnet/examples/postgresql/list-restorations.md index 2663a1f83..b94f14d3d 100644 --- a/examples/2.3.x/server-dotnet/examples/postgresql/list-restorations.md +++ b/examples/2.3.x/server-dotnet/examples/postgresql/list-restorations.md @@ -10,7 +10,7 @@ Client client = new Client() Postgresql postgresql = new Postgresql(client); -DedicatedDatabaseRestorationList result = await postgresql.ListRestorations( +Appwrite.Models.DedicatedDatabaseRestorationList result = await postgresql.ListRestorations( databaseId: "<DATABASE_ID>", status: "pending", // optional type: "backup", // optional diff --git a/examples/2.3.x/server-dotnet/examples/postgresql/list-specifications.md b/examples/2.3.x/server-dotnet/examples/postgresql/list-specifications.md index da1539be7..e6117b11d 100644 --- a/examples/2.3.x/server-dotnet/examples/postgresql/list-specifications.md +++ b/examples/2.3.x/server-dotnet/examples/postgresql/list-specifications.md @@ -10,7 +10,7 @@ Client client = new Client() Postgresql postgresql = new Postgresql(client); -DedicatedDatabaseSpecificationList result = await postgresql.ListSpecifications(); +Appwrite.Models.DedicatedDatabaseSpecificationList result = await postgresql.ListSpecifications(); ``` diff --git a/examples/2.3.x/server-dotnet/examples/postgresql/list.md b/examples/2.3.x/server-dotnet/examples/postgresql/list.md index eb2e0e06f..ba8b1ef33 100644 --- a/examples/2.3.x/server-dotnet/examples/postgresql/list.md +++ b/examples/2.3.x/server-dotnet/examples/postgresql/list.md @@ -10,7 +10,7 @@ Client client = new Client() Postgresql postgresql = new Postgresql(client); -DedicatedDatabaseList result = await postgresql.List( +Appwrite.Models.DedicatedDatabaseList result = await postgresql.List( queries: new List<string>() // optional ); diff --git a/examples/2.3.x/server-dotnet/examples/postgresql/update-backup-policy.md b/examples/2.3.x/server-dotnet/examples/postgresql/update-backup-policy.md index c1faaa09c..f132a200e 100644 --- a/examples/2.3.x/server-dotnet/examples/postgresql/update-backup-policy.md +++ b/examples/2.3.x/server-dotnet/examples/postgresql/update-backup-policy.md @@ -10,7 +10,7 @@ Client client = new Client() Postgresql postgresql = new Postgresql(client); -BackupPolicy result = await postgresql.UpdateBackupPolicy( +Appwrite.Models.BackupPolicy result = await postgresql.UpdateBackupPolicy( databaseId: "<DATABASE_ID>", policyId: "<POLICY_ID>", name: "<NAME>", // optional diff --git a/examples/2.3.x/server-dotnet/examples/postgresql/update-backup-storage.md b/examples/2.3.x/server-dotnet/examples/postgresql/update-backup-storage.md index 88d946e13..88e84f1fe 100644 --- a/examples/2.3.x/server-dotnet/examples/postgresql/update-backup-storage.md +++ b/examples/2.3.x/server-dotnet/examples/postgresql/update-backup-storage.md @@ -10,7 +10,7 @@ Client client = new Client() Postgresql postgresql = new Postgresql(client); -DedicatedDatabaseBackupStorage result = await postgresql.UpdateBackupStorage( +Appwrite.Models.DedicatedDatabaseBackupStorage result = await postgresql.UpdateBackupStorage( databaseId: "<DATABASE_ID>", provider: "s3", bucket: "<BUCKET>", diff --git a/examples/2.3.x/server-dotnet/examples/postgresql/update-credentials.md b/examples/2.3.x/server-dotnet/examples/postgresql/update-credentials.md index 75f8f3383..bb714ecb4 100644 --- a/examples/2.3.x/server-dotnet/examples/postgresql/update-credentials.md +++ b/examples/2.3.x/server-dotnet/examples/postgresql/update-credentials.md @@ -10,7 +10,7 @@ Client client = new Client() Postgresql postgresql = new Postgresql(client); -DedicatedDatabaseOperation result = await postgresql.UpdateCredentials( +Appwrite.Models.DedicatedDatabaseOperation result = await postgresql.UpdateCredentials( databaseId: "<DATABASE_ID>" ); diff --git a/examples/2.3.x/server-dotnet/examples/postgresql/update-maintenance.md b/examples/2.3.x/server-dotnet/examples/postgresql/update-maintenance.md index ed6fa91a4..01f682c79 100644 --- a/examples/2.3.x/server-dotnet/examples/postgresql/update-maintenance.md +++ b/examples/2.3.x/server-dotnet/examples/postgresql/update-maintenance.md @@ -10,7 +10,7 @@ Client client = new Client() Postgresql postgresql = new Postgresql(client); -DedicatedDatabase result = await postgresql.UpdateMaintenance( +Appwrite.Models.DedicatedDatabase result = await postgresql.UpdateMaintenance( databaseId: "<DATABASE_ID>", day: "sun", hourUtc: 0 diff --git a/examples/2.3.x/server-dotnet/examples/postgresql/update-pooler.md b/examples/2.3.x/server-dotnet/examples/postgresql/update-pooler.md index bc77771f0..202dd354c 100644 --- a/examples/2.3.x/server-dotnet/examples/postgresql/update-pooler.md +++ b/examples/2.3.x/server-dotnet/examples/postgresql/update-pooler.md @@ -10,7 +10,7 @@ Client client = new Client() Postgresql postgresql = new Postgresql(client); -DedicatedDatabasePooler result = await postgresql.UpdatePooler( +Appwrite.Models.DedicatedDatabasePooler result = await postgresql.UpdatePooler( databaseId: "<DATABASE_ID>", mode: "transaction", // optional maxConnections: 10, // optional diff --git a/examples/2.3.x/server-dotnet/examples/postgresql/update.md b/examples/2.3.x/server-dotnet/examples/postgresql/update.md index c6e5d48a6..c942e330c 100644 --- a/examples/2.3.x/server-dotnet/examples/postgresql/update.md +++ b/examples/2.3.x/server-dotnet/examples/postgresql/update.md @@ -10,7 +10,7 @@ Client client = new Client() Postgresql postgresql = new Postgresql(client); -DedicatedDatabase result = await postgresql.Update( +Appwrite.Models.DedicatedDatabase result = await postgresql.Update( databaseId: "<DATABASE_ID>", name: "<NAME>", // optional status: "ready", // optional diff --git a/examples/2.3.x/server-dotnet/examples/presences/get.md b/examples/2.3.x/server-dotnet/examples/presences/get.md index 85e7287ea..b1c42215d 100644 --- a/examples/2.3.x/server-dotnet/examples/presences/get.md +++ b/examples/2.3.x/server-dotnet/examples/presences/get.md @@ -10,7 +10,7 @@ Client client = new Client() Presences presences = new Presences(client); -Presence result = await presences.Get( +Appwrite.Models.Presence result = await presences.Get( presenceId: "<PRESENCE_ID>" ); diff --git a/examples/2.3.x/server-dotnet/examples/presences/list.md b/examples/2.3.x/server-dotnet/examples/presences/list.md index 8285644ef..7e46168c5 100644 --- a/examples/2.3.x/server-dotnet/examples/presences/list.md +++ b/examples/2.3.x/server-dotnet/examples/presences/list.md @@ -10,7 +10,7 @@ Client client = new Client() Presences presences = new Presences(client); -PresenceList result = await presences.List( +Appwrite.Models.PresenceList result = await presences.List( queries: new List<string>(), // optional total: false, // optional ttl: 0 // optional diff --git a/examples/2.3.x/server-dotnet/examples/presences/update.md b/examples/2.3.x/server-dotnet/examples/presences/update.md index ed55483b9..3efa3244e 100644 --- a/examples/2.3.x/server-dotnet/examples/presences/update.md +++ b/examples/2.3.x/server-dotnet/examples/presences/update.md @@ -10,7 +10,7 @@ Client client = new Client() Presences presences = new Presences(client); -Presence result = await presences.Update( +Appwrite.Models.Presence result = await presences.Update( presenceId: "<PRESENCE_ID>", userId: "<USER_ID>", status: "<STATUS>", // optional diff --git a/examples/2.3.x/server-dotnet/examples/presences/upsert.md b/examples/2.3.x/server-dotnet/examples/presences/upsert.md index b7868248a..b87c35ecb 100644 --- a/examples/2.3.x/server-dotnet/examples/presences/upsert.md +++ b/examples/2.3.x/server-dotnet/examples/presences/upsert.md @@ -10,7 +10,7 @@ Client client = new Client() Presences presences = new Presences(client); -Presence result = await presences.Upsert( +Appwrite.Models.Presence result = await presences.Upsert( presenceId: "<PRESENCE_ID>", userId: "<USER_ID>", status: "<STATUS>", diff --git a/examples/2.3.x/server-dotnet/examples/project/create-android-platform.md b/examples/2.3.x/server-dotnet/examples/project/create-android-platform.md index df8dd6e0f..bb6012942 100644 --- a/examples/2.3.x/server-dotnet/examples/project/create-android-platform.md +++ b/examples/2.3.x/server-dotnet/examples/project/create-android-platform.md @@ -10,7 +10,7 @@ Client client = new Client() Project project = new Project(client); -PlatformAndroid result = await project.CreateAndroidPlatform( +Appwrite.Models.PlatformAndroid result = await project.CreateAndroidPlatform( platformId: "<PLATFORM_ID>", name: "<NAME>", applicationId: "<APPLICATION_ID>" diff --git a/examples/2.3.x/server-dotnet/examples/project/create-apple-platform.md b/examples/2.3.x/server-dotnet/examples/project/create-apple-platform.md index 10dc58da1..fa2bcc497 100644 --- a/examples/2.3.x/server-dotnet/examples/project/create-apple-platform.md +++ b/examples/2.3.x/server-dotnet/examples/project/create-apple-platform.md @@ -10,7 +10,7 @@ Client client = new Client() Project project = new Project(client); -PlatformApple result = await project.CreateApplePlatform( +Appwrite.Models.PlatformApple result = await project.CreateApplePlatform( platformId: "<PLATFORM_ID>", name: "<NAME>", bundleIdentifier: "<BUNDLE_IDENTIFIER>" diff --git a/examples/2.3.x/server-dotnet/examples/project/create-ephemeral-key.md b/examples/2.3.x/server-dotnet/examples/project/create-ephemeral-key.md index 5b6226bb8..683241c34 100644 --- a/examples/2.3.x/server-dotnet/examples/project/create-ephemeral-key.md +++ b/examples/2.3.x/server-dotnet/examples/project/create-ephemeral-key.md @@ -11,8 +11,8 @@ Client client = new Client() Project project = new Project(client); -EphemeralKey result = await project.CreateEphemeralKey( - scopes: new List<ProjectKeyScopes> { ProjectKeyScopes.ProjectRead }, +Appwrite.Models.EphemeralKey result = await project.CreateEphemeralKey( + scopes: new List<ProjectKeyScopes> { ProjectKeyScopes.UsersRead }, duration: 600 ); diff --git a/examples/2.3.x/server-dotnet/examples/project/create-linux-platform.md b/examples/2.3.x/server-dotnet/examples/project/create-linux-platform.md index 7037a09c8..ee52c8def 100644 --- a/examples/2.3.x/server-dotnet/examples/project/create-linux-platform.md +++ b/examples/2.3.x/server-dotnet/examples/project/create-linux-platform.md @@ -10,7 +10,7 @@ Client client = new Client() Project project = new Project(client); -PlatformLinux result = await project.CreateLinuxPlatform( +Appwrite.Models.PlatformLinux result = await project.CreateLinuxPlatform( platformId: "<PLATFORM_ID>", name: "<NAME>", packageName: "<PACKAGE_NAME>" diff --git a/examples/2.3.x/server-dotnet/examples/project/create-mock-phone.md b/examples/2.3.x/server-dotnet/examples/project/create-mock-phone.md index f8bb1bf57..b907e263b 100644 --- a/examples/2.3.x/server-dotnet/examples/project/create-mock-phone.md +++ b/examples/2.3.x/server-dotnet/examples/project/create-mock-phone.md @@ -10,7 +10,7 @@ Client client = new Client() Project project = new Project(client); -MockNumber result = await project.CreateMockPhone( +Appwrite.Models.MockNumber result = await project.CreateMockPhone( number: "+12065550100", otp: "<OTP>" ); diff --git a/examples/2.3.x/server-dotnet/examples/project/create-smtp-test.md b/examples/2.3.x/server-dotnet/examples/project/create-smtp-test.md index d461c0cde..1070cfdf6 100644 --- a/examples/2.3.x/server-dotnet/examples/project/create-smtp-test.md +++ b/examples/2.3.x/server-dotnet/examples/project/create-smtp-test.md @@ -10,8 +10,8 @@ Client client = new Client() Project project = new Project(client); - result = await project.CreateSMTPTest( - emails: new List<string>() +Appwrite.Models. result = await project.CreateSMTPTest( + emails: ["recipient@example.com"] ); ``` diff --git a/examples/2.3.x/server-dotnet/examples/project/create-variable.md b/examples/2.3.x/server-dotnet/examples/project/create-variable.md index 1e361c54b..118c12baa 100644 --- a/examples/2.3.x/server-dotnet/examples/project/create-variable.md +++ b/examples/2.3.x/server-dotnet/examples/project/create-variable.md @@ -10,7 +10,7 @@ Client client = new Client() Project project = new Project(client); -Variable result = await project.CreateVariable( +Appwrite.Models.Variable result = await project.CreateVariable( variableId: "<VARIABLE_ID>", key: "<KEY>", value: "<VALUE>", diff --git a/examples/2.3.x/server-dotnet/examples/project/create-web-platform.md b/examples/2.3.x/server-dotnet/examples/project/create-web-platform.md index 83f148a03..3a77a0146 100644 --- a/examples/2.3.x/server-dotnet/examples/project/create-web-platform.md +++ b/examples/2.3.x/server-dotnet/examples/project/create-web-platform.md @@ -10,7 +10,7 @@ Client client = new Client() Project project = new Project(client); -PlatformWeb result = await project.CreateWebPlatform( +Appwrite.Models.PlatformWeb result = await project.CreateWebPlatform( platformId: "<PLATFORM_ID>", name: "<NAME>", hostname: "app.example.com" diff --git a/examples/2.3.x/server-dotnet/examples/project/create-windows-platform.md b/examples/2.3.x/server-dotnet/examples/project/create-windows-platform.md index 01eb5b90f..851b10e70 100644 --- a/examples/2.3.x/server-dotnet/examples/project/create-windows-platform.md +++ b/examples/2.3.x/server-dotnet/examples/project/create-windows-platform.md @@ -10,7 +10,7 @@ Client client = new Client() Project project = new Project(client); -PlatformWindows result = await project.CreateWindowsPlatform( +Appwrite.Models.PlatformWindows result = await project.CreateWindowsPlatform( platformId: "<PLATFORM_ID>", name: "<NAME>", packageIdentifierName: "<PACKAGE_IDENTIFIER_NAME>" diff --git a/examples/2.3.x/server-dotnet/examples/project/get-email-template.md b/examples/2.3.x/server-dotnet/examples/project/get-email-template.md index 11a331a21..ca99baed0 100644 --- a/examples/2.3.x/server-dotnet/examples/project/get-email-template.md +++ b/examples/2.3.x/server-dotnet/examples/project/get-email-template.md @@ -11,7 +11,7 @@ Client client = new Client() Project project = new Project(client); -EmailTemplate result = await project.GetEmailTemplate( +Appwrite.Models.EmailTemplate result = await project.GetEmailTemplate( templateId: ProjectEmailTemplateId.Verification, locale: ProjectEmailTemplateLocale.Af // optional ); diff --git a/examples/2.3.x/server-dotnet/examples/project/get-key.md b/examples/2.3.x/server-dotnet/examples/project/get-key.md index a84c4602f..c672e1a56 100644 --- a/examples/2.3.x/server-dotnet/examples/project/get-key.md +++ b/examples/2.3.x/server-dotnet/examples/project/get-key.md @@ -10,7 +10,7 @@ Client client = new Client() Project project = new Project(client); -Key result = await project.GetKey( +Appwrite.Models.Key result = await project.GetKey( keyId: "<KEY_ID>" ); diff --git a/examples/2.3.x/server-dotnet/examples/project/get-mock-phone.md b/examples/2.3.x/server-dotnet/examples/project/get-mock-phone.md index 43fea545d..33e64f11c 100644 --- a/examples/2.3.x/server-dotnet/examples/project/get-mock-phone.md +++ b/examples/2.3.x/server-dotnet/examples/project/get-mock-phone.md @@ -10,7 +10,7 @@ Client client = new Client() Project project = new Project(client); -MockNumber result = await project.GetMockPhone( +Appwrite.Models.MockNumber result = await project.GetMockPhone( number: "+12065550100" ); diff --git a/examples/2.3.x/server-dotnet/examples/project/get-variable.md b/examples/2.3.x/server-dotnet/examples/project/get-variable.md index bda49739d..13f24c439 100644 --- a/examples/2.3.x/server-dotnet/examples/project/get-variable.md +++ b/examples/2.3.x/server-dotnet/examples/project/get-variable.md @@ -10,7 +10,7 @@ Client client = new Client() Project project = new Project(client); -Variable result = await project.GetVariable( +Appwrite.Models.Variable result = await project.GetVariable( variableId: "<VARIABLE_ID>" ); diff --git a/examples/2.3.x/server-dotnet/examples/project/get.md b/examples/2.3.x/server-dotnet/examples/project/get.md index 8dbf5a582..e1cb06371 100644 --- a/examples/2.3.x/server-dotnet/examples/project/get.md +++ b/examples/2.3.x/server-dotnet/examples/project/get.md @@ -10,7 +10,7 @@ Client client = new Client() Project project = new Project(client); -Project result = await project.Get(); +Appwrite.Models.Project result = await project.Get(); ``` diff --git a/examples/2.3.x/server-dotnet/examples/project/list-email-templates.md b/examples/2.3.x/server-dotnet/examples/project/list-email-templates.md index 0cd3cad12..e8ebd1aa8 100644 --- a/examples/2.3.x/server-dotnet/examples/project/list-email-templates.md +++ b/examples/2.3.x/server-dotnet/examples/project/list-email-templates.md @@ -10,7 +10,7 @@ Client client = new Client() Project project = new Project(client); -EmailTemplateList result = await project.ListEmailTemplates( +Appwrite.Models.EmailTemplateList result = await project.ListEmailTemplates( queries: new List<string>(), // optional total: false // optional ); diff --git a/examples/2.3.x/server-dotnet/examples/project/list-keys.md b/examples/2.3.x/server-dotnet/examples/project/list-keys.md index f006dd194..45111a31c 100644 --- a/examples/2.3.x/server-dotnet/examples/project/list-keys.md +++ b/examples/2.3.x/server-dotnet/examples/project/list-keys.md @@ -10,7 +10,7 @@ Client client = new Client() Project project = new Project(client); -KeyList result = await project.ListKeys( +Appwrite.Models.KeyList result = await project.ListKeys( queries: new List<string>(), // optional total: false // optional ); diff --git a/examples/2.3.x/server-dotnet/examples/project/list-mock-phones.md b/examples/2.3.x/server-dotnet/examples/project/list-mock-phones.md index 3fa07bdcb..d323abb73 100644 --- a/examples/2.3.x/server-dotnet/examples/project/list-mock-phones.md +++ b/examples/2.3.x/server-dotnet/examples/project/list-mock-phones.md @@ -10,7 +10,7 @@ Client client = new Client() Project project = new Project(client); -MockNumberList result = await project.ListMockPhones( +Appwrite.Models.MockNumberList result = await project.ListMockPhones( queries: new List<string>(), // optional total: false // optional ); diff --git a/examples/2.3.x/server-dotnet/examples/project/list-o-auth-2-providers.md b/examples/2.3.x/server-dotnet/examples/project/list-o-auth-2-providers.md index 9d0e7eae9..f27c64dc7 100644 --- a/examples/2.3.x/server-dotnet/examples/project/list-o-auth-2-providers.md +++ b/examples/2.3.x/server-dotnet/examples/project/list-o-auth-2-providers.md @@ -10,7 +10,7 @@ Client client = new Client() Project project = new Project(client); -OAuth2ProviderList result = await project.ListOAuth2Providers( +Appwrite.Models.OAuth2ProviderList result = await project.ListOAuth2Providers( queries: new List<string>(), // optional total: false // optional ); diff --git a/examples/2.3.x/server-dotnet/examples/project/list-platforms.md b/examples/2.3.x/server-dotnet/examples/project/list-platforms.md index 2a507c274..2cd00be50 100644 --- a/examples/2.3.x/server-dotnet/examples/project/list-platforms.md +++ b/examples/2.3.x/server-dotnet/examples/project/list-platforms.md @@ -10,7 +10,7 @@ Client client = new Client() Project project = new Project(client); -PlatformList result = await project.ListPlatforms( +Appwrite.Models.PlatformList result = await project.ListPlatforms( queries: new List<string>(), // optional total: false // optional ); diff --git a/examples/2.3.x/server-dotnet/examples/project/list-policies.md b/examples/2.3.x/server-dotnet/examples/project/list-policies.md index bbd49b4c6..6c22f716e 100644 --- a/examples/2.3.x/server-dotnet/examples/project/list-policies.md +++ b/examples/2.3.x/server-dotnet/examples/project/list-policies.md @@ -10,7 +10,7 @@ Client client = new Client() Project project = new Project(client); -PolicyList result = await project.ListPolicies( +Appwrite.Models.PolicyList result = await project.ListPolicies( queries: new List<string>(), // optional total: false // optional ); diff --git a/examples/2.3.x/server-dotnet/examples/project/list-variables.md b/examples/2.3.x/server-dotnet/examples/project/list-variables.md index e8107ab6c..8fc250379 100644 --- a/examples/2.3.x/server-dotnet/examples/project/list-variables.md +++ b/examples/2.3.x/server-dotnet/examples/project/list-variables.md @@ -10,7 +10,7 @@ Client client = new Client() Project project = new Project(client); -VariableList result = await project.ListVariables( +Appwrite.Models.VariableList result = await project.ListVariables( queries: new List<string>(), // optional total: false // optional ); diff --git a/examples/2.3.x/server-dotnet/examples/project/update-android-platform.md b/examples/2.3.x/server-dotnet/examples/project/update-android-platform.md index 77b78b571..d56913a54 100644 --- a/examples/2.3.x/server-dotnet/examples/project/update-android-platform.md +++ b/examples/2.3.x/server-dotnet/examples/project/update-android-platform.md @@ -10,7 +10,7 @@ Client client = new Client() Project project = new Project(client); -PlatformAndroid result = await project.UpdateAndroidPlatform( +Appwrite.Models.PlatformAndroid result = await project.UpdateAndroidPlatform( platformId: "<PLATFORM_ID>", name: "<NAME>", applicationId: "<APPLICATION_ID>" diff --git a/examples/2.3.x/server-dotnet/examples/project/update-apple-platform.md b/examples/2.3.x/server-dotnet/examples/project/update-apple-platform.md index fa9ec4623..d48e1a2d1 100644 --- a/examples/2.3.x/server-dotnet/examples/project/update-apple-platform.md +++ b/examples/2.3.x/server-dotnet/examples/project/update-apple-platform.md @@ -10,7 +10,7 @@ Client client = new Client() Project project = new Project(client); -PlatformApple result = await project.UpdateApplePlatform( +Appwrite.Models.PlatformApple result = await project.UpdateApplePlatform( platformId: "<PLATFORM_ID>", name: "<NAME>", bundleIdentifier: "<BUNDLE_IDENTIFIER>" diff --git a/examples/2.3.x/server-dotnet/examples/project/update-auth-method.md b/examples/2.3.x/server-dotnet/examples/project/update-auth-method.md index 0b180be24..909814771 100644 --- a/examples/2.3.x/server-dotnet/examples/project/update-auth-method.md +++ b/examples/2.3.x/server-dotnet/examples/project/update-auth-method.md @@ -11,7 +11,7 @@ Client client = new Client() Project project = new Project(client); -Project result = await project.UpdateAuthMethod( +Appwrite.Models.Project result = await project.UpdateAuthMethod( methodId: ProjectAuthMethodId.EmailPassword, enabled: false ); diff --git a/examples/2.3.x/server-dotnet/examples/project/update-deny-aliased-email-policy.md b/examples/2.3.x/server-dotnet/examples/project/update-deny-aliased-email-policy.md index 50d622ea7..aacc20172 100644 --- a/examples/2.3.x/server-dotnet/examples/project/update-deny-aliased-email-policy.md +++ b/examples/2.3.x/server-dotnet/examples/project/update-deny-aliased-email-policy.md @@ -10,7 +10,7 @@ Client client = new Client() Project project = new Project(client); -Project result = await project.UpdateDenyAliasedEmailPolicy( +Appwrite.Models.Project result = await project.UpdateDenyAliasedEmailPolicy( enabled: false ); diff --git a/examples/2.3.x/server-dotnet/examples/project/update-deny-corporate-email-policy.md b/examples/2.3.x/server-dotnet/examples/project/update-deny-corporate-email-policy.md index 13e204eb2..169f8e025 100644 --- a/examples/2.3.x/server-dotnet/examples/project/update-deny-corporate-email-policy.md +++ b/examples/2.3.x/server-dotnet/examples/project/update-deny-corporate-email-policy.md @@ -10,7 +10,7 @@ Client client = new Client() Project project = new Project(client); -Project result = await project.UpdateDenyCorporateEmailPolicy( +Appwrite.Models.Project result = await project.UpdateDenyCorporateEmailPolicy( enabled: false ); diff --git a/examples/2.3.x/server-dotnet/examples/project/update-deny-disposable-email-policy.md b/examples/2.3.x/server-dotnet/examples/project/update-deny-disposable-email-policy.md index 7e22b31a3..d1f6122bc 100644 --- a/examples/2.3.x/server-dotnet/examples/project/update-deny-disposable-email-policy.md +++ b/examples/2.3.x/server-dotnet/examples/project/update-deny-disposable-email-policy.md @@ -10,7 +10,7 @@ Client client = new Client() Project project = new Project(client); -Project result = await project.UpdateDenyDisposableEmailPolicy( +Appwrite.Models.Project result = await project.UpdateDenyDisposableEmailPolicy( enabled: false ); diff --git a/examples/2.3.x/server-dotnet/examples/project/update-deny-free-email-policy.md b/examples/2.3.x/server-dotnet/examples/project/update-deny-free-email-policy.md index 49ba67670..6da6853db 100644 --- a/examples/2.3.x/server-dotnet/examples/project/update-deny-free-email-policy.md +++ b/examples/2.3.x/server-dotnet/examples/project/update-deny-free-email-policy.md @@ -10,7 +10,7 @@ Client client = new Client() Project project = new Project(client); -Project result = await project.UpdateDenyFreeEmailPolicy( +Appwrite.Models.Project result = await project.UpdateDenyFreeEmailPolicy( enabled: false ); diff --git a/examples/2.3.x/server-dotnet/examples/project/update-email-template.md b/examples/2.3.x/server-dotnet/examples/project/update-email-template.md index 2c4c747d2..dd1ae5d6b 100644 --- a/examples/2.3.x/server-dotnet/examples/project/update-email-template.md +++ b/examples/2.3.x/server-dotnet/examples/project/update-email-template.md @@ -11,7 +11,7 @@ Client client = new Client() Project project = new Project(client); -EmailTemplate result = await project.UpdateEmailTemplate( +Appwrite.Models.EmailTemplate result = await project.UpdateEmailTemplate( templateId: ProjectEmailTemplateId.Verification, locale: ProjectEmailTemplateLocale.Af, // optional subject: "<SUBJECT>", // optional diff --git a/examples/2.3.x/server-dotnet/examples/project/update-key.md b/examples/2.3.x/server-dotnet/examples/project/update-key.md index 619fca4b9..6097e49a0 100644 --- a/examples/2.3.x/server-dotnet/examples/project/update-key.md +++ b/examples/2.3.x/server-dotnet/examples/project/update-key.md @@ -11,10 +11,10 @@ Client client = new Client() Project project = new Project(client); -Key result = await project.UpdateKey( +Appwrite.Models.Key result = await project.UpdateKey( keyId: "<KEY_ID>", name: "<NAME>", - scopes: new List<ProjectKeyScopes> { ProjectKeyScopes.ProjectRead }, + scopes: new List<ProjectKeyScopes> { ProjectKeyScopes.UsersRead }, expire: "2020-10-15T06:38:00.000+00:00" // optional ); diff --git a/examples/2.3.x/server-dotnet/examples/project/update-labels.md b/examples/2.3.x/server-dotnet/examples/project/update-labels.md index 2dfe3ea86..76e8304db 100644 --- a/examples/2.3.x/server-dotnet/examples/project/update-labels.md +++ b/examples/2.3.x/server-dotnet/examples/project/update-labels.md @@ -10,8 +10,8 @@ Client client = new Client() Project project = new Project(client); -Project result = await project.UpdateLabels( - labels: new List<string>() +Appwrite.Models.Project result = await project.UpdateLabels( + labels: ["production"] ); ``` diff --git a/examples/2.3.x/server-dotnet/examples/project/update-linux-platform.md b/examples/2.3.x/server-dotnet/examples/project/update-linux-platform.md index 0e0be47d5..b0a4e359e 100644 --- a/examples/2.3.x/server-dotnet/examples/project/update-linux-platform.md +++ b/examples/2.3.x/server-dotnet/examples/project/update-linux-platform.md @@ -10,7 +10,7 @@ Client client = new Client() Project project = new Project(client); -PlatformLinux result = await project.UpdateLinuxPlatform( +Appwrite.Models.PlatformLinux result = await project.UpdateLinuxPlatform( platformId: "<PLATFORM_ID>", name: "<NAME>", packageName: "<PACKAGE_NAME>" diff --git a/examples/2.3.x/server-dotnet/examples/project/update-membership-privacy-policy.md b/examples/2.3.x/server-dotnet/examples/project/update-membership-privacy-policy.md index 3e6102f6d..8f508a40f 100644 --- a/examples/2.3.x/server-dotnet/examples/project/update-membership-privacy-policy.md +++ b/examples/2.3.x/server-dotnet/examples/project/update-membership-privacy-policy.md @@ -10,7 +10,7 @@ Client client = new Client() Project project = new Project(client); -Project result = await project.UpdateMembershipPrivacyPolicy( +Appwrite.Models.Project result = await project.UpdateMembershipPrivacyPolicy( userId: false, // optional userEmail: false, // optional userPhone: false, // optional diff --git a/examples/2.3.x/server-dotnet/examples/project/update-mfa-factors-policy.md b/examples/2.3.x/server-dotnet/examples/project/update-mfa-factors-policy.md index aa9ed2a54..8521251e4 100644 --- a/examples/2.3.x/server-dotnet/examples/project/update-mfa-factors-policy.md +++ b/examples/2.3.x/server-dotnet/examples/project/update-mfa-factors-policy.md @@ -10,7 +10,7 @@ Client client = new Client() Project project = new Project(client); -Project result = await project.UpdateMFAFactorsPolicy( +Appwrite.Models.Project result = await project.UpdateMFAFactorsPolicy( totp: false, // optional email: false, // optional phone: false, // optional diff --git a/examples/2.3.x/server-dotnet/examples/project/update-mock-phone.md b/examples/2.3.x/server-dotnet/examples/project/update-mock-phone.md index e2c699e2b..c7f7c82e7 100644 --- a/examples/2.3.x/server-dotnet/examples/project/update-mock-phone.md +++ b/examples/2.3.x/server-dotnet/examples/project/update-mock-phone.md @@ -10,7 +10,7 @@ Client client = new Client() Project project = new Project(client); -MockNumber result = await project.UpdateMockPhone( +Appwrite.Models.MockNumber result = await project.UpdateMockPhone( number: "+12065550100", otp: "<OTP>" ); diff --git a/examples/2.3.x/server-dotnet/examples/project/update-o-auth-2-amazon.md b/examples/2.3.x/server-dotnet/examples/project/update-o-auth-2-amazon.md index b104edf02..08d858f13 100644 --- a/examples/2.3.x/server-dotnet/examples/project/update-o-auth-2-amazon.md +++ b/examples/2.3.x/server-dotnet/examples/project/update-o-auth-2-amazon.md @@ -10,7 +10,7 @@ Client client = new Client() Project project = new Project(client); -OAuth2Amazon result = await project.UpdateOAuth2Amazon( +Appwrite.Models.OAuth2Amazon result = await project.UpdateOAuth2Amazon( clientId: "<CLIENT_ID>", // optional clientSecret: "<CLIENT_SECRET>", // optional enabled: false // optional diff --git a/examples/2.3.x/server-dotnet/examples/project/update-o-auth-2-apple.md b/examples/2.3.x/server-dotnet/examples/project/update-o-auth-2-apple.md index aa455efa7..09a03e3a3 100644 --- a/examples/2.3.x/server-dotnet/examples/project/update-o-auth-2-apple.md +++ b/examples/2.3.x/server-dotnet/examples/project/update-o-auth-2-apple.md @@ -10,7 +10,7 @@ Client client = new Client() Project project = new Project(client); -OAuth2Apple result = await project.UpdateOAuth2Apple( +Appwrite.Models.OAuth2Apple result = await project.UpdateOAuth2Apple( serviceId: "<SERVICE_ID>", // optional keyId: "<KEY_ID>", // optional teamId: "<TEAM_ID>", // optional diff --git a/examples/2.3.x/server-dotnet/examples/project/update-o-auth-2-appwrite.md b/examples/2.3.x/server-dotnet/examples/project/update-o-auth-2-appwrite.md index cb38c52d7..181cd8069 100644 --- a/examples/2.3.x/server-dotnet/examples/project/update-o-auth-2-appwrite.md +++ b/examples/2.3.x/server-dotnet/examples/project/update-o-auth-2-appwrite.md @@ -10,7 +10,7 @@ Client client = new Client() Project project = new Project(client); -OAuth2Appwrite result = await project.UpdateOAuth2Appwrite( +Appwrite.Models.OAuth2Appwrite result = await project.UpdateOAuth2Appwrite( clientId: "<CLIENT_ID>", // optional clientSecret: "<CLIENT_SECRET>", // optional enabled: false // optional diff --git a/examples/2.3.x/server-dotnet/examples/project/update-o-auth-2-auth-0.md b/examples/2.3.x/server-dotnet/examples/project/update-o-auth-2-auth-0.md index 081f83231..f9e3c83a6 100644 --- a/examples/2.3.x/server-dotnet/examples/project/update-o-auth-2-auth-0.md +++ b/examples/2.3.x/server-dotnet/examples/project/update-o-auth-2-auth-0.md @@ -1,5 +1,6 @@ ```csharp using Appwrite; +using Appwrite.Enums; using Appwrite.Models; using Appwrite.Services; @@ -10,10 +11,11 @@ Client client = new Client() Project project = new Project(client); -OAuth2Auth0 result = await project.UpdateOAuth2Auth0( +Appwrite.Models.OAuth2Auth0 result = await project.UpdateOAuth2Auth0( clientId: "<CLIENT_ID>", // optional clientSecret: "<CLIENT_SECRET>", // optional endpoint: "<ENDPOINT>", // optional + prompt: new List<ProjectOAuth2Auth0Prompt> { ProjectOAuth2Auth0Prompt.None }, // optional enabled: false // optional ); diff --git a/examples/2.3.x/server-dotnet/examples/project/update-o-auth-2-authentik.md b/examples/2.3.x/server-dotnet/examples/project/update-o-auth-2-authentik.md index 75107594c..a03f9fc51 100644 --- a/examples/2.3.x/server-dotnet/examples/project/update-o-auth-2-authentik.md +++ b/examples/2.3.x/server-dotnet/examples/project/update-o-auth-2-authentik.md @@ -10,7 +10,7 @@ Client client = new Client() Project project = new Project(client); -OAuth2Authentik result = await project.UpdateOAuth2Authentik( +Appwrite.Models.OAuth2Authentik result = await project.UpdateOAuth2Authentik( clientId: "<CLIENT_ID>", // optional clientSecret: "<CLIENT_SECRET>", // optional endpoint: "<ENDPOINT>", // optional diff --git a/examples/2.3.x/server-dotnet/examples/project/update-o-auth-2-autodesk.md b/examples/2.3.x/server-dotnet/examples/project/update-o-auth-2-autodesk.md index 836fcc553..074144866 100644 --- a/examples/2.3.x/server-dotnet/examples/project/update-o-auth-2-autodesk.md +++ b/examples/2.3.x/server-dotnet/examples/project/update-o-auth-2-autodesk.md @@ -10,7 +10,7 @@ Client client = new Client() Project project = new Project(client); -OAuth2Autodesk result = await project.UpdateOAuth2Autodesk( +Appwrite.Models.OAuth2Autodesk result = await project.UpdateOAuth2Autodesk( clientId: "<CLIENT_ID>", // optional clientSecret: "<CLIENT_SECRET>", // optional enabled: false // optional diff --git a/examples/2.3.x/server-dotnet/examples/project/update-o-auth-2-bitbucket.md b/examples/2.3.x/server-dotnet/examples/project/update-o-auth-2-bitbucket.md index 6a72900dd..a24936b8e 100644 --- a/examples/2.3.x/server-dotnet/examples/project/update-o-auth-2-bitbucket.md +++ b/examples/2.3.x/server-dotnet/examples/project/update-o-auth-2-bitbucket.md @@ -10,7 +10,7 @@ Client client = new Client() Project project = new Project(client); -OAuth2Bitbucket result = await project.UpdateOAuth2Bitbucket( +Appwrite.Models.OAuth2Bitbucket result = await project.UpdateOAuth2Bitbucket( key: "<KEY>", // optional secret: "<SECRET>", // optional enabled: false // optional diff --git a/examples/2.3.x/server-dotnet/examples/project/update-o-auth-2-bitly.md b/examples/2.3.x/server-dotnet/examples/project/update-o-auth-2-bitly.md index f46dd35a6..6d874e425 100644 --- a/examples/2.3.x/server-dotnet/examples/project/update-o-auth-2-bitly.md +++ b/examples/2.3.x/server-dotnet/examples/project/update-o-auth-2-bitly.md @@ -10,7 +10,7 @@ Client client = new Client() Project project = new Project(client); -OAuth2Bitly result = await project.UpdateOAuth2Bitly( +Appwrite.Models.OAuth2Bitly result = await project.UpdateOAuth2Bitly( clientId: "<CLIENT_ID>", // optional clientSecret: "<CLIENT_SECRET>", // optional enabled: false // optional diff --git a/examples/2.3.x/server-dotnet/examples/project/update-o-auth-2-box.md b/examples/2.3.x/server-dotnet/examples/project/update-o-auth-2-box.md index 1f331e2cb..55b77479f 100644 --- a/examples/2.3.x/server-dotnet/examples/project/update-o-auth-2-box.md +++ b/examples/2.3.x/server-dotnet/examples/project/update-o-auth-2-box.md @@ -10,7 +10,7 @@ Client client = new Client() Project project = new Project(client); -OAuth2Box result = await project.UpdateOAuth2Box( +Appwrite.Models.OAuth2Box result = await project.UpdateOAuth2Box( clientId: "<CLIENT_ID>", // optional clientSecret: "<CLIENT_SECRET>", // optional enabled: false // optional diff --git a/examples/2.3.x/server-dotnet/examples/project/update-o-auth-2-cloudflare.md b/examples/2.3.x/server-dotnet/examples/project/update-o-auth-2-cloudflare.md index 2c7fd8099..d2c5b6c7f 100644 --- a/examples/2.3.x/server-dotnet/examples/project/update-o-auth-2-cloudflare.md +++ b/examples/2.3.x/server-dotnet/examples/project/update-o-auth-2-cloudflare.md @@ -10,7 +10,7 @@ Client client = new Client() Project project = new Project(client); -OAuth2Cloudflare result = await project.UpdateOAuth2Cloudflare( +Appwrite.Models.OAuth2Cloudflare result = await project.UpdateOAuth2Cloudflare( clientId: "<CLIENT_ID>", // optional clientSecret: "<CLIENT_SECRET>", // optional enabled: false // optional diff --git a/examples/2.3.x/server-dotnet/examples/project/update-o-auth-2-dailymotion.md b/examples/2.3.x/server-dotnet/examples/project/update-o-auth-2-dailymotion.md index 87c2c4785..bdb91bb82 100644 --- a/examples/2.3.x/server-dotnet/examples/project/update-o-auth-2-dailymotion.md +++ b/examples/2.3.x/server-dotnet/examples/project/update-o-auth-2-dailymotion.md @@ -10,7 +10,7 @@ Client client = new Client() Project project = new Project(client); -OAuth2Dailymotion result = await project.UpdateOAuth2Dailymotion( +Appwrite.Models.OAuth2Dailymotion result = await project.UpdateOAuth2Dailymotion( apiKey: "<API_KEY>", // optional apiSecret: "<API_SECRET>", // optional enabled: false // optional diff --git a/examples/2.3.x/server-dotnet/examples/project/update-o-auth-2-discord.md b/examples/2.3.x/server-dotnet/examples/project/update-o-auth-2-discord.md index b6a92dbef..847c1a8ad 100644 --- a/examples/2.3.x/server-dotnet/examples/project/update-o-auth-2-discord.md +++ b/examples/2.3.x/server-dotnet/examples/project/update-o-auth-2-discord.md @@ -1,5 +1,6 @@ ```csharp using Appwrite; +using Appwrite.Enums; using Appwrite.Models; using Appwrite.Services; @@ -10,9 +11,10 @@ Client client = new Client() Project project = new Project(client); -OAuth2Discord result = await project.UpdateOAuth2Discord( +Appwrite.Models.OAuth2Discord result = await project.UpdateOAuth2Discord( clientId: "<CLIENT_ID>", // optional clientSecret: "<CLIENT_SECRET>", // optional + prompt: new List<ProjectOAuth2DiscordPrompt> { ProjectOAuth2DiscordPrompt.None }, // optional enabled: false // optional ); diff --git a/examples/2.3.x/server-dotnet/examples/project/update-o-auth-2-disqus.md b/examples/2.3.x/server-dotnet/examples/project/update-o-auth-2-disqus.md index a7235621b..7095681a4 100644 --- a/examples/2.3.x/server-dotnet/examples/project/update-o-auth-2-disqus.md +++ b/examples/2.3.x/server-dotnet/examples/project/update-o-auth-2-disqus.md @@ -10,7 +10,7 @@ Client client = new Client() Project project = new Project(client); -OAuth2Disqus result = await project.UpdateOAuth2Disqus( +Appwrite.Models.OAuth2Disqus result = await project.UpdateOAuth2Disqus( publicKey: "<PUBLIC_KEY>", // optional secretKey: "<SECRET_KEY>", // optional enabled: false // optional diff --git a/examples/2.3.x/server-dotnet/examples/project/update-o-auth-2-dropbox.md b/examples/2.3.x/server-dotnet/examples/project/update-o-auth-2-dropbox.md index 16dd0f995..fcf1b826e 100644 --- a/examples/2.3.x/server-dotnet/examples/project/update-o-auth-2-dropbox.md +++ b/examples/2.3.x/server-dotnet/examples/project/update-o-auth-2-dropbox.md @@ -10,7 +10,7 @@ Client client = new Client() Project project = new Project(client); -OAuth2Dropbox result = await project.UpdateOAuth2Dropbox( +Appwrite.Models.OAuth2Dropbox result = await project.UpdateOAuth2Dropbox( appKey: "<APP_KEY>", // optional appSecret: "<APP_SECRET>", // optional enabled: false // optional diff --git a/examples/2.3.x/server-dotnet/examples/project/update-o-auth-2-etsy.md b/examples/2.3.x/server-dotnet/examples/project/update-o-auth-2-etsy.md index 7ffcb53fa..70805c339 100644 --- a/examples/2.3.x/server-dotnet/examples/project/update-o-auth-2-etsy.md +++ b/examples/2.3.x/server-dotnet/examples/project/update-o-auth-2-etsy.md @@ -10,7 +10,7 @@ Client client = new Client() Project project = new Project(client); -OAuth2Etsy result = await project.UpdateOAuth2Etsy( +Appwrite.Models.OAuth2Etsy result = await project.UpdateOAuth2Etsy( keyString: "<KEY_STRING>", // optional sharedSecret: "<SHARED_SECRET>", // optional enabled: false // optional diff --git a/examples/2.3.x/server-dotnet/examples/project/update-o-auth-2-facebook.md b/examples/2.3.x/server-dotnet/examples/project/update-o-auth-2-facebook.md index a1549973a..ff6ddbc8e 100644 --- a/examples/2.3.x/server-dotnet/examples/project/update-o-auth-2-facebook.md +++ b/examples/2.3.x/server-dotnet/examples/project/update-o-auth-2-facebook.md @@ -10,7 +10,7 @@ Client client = new Client() Project project = new Project(client); -OAuth2Facebook result = await project.UpdateOAuth2Facebook( +Appwrite.Models.OAuth2Facebook result = await project.UpdateOAuth2Facebook( appId: "<APP_ID>", // optional appSecret: "<APP_SECRET>", // optional enabled: false // optional diff --git a/examples/2.3.x/server-dotnet/examples/project/update-o-auth-2-figma.md b/examples/2.3.x/server-dotnet/examples/project/update-o-auth-2-figma.md index 4c2e8bcd2..2ac8f9eed 100644 --- a/examples/2.3.x/server-dotnet/examples/project/update-o-auth-2-figma.md +++ b/examples/2.3.x/server-dotnet/examples/project/update-o-auth-2-figma.md @@ -10,7 +10,7 @@ Client client = new Client() Project project = new Project(client); -OAuth2Figma result = await project.UpdateOAuth2Figma( +Appwrite.Models.OAuth2Figma result = await project.UpdateOAuth2Figma( clientId: "<CLIENT_ID>", // optional clientSecret: "<CLIENT_SECRET>", // optional enabled: false // optional diff --git a/examples/2.3.x/server-dotnet/examples/project/update-o-auth-2-fusion-auth.md b/examples/2.3.x/server-dotnet/examples/project/update-o-auth-2-fusion-auth.md index d8515eeab..d21156c23 100644 --- a/examples/2.3.x/server-dotnet/examples/project/update-o-auth-2-fusion-auth.md +++ b/examples/2.3.x/server-dotnet/examples/project/update-o-auth-2-fusion-auth.md @@ -10,7 +10,7 @@ Client client = new Client() Project project = new Project(client); -OAuth2FusionAuth result = await project.UpdateOAuth2FusionAuth( +Appwrite.Models.OAuth2FusionAuth result = await project.UpdateOAuth2FusionAuth( clientId: "<CLIENT_ID>", // optional clientSecret: "<CLIENT_SECRET>", // optional endpoint: "<ENDPOINT>", // optional diff --git a/examples/2.3.x/server-dotnet/examples/project/update-o-auth-2-git-hub.md b/examples/2.3.x/server-dotnet/examples/project/update-o-auth-2-git-hub.md index f57712e35..fed0b19c9 100644 --- a/examples/2.3.x/server-dotnet/examples/project/update-o-auth-2-git-hub.md +++ b/examples/2.3.x/server-dotnet/examples/project/update-o-auth-2-git-hub.md @@ -1,5 +1,6 @@ ```csharp using Appwrite; +using Appwrite.Enums; using Appwrite.Models; using Appwrite.Services; @@ -10,9 +11,10 @@ Client client = new Client() Project project = new Project(client); -OAuth2Github result = await project.UpdateOAuth2GitHub( +Appwrite.Models.OAuth2Github result = await project.UpdateOAuth2GitHub( clientId: "<CLIENT_ID>", // optional clientSecret: "<CLIENT_SECRET>", // optional + prompt: new List<ProjectOAuth2GitHubPrompt> { ProjectOAuth2GitHubPrompt.SelectAccount }, // optional enabled: false // optional ); diff --git a/examples/2.3.x/server-dotnet/examples/project/update-o-auth-2-gitlab.md b/examples/2.3.x/server-dotnet/examples/project/update-o-auth-2-gitlab.md index 169b2ec84..9324d68d2 100644 --- a/examples/2.3.x/server-dotnet/examples/project/update-o-auth-2-gitlab.md +++ b/examples/2.3.x/server-dotnet/examples/project/update-o-auth-2-gitlab.md @@ -10,7 +10,7 @@ Client client = new Client() Project project = new Project(client); -OAuth2Gitlab result = await project.UpdateOAuth2Gitlab( +Appwrite.Models.OAuth2Gitlab result = await project.UpdateOAuth2Gitlab( applicationId: "<APPLICATION_ID>", // optional secret: "<SECRET>", // optional endpoint: "https://example.com", // optional diff --git a/examples/2.3.x/server-dotnet/examples/project/update-o-auth-2-google.md b/examples/2.3.x/server-dotnet/examples/project/update-o-auth-2-google.md index f72b8a6db..e5062c2cb 100644 --- a/examples/2.3.x/server-dotnet/examples/project/update-o-auth-2-google.md +++ b/examples/2.3.x/server-dotnet/examples/project/update-o-auth-2-google.md @@ -11,7 +11,7 @@ Client client = new Client() Project project = new Project(client); -OAuth2Google result = await project.UpdateOAuth2Google( +Appwrite.Models.OAuth2Google result = await project.UpdateOAuth2Google( clientId: "<CLIENT_ID>", // optional clientSecret: "<CLIENT_SECRET>", // optional prompt: new List<ProjectOAuth2GooglePrompt> { ProjectOAuth2GooglePrompt.None }, // optional diff --git a/examples/2.3.x/server-dotnet/examples/project/update-o-auth-2-hugging-face.md b/examples/2.3.x/server-dotnet/examples/project/update-o-auth-2-hugging-face.md index 350640d47..dda17b9fb 100644 --- a/examples/2.3.x/server-dotnet/examples/project/update-o-auth-2-hugging-face.md +++ b/examples/2.3.x/server-dotnet/examples/project/update-o-auth-2-hugging-face.md @@ -10,7 +10,7 @@ Client client = new Client() Project project = new Project(client); -OAuth2HuggingFace result = await project.UpdateOAuth2HuggingFace( +Appwrite.Models.OAuth2HuggingFace result = await project.UpdateOAuth2HuggingFace( clientId: "<CLIENT_ID>", // optional clientSecret: "<CLIENT_SECRET>", // optional enabled: false // optional diff --git a/examples/2.3.x/server-dotnet/examples/project/update-o-auth-2-kakao.md b/examples/2.3.x/server-dotnet/examples/project/update-o-auth-2-kakao.md index 546e5ac66..f03cdf191 100644 --- a/examples/2.3.x/server-dotnet/examples/project/update-o-auth-2-kakao.md +++ b/examples/2.3.x/server-dotnet/examples/project/update-o-auth-2-kakao.md @@ -1,5 +1,6 @@ ```csharp using Appwrite; +using Appwrite.Enums; using Appwrite.Models; using Appwrite.Services; @@ -10,9 +11,10 @@ Client client = new Client() Project project = new Project(client); -OAuth2Kakao result = await project.UpdateOAuth2Kakao( +Appwrite.Models.OAuth2Kakao result = await project.UpdateOAuth2Kakao( clientId: "<CLIENT_ID>", // optional clientSecret: "<CLIENT_SECRET>", // optional + prompt: new List<ProjectOAuth2KakaoPrompt> { ProjectOAuth2KakaoPrompt.None }, // optional enabled: false // optional ); diff --git a/examples/2.3.x/server-dotnet/examples/project/update-o-auth-2-keycloak.md b/examples/2.3.x/server-dotnet/examples/project/update-o-auth-2-keycloak.md index 67b036972..a91d66e13 100644 --- a/examples/2.3.x/server-dotnet/examples/project/update-o-auth-2-keycloak.md +++ b/examples/2.3.x/server-dotnet/examples/project/update-o-auth-2-keycloak.md @@ -10,7 +10,7 @@ Client client = new Client() Project project = new Project(client); -OAuth2Keycloak result = await project.UpdateOAuth2Keycloak( +Appwrite.Models.OAuth2Keycloak result = await project.UpdateOAuth2Keycloak( clientId: "<CLIENT_ID>", // optional clientSecret: "<CLIENT_SECRET>", // optional endpoint: "<ENDPOINT>", // optional diff --git a/examples/2.3.x/server-dotnet/examples/project/update-o-auth-2-kick.md b/examples/2.3.x/server-dotnet/examples/project/update-o-auth-2-kick.md index 56cbef852..0d2e6d7b7 100644 --- a/examples/2.3.x/server-dotnet/examples/project/update-o-auth-2-kick.md +++ b/examples/2.3.x/server-dotnet/examples/project/update-o-auth-2-kick.md @@ -10,7 +10,7 @@ Client client = new Client() Project project = new Project(client); -OAuth2Kick result = await project.UpdateOAuth2Kick( +Appwrite.Models.OAuth2Kick result = await project.UpdateOAuth2Kick( clientId: "<CLIENT_ID>", // optional clientSecret: "<CLIENT_SECRET>", // optional enabled: false // optional diff --git a/examples/2.3.x/server-dotnet/examples/project/update-o-auth-2-linkedin.md b/examples/2.3.x/server-dotnet/examples/project/update-o-auth-2-linkedin.md index 72c138421..6f762e0c2 100644 --- a/examples/2.3.x/server-dotnet/examples/project/update-o-auth-2-linkedin.md +++ b/examples/2.3.x/server-dotnet/examples/project/update-o-auth-2-linkedin.md @@ -10,7 +10,7 @@ Client client = new Client() Project project = new Project(client); -OAuth2Linkedin result = await project.UpdateOAuth2Linkedin( +Appwrite.Models.OAuth2Linkedin result = await project.UpdateOAuth2Linkedin( clientId: "<CLIENT_ID>", // optional primaryClientSecret: "<PRIMARY_CLIENT_SECRET>", // optional enabled: false // optional diff --git a/examples/2.3.x/server-dotnet/examples/project/update-o-auth-2-microsoft.md b/examples/2.3.x/server-dotnet/examples/project/update-o-auth-2-microsoft.md index 8e5afa31b..553630789 100644 --- a/examples/2.3.x/server-dotnet/examples/project/update-o-auth-2-microsoft.md +++ b/examples/2.3.x/server-dotnet/examples/project/update-o-auth-2-microsoft.md @@ -1,5 +1,6 @@ ```csharp using Appwrite; +using Appwrite.Enums; using Appwrite.Models; using Appwrite.Services; @@ -10,10 +11,11 @@ Client client = new Client() Project project = new Project(client); -OAuth2Microsoft result = await project.UpdateOAuth2Microsoft( +Appwrite.Models.OAuth2Microsoft result = await project.UpdateOAuth2Microsoft( applicationId: "<APPLICATION_ID>", // optional applicationSecret: "<APPLICATION_SECRET>", // optional tenant: "<TENANT>", // optional + prompt: new List<ProjectOAuth2MicrosoftPrompt> { ProjectOAuth2MicrosoftPrompt.None }, // optional enabled: false // optional ); diff --git a/examples/2.3.x/server-dotnet/examples/project/update-o-auth-2-notion.md b/examples/2.3.x/server-dotnet/examples/project/update-o-auth-2-notion.md index a3cb77633..abcd69307 100644 --- a/examples/2.3.x/server-dotnet/examples/project/update-o-auth-2-notion.md +++ b/examples/2.3.x/server-dotnet/examples/project/update-o-auth-2-notion.md @@ -10,7 +10,7 @@ Client client = new Client() Project project = new Project(client); -OAuth2Notion result = await project.UpdateOAuth2Notion( +Appwrite.Models.OAuth2Notion result = await project.UpdateOAuth2Notion( oauthClientId: "<OAUTH_CLIENT_ID>", // optional oauthClientSecret: "<OAUTH_CLIENT_SECRET>", // optional enabled: false // optional diff --git a/examples/2.3.x/server-dotnet/examples/project/update-o-auth-2-oidc.md b/examples/2.3.x/server-dotnet/examples/project/update-o-auth-2-oidc.md index 5abb49326..c85099f25 100644 --- a/examples/2.3.x/server-dotnet/examples/project/update-o-auth-2-oidc.md +++ b/examples/2.3.x/server-dotnet/examples/project/update-o-auth-2-oidc.md @@ -11,7 +11,7 @@ Client client = new Client() Project project = new Project(client); -OAuth2Oidc result = await project.UpdateOAuth2Oidc( +Appwrite.Models.OAuth2Oidc result = await project.UpdateOAuth2Oidc( clientId: "<CLIENT_ID>", // optional clientSecret: "<CLIENT_SECRET>", // optional wellKnownURL: "https://example.com", // optional diff --git a/examples/2.3.x/server-dotnet/examples/project/update-o-auth-2-okta.md b/examples/2.3.x/server-dotnet/examples/project/update-o-auth-2-okta.md index fa2a11515..850b47cac 100644 --- a/examples/2.3.x/server-dotnet/examples/project/update-o-auth-2-okta.md +++ b/examples/2.3.x/server-dotnet/examples/project/update-o-auth-2-okta.md @@ -1,5 +1,6 @@ ```csharp using Appwrite; +using Appwrite.Enums; using Appwrite.Models; using Appwrite.Services; @@ -10,11 +11,12 @@ Client client = new Client() Project project = new Project(client); -OAuth2Okta result = await project.UpdateOAuth2Okta( +Appwrite.Models.OAuth2Okta result = await project.UpdateOAuth2Okta( clientId: "<CLIENT_ID>", // optional clientSecret: "<CLIENT_SECRET>", // optional domain: "example.com", // optional authorizationServerId: "<AUTHORIZATION_SERVER_ID>", // optional + prompt: new List<ProjectOAuth2OktaPrompt> { ProjectOAuth2OktaPrompt.None }, // optional enabled: false // optional ); diff --git a/examples/2.3.x/server-dotnet/examples/project/update-o-auth-2-paypal-sandbox.md b/examples/2.3.x/server-dotnet/examples/project/update-o-auth-2-paypal-sandbox.md index 1cbc8c572..3045dc4f1 100644 --- a/examples/2.3.x/server-dotnet/examples/project/update-o-auth-2-paypal-sandbox.md +++ b/examples/2.3.x/server-dotnet/examples/project/update-o-auth-2-paypal-sandbox.md @@ -10,7 +10,7 @@ Client client = new Client() Project project = new Project(client); -OAuth2Paypal result = await project.UpdateOAuth2PaypalSandbox( +Appwrite.Models.OAuth2Paypal result = await project.UpdateOAuth2PaypalSandbox( clientId: "<CLIENT_ID>", // optional secretKey: "<SECRET_KEY>", // optional enabled: false // optional diff --git a/examples/2.3.x/server-dotnet/examples/project/update-o-auth-2-paypal.md b/examples/2.3.x/server-dotnet/examples/project/update-o-auth-2-paypal.md index 03fc66593..3324c712d 100644 --- a/examples/2.3.x/server-dotnet/examples/project/update-o-auth-2-paypal.md +++ b/examples/2.3.x/server-dotnet/examples/project/update-o-auth-2-paypal.md @@ -10,7 +10,7 @@ Client client = new Client() Project project = new Project(client); -OAuth2Paypal result = await project.UpdateOAuth2Paypal( +Appwrite.Models.OAuth2Paypal result = await project.UpdateOAuth2Paypal( clientId: "<CLIENT_ID>", // optional secretKey: "<SECRET_KEY>", // optional enabled: false // optional diff --git a/examples/2.3.x/server-dotnet/examples/project/update-o-auth-2-podio.md b/examples/2.3.x/server-dotnet/examples/project/update-o-auth-2-podio.md index 9e8b31f6c..f92d37131 100644 --- a/examples/2.3.x/server-dotnet/examples/project/update-o-auth-2-podio.md +++ b/examples/2.3.x/server-dotnet/examples/project/update-o-auth-2-podio.md @@ -10,7 +10,7 @@ Client client = new Client() Project project = new Project(client); -OAuth2Podio result = await project.UpdateOAuth2Podio( +Appwrite.Models.OAuth2Podio result = await project.UpdateOAuth2Podio( clientId: "<CLIENT_ID>", // optional clientSecret: "<CLIENT_SECRET>", // optional enabled: false // optional diff --git a/examples/2.3.x/server-dotnet/examples/project/update-o-auth-2-resend.md b/examples/2.3.x/server-dotnet/examples/project/update-o-auth-2-resend.md index 3fd799220..81fc6f0d5 100644 --- a/examples/2.3.x/server-dotnet/examples/project/update-o-auth-2-resend.md +++ b/examples/2.3.x/server-dotnet/examples/project/update-o-auth-2-resend.md @@ -10,7 +10,7 @@ Client client = new Client() Project project = new Project(client); -OAuth2Resend result = await project.UpdateOAuth2Resend( +Appwrite.Models.OAuth2Resend result = await project.UpdateOAuth2Resend( clientId: "<CLIENT_ID>", // optional clientSecret: "<CLIENT_SECRET>", // optional enabled: false // optional diff --git a/examples/2.3.x/server-dotnet/examples/project/update-o-auth-2-salesforce.md b/examples/2.3.x/server-dotnet/examples/project/update-o-auth-2-salesforce.md index e4b6629c1..7a1d3d9c5 100644 --- a/examples/2.3.x/server-dotnet/examples/project/update-o-auth-2-salesforce.md +++ b/examples/2.3.x/server-dotnet/examples/project/update-o-auth-2-salesforce.md @@ -1,5 +1,6 @@ ```csharp using Appwrite; +using Appwrite.Enums; using Appwrite.Models; using Appwrite.Services; @@ -10,9 +11,10 @@ Client client = new Client() Project project = new Project(client); -OAuth2Salesforce result = await project.UpdateOAuth2Salesforce( +Appwrite.Models.OAuth2Salesforce result = await project.UpdateOAuth2Salesforce( customerKey: "<CUSTOMER_KEY>", // optional customerSecret: "<CUSTOMER_SECRET>", // optional + prompt: new List<ProjectOAuth2SalesforcePrompt> { ProjectOAuth2SalesforcePrompt.Login }, // optional enabled: false // optional ); diff --git a/examples/2.3.x/server-dotnet/examples/project/update-o-auth-2-server.md b/examples/2.3.x/server-dotnet/examples/project/update-o-auth-2-server.md index c43efa264..3b3c2ef8c 100644 --- a/examples/2.3.x/server-dotnet/examples/project/update-o-auth-2-server.md +++ b/examples/2.3.x/server-dotnet/examples/project/update-o-auth-2-server.md @@ -10,7 +10,7 @@ Client client = new Client() Project project = new Project(client); -Project result = await project.UpdateOAuth2Server( +Appwrite.Models.Project result = await project.UpdateOAuth2Server( enabled: false, authorizationUrl: "https://example.com", scopes: new List<string>(), // optional diff --git a/examples/2.3.x/server-dotnet/examples/project/update-o-auth-2-slack.md b/examples/2.3.x/server-dotnet/examples/project/update-o-auth-2-slack.md index 1d7cc149d..fc838191e 100644 --- a/examples/2.3.x/server-dotnet/examples/project/update-o-auth-2-slack.md +++ b/examples/2.3.x/server-dotnet/examples/project/update-o-auth-2-slack.md @@ -10,7 +10,7 @@ Client client = new Client() Project project = new Project(client); -OAuth2Slack result = await project.UpdateOAuth2Slack( +Appwrite.Models.OAuth2Slack result = await project.UpdateOAuth2Slack( clientId: "<CLIENT_ID>", // optional clientSecret: "<CLIENT_SECRET>", // optional enabled: false // optional diff --git a/examples/2.3.x/server-dotnet/examples/project/update-o-auth-2-spotify.md b/examples/2.3.x/server-dotnet/examples/project/update-o-auth-2-spotify.md index 481634e40..d4795540f 100644 --- a/examples/2.3.x/server-dotnet/examples/project/update-o-auth-2-spotify.md +++ b/examples/2.3.x/server-dotnet/examples/project/update-o-auth-2-spotify.md @@ -10,7 +10,7 @@ Client client = new Client() Project project = new Project(client); -OAuth2Spotify result = await project.UpdateOAuth2Spotify( +Appwrite.Models.OAuth2Spotify result = await project.UpdateOAuth2Spotify( clientId: "<CLIENT_ID>", // optional clientSecret: "<CLIENT_SECRET>", // optional enabled: false // optional diff --git a/examples/2.3.x/server-dotnet/examples/project/update-o-auth-2-stripe.md b/examples/2.3.x/server-dotnet/examples/project/update-o-auth-2-stripe.md index 97ce54a17..382d641e3 100644 --- a/examples/2.3.x/server-dotnet/examples/project/update-o-auth-2-stripe.md +++ b/examples/2.3.x/server-dotnet/examples/project/update-o-auth-2-stripe.md @@ -10,7 +10,7 @@ Client client = new Client() Project project = new Project(client); -OAuth2Stripe result = await project.UpdateOAuth2Stripe( +Appwrite.Models.OAuth2Stripe result = await project.UpdateOAuth2Stripe( clientId: "<CLIENT_ID>", // optional apiSecretKey: "<API_SECRET_KEY>", // optional enabled: false // optional diff --git a/examples/2.3.x/server-dotnet/examples/project/update-o-auth-2-tik-tok.md b/examples/2.3.x/server-dotnet/examples/project/update-o-auth-2-tik-tok.md index 560c4f54e..b6ac35ca1 100644 --- a/examples/2.3.x/server-dotnet/examples/project/update-o-auth-2-tik-tok.md +++ b/examples/2.3.x/server-dotnet/examples/project/update-o-auth-2-tik-tok.md @@ -10,7 +10,7 @@ Client client = new Client() Project project = new Project(client); -OAuth2TikTok result = await project.UpdateOAuth2TikTok( +Appwrite.Models.OAuth2TikTok result = await project.UpdateOAuth2TikTok( clientId: "<CLIENT_ID>", // optional clientSecret: "<CLIENT_SECRET>", // optional enabled: false // optional diff --git a/examples/2.3.x/server-dotnet/examples/project/update-o-auth-2-tradeshift-sandbox.md b/examples/2.3.x/server-dotnet/examples/project/update-o-auth-2-tradeshift-sandbox.md index 72ab7c5a5..8721d213a 100644 --- a/examples/2.3.x/server-dotnet/examples/project/update-o-auth-2-tradeshift-sandbox.md +++ b/examples/2.3.x/server-dotnet/examples/project/update-o-auth-2-tradeshift-sandbox.md @@ -10,7 +10,7 @@ Client client = new Client() Project project = new Project(client); -OAuth2Tradeshift result = await project.UpdateOAuth2TradeshiftSandbox( +Appwrite.Models.OAuth2Tradeshift result = await project.UpdateOAuth2TradeshiftSandbox( oauth2ClientId: "<OAUTH2_CLIENT_ID>", // optional oauth2ClientSecret: "<OAUTH2_CLIENT_SECRET>", // optional enabled: false // optional diff --git a/examples/2.3.x/server-dotnet/examples/project/update-o-auth-2-tradeshift.md b/examples/2.3.x/server-dotnet/examples/project/update-o-auth-2-tradeshift.md index 01edc689f..431b0aa6e 100644 --- a/examples/2.3.x/server-dotnet/examples/project/update-o-auth-2-tradeshift.md +++ b/examples/2.3.x/server-dotnet/examples/project/update-o-auth-2-tradeshift.md @@ -10,7 +10,7 @@ Client client = new Client() Project project = new Project(client); -OAuth2Tradeshift result = await project.UpdateOAuth2Tradeshift( +Appwrite.Models.OAuth2Tradeshift result = await project.UpdateOAuth2Tradeshift( oauth2ClientId: "<OAUTH2_CLIENT_ID>", // optional oauth2ClientSecret: "<OAUTH2_CLIENT_SECRET>", // optional enabled: false // optional diff --git a/examples/2.3.x/server-dotnet/examples/project/update-o-auth-2-twitch.md b/examples/2.3.x/server-dotnet/examples/project/update-o-auth-2-twitch.md index 405b7dc70..843e855ce 100644 --- a/examples/2.3.x/server-dotnet/examples/project/update-o-auth-2-twitch.md +++ b/examples/2.3.x/server-dotnet/examples/project/update-o-auth-2-twitch.md @@ -10,7 +10,7 @@ Client client = new Client() Project project = new Project(client); -OAuth2Twitch result = await project.UpdateOAuth2Twitch( +Appwrite.Models.OAuth2Twitch result = await project.UpdateOAuth2Twitch( clientId: "<CLIENT_ID>", // optional clientSecret: "<CLIENT_SECRET>", // optional enabled: false // optional diff --git a/examples/2.3.x/server-dotnet/examples/project/update-o-auth-2-webflow.md b/examples/2.3.x/server-dotnet/examples/project/update-o-auth-2-webflow.md new file mode 100644 index 000000000..266322f52 --- /dev/null +++ b/examples/2.3.x/server-dotnet/examples/project/update-o-auth-2-webflow.md @@ -0,0 +1,19 @@ +```csharp +using Appwrite; +using Appwrite.Models; +using Appwrite.Services; + +Client client = new Client() + .SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .SetProject("<YOUR_PROJECT_ID>") // Your project ID + .SetKey("<YOUR_API_KEY>"); // Your secret API key + +Project project = new Project(client); + +Appwrite.Models.OAuth2Webflow result = await project.UpdateOAuth2Webflow( + clientId: "<CLIENT_ID>", // optional + clientSecret: "<CLIENT_SECRET>", // optional + enabled: false // optional +); + +``` diff --git a/examples/2.3.x/server-dotnet/examples/project/update-o-auth-2-word-press.md b/examples/2.3.x/server-dotnet/examples/project/update-o-auth-2-word-press.md index 60bbdfcf9..b381ebee6 100644 --- a/examples/2.3.x/server-dotnet/examples/project/update-o-auth-2-word-press.md +++ b/examples/2.3.x/server-dotnet/examples/project/update-o-auth-2-word-press.md @@ -10,7 +10,7 @@ Client client = new Client() Project project = new Project(client); -OAuth2WordPress result = await project.UpdateOAuth2WordPress( +Appwrite.Models.OAuth2WordPress result = await project.UpdateOAuth2WordPress( clientId: "<CLIENT_ID>", // optional clientSecret: "<CLIENT_SECRET>", // optional enabled: false // optional diff --git a/examples/2.3.x/server-dotnet/examples/project/update-o-auth-2-yahoo.md b/examples/2.3.x/server-dotnet/examples/project/update-o-auth-2-yahoo.md index 127f97867..76bd9ff78 100644 --- a/examples/2.3.x/server-dotnet/examples/project/update-o-auth-2-yahoo.md +++ b/examples/2.3.x/server-dotnet/examples/project/update-o-auth-2-yahoo.md @@ -10,7 +10,7 @@ Client client = new Client() Project project = new Project(client); -OAuth2Yahoo result = await project.UpdateOAuth2Yahoo( +Appwrite.Models.OAuth2Yahoo result = await project.UpdateOAuth2Yahoo( clientId: "<CLIENT_ID>", // optional clientSecret: "<CLIENT_SECRET>", // optional enabled: false // optional diff --git a/examples/2.3.x/server-dotnet/examples/project/update-o-auth-2-yandex.md b/examples/2.3.x/server-dotnet/examples/project/update-o-auth-2-yandex.md index 0fcc0dc76..c9f6a488d 100644 --- a/examples/2.3.x/server-dotnet/examples/project/update-o-auth-2-yandex.md +++ b/examples/2.3.x/server-dotnet/examples/project/update-o-auth-2-yandex.md @@ -10,7 +10,7 @@ Client client = new Client() Project project = new Project(client); -OAuth2Yandex result = await project.UpdateOAuth2Yandex( +Appwrite.Models.OAuth2Yandex result = await project.UpdateOAuth2Yandex( clientId: "<CLIENT_ID>", // optional clientSecret: "<CLIENT_SECRET>", // optional enabled: false // optional diff --git a/examples/2.3.x/server-dotnet/examples/project/update-o-auth-2-zoho.md b/examples/2.3.x/server-dotnet/examples/project/update-o-auth-2-zoho.md index 6347cb2bb..3a822d5d4 100644 --- a/examples/2.3.x/server-dotnet/examples/project/update-o-auth-2-zoho.md +++ b/examples/2.3.x/server-dotnet/examples/project/update-o-auth-2-zoho.md @@ -1,5 +1,6 @@ ```csharp using Appwrite; +using Appwrite.Enums; using Appwrite.Models; using Appwrite.Services; @@ -10,9 +11,10 @@ Client client = new Client() Project project = new Project(client); -OAuth2Zoho result = await project.UpdateOAuth2Zoho( +Appwrite.Models.OAuth2Zoho result = await project.UpdateOAuth2Zoho( clientId: "<CLIENT_ID>", // optional clientSecret: "<CLIENT_SECRET>", // optional + prompt: new List<ProjectOAuth2ZohoPrompt> { ProjectOAuth2ZohoPrompt.Consent }, // optional enabled: false // optional ); diff --git a/examples/2.3.x/server-dotnet/examples/project/update-o-auth-2-zoom.md b/examples/2.3.x/server-dotnet/examples/project/update-o-auth-2-zoom.md index 2b9d60dd6..b75d71d0f 100644 --- a/examples/2.3.x/server-dotnet/examples/project/update-o-auth-2-zoom.md +++ b/examples/2.3.x/server-dotnet/examples/project/update-o-auth-2-zoom.md @@ -10,7 +10,7 @@ Client client = new Client() Project project = new Project(client); -OAuth2Zoom result = await project.UpdateOAuth2Zoom( +Appwrite.Models.OAuth2Zoom result = await project.UpdateOAuth2Zoom( clientId: "<CLIENT_ID>", // optional clientSecret: "<CLIENT_SECRET>", // optional enabled: false // optional diff --git a/examples/2.3.x/server-dotnet/examples/project/update-o-auth-2x.md b/examples/2.3.x/server-dotnet/examples/project/update-o-auth-2x.md index 01bab1404..e5041a944 100644 --- a/examples/2.3.x/server-dotnet/examples/project/update-o-auth-2x.md +++ b/examples/2.3.x/server-dotnet/examples/project/update-o-auth-2x.md @@ -10,7 +10,7 @@ Client client = new Client() Project project = new Project(client); -OAuth2X result = await project.UpdateOAuth2X( +Appwrite.Models.OAuth2X result = await project.UpdateOAuth2X( customerKey: "<CUSTOMER_KEY>", // optional secretKey: "<SECRET_KEY>", // optional enabled: false // optional diff --git a/examples/2.3.x/server-dotnet/examples/project/update-password-dictionary-policy.md b/examples/2.3.x/server-dotnet/examples/project/update-password-dictionary-policy.md index bfcf1c3d4..f40df719a 100644 --- a/examples/2.3.x/server-dotnet/examples/project/update-password-dictionary-policy.md +++ b/examples/2.3.x/server-dotnet/examples/project/update-password-dictionary-policy.md @@ -10,7 +10,7 @@ Client client = new Client() Project project = new Project(client); -Project result = await project.UpdatePasswordDictionaryPolicy( +Appwrite.Models.Project result = await project.UpdatePasswordDictionaryPolicy( enabled: false ); diff --git a/examples/2.3.x/server-dotnet/examples/project/update-password-history-policy.md b/examples/2.3.x/server-dotnet/examples/project/update-password-history-policy.md index 838761546..362c30c39 100644 --- a/examples/2.3.x/server-dotnet/examples/project/update-password-history-policy.md +++ b/examples/2.3.x/server-dotnet/examples/project/update-password-history-policy.md @@ -10,7 +10,7 @@ Client client = new Client() Project project = new Project(client); -Project result = await project.UpdatePasswordHistoryPolicy( +Appwrite.Models.Project result = await project.UpdatePasswordHistoryPolicy( total: 1 ); diff --git a/examples/2.3.x/server-dotnet/examples/project/update-password-personal-data-policy.md b/examples/2.3.x/server-dotnet/examples/project/update-password-personal-data-policy.md index e79919f28..79d01b5b5 100644 --- a/examples/2.3.x/server-dotnet/examples/project/update-password-personal-data-policy.md +++ b/examples/2.3.x/server-dotnet/examples/project/update-password-personal-data-policy.md @@ -10,7 +10,7 @@ Client client = new Client() Project project = new Project(client); -Project result = await project.UpdatePasswordPersonalDataPolicy( +Appwrite.Models.Project result = await project.UpdatePasswordPersonalDataPolicy( enabled: false ); diff --git a/examples/2.3.x/server-dotnet/examples/project/update-password-pwned-policy.md b/examples/2.3.x/server-dotnet/examples/project/update-password-pwned-policy.md index 6a23dd029..05a8b9bef 100644 --- a/examples/2.3.x/server-dotnet/examples/project/update-password-pwned-policy.md +++ b/examples/2.3.x/server-dotnet/examples/project/update-password-pwned-policy.md @@ -10,7 +10,7 @@ Client client = new Client() Project project = new Project(client); -Project result = await project.UpdatePasswordPwnedPolicy( +Appwrite.Models.Project result = await project.UpdatePasswordPwnedPolicy( enabled: false, // optional sessions: false, // optional users: false // optional diff --git a/examples/2.3.x/server-dotnet/examples/project/update-password-strength-policy.md b/examples/2.3.x/server-dotnet/examples/project/update-password-strength-policy.md index 7edf30509..996393492 100644 --- a/examples/2.3.x/server-dotnet/examples/project/update-password-strength-policy.md +++ b/examples/2.3.x/server-dotnet/examples/project/update-password-strength-policy.md @@ -10,7 +10,7 @@ Client client = new Client() Project project = new Project(client); -PolicyPasswordStrength result = await project.UpdatePasswordStrengthPolicy( +Appwrite.Models.PolicyPasswordStrength result = await project.UpdatePasswordStrengthPolicy( min: 8, // optional uppercase: false, // optional lowercase: false, // optional diff --git a/examples/2.3.x/server-dotnet/examples/project/update-protocol.md b/examples/2.3.x/server-dotnet/examples/project/update-protocol.md index 9a53240a8..ddb7e8939 100644 --- a/examples/2.3.x/server-dotnet/examples/project/update-protocol.md +++ b/examples/2.3.x/server-dotnet/examples/project/update-protocol.md @@ -11,7 +11,7 @@ Client client = new Client() Project project = new Project(client); -Project result = await project.UpdateProtocol( +Appwrite.Models.Project result = await project.UpdateProtocol( protocolId: ProjectProtocolId.Rest, enabled: false ); diff --git a/examples/2.3.x/server-dotnet/examples/project/update-service.md b/examples/2.3.x/server-dotnet/examples/project/update-service.md index 8463028b4..f8a94d349 100644 --- a/examples/2.3.x/server-dotnet/examples/project/update-service.md +++ b/examples/2.3.x/server-dotnet/examples/project/update-service.md @@ -11,7 +11,7 @@ Client client = new Client() Project project = new Project(client); -Project result = await project.UpdateService( +Appwrite.Models.Project result = await project.UpdateService( serviceId: ProjectServiceId.Account, enabled: false ); diff --git a/examples/2.3.x/server-dotnet/examples/project/update-session-alert-policy.md b/examples/2.3.x/server-dotnet/examples/project/update-session-alert-policy.md index 247fe3ced..fc5627ef1 100644 --- a/examples/2.3.x/server-dotnet/examples/project/update-session-alert-policy.md +++ b/examples/2.3.x/server-dotnet/examples/project/update-session-alert-policy.md @@ -10,7 +10,7 @@ Client client = new Client() Project project = new Project(client); -Project result = await project.UpdateSessionAlertPolicy( +Appwrite.Models.Project result = await project.UpdateSessionAlertPolicy( enabled: false ); diff --git a/examples/2.3.x/server-dotnet/examples/project/update-session-duration-policy.md b/examples/2.3.x/server-dotnet/examples/project/update-session-duration-policy.md index 1c66cc204..066f964a6 100644 --- a/examples/2.3.x/server-dotnet/examples/project/update-session-duration-policy.md +++ b/examples/2.3.x/server-dotnet/examples/project/update-session-duration-policy.md @@ -10,7 +10,7 @@ Client client = new Client() Project project = new Project(client); -Project result = await project.UpdateSessionDurationPolicy( +Appwrite.Models.Project result = await project.UpdateSessionDurationPolicy( duration: 60 ); diff --git a/examples/2.3.x/server-dotnet/examples/project/update-session-invalidation-policy.md b/examples/2.3.x/server-dotnet/examples/project/update-session-invalidation-policy.md index e354b471f..3b32e2b3b 100644 --- a/examples/2.3.x/server-dotnet/examples/project/update-session-invalidation-policy.md +++ b/examples/2.3.x/server-dotnet/examples/project/update-session-invalidation-policy.md @@ -10,7 +10,7 @@ Client client = new Client() Project project = new Project(client); -Project result = await project.UpdateSessionInvalidationPolicy( +Appwrite.Models.Project result = await project.UpdateSessionInvalidationPolicy( enabled: false ); diff --git a/examples/2.3.x/server-dotnet/examples/project/update-session-limit-policy.md b/examples/2.3.x/server-dotnet/examples/project/update-session-limit-policy.md index 11434253c..0837a98c8 100644 --- a/examples/2.3.x/server-dotnet/examples/project/update-session-limit-policy.md +++ b/examples/2.3.x/server-dotnet/examples/project/update-session-limit-policy.md @@ -10,7 +10,7 @@ Client client = new Client() Project project = new Project(client); -Project result = await project.UpdateSessionLimitPolicy( +Appwrite.Models.Project result = await project.UpdateSessionLimitPolicy( total: 1 ); diff --git a/examples/2.3.x/server-dotnet/examples/project/update-smtp.md b/examples/2.3.x/server-dotnet/examples/project/update-smtp.md index 4af1ceeed..d7ee2caa2 100644 --- a/examples/2.3.x/server-dotnet/examples/project/update-smtp.md +++ b/examples/2.3.x/server-dotnet/examples/project/update-smtp.md @@ -11,7 +11,7 @@ Client client = new Client() Project project = new Project(client); -Project result = await project.UpdateSMTP( +Appwrite.Models.Project result = await project.UpdateSMTP( host: "example.com", // optional port: 587, // optional username: "<USERNAME>", // optional diff --git a/examples/2.3.x/server-dotnet/examples/project/update-user-limit-policy.md b/examples/2.3.x/server-dotnet/examples/project/update-user-limit-policy.md index d24957e0c..562ccca41 100644 --- a/examples/2.3.x/server-dotnet/examples/project/update-user-limit-policy.md +++ b/examples/2.3.x/server-dotnet/examples/project/update-user-limit-policy.md @@ -10,7 +10,7 @@ Client client = new Client() Project project = new Project(client); -Project result = await project.UpdateUserLimitPolicy( +Appwrite.Models.Project result = await project.UpdateUserLimitPolicy( total: 0 ); diff --git a/examples/2.3.x/server-dotnet/examples/project/update-variable.md b/examples/2.3.x/server-dotnet/examples/project/update-variable.md index b612ed863..d60e68d69 100644 --- a/examples/2.3.x/server-dotnet/examples/project/update-variable.md +++ b/examples/2.3.x/server-dotnet/examples/project/update-variable.md @@ -10,7 +10,7 @@ Client client = new Client() Project project = new Project(client); -Variable result = await project.UpdateVariable( +Appwrite.Models.Variable result = await project.UpdateVariable( variableId: "<VARIABLE_ID>", key: "<KEY>", // optional value: "<VALUE>", // optional diff --git a/examples/2.3.x/server-dotnet/examples/project/update-web-platform.md b/examples/2.3.x/server-dotnet/examples/project/update-web-platform.md index 3d03f26d2..a9686e561 100644 --- a/examples/2.3.x/server-dotnet/examples/project/update-web-platform.md +++ b/examples/2.3.x/server-dotnet/examples/project/update-web-platform.md @@ -10,7 +10,7 @@ Client client = new Client() Project project = new Project(client); -PlatformWeb result = await project.UpdateWebPlatform( +Appwrite.Models.PlatformWeb result = await project.UpdateWebPlatform( platformId: "<PLATFORM_ID>", name: "<NAME>", hostname: "app.example.com" diff --git a/examples/2.3.x/server-dotnet/examples/project/update-windows-platform.md b/examples/2.3.x/server-dotnet/examples/project/update-windows-platform.md index 64e219981..ff5190460 100644 --- a/examples/2.3.x/server-dotnet/examples/project/update-windows-platform.md +++ b/examples/2.3.x/server-dotnet/examples/project/update-windows-platform.md @@ -10,7 +10,7 @@ Client client = new Client() Project project = new Project(client); -PlatformWindows result = await project.UpdateWindowsPlatform( +Appwrite.Models.PlatformWindows result = await project.UpdateWindowsPlatform( platformId: "<PLATFORM_ID>", name: "<NAME>", packageIdentifierName: "<PACKAGE_IDENTIFIER_NAME>" diff --git a/examples/2.3.x/server-dotnet/examples/proxy/create-api-rule.md b/examples/2.3.x/server-dotnet/examples/proxy/create-api-rule.md index a5511bd39..2928db878 100644 --- a/examples/2.3.x/server-dotnet/examples/proxy/create-api-rule.md +++ b/examples/2.3.x/server-dotnet/examples/proxy/create-api-rule.md @@ -10,7 +10,7 @@ Client client = new Client() Proxy proxy = new Proxy(client); -ProxyRule result = await proxy.CreateAPIRule( +Appwrite.Models.ProxyRule result = await proxy.CreateAPIRule( domain: "example.com" ); diff --git a/examples/2.3.x/server-dotnet/examples/proxy/create-function-rule.md b/examples/2.3.x/server-dotnet/examples/proxy/create-function-rule.md index fe1fd9067..fd275ba15 100644 --- a/examples/2.3.x/server-dotnet/examples/proxy/create-function-rule.md +++ b/examples/2.3.x/server-dotnet/examples/proxy/create-function-rule.md @@ -10,7 +10,7 @@ Client client = new Client() Proxy proxy = new Proxy(client); -ProxyRule result = await proxy.CreateFunctionRule( +Appwrite.Models.ProxyRule result = await proxy.CreateFunctionRule( domain: "example.com", functionId: "<FUNCTION_ID>", branch: "<BRANCH>" // optional diff --git a/examples/2.3.x/server-dotnet/examples/proxy/create-invalidation.md b/examples/2.3.x/server-dotnet/examples/proxy/create-invalidation.md index 0b51ed48f..13a97223d 100644 --- a/examples/2.3.x/server-dotnet/examples/proxy/create-invalidation.md +++ b/examples/2.3.x/server-dotnet/examples/proxy/create-invalidation.md @@ -11,7 +11,7 @@ Client client = new Client() Proxy proxy = new Proxy(client); -ProxyInvalidation result = await proxy.CreateInvalidation( +Appwrite.Models.ProxyInvalidation result = await proxy.CreateInvalidation( domain: "example.com", type: InvalidationType.Tag, reference: "<REFERENCE>" // optional diff --git a/examples/2.3.x/server-dotnet/examples/proxy/create-redirect-rule.md b/examples/2.3.x/server-dotnet/examples/proxy/create-redirect-rule.md index 71ffbefed..62a51ee52 100644 --- a/examples/2.3.x/server-dotnet/examples/proxy/create-redirect-rule.md +++ b/examples/2.3.x/server-dotnet/examples/proxy/create-redirect-rule.md @@ -11,7 +11,7 @@ Client client = new Client() Proxy proxy = new Proxy(client); -ProxyRule result = await proxy.CreateRedirectRule( +Appwrite.Models.ProxyRule result = await proxy.CreateRedirectRule( domain: "example.com", url: "https://example.com", statusCode: StatusCode.MovedPermanently, diff --git a/examples/2.3.x/server-dotnet/examples/proxy/create-site-rule.md b/examples/2.3.x/server-dotnet/examples/proxy/create-site-rule.md index 52b6b60e7..6d8bb07ba 100644 --- a/examples/2.3.x/server-dotnet/examples/proxy/create-site-rule.md +++ b/examples/2.3.x/server-dotnet/examples/proxy/create-site-rule.md @@ -10,7 +10,7 @@ Client client = new Client() Proxy proxy = new Proxy(client); -ProxyRule result = await proxy.CreateSiteRule( +Appwrite.Models.ProxyRule result = await proxy.CreateSiteRule( domain: "example.com", siteId: "<SITE_ID>", branch: "<BRANCH>" // optional diff --git a/examples/2.3.x/server-dotnet/examples/proxy/get-rule.md b/examples/2.3.x/server-dotnet/examples/proxy/get-rule.md index 6834db740..80e8aef52 100644 --- a/examples/2.3.x/server-dotnet/examples/proxy/get-rule.md +++ b/examples/2.3.x/server-dotnet/examples/proxy/get-rule.md @@ -10,7 +10,7 @@ Client client = new Client() Proxy proxy = new Proxy(client); -ProxyRule result = await proxy.GetRule( +Appwrite.Models.ProxyRule result = await proxy.GetRule( ruleId: "<RULE_ID>" ); diff --git a/examples/2.3.x/server-dotnet/examples/proxy/list-rules.md b/examples/2.3.x/server-dotnet/examples/proxy/list-rules.md index 4a962d304..da132346e 100644 --- a/examples/2.3.x/server-dotnet/examples/proxy/list-rules.md +++ b/examples/2.3.x/server-dotnet/examples/proxy/list-rules.md @@ -10,7 +10,7 @@ Client client = new Client() Proxy proxy = new Proxy(client); -ProxyRuleList result = await proxy.ListRules( +Appwrite.Models.ProxyRuleList result = await proxy.ListRules( queries: new List<string>(), // optional total: false // optional ); diff --git a/examples/2.3.x/server-dotnet/examples/proxy/update-rule-status.md b/examples/2.3.x/server-dotnet/examples/proxy/update-rule-status.md index da3efe372..18df55070 100644 --- a/examples/2.3.x/server-dotnet/examples/proxy/update-rule-status.md +++ b/examples/2.3.x/server-dotnet/examples/proxy/update-rule-status.md @@ -10,7 +10,7 @@ Client client = new Client() Proxy proxy = new Proxy(client); -ProxyRule result = await proxy.UpdateRuleStatus( +Appwrite.Models.ProxyRule result = await proxy.UpdateRuleStatus( ruleId: "<RULE_ID>" ); diff --git a/examples/2.3.x/server-dotnet/examples/sites/create-deployment.md b/examples/2.3.x/server-dotnet/examples/sites/create-deployment.md index 61b562686..32fe01eab 100644 --- a/examples/2.3.x/server-dotnet/examples/sites/create-deployment.md +++ b/examples/2.3.x/server-dotnet/examples/sites/create-deployment.md @@ -10,7 +10,7 @@ Client client = new Client() Sites sites = new Sites(client); -Deployment result = await sites.CreateDeployment( +Appwrite.Models.Deployment result = await sites.CreateDeployment( siteId: "<SITE_ID>", code: InputFile.FromPath("./path-to-files/image.jpg"), installCommand: "<INSTALL_COMMAND>", // optional diff --git a/examples/2.3.x/server-dotnet/examples/sites/create-duplicate-deployment.md b/examples/2.3.x/server-dotnet/examples/sites/create-duplicate-deployment.md index 22c70c1d6..43fd2567f 100644 --- a/examples/2.3.x/server-dotnet/examples/sites/create-duplicate-deployment.md +++ b/examples/2.3.x/server-dotnet/examples/sites/create-duplicate-deployment.md @@ -10,7 +10,7 @@ Client client = new Client() Sites sites = new Sites(client); -Deployment result = await sites.CreateDuplicateDeployment( +Appwrite.Models.Deployment result = await sites.CreateDuplicateDeployment( siteId: "<SITE_ID>", deploymentId: "<DEPLOYMENT_ID>" ); diff --git a/examples/2.3.x/server-dotnet/examples/sites/create-template-deployment.md b/examples/2.3.x/server-dotnet/examples/sites/create-template-deployment.md index 769fcc1c1..06d424009 100644 --- a/examples/2.3.x/server-dotnet/examples/sites/create-template-deployment.md +++ b/examples/2.3.x/server-dotnet/examples/sites/create-template-deployment.md @@ -11,7 +11,7 @@ Client client = new Client() Sites sites = new Sites(client); -Deployment result = await sites.CreateTemplateDeployment( +Appwrite.Models.Deployment result = await sites.CreateTemplateDeployment( siteId: "<SITE_ID>", repository: "<REPOSITORY>", owner: "<OWNER>", diff --git a/examples/2.3.x/server-dotnet/examples/sites/create-variable.md b/examples/2.3.x/server-dotnet/examples/sites/create-variable.md index 9e9d1ef73..d84e24902 100644 --- a/examples/2.3.x/server-dotnet/examples/sites/create-variable.md +++ b/examples/2.3.x/server-dotnet/examples/sites/create-variable.md @@ -10,7 +10,7 @@ Client client = new Client() Sites sites = new Sites(client); -Variable result = await sites.CreateVariable( +Appwrite.Models.Variable result = await sites.CreateVariable( siteId: "<SITE_ID>", variableId: "<VARIABLE_ID>", key: "<KEY>", diff --git a/examples/2.3.x/server-dotnet/examples/sites/create-vcs-deployment.md b/examples/2.3.x/server-dotnet/examples/sites/create-vcs-deployment.md index 42ec3756c..206fd72e5 100644 --- a/examples/2.3.x/server-dotnet/examples/sites/create-vcs-deployment.md +++ b/examples/2.3.x/server-dotnet/examples/sites/create-vcs-deployment.md @@ -11,7 +11,7 @@ Client client = new Client() Sites sites = new Sites(client); -Deployment result = await sites.CreateVcsDeployment( +Appwrite.Models.Deployment result = await sites.CreateVcsDeployment( siteId: "<SITE_ID>", type: VCSReferenceType.Branch, reference: "<REFERENCE>", diff --git a/examples/2.3.x/server-dotnet/examples/sites/create.md b/examples/2.3.x/server-dotnet/examples/sites/create.md index 9b2d5b52e..1d6c12391 100644 --- a/examples/2.3.x/server-dotnet/examples/sites/create.md +++ b/examples/2.3.x/server-dotnet/examples/sites/create.md @@ -11,7 +11,7 @@ Client client = new Client() Sites sites = new Sites(client); -Site result = await sites.Create( +Appwrite.Models.Site result = await sites.Create( siteId: "<SITE_ID>", name: "<NAME>", framework: Framework.Analog, diff --git a/examples/2.3.x/server-dotnet/examples/sites/get-deployment.md b/examples/2.3.x/server-dotnet/examples/sites/get-deployment.md index dfd86dfc0..9ada2908f 100644 --- a/examples/2.3.x/server-dotnet/examples/sites/get-deployment.md +++ b/examples/2.3.x/server-dotnet/examples/sites/get-deployment.md @@ -10,7 +10,7 @@ Client client = new Client() Sites sites = new Sites(client); -Deployment result = await sites.GetDeployment( +Appwrite.Models.Deployment result = await sites.GetDeployment( siteId: "<SITE_ID>", deploymentId: "<DEPLOYMENT_ID>" ); diff --git a/examples/2.3.x/server-dotnet/examples/sites/get-log.md b/examples/2.3.x/server-dotnet/examples/sites/get-log.md index caa38be7a..daebb52b2 100644 --- a/examples/2.3.x/server-dotnet/examples/sites/get-log.md +++ b/examples/2.3.x/server-dotnet/examples/sites/get-log.md @@ -10,7 +10,7 @@ Client client = new Client() Sites sites = new Sites(client); -Execution result = await sites.GetLog( +Appwrite.Models.Execution result = await sites.GetLog( siteId: "<SITE_ID>", logId: "<LOG_ID>" ); diff --git a/examples/2.3.x/server-dotnet/examples/sites/get-variable.md b/examples/2.3.x/server-dotnet/examples/sites/get-variable.md index 9a68b6615..604c519bf 100644 --- a/examples/2.3.x/server-dotnet/examples/sites/get-variable.md +++ b/examples/2.3.x/server-dotnet/examples/sites/get-variable.md @@ -10,7 +10,7 @@ Client client = new Client() Sites sites = new Sites(client); -Variable result = await sites.GetVariable( +Appwrite.Models.Variable result = await sites.GetVariable( siteId: "<SITE_ID>", variableId: "<VARIABLE_ID>" ); diff --git a/examples/2.3.x/server-dotnet/examples/sites/get.md b/examples/2.3.x/server-dotnet/examples/sites/get.md index 7c1885cb2..e971b90dc 100644 --- a/examples/2.3.x/server-dotnet/examples/sites/get.md +++ b/examples/2.3.x/server-dotnet/examples/sites/get.md @@ -10,7 +10,7 @@ Client client = new Client() Sites sites = new Sites(client); -Site result = await sites.Get( +Appwrite.Models.Site result = await sites.Get( siteId: "<SITE_ID>" ); diff --git a/examples/2.3.x/server-dotnet/examples/sites/list-deployments.md b/examples/2.3.x/server-dotnet/examples/sites/list-deployments.md index b25172e26..737333628 100644 --- a/examples/2.3.x/server-dotnet/examples/sites/list-deployments.md +++ b/examples/2.3.x/server-dotnet/examples/sites/list-deployments.md @@ -10,7 +10,7 @@ Client client = new Client() Sites sites = new Sites(client); -DeploymentList result = await sites.ListDeployments( +Appwrite.Models.DeploymentList result = await sites.ListDeployments( siteId: "<SITE_ID>", queries: new List<string>(), // optional search: "<SEARCH>", // optional diff --git a/examples/2.3.x/server-dotnet/examples/sites/list-frameworks.md b/examples/2.3.x/server-dotnet/examples/sites/list-frameworks.md index 7a3165f9f..80859048e 100644 --- a/examples/2.3.x/server-dotnet/examples/sites/list-frameworks.md +++ b/examples/2.3.x/server-dotnet/examples/sites/list-frameworks.md @@ -10,7 +10,8 @@ Client client = new Client() Sites sites = new Sites(client); -FrameworkList result = await sites.ListFrameworks(); - +Appwrite.Models.FrameworkList result = await sites.ListFrameworks( + total: false // optional +); ``` diff --git a/examples/2.3.x/server-dotnet/examples/sites/list-logs.md b/examples/2.3.x/server-dotnet/examples/sites/list-logs.md index baee6c918..063de9a89 100644 --- a/examples/2.3.x/server-dotnet/examples/sites/list-logs.md +++ b/examples/2.3.x/server-dotnet/examples/sites/list-logs.md @@ -10,7 +10,7 @@ Client client = new Client() Sites sites = new Sites(client); -ExecutionList result = await sites.ListLogs( +Appwrite.Models.ExecutionList result = await sites.ListLogs( siteId: "<SITE_ID>", queries: new List<string>(), // optional total: false // optional diff --git a/examples/2.3.x/server-dotnet/examples/sites/list-specifications.md b/examples/2.3.x/server-dotnet/examples/sites/list-specifications.md index 12d184080..745077ed6 100644 --- a/examples/2.3.x/server-dotnet/examples/sites/list-specifications.md +++ b/examples/2.3.x/server-dotnet/examples/sites/list-specifications.md @@ -10,8 +10,9 @@ Client client = new Client() Sites sites = new Sites(client); -SpecificationList result = await sites.ListSpecifications( - type: "runtimes" // optional +Appwrite.Models.SpecificationList result = await sites.ListSpecifications( + type: "runtimes", // optional + total: false // optional ); ``` diff --git a/examples/2.3.x/server-dotnet/examples/sites/list-variables.md b/examples/2.3.x/server-dotnet/examples/sites/list-variables.md index 8f546817c..55aa3a3c3 100644 --- a/examples/2.3.x/server-dotnet/examples/sites/list-variables.md +++ b/examples/2.3.x/server-dotnet/examples/sites/list-variables.md @@ -10,7 +10,7 @@ Client client = new Client() Sites sites = new Sites(client); -VariableList result = await sites.ListVariables( +Appwrite.Models.VariableList result = await sites.ListVariables( siteId: "<SITE_ID>", queries: new List<string>(), // optional total: false // optional diff --git a/examples/2.3.x/server-dotnet/examples/sites/list.md b/examples/2.3.x/server-dotnet/examples/sites/list.md index 27c4f6594..2bf65b278 100644 --- a/examples/2.3.x/server-dotnet/examples/sites/list.md +++ b/examples/2.3.x/server-dotnet/examples/sites/list.md @@ -10,7 +10,7 @@ Client client = new Client() Sites sites = new Sites(client); -SiteList result = await sites.List( +Appwrite.Models.SiteList result = await sites.List( queries: new List<string>(), // optional search: "<SEARCH>", // optional total: false // optional diff --git a/examples/2.3.x/server-dotnet/examples/sites/update-deployment-status.md b/examples/2.3.x/server-dotnet/examples/sites/update-deployment-status.md index 0a6bf240c..c4269a932 100644 --- a/examples/2.3.x/server-dotnet/examples/sites/update-deployment-status.md +++ b/examples/2.3.x/server-dotnet/examples/sites/update-deployment-status.md @@ -10,7 +10,7 @@ Client client = new Client() Sites sites = new Sites(client); -Deployment result = await sites.UpdateDeploymentStatus( +Appwrite.Models.Deployment result = await sites.UpdateDeploymentStatus( siteId: "<SITE_ID>", deploymentId: "<DEPLOYMENT_ID>" ); diff --git a/examples/2.3.x/server-dotnet/examples/sites/update-site-deployment.md b/examples/2.3.x/server-dotnet/examples/sites/update-site-deployment.md index 8633ab7ea..cf3f1a1ec 100644 --- a/examples/2.3.x/server-dotnet/examples/sites/update-site-deployment.md +++ b/examples/2.3.x/server-dotnet/examples/sites/update-site-deployment.md @@ -10,7 +10,7 @@ Client client = new Client() Sites sites = new Sites(client); -Site result = await sites.UpdateSiteDeployment( +Appwrite.Models.Site result = await sites.UpdateSiteDeployment( siteId: "<SITE_ID>", deploymentId: "<DEPLOYMENT_ID>" ); diff --git a/examples/2.3.x/server-dotnet/examples/sites/update-variable.md b/examples/2.3.x/server-dotnet/examples/sites/update-variable.md index e7236cef6..7abe9298c 100644 --- a/examples/2.3.x/server-dotnet/examples/sites/update-variable.md +++ b/examples/2.3.x/server-dotnet/examples/sites/update-variable.md @@ -10,7 +10,7 @@ Client client = new Client() Sites sites = new Sites(client); -Variable result = await sites.UpdateVariable( +Appwrite.Models.Variable result = await sites.UpdateVariable( siteId: "<SITE_ID>", variableId: "<VARIABLE_ID>", key: "<KEY>", // optional diff --git a/examples/2.3.x/server-dotnet/examples/sites/update.md b/examples/2.3.x/server-dotnet/examples/sites/update.md index 8c8128411..e258d3837 100644 --- a/examples/2.3.x/server-dotnet/examples/sites/update.md +++ b/examples/2.3.x/server-dotnet/examples/sites/update.md @@ -11,7 +11,7 @@ Client client = new Client() Sites sites = new Sites(client); -Site result = await sites.Update( +Appwrite.Models.Site result = await sites.Update( siteId: "<SITE_ID>", name: "<NAME>", framework: Framework.Analog, diff --git a/examples/2.3.x/server-dotnet/examples/storage/create-bucket.md b/examples/2.3.x/server-dotnet/examples/storage/create-bucket.md index bdbd46a9e..6fc744e0e 100644 --- a/examples/2.3.x/server-dotnet/examples/storage/create-bucket.md +++ b/examples/2.3.x/server-dotnet/examples/storage/create-bucket.md @@ -11,7 +11,7 @@ Client client = new Client() Storage storage = new Storage(client); -Bucket result = await storage.CreateBucket( +Appwrite.Models.Bucket result = await storage.CreateBucket( bucketId: "<BUCKET_ID>", name: "<NAME>", permissions: new List<string> { Permission.Read(Role.Any()) }, // optional diff --git a/examples/2.3.x/server-dotnet/examples/storage/create-file.md b/examples/2.3.x/server-dotnet/examples/storage/create-file.md index 32cbd1d35..98fcc9df8 100644 --- a/examples/2.3.x/server-dotnet/examples/storage/create-file.md +++ b/examples/2.3.x/server-dotnet/examples/storage/create-file.md @@ -10,7 +10,7 @@ Client client = new Client() Storage storage = new Storage(client); -File result = await storage.CreateFile( +Appwrite.Models.File result = await storage.CreateFile( bucketId: "<BUCKET_ID>", fileId: "<FILE_ID>", file: InputFile.FromPath("./path-to-files/image.jpg"), diff --git a/examples/2.3.x/server-dotnet/examples/storage/get-bucket.md b/examples/2.3.x/server-dotnet/examples/storage/get-bucket.md index 8c1edda21..5f39e48b5 100644 --- a/examples/2.3.x/server-dotnet/examples/storage/get-bucket.md +++ b/examples/2.3.x/server-dotnet/examples/storage/get-bucket.md @@ -10,7 +10,7 @@ Client client = new Client() Storage storage = new Storage(client); -Bucket result = await storage.GetBucket( +Appwrite.Models.Bucket result = await storage.GetBucket( bucketId: "<BUCKET_ID>" ); diff --git a/examples/2.3.x/server-dotnet/examples/storage/get-file.md b/examples/2.3.x/server-dotnet/examples/storage/get-file.md index 925a7b5d4..a975539a8 100644 --- a/examples/2.3.x/server-dotnet/examples/storage/get-file.md +++ b/examples/2.3.x/server-dotnet/examples/storage/get-file.md @@ -10,7 +10,7 @@ Client client = new Client() Storage storage = new Storage(client); -File result = await storage.GetFile( +Appwrite.Models.File result = await storage.GetFile( bucketId: "<BUCKET_ID>", fileId: "<FILE_ID>" ); diff --git a/examples/2.3.x/server-dotnet/examples/storage/list-buckets.md b/examples/2.3.x/server-dotnet/examples/storage/list-buckets.md index df2145676..ad1067d60 100644 --- a/examples/2.3.x/server-dotnet/examples/storage/list-buckets.md +++ b/examples/2.3.x/server-dotnet/examples/storage/list-buckets.md @@ -10,7 +10,7 @@ Client client = new Client() Storage storage = new Storage(client); -BucketList result = await storage.ListBuckets( +Appwrite.Models.BucketList result = await storage.ListBuckets( queries: new List<string>(), // optional search: "<SEARCH>", // optional total: false // optional diff --git a/examples/2.3.x/server-dotnet/examples/storage/list-files.md b/examples/2.3.x/server-dotnet/examples/storage/list-files.md index 756aeb9f9..995a6a319 100644 --- a/examples/2.3.x/server-dotnet/examples/storage/list-files.md +++ b/examples/2.3.x/server-dotnet/examples/storage/list-files.md @@ -10,7 +10,7 @@ Client client = new Client() Storage storage = new Storage(client); -FileList result = await storage.ListFiles( +Appwrite.Models.FileList result = await storage.ListFiles( bucketId: "<BUCKET_ID>", queries: new List<string>(), // optional search: "<SEARCH>", // optional diff --git a/examples/2.3.x/server-dotnet/examples/storage/update-bucket.md b/examples/2.3.x/server-dotnet/examples/storage/update-bucket.md index 6e31cb359..043ff8931 100644 --- a/examples/2.3.x/server-dotnet/examples/storage/update-bucket.md +++ b/examples/2.3.x/server-dotnet/examples/storage/update-bucket.md @@ -11,7 +11,7 @@ Client client = new Client() Storage storage = new Storage(client); -Bucket result = await storage.UpdateBucket( +Appwrite.Models.Bucket result = await storage.UpdateBucket( bucketId: "<BUCKET_ID>", name: "<NAME>", permissions: new List<string> { Permission.Read(Role.Any()) }, // optional diff --git a/examples/2.3.x/server-dotnet/examples/storage/update-file.md b/examples/2.3.x/server-dotnet/examples/storage/update-file.md index a2b7013c3..cab60ebdd 100644 --- a/examples/2.3.x/server-dotnet/examples/storage/update-file.md +++ b/examples/2.3.x/server-dotnet/examples/storage/update-file.md @@ -10,7 +10,7 @@ Client client = new Client() Storage storage = new Storage(client); -File result = await storage.UpdateFile( +Appwrite.Models.File result = await storage.UpdateFile( bucketId: "<BUCKET_ID>", fileId: "<FILE_ID>", name: "<NAME>", // optional diff --git a/examples/2.3.x/server-dotnet/examples/tablesdb/create-big-int-column.md b/examples/2.3.x/server-dotnet/examples/tablesdb/create-big-int-column.md index 9849dc441..54edf9b58 100644 --- a/examples/2.3.x/server-dotnet/examples/tablesdb/create-big-int-column.md +++ b/examples/2.3.x/server-dotnet/examples/tablesdb/create-big-int-column.md @@ -10,7 +10,7 @@ Client client = new Client() TablesDB tablesDB = new TablesDB(client); -ColumnBigint result = await tablesDB.CreateBigIntColumn( +Appwrite.Models.ColumnBigint result = await tablesDB.CreateBigIntColumn( databaseId: "<DATABASE_ID>", tableId: "<TABLE_ID>", key: "<KEY>", diff --git a/examples/2.3.x/server-dotnet/examples/tablesdb/create-boolean-column.md b/examples/2.3.x/server-dotnet/examples/tablesdb/create-boolean-column.md index d4d177674..7e21e27de 100644 --- a/examples/2.3.x/server-dotnet/examples/tablesdb/create-boolean-column.md +++ b/examples/2.3.x/server-dotnet/examples/tablesdb/create-boolean-column.md @@ -10,7 +10,7 @@ Client client = new Client() TablesDB tablesDB = new TablesDB(client); -ColumnBoolean result = await tablesDB.CreateBooleanColumn( +Appwrite.Models.ColumnBoolean result = await tablesDB.CreateBooleanColumn( databaseId: "<DATABASE_ID>", tableId: "<TABLE_ID>", key: "<KEY>", diff --git a/examples/2.3.x/server-dotnet/examples/tablesdb/create-cutover.md b/examples/2.3.x/server-dotnet/examples/tablesdb/create-cutover.md index 522ed9482..5bed5adb6 100644 --- a/examples/2.3.x/server-dotnet/examples/tablesdb/create-cutover.md +++ b/examples/2.3.x/server-dotnet/examples/tablesdb/create-cutover.md @@ -10,7 +10,7 @@ Client client = new Client() TablesDB tablesDB = new TablesDB(client); -DatabaseMigration result = await tablesDB.CreateCutover( +Appwrite.Models.DatabaseMigration result = await tablesDB.CreateCutover( databaseId: "<DATABASE_ID>", migrationId: "<MIGRATION_ID>" ); diff --git a/examples/2.3.x/server-dotnet/examples/tablesdb/create-datetime-column.md b/examples/2.3.x/server-dotnet/examples/tablesdb/create-datetime-column.md index 0739c6cfa..0f80c7eb5 100644 --- a/examples/2.3.x/server-dotnet/examples/tablesdb/create-datetime-column.md +++ b/examples/2.3.x/server-dotnet/examples/tablesdb/create-datetime-column.md @@ -10,7 +10,7 @@ Client client = new Client() TablesDB tablesDB = new TablesDB(client); -ColumnDatetime result = await tablesDB.CreateDatetimeColumn( +Appwrite.Models.ColumnDatetime result = await tablesDB.CreateDatetimeColumn( databaseId: "<DATABASE_ID>", tableId: "<TABLE_ID>", key: "<KEY>", diff --git a/examples/2.3.x/server-dotnet/examples/tablesdb/create-email-column.md b/examples/2.3.x/server-dotnet/examples/tablesdb/create-email-column.md index b5879ca47..e786773e5 100644 --- a/examples/2.3.x/server-dotnet/examples/tablesdb/create-email-column.md +++ b/examples/2.3.x/server-dotnet/examples/tablesdb/create-email-column.md @@ -10,7 +10,7 @@ Client client = new Client() TablesDB tablesDB = new TablesDB(client); -ColumnEmail result = await tablesDB.CreateEmailColumn( +Appwrite.Models.ColumnEmail result = await tablesDB.CreateEmailColumn( databaseId: "<DATABASE_ID>", tableId: "<TABLE_ID>", key: "<KEY>", diff --git a/examples/2.3.x/server-dotnet/examples/tablesdb/create-enum-column.md b/examples/2.3.x/server-dotnet/examples/tablesdb/create-enum-column.md index 7a855e5dd..b9e7c8270 100644 --- a/examples/2.3.x/server-dotnet/examples/tablesdb/create-enum-column.md +++ b/examples/2.3.x/server-dotnet/examples/tablesdb/create-enum-column.md @@ -10,7 +10,7 @@ Client client = new Client() TablesDB tablesDB = new TablesDB(client); -ColumnEnum result = await tablesDB.CreateEnumColumn( +Appwrite.Models.ColumnEnum result = await tablesDB.CreateEnumColumn( databaseId: "<DATABASE_ID>", tableId: "<TABLE_ID>", key: "<KEY>", diff --git a/examples/2.3.x/server-dotnet/examples/tablesdb/create-failover.md b/examples/2.3.x/server-dotnet/examples/tablesdb/create-failover.md index 8eee23f4d..6b826227b 100644 --- a/examples/2.3.x/server-dotnet/examples/tablesdb/create-failover.md +++ b/examples/2.3.x/server-dotnet/examples/tablesdb/create-failover.md @@ -10,7 +10,7 @@ Client client = new Client() TablesDB tablesDB = new TablesDB(client); -DedicatedDatabase result = await tablesDB.CreateFailover( +Appwrite.Models.DedicatedDatabase result = await tablesDB.CreateFailover( databaseId: "<DATABASE_ID>", targetReplicaId: "<TARGET_REPLICA_ID>" // optional ); diff --git a/examples/2.3.x/server-dotnet/examples/tablesdb/create-float-column.md b/examples/2.3.x/server-dotnet/examples/tablesdb/create-float-column.md index 8d7293a50..fd75c9840 100644 --- a/examples/2.3.x/server-dotnet/examples/tablesdb/create-float-column.md +++ b/examples/2.3.x/server-dotnet/examples/tablesdb/create-float-column.md @@ -10,7 +10,7 @@ Client client = new Client() TablesDB tablesDB = new TablesDB(client); -ColumnFloat result = await tablesDB.CreateFloatColumn( +Appwrite.Models.ColumnFloat result = await tablesDB.CreateFloatColumn( databaseId: "<DATABASE_ID>", tableId: "<TABLE_ID>", key: "<KEY>", diff --git a/examples/2.3.x/server-dotnet/examples/tablesdb/create-index.md b/examples/2.3.x/server-dotnet/examples/tablesdb/create-index.md index df5d61e3e..569a8bea9 100644 --- a/examples/2.3.x/server-dotnet/examples/tablesdb/create-index.md +++ b/examples/2.3.x/server-dotnet/examples/tablesdb/create-index.md @@ -11,12 +11,12 @@ Client client = new Client() TablesDB tablesDB = new TablesDB(client); -ColumnIndex result = await tablesDB.CreateIndex( +Appwrite.Models.ColumnIndex result = await tablesDB.CreateIndex( databaseId: "<DATABASE_ID>", tableId: "<TABLE_ID>", key: "<KEY>", type: TablesDBIndexType.Key, - columns: new List<string>(), + columns: ["username"], orders: new List<OrderBy> { OrderBy.Asc }, // optional lengths: new List<long>() // optional ); diff --git a/examples/2.3.x/server-dotnet/examples/tablesdb/create-integer-column.md b/examples/2.3.x/server-dotnet/examples/tablesdb/create-integer-column.md index 60ecc4c1a..7f501803f 100644 --- a/examples/2.3.x/server-dotnet/examples/tablesdb/create-integer-column.md +++ b/examples/2.3.x/server-dotnet/examples/tablesdb/create-integer-column.md @@ -10,7 +10,7 @@ Client client = new Client() TablesDB tablesDB = new TablesDB(client); -ColumnInteger result = await tablesDB.CreateIntegerColumn( +Appwrite.Models.ColumnInteger result = await tablesDB.CreateIntegerColumn( databaseId: "<DATABASE_ID>", tableId: "<TABLE_ID>", key: "<KEY>", diff --git a/examples/2.3.x/server-dotnet/examples/tablesdb/create-ip-column.md b/examples/2.3.x/server-dotnet/examples/tablesdb/create-ip-column.md index dea6f8a0f..1488a7716 100644 --- a/examples/2.3.x/server-dotnet/examples/tablesdb/create-ip-column.md +++ b/examples/2.3.x/server-dotnet/examples/tablesdb/create-ip-column.md @@ -10,7 +10,7 @@ Client client = new Client() TablesDB tablesDB = new TablesDB(client); -ColumnIp result = await tablesDB.CreateIpColumn( +Appwrite.Models.ColumnIp result = await tablesDB.CreateIpColumn( databaseId: "<DATABASE_ID>", tableId: "<TABLE_ID>", key: "<KEY>", diff --git a/examples/2.3.x/server-dotnet/examples/tablesdb/create-line-column.md b/examples/2.3.x/server-dotnet/examples/tablesdb/create-line-column.md index 3f7ae3387..9262eeaf6 100644 --- a/examples/2.3.x/server-dotnet/examples/tablesdb/create-line-column.md +++ b/examples/2.3.x/server-dotnet/examples/tablesdb/create-line-column.md @@ -10,7 +10,7 @@ Client client = new Client() TablesDB tablesDB = new TablesDB(client); -ColumnLine result = await tablesDB.CreateLineColumn( +Appwrite.Models.ColumnLine result = await tablesDB.CreateLineColumn( databaseId: "<DATABASE_ID>", tableId: "<TABLE_ID>", key: "<KEY>", diff --git a/examples/2.3.x/server-dotnet/examples/tablesdb/create-longtext-column.md b/examples/2.3.x/server-dotnet/examples/tablesdb/create-longtext-column.md index 7f63f462e..a009fbebe 100644 --- a/examples/2.3.x/server-dotnet/examples/tablesdb/create-longtext-column.md +++ b/examples/2.3.x/server-dotnet/examples/tablesdb/create-longtext-column.md @@ -10,7 +10,7 @@ Client client = new Client() TablesDB tablesDB = new TablesDB(client); -ColumnLongtext result = await tablesDB.CreateLongtextColumn( +Appwrite.Models.ColumnLongtext result = await tablesDB.CreateLongtextColumn( databaseId: "<DATABASE_ID>", tableId: "<TABLE_ID>", key: "<KEY>", diff --git a/examples/2.3.x/server-dotnet/examples/tablesdb/create-mediumtext-column.md b/examples/2.3.x/server-dotnet/examples/tablesdb/create-mediumtext-column.md index f834cf246..2dc5454e7 100644 --- a/examples/2.3.x/server-dotnet/examples/tablesdb/create-mediumtext-column.md +++ b/examples/2.3.x/server-dotnet/examples/tablesdb/create-mediumtext-column.md @@ -10,7 +10,7 @@ Client client = new Client() TablesDB tablesDB = new TablesDB(client); -ColumnMediumtext result = await tablesDB.CreateMediumtextColumn( +Appwrite.Models.ColumnMediumtext result = await tablesDB.CreateMediumtextColumn( databaseId: "<DATABASE_ID>", tableId: "<TABLE_ID>", key: "<KEY>", diff --git a/examples/2.3.x/server-dotnet/examples/tablesdb/create-migration.md b/examples/2.3.x/server-dotnet/examples/tablesdb/create-migration.md index 863f223c5..3e3c4eb15 100644 --- a/examples/2.3.x/server-dotnet/examples/tablesdb/create-migration.md +++ b/examples/2.3.x/server-dotnet/examples/tablesdb/create-migration.md @@ -10,7 +10,7 @@ Client client = new Client() TablesDB tablesDB = new TablesDB(client); -DatabaseMigration result = await tablesDB.CreateMigration( +Appwrite.Models.DatabaseMigration result = await tablesDB.CreateMigration( databaseId: "<DATABASE_ID>", specification: "s-1vcpu-1gb", autoCutover: false // optional diff --git a/examples/2.3.x/server-dotnet/examples/tablesdb/create-operations.md b/examples/2.3.x/server-dotnet/examples/tablesdb/create-operations.md index e7e92df13..41c04dc6c 100644 --- a/examples/2.3.x/server-dotnet/examples/tablesdb/create-operations.md +++ b/examples/2.3.x/server-dotnet/examples/tablesdb/create-operations.md @@ -10,7 +10,7 @@ Client client = new Client() TablesDB tablesDB = new TablesDB(client); -Transaction result = await tablesDB.CreateOperations( +Appwrite.Models.Transaction result = await tablesDB.CreateOperations( transactionId: "<TRANSACTION_ID>", operations: [ { diff --git a/examples/2.3.x/server-dotnet/examples/tablesdb/create-point-column.md b/examples/2.3.x/server-dotnet/examples/tablesdb/create-point-column.md index aa787a482..c27586cb9 100644 --- a/examples/2.3.x/server-dotnet/examples/tablesdb/create-point-column.md +++ b/examples/2.3.x/server-dotnet/examples/tablesdb/create-point-column.md @@ -10,7 +10,7 @@ Client client = new Client() TablesDB tablesDB = new TablesDB(client); -ColumnPoint result = await tablesDB.CreatePointColumn( +Appwrite.Models.ColumnPoint result = await tablesDB.CreatePointColumn( databaseId: "<DATABASE_ID>", tableId: "<TABLE_ID>", key: "<KEY>", diff --git a/examples/2.3.x/server-dotnet/examples/tablesdb/create-polygon-column.md b/examples/2.3.x/server-dotnet/examples/tablesdb/create-polygon-column.md index c667492ff..6b4ac04dc 100644 --- a/examples/2.3.x/server-dotnet/examples/tablesdb/create-polygon-column.md +++ b/examples/2.3.x/server-dotnet/examples/tablesdb/create-polygon-column.md @@ -10,7 +10,7 @@ Client client = new Client() TablesDB tablesDB = new TablesDB(client); -ColumnPolygon result = await tablesDB.CreatePolygonColumn( +Appwrite.Models.ColumnPolygon result = await tablesDB.CreatePolygonColumn( databaseId: "<DATABASE_ID>", tableId: "<TABLE_ID>", key: "<KEY>", diff --git a/examples/2.3.x/server-dotnet/examples/tablesdb/create-relationship-column.md b/examples/2.3.x/server-dotnet/examples/tablesdb/create-relationship-column.md index 2ad3e3659..bfeb4f4f7 100644 --- a/examples/2.3.x/server-dotnet/examples/tablesdb/create-relationship-column.md +++ b/examples/2.3.x/server-dotnet/examples/tablesdb/create-relationship-column.md @@ -11,7 +11,7 @@ Client client = new Client() TablesDB tablesDB = new TablesDB(client); -ColumnRelationship result = await tablesDB.CreateRelationshipColumn( +Appwrite.Models.ColumnRelationship result = await tablesDB.CreateRelationshipColumn( databaseId: "<DATABASE_ID>", tableId: "<TABLE_ID>", relatedTableId: "<RELATED_TABLE_ID>", diff --git a/examples/2.3.x/server-dotnet/examples/tablesdb/create-row.md b/examples/2.3.x/server-dotnet/examples/tablesdb/create-row.md index 05cbe3ce5..353c92be3 100644 --- a/examples/2.3.x/server-dotnet/examples/tablesdb/create-row.md +++ b/examples/2.3.x/server-dotnet/examples/tablesdb/create-row.md @@ -10,7 +10,7 @@ Client client = new Client() TablesDB tablesDB = new TablesDB(client); -Row result = await tablesDB.CreateRow( +Appwrite.Models.Row result = await tablesDB.CreateRow( databaseId: "<DATABASE_ID>", tableId: "<TABLE_ID>", rowId: "<ROW_ID>", diff --git a/examples/2.3.x/server-dotnet/examples/tablesdb/create-rows.md b/examples/2.3.x/server-dotnet/examples/tablesdb/create-rows.md index 868c515a7..f1fd9731a 100644 --- a/examples/2.3.x/server-dotnet/examples/tablesdb/create-rows.md +++ b/examples/2.3.x/server-dotnet/examples/tablesdb/create-rows.md @@ -10,10 +10,19 @@ Client client = new Client() TablesDB tablesDB = new TablesDB(client); -RowList result = await tablesDB.CreateRows( +Appwrite.Models.RowList result = await tablesDB.CreateRows( databaseId: "<DATABASE_ID>", tableId: "<TABLE_ID>", - rows: new List<object>(), + rows: [ + { + "$id": "example1", + "username": "walter.obrien", + "email": "walter.obrien@example.com", + "fullName": "Walter O'Brien", + "age": 30, + "isAdmin": false + } + ], transactionId: "<TRANSACTION_ID>" // optional ); diff --git a/examples/2.3.x/server-dotnet/examples/tablesdb/create-string-column.md b/examples/2.3.x/server-dotnet/examples/tablesdb/create-string-column.md index 70d552835..8b98954b9 100644 --- a/examples/2.3.x/server-dotnet/examples/tablesdb/create-string-column.md +++ b/examples/2.3.x/server-dotnet/examples/tablesdb/create-string-column.md @@ -10,7 +10,7 @@ Client client = new Client() TablesDB tablesDB = new TablesDB(client); -ColumnString result = await tablesDB.CreateStringColumn( +Appwrite.Models.ColumnString result = await tablesDB.CreateStringColumn( databaseId: "<DATABASE_ID>", tableId: "<TABLE_ID>", key: "<KEY>", diff --git a/examples/2.3.x/server-dotnet/examples/tablesdb/create-table.md b/examples/2.3.x/server-dotnet/examples/tablesdb/create-table.md index f7781fc7b..3657fc342 100644 --- a/examples/2.3.x/server-dotnet/examples/tablesdb/create-table.md +++ b/examples/2.3.x/server-dotnet/examples/tablesdb/create-table.md @@ -10,7 +10,7 @@ Client client = new Client() TablesDB tablesDB = new TablesDB(client); -Table result = await tablesDB.CreateTable( +Appwrite.Models.Table result = await tablesDB.CreateTable( databaseId: "<DATABASE_ID>", tableId: "<TABLE_ID>", name: "<NAME>", diff --git a/examples/2.3.x/server-dotnet/examples/tablesdb/create-text-column.md b/examples/2.3.x/server-dotnet/examples/tablesdb/create-text-column.md index ae046a6ae..860bbd40c 100644 --- a/examples/2.3.x/server-dotnet/examples/tablesdb/create-text-column.md +++ b/examples/2.3.x/server-dotnet/examples/tablesdb/create-text-column.md @@ -10,7 +10,7 @@ Client client = new Client() TablesDB tablesDB = new TablesDB(client); -ColumnText result = await tablesDB.CreateTextColumn( +Appwrite.Models.ColumnText result = await tablesDB.CreateTextColumn( databaseId: "<DATABASE_ID>", tableId: "<TABLE_ID>", key: "<KEY>", diff --git a/examples/2.3.x/server-dotnet/examples/tablesdb/create-transaction.md b/examples/2.3.x/server-dotnet/examples/tablesdb/create-transaction.md index cc3845f05..9d890fbf2 100644 --- a/examples/2.3.x/server-dotnet/examples/tablesdb/create-transaction.md +++ b/examples/2.3.x/server-dotnet/examples/tablesdb/create-transaction.md @@ -10,7 +10,7 @@ Client client = new Client() TablesDB tablesDB = new TablesDB(client); -Transaction result = await tablesDB.CreateTransaction( +Appwrite.Models.Transaction result = await tablesDB.CreateTransaction( ttl: 60 // optional ); diff --git a/examples/2.3.x/server-dotnet/examples/tablesdb/create-url-column.md b/examples/2.3.x/server-dotnet/examples/tablesdb/create-url-column.md index de79303f9..1ad8c1493 100644 --- a/examples/2.3.x/server-dotnet/examples/tablesdb/create-url-column.md +++ b/examples/2.3.x/server-dotnet/examples/tablesdb/create-url-column.md @@ -10,7 +10,7 @@ Client client = new Client() TablesDB tablesDB = new TablesDB(client); -ColumnUrl result = await tablesDB.CreateUrlColumn( +Appwrite.Models.ColumnUrl result = await tablesDB.CreateUrlColumn( databaseId: "<DATABASE_ID>", tableId: "<TABLE_ID>", key: "<KEY>", diff --git a/examples/2.3.x/server-dotnet/examples/tablesdb/create-varchar-column.md b/examples/2.3.x/server-dotnet/examples/tablesdb/create-varchar-column.md index 507c8dd4f..d6d9e2d8a 100644 --- a/examples/2.3.x/server-dotnet/examples/tablesdb/create-varchar-column.md +++ b/examples/2.3.x/server-dotnet/examples/tablesdb/create-varchar-column.md @@ -10,7 +10,7 @@ Client client = new Client() TablesDB tablesDB = new TablesDB(client); -ColumnVarchar result = await tablesDB.CreateVarcharColumn( +Appwrite.Models.ColumnVarchar result = await tablesDB.CreateVarcharColumn( databaseId: "<DATABASE_ID>", tableId: "<TABLE_ID>", key: "<KEY>", diff --git a/examples/2.3.x/server-dotnet/examples/tablesdb/create.md b/examples/2.3.x/server-dotnet/examples/tablesdb/create.md index 8175c0eb0..792328788 100644 --- a/examples/2.3.x/server-dotnet/examples/tablesdb/create.md +++ b/examples/2.3.x/server-dotnet/examples/tablesdb/create.md @@ -10,7 +10,7 @@ Client client = new Client() TablesDB tablesDB = new TablesDB(client); -Database result = await tablesDB.Create( +Appwrite.Models.Database result = await tablesDB.Create( databaseId: "<DATABASE_ID>", name: "<NAME>", enabled: false, // optional diff --git a/examples/2.3.x/server-dotnet/examples/tablesdb/decrement-row-column.md b/examples/2.3.x/server-dotnet/examples/tablesdb/decrement-row-column.md index c7a970202..92319dbb9 100644 --- a/examples/2.3.x/server-dotnet/examples/tablesdb/decrement-row-column.md +++ b/examples/2.3.x/server-dotnet/examples/tablesdb/decrement-row-column.md @@ -10,7 +10,7 @@ Client client = new Client() TablesDB tablesDB = new TablesDB(client); -Row result = await tablesDB.DecrementRowColumn( +Appwrite.Models.Row result = await tablesDB.DecrementRowColumn( databaseId: "<DATABASE_ID>", tableId: "<TABLE_ID>", rowId: "<ROW_ID>", diff --git a/examples/2.3.x/server-dotnet/examples/tablesdb/delete-rows.md b/examples/2.3.x/server-dotnet/examples/tablesdb/delete-rows.md index 1cfdfe72b..428c5c48f 100644 --- a/examples/2.3.x/server-dotnet/examples/tablesdb/delete-rows.md +++ b/examples/2.3.x/server-dotnet/examples/tablesdb/delete-rows.md @@ -13,7 +13,7 @@ TablesDB tablesDB = new TablesDB(client); await tablesDB.DeleteRows( databaseId: "<DATABASE_ID>", tableId: "<TABLE_ID>", - queries: new List<string>(), // optional + queries: ["{\"method\":\"equal\", \"attribute\":\"$id\", \"values\":[\"<ROW_ID>\"]}"], // optional transactionId: "<TRANSACTION_ID>" // optional ); diff --git a/examples/2.3.x/server-dotnet/examples/tablesdb/get-index.md b/examples/2.3.x/server-dotnet/examples/tablesdb/get-index.md index 45cb48260..d0747b912 100644 --- a/examples/2.3.x/server-dotnet/examples/tablesdb/get-index.md +++ b/examples/2.3.x/server-dotnet/examples/tablesdb/get-index.md @@ -10,7 +10,7 @@ Client client = new Client() TablesDB tablesDB = new TablesDB(client); -ColumnIndex result = await tablesDB.GetIndex( +Appwrite.Models.ColumnIndex result = await tablesDB.GetIndex( databaseId: "<DATABASE_ID>", tableId: "<TABLE_ID>", key: "<KEY>" diff --git a/examples/2.3.x/server-dotnet/examples/tablesdb/get-migration.md b/examples/2.3.x/server-dotnet/examples/tablesdb/get-migration.md index de4d85e3b..49c9170c0 100644 --- a/examples/2.3.x/server-dotnet/examples/tablesdb/get-migration.md +++ b/examples/2.3.x/server-dotnet/examples/tablesdb/get-migration.md @@ -10,7 +10,7 @@ Client client = new Client() TablesDB tablesDB = new TablesDB(client); -DatabaseMigration result = await tablesDB.GetMigration( +Appwrite.Models.DatabaseMigration result = await tablesDB.GetMigration( databaseId: "<DATABASE_ID>", migrationId: "<MIGRATION_ID>" ); diff --git a/examples/2.3.x/server-dotnet/examples/tablesdb/get-replicas.md b/examples/2.3.x/server-dotnet/examples/tablesdb/get-replicas.md index 1053522f8..5919bdb11 100644 --- a/examples/2.3.x/server-dotnet/examples/tablesdb/get-replicas.md +++ b/examples/2.3.x/server-dotnet/examples/tablesdb/get-replicas.md @@ -10,7 +10,7 @@ Client client = new Client() TablesDB tablesDB = new TablesDB(client); -DedicatedDatabaseReplicas result = await tablesDB.GetReplicas( +Appwrite.Models.DedicatedDatabaseReplicas result = await tablesDB.GetReplicas( databaseId: "<DATABASE_ID>" ); diff --git a/examples/2.3.x/server-dotnet/examples/tablesdb/get-row.md b/examples/2.3.x/server-dotnet/examples/tablesdb/get-row.md index 83c1f61e9..acae65660 100644 --- a/examples/2.3.x/server-dotnet/examples/tablesdb/get-row.md +++ b/examples/2.3.x/server-dotnet/examples/tablesdb/get-row.md @@ -10,7 +10,7 @@ Client client = new Client() TablesDB tablesDB = new TablesDB(client); -Row result = await tablesDB.GetRow( +Appwrite.Models.Row result = await tablesDB.GetRow( databaseId: "<DATABASE_ID>", tableId: "<TABLE_ID>", rowId: "<ROW_ID>", diff --git a/examples/2.3.x/server-dotnet/examples/tablesdb/get-status.md b/examples/2.3.x/server-dotnet/examples/tablesdb/get-status.md index 5cc588fb3..b3c81945f 100644 --- a/examples/2.3.x/server-dotnet/examples/tablesdb/get-status.md +++ b/examples/2.3.x/server-dotnet/examples/tablesdb/get-status.md @@ -10,7 +10,7 @@ Client client = new Client() TablesDB tablesDB = new TablesDB(client); -DatabaseStatus result = await tablesDB.GetStatus( +Appwrite.Models.DatabaseStatus result = await tablesDB.GetStatus( databaseId: "<DATABASE_ID>" ); diff --git a/examples/2.3.x/server-dotnet/examples/tablesdb/get-table.md b/examples/2.3.x/server-dotnet/examples/tablesdb/get-table.md index e5f5c4e45..2844a3883 100644 --- a/examples/2.3.x/server-dotnet/examples/tablesdb/get-table.md +++ b/examples/2.3.x/server-dotnet/examples/tablesdb/get-table.md @@ -10,7 +10,7 @@ Client client = new Client() TablesDB tablesDB = new TablesDB(client); -Table result = await tablesDB.GetTable( +Appwrite.Models.Table result = await tablesDB.GetTable( databaseId: "<DATABASE_ID>", tableId: "<TABLE_ID>" ); diff --git a/examples/2.3.x/server-dotnet/examples/tablesdb/get-transaction.md b/examples/2.3.x/server-dotnet/examples/tablesdb/get-transaction.md index 9bfeeb636..5d11d5535 100644 --- a/examples/2.3.x/server-dotnet/examples/tablesdb/get-transaction.md +++ b/examples/2.3.x/server-dotnet/examples/tablesdb/get-transaction.md @@ -10,7 +10,7 @@ Client client = new Client() TablesDB tablesDB = new TablesDB(client); -Transaction result = await tablesDB.GetTransaction( +Appwrite.Models.Transaction result = await tablesDB.GetTransaction( transactionId: "<TRANSACTION_ID>" ); diff --git a/examples/2.3.x/server-dotnet/examples/tablesdb/get.md b/examples/2.3.x/server-dotnet/examples/tablesdb/get.md index daa759aba..15c8fd671 100644 --- a/examples/2.3.x/server-dotnet/examples/tablesdb/get.md +++ b/examples/2.3.x/server-dotnet/examples/tablesdb/get.md @@ -10,7 +10,7 @@ Client client = new Client() TablesDB tablesDB = new TablesDB(client); -Database result = await tablesDB.Get( +Appwrite.Models.Database result = await tablesDB.Get( databaseId: "<DATABASE_ID>" ); diff --git a/examples/2.3.x/server-dotnet/examples/tablesdb/increment-row-column.md b/examples/2.3.x/server-dotnet/examples/tablesdb/increment-row-column.md index 16d13fbc7..28533f751 100644 --- a/examples/2.3.x/server-dotnet/examples/tablesdb/increment-row-column.md +++ b/examples/2.3.x/server-dotnet/examples/tablesdb/increment-row-column.md @@ -10,7 +10,7 @@ Client client = new Client() TablesDB tablesDB = new TablesDB(client); -Row result = await tablesDB.IncrementRowColumn( +Appwrite.Models.Row result = await tablesDB.IncrementRowColumn( databaseId: "<DATABASE_ID>", tableId: "<TABLE_ID>", rowId: "<ROW_ID>", diff --git a/examples/2.3.x/server-dotnet/examples/tablesdb/list-columns.md b/examples/2.3.x/server-dotnet/examples/tablesdb/list-columns.md index fdb00a25b..01fd5e7db 100644 --- a/examples/2.3.x/server-dotnet/examples/tablesdb/list-columns.md +++ b/examples/2.3.x/server-dotnet/examples/tablesdb/list-columns.md @@ -10,7 +10,7 @@ Client client = new Client() TablesDB tablesDB = new TablesDB(client); -ColumnList result = await tablesDB.ListColumns( +Appwrite.Models.ColumnList result = await tablesDB.ListColumns( databaseId: "<DATABASE_ID>", tableId: "<TABLE_ID>", queries: new List<string>(), // optional diff --git a/examples/2.3.x/server-dotnet/examples/tablesdb/list-indexes.md b/examples/2.3.x/server-dotnet/examples/tablesdb/list-indexes.md index f2b039a4a..71b61d2f6 100644 --- a/examples/2.3.x/server-dotnet/examples/tablesdb/list-indexes.md +++ b/examples/2.3.x/server-dotnet/examples/tablesdb/list-indexes.md @@ -10,7 +10,7 @@ Client client = new Client() TablesDB tablesDB = new TablesDB(client); -ColumnIndexList result = await tablesDB.ListIndexes( +Appwrite.Models.ColumnIndexList result = await tablesDB.ListIndexes( databaseId: "<DATABASE_ID>", tableId: "<TABLE_ID>", queries: new List<string>(), // optional diff --git a/examples/2.3.x/server-dotnet/examples/tablesdb/list-migrations.md b/examples/2.3.x/server-dotnet/examples/tablesdb/list-migrations.md index a7b88cb91..7c4cdb6ae 100644 --- a/examples/2.3.x/server-dotnet/examples/tablesdb/list-migrations.md +++ b/examples/2.3.x/server-dotnet/examples/tablesdb/list-migrations.md @@ -10,7 +10,7 @@ Client client = new Client() TablesDB tablesDB = new TablesDB(client); -DatabaseMigrationList result = await tablesDB.ListMigrations( +Appwrite.Models.DatabaseMigrationList result = await tablesDB.ListMigrations( databaseId: "<DATABASE_ID>" ); diff --git a/examples/2.3.x/server-dotnet/examples/tablesdb/list-operations.md b/examples/2.3.x/server-dotnet/examples/tablesdb/list-operations.md index daaa28684..e02a93969 100644 --- a/examples/2.3.x/server-dotnet/examples/tablesdb/list-operations.md +++ b/examples/2.3.x/server-dotnet/examples/tablesdb/list-operations.md @@ -10,7 +10,7 @@ Client client = new Client() TablesDB tablesDB = new TablesDB(client); -DedicatedDatabaseOperationList result = await tablesDB.ListOperations( +Appwrite.Models.DedicatedDatabaseOperationList result = await tablesDB.ListOperations( databaseId: "<DATABASE_ID>", status: "queued", // optional limit: 1, // optional diff --git a/examples/2.3.x/server-dotnet/examples/tablesdb/list-rows.md b/examples/2.3.x/server-dotnet/examples/tablesdb/list-rows.md index 66e085fd9..4972902b7 100644 --- a/examples/2.3.x/server-dotnet/examples/tablesdb/list-rows.md +++ b/examples/2.3.x/server-dotnet/examples/tablesdb/list-rows.md @@ -10,7 +10,7 @@ Client client = new Client() TablesDB tablesDB = new TablesDB(client); -RowList result = await tablesDB.ListRows( +Appwrite.Models.RowList result = await tablesDB.ListRows( databaseId: "<DATABASE_ID>", tableId: "<TABLE_ID>", queries: new List<string>(), // optional diff --git a/examples/2.3.x/server-dotnet/examples/tablesdb/list-specifications.md b/examples/2.3.x/server-dotnet/examples/tablesdb/list-specifications.md index 262b9fd3f..1c0779ced 100644 --- a/examples/2.3.x/server-dotnet/examples/tablesdb/list-specifications.md +++ b/examples/2.3.x/server-dotnet/examples/tablesdb/list-specifications.md @@ -10,7 +10,7 @@ Client client = new Client() TablesDB tablesDB = new TablesDB(client); -DedicatedDatabaseSpecificationList result = await tablesDB.ListSpecifications(); +Appwrite.Models.DedicatedDatabaseSpecificationList result = await tablesDB.ListSpecifications(); ``` diff --git a/examples/2.3.x/server-dotnet/examples/tablesdb/list-tables.md b/examples/2.3.x/server-dotnet/examples/tablesdb/list-tables.md index 89c2e7b52..0de79b37e 100644 --- a/examples/2.3.x/server-dotnet/examples/tablesdb/list-tables.md +++ b/examples/2.3.x/server-dotnet/examples/tablesdb/list-tables.md @@ -10,7 +10,7 @@ Client client = new Client() TablesDB tablesDB = new TablesDB(client); -TableList result = await tablesDB.ListTables( +Appwrite.Models.TableList result = await tablesDB.ListTables( databaseId: "<DATABASE_ID>", queries: new List<string>(), // optional search: "<SEARCH>", // optional diff --git a/examples/2.3.x/server-dotnet/examples/tablesdb/list-transactions.md b/examples/2.3.x/server-dotnet/examples/tablesdb/list-transactions.md index 6d7db9ab0..4a9b882a9 100644 --- a/examples/2.3.x/server-dotnet/examples/tablesdb/list-transactions.md +++ b/examples/2.3.x/server-dotnet/examples/tablesdb/list-transactions.md @@ -10,8 +10,9 @@ Client client = new Client() TablesDB tablesDB = new TablesDB(client); -TransactionList result = await tablesDB.ListTransactions( - queries: new List<string>() // optional +Appwrite.Models.TransactionList result = await tablesDB.ListTransactions( + queries: new List<string>(), // optional + total: false // optional ); ``` diff --git a/examples/2.3.x/server-dotnet/examples/tablesdb/list.md b/examples/2.3.x/server-dotnet/examples/tablesdb/list.md index 6f0829307..bd25fdfbf 100644 --- a/examples/2.3.x/server-dotnet/examples/tablesdb/list.md +++ b/examples/2.3.x/server-dotnet/examples/tablesdb/list.md @@ -10,7 +10,7 @@ Client client = new Client() TablesDB tablesDB = new TablesDB(client); -DatabaseList result = await tablesDB.List( +Appwrite.Models.DatabaseList result = await tablesDB.List( queries: new List<string>(), // optional search: "<SEARCH>", // optional total: false // optional diff --git a/examples/2.3.x/server-dotnet/examples/tablesdb/update-big-int-column.md b/examples/2.3.x/server-dotnet/examples/tablesdb/update-big-int-column.md index 381d02b26..c71e3f186 100644 --- a/examples/2.3.x/server-dotnet/examples/tablesdb/update-big-int-column.md +++ b/examples/2.3.x/server-dotnet/examples/tablesdb/update-big-int-column.md @@ -10,7 +10,7 @@ Client client = new Client() TablesDB tablesDB = new TablesDB(client); -ColumnBigint result = await tablesDB.UpdateBigIntColumn( +Appwrite.Models.ColumnBigint result = await tablesDB.UpdateBigIntColumn( databaseId: "<DATABASE_ID>", tableId: "<TABLE_ID>", key: "<KEY>", diff --git a/examples/2.3.x/server-dotnet/examples/tablesdb/update-boolean-column.md b/examples/2.3.x/server-dotnet/examples/tablesdb/update-boolean-column.md index 5f7685ec2..faca887be 100644 --- a/examples/2.3.x/server-dotnet/examples/tablesdb/update-boolean-column.md +++ b/examples/2.3.x/server-dotnet/examples/tablesdb/update-boolean-column.md @@ -10,7 +10,7 @@ Client client = new Client() TablesDB tablesDB = new TablesDB(client); -ColumnBoolean result = await tablesDB.UpdateBooleanColumn( +Appwrite.Models.ColumnBoolean result = await tablesDB.UpdateBooleanColumn( databaseId: "<DATABASE_ID>", tableId: "<TABLE_ID>", key: "<KEY>", diff --git a/examples/2.3.x/server-dotnet/examples/tablesdb/update-datetime-column.md b/examples/2.3.x/server-dotnet/examples/tablesdb/update-datetime-column.md index f659279c1..7fbdbae95 100644 --- a/examples/2.3.x/server-dotnet/examples/tablesdb/update-datetime-column.md +++ b/examples/2.3.x/server-dotnet/examples/tablesdb/update-datetime-column.md @@ -10,7 +10,7 @@ Client client = new Client() TablesDB tablesDB = new TablesDB(client); -ColumnDatetime result = await tablesDB.UpdateDatetimeColumn( +Appwrite.Models.ColumnDatetime result = await tablesDB.UpdateDatetimeColumn( databaseId: "<DATABASE_ID>", tableId: "<TABLE_ID>", key: "<KEY>", diff --git a/examples/2.3.x/server-dotnet/examples/tablesdb/update-email-column.md b/examples/2.3.x/server-dotnet/examples/tablesdb/update-email-column.md index c8f5d9127..c26eda40f 100644 --- a/examples/2.3.x/server-dotnet/examples/tablesdb/update-email-column.md +++ b/examples/2.3.x/server-dotnet/examples/tablesdb/update-email-column.md @@ -10,7 +10,7 @@ Client client = new Client() TablesDB tablesDB = new TablesDB(client); -ColumnEmail result = await tablesDB.UpdateEmailColumn( +Appwrite.Models.ColumnEmail result = await tablesDB.UpdateEmailColumn( databaseId: "<DATABASE_ID>", tableId: "<TABLE_ID>", key: "<KEY>", diff --git a/examples/2.3.x/server-dotnet/examples/tablesdb/update-enum-column.md b/examples/2.3.x/server-dotnet/examples/tablesdb/update-enum-column.md index 404fc413d..b135a8e19 100644 --- a/examples/2.3.x/server-dotnet/examples/tablesdb/update-enum-column.md +++ b/examples/2.3.x/server-dotnet/examples/tablesdb/update-enum-column.md @@ -10,7 +10,7 @@ Client client = new Client() TablesDB tablesDB = new TablesDB(client); -ColumnEnum result = await tablesDB.UpdateEnumColumn( +Appwrite.Models.ColumnEnum result = await tablesDB.UpdateEnumColumn( databaseId: "<DATABASE_ID>", tableId: "<TABLE_ID>", key: "<KEY>", diff --git a/examples/2.3.x/server-dotnet/examples/tablesdb/update-float-column.md b/examples/2.3.x/server-dotnet/examples/tablesdb/update-float-column.md index 7983743ea..7e54e7434 100644 --- a/examples/2.3.x/server-dotnet/examples/tablesdb/update-float-column.md +++ b/examples/2.3.x/server-dotnet/examples/tablesdb/update-float-column.md @@ -10,7 +10,7 @@ Client client = new Client() TablesDB tablesDB = new TablesDB(client); -ColumnFloat result = await tablesDB.UpdateFloatColumn( +Appwrite.Models.ColumnFloat result = await tablesDB.UpdateFloatColumn( databaseId: "<DATABASE_ID>", tableId: "<TABLE_ID>", key: "<KEY>", diff --git a/examples/2.3.x/server-dotnet/examples/tablesdb/update-integer-column.md b/examples/2.3.x/server-dotnet/examples/tablesdb/update-integer-column.md index 22b8ab205..0b9e3a2a4 100644 --- a/examples/2.3.x/server-dotnet/examples/tablesdb/update-integer-column.md +++ b/examples/2.3.x/server-dotnet/examples/tablesdb/update-integer-column.md @@ -10,7 +10,7 @@ Client client = new Client() TablesDB tablesDB = new TablesDB(client); -ColumnInteger result = await tablesDB.UpdateIntegerColumn( +Appwrite.Models.ColumnInteger result = await tablesDB.UpdateIntegerColumn( databaseId: "<DATABASE_ID>", tableId: "<TABLE_ID>", key: "<KEY>", diff --git a/examples/2.3.x/server-dotnet/examples/tablesdb/update-ip-column.md b/examples/2.3.x/server-dotnet/examples/tablesdb/update-ip-column.md index 30a9c595b..9e5c70b3d 100644 --- a/examples/2.3.x/server-dotnet/examples/tablesdb/update-ip-column.md +++ b/examples/2.3.x/server-dotnet/examples/tablesdb/update-ip-column.md @@ -10,7 +10,7 @@ Client client = new Client() TablesDB tablesDB = new TablesDB(client); -ColumnIp result = await tablesDB.UpdateIpColumn( +Appwrite.Models.ColumnIp result = await tablesDB.UpdateIpColumn( databaseId: "<DATABASE_ID>", tableId: "<TABLE_ID>", key: "<KEY>", diff --git a/examples/2.3.x/server-dotnet/examples/tablesdb/update-line-column.md b/examples/2.3.x/server-dotnet/examples/tablesdb/update-line-column.md index 91291e3f6..b4345e412 100644 --- a/examples/2.3.x/server-dotnet/examples/tablesdb/update-line-column.md +++ b/examples/2.3.x/server-dotnet/examples/tablesdb/update-line-column.md @@ -10,7 +10,7 @@ Client client = new Client() TablesDB tablesDB = new TablesDB(client); -ColumnLine result = await tablesDB.UpdateLineColumn( +Appwrite.Models.ColumnLine result = await tablesDB.UpdateLineColumn( databaseId: "<DATABASE_ID>", tableId: "<TABLE_ID>", key: "<KEY>", diff --git a/examples/2.3.x/server-dotnet/examples/tablesdb/update-longtext-column.md b/examples/2.3.x/server-dotnet/examples/tablesdb/update-longtext-column.md index c240a4965..45835ecd3 100644 --- a/examples/2.3.x/server-dotnet/examples/tablesdb/update-longtext-column.md +++ b/examples/2.3.x/server-dotnet/examples/tablesdb/update-longtext-column.md @@ -10,7 +10,7 @@ Client client = new Client() TablesDB tablesDB = new TablesDB(client); -ColumnLongtext result = await tablesDB.UpdateLongtextColumn( +Appwrite.Models.ColumnLongtext result = await tablesDB.UpdateLongtextColumn( databaseId: "<DATABASE_ID>", tableId: "<TABLE_ID>", key: "<KEY>", diff --git a/examples/2.3.x/server-dotnet/examples/tablesdb/update-mediumtext-column.md b/examples/2.3.x/server-dotnet/examples/tablesdb/update-mediumtext-column.md index 592d8afac..1d0308151 100644 --- a/examples/2.3.x/server-dotnet/examples/tablesdb/update-mediumtext-column.md +++ b/examples/2.3.x/server-dotnet/examples/tablesdb/update-mediumtext-column.md @@ -10,7 +10,7 @@ Client client = new Client() TablesDB tablesDB = new TablesDB(client); -ColumnMediumtext result = await tablesDB.UpdateMediumtextColumn( +Appwrite.Models.ColumnMediumtext result = await tablesDB.UpdateMediumtextColumn( databaseId: "<DATABASE_ID>", tableId: "<TABLE_ID>", key: "<KEY>", diff --git a/examples/2.3.x/server-dotnet/examples/tablesdb/update-point-column.md b/examples/2.3.x/server-dotnet/examples/tablesdb/update-point-column.md index 4e2dcc07a..77abccbdb 100644 --- a/examples/2.3.x/server-dotnet/examples/tablesdb/update-point-column.md +++ b/examples/2.3.x/server-dotnet/examples/tablesdb/update-point-column.md @@ -10,7 +10,7 @@ Client client = new Client() TablesDB tablesDB = new TablesDB(client); -ColumnPoint result = await tablesDB.UpdatePointColumn( +Appwrite.Models.ColumnPoint result = await tablesDB.UpdatePointColumn( databaseId: "<DATABASE_ID>", tableId: "<TABLE_ID>", key: "<KEY>", diff --git a/examples/2.3.x/server-dotnet/examples/tablesdb/update-polygon-column.md b/examples/2.3.x/server-dotnet/examples/tablesdb/update-polygon-column.md index 5ecd1b806..2ca0f43dd 100644 --- a/examples/2.3.x/server-dotnet/examples/tablesdb/update-polygon-column.md +++ b/examples/2.3.x/server-dotnet/examples/tablesdb/update-polygon-column.md @@ -10,7 +10,7 @@ Client client = new Client() TablesDB tablesDB = new TablesDB(client); -ColumnPolygon result = await tablesDB.UpdatePolygonColumn( +Appwrite.Models.ColumnPolygon result = await tablesDB.UpdatePolygonColumn( databaseId: "<DATABASE_ID>", tableId: "<TABLE_ID>", key: "<KEY>", diff --git a/examples/2.3.x/server-dotnet/examples/tablesdb/update-relationship-column.md b/examples/2.3.x/server-dotnet/examples/tablesdb/update-relationship-column.md index 8d75dd0a0..d22ece791 100644 --- a/examples/2.3.x/server-dotnet/examples/tablesdb/update-relationship-column.md +++ b/examples/2.3.x/server-dotnet/examples/tablesdb/update-relationship-column.md @@ -11,7 +11,7 @@ Client client = new Client() TablesDB tablesDB = new TablesDB(client); -ColumnRelationship result = await tablesDB.UpdateRelationshipColumn( +Appwrite.Models.ColumnRelationship result = await tablesDB.UpdateRelationshipColumn( databaseId: "<DATABASE_ID>", tableId: "<TABLE_ID>", key: "<KEY>", diff --git a/examples/2.3.x/server-dotnet/examples/tablesdb/update-row.md b/examples/2.3.x/server-dotnet/examples/tablesdb/update-row.md index 03f71f613..1b5a5a7e9 100644 --- a/examples/2.3.x/server-dotnet/examples/tablesdb/update-row.md +++ b/examples/2.3.x/server-dotnet/examples/tablesdb/update-row.md @@ -10,7 +10,7 @@ Client client = new Client() TablesDB tablesDB = new TablesDB(client); -Row result = await tablesDB.UpdateRow( +Appwrite.Models.Row result = await tablesDB.UpdateRow( databaseId: "<DATABASE_ID>", tableId: "<TABLE_ID>", rowId: "<ROW_ID>", diff --git a/examples/2.3.x/server-dotnet/examples/tablesdb/update-rows.md b/examples/2.3.x/server-dotnet/examples/tablesdb/update-rows.md index 9e4c497bd..4e69f0b8d 100644 --- a/examples/2.3.x/server-dotnet/examples/tablesdb/update-rows.md +++ b/examples/2.3.x/server-dotnet/examples/tablesdb/update-rows.md @@ -10,7 +10,7 @@ Client client = new Client() TablesDB tablesDB = new TablesDB(client); -RowList result = await tablesDB.UpdateRows( +Appwrite.Models.RowList result = await tablesDB.UpdateRows( databaseId: "<DATABASE_ID>", tableId: "<TABLE_ID>", data: new { diff --git a/examples/2.3.x/server-dotnet/examples/tablesdb/update-string-column.md b/examples/2.3.x/server-dotnet/examples/tablesdb/update-string-column.md index bf0849e2f..eccf91174 100644 --- a/examples/2.3.x/server-dotnet/examples/tablesdb/update-string-column.md +++ b/examples/2.3.x/server-dotnet/examples/tablesdb/update-string-column.md @@ -10,7 +10,7 @@ Client client = new Client() TablesDB tablesDB = new TablesDB(client); -ColumnString result = await tablesDB.UpdateStringColumn( +Appwrite.Models.ColumnString result = await tablesDB.UpdateStringColumn( databaseId: "<DATABASE_ID>", tableId: "<TABLE_ID>", key: "<KEY>", diff --git a/examples/2.3.x/server-dotnet/examples/tablesdb/update-table.md b/examples/2.3.x/server-dotnet/examples/tablesdb/update-table.md index e7a228214..d3547d917 100644 --- a/examples/2.3.x/server-dotnet/examples/tablesdb/update-table.md +++ b/examples/2.3.x/server-dotnet/examples/tablesdb/update-table.md @@ -10,7 +10,7 @@ Client client = new Client() TablesDB tablesDB = new TablesDB(client); -Table result = await tablesDB.UpdateTable( +Appwrite.Models.Table result = await tablesDB.UpdateTable( databaseId: "<DATABASE_ID>", tableId: "<TABLE_ID>", name: "<NAME>", // optional diff --git a/examples/2.3.x/server-dotnet/examples/tablesdb/update-text-column.md b/examples/2.3.x/server-dotnet/examples/tablesdb/update-text-column.md index 0ee26e042..c2f9e0646 100644 --- a/examples/2.3.x/server-dotnet/examples/tablesdb/update-text-column.md +++ b/examples/2.3.x/server-dotnet/examples/tablesdb/update-text-column.md @@ -10,7 +10,7 @@ Client client = new Client() TablesDB tablesDB = new TablesDB(client); -ColumnText result = await tablesDB.UpdateTextColumn( +Appwrite.Models.ColumnText result = await tablesDB.UpdateTextColumn( databaseId: "<DATABASE_ID>", tableId: "<TABLE_ID>", key: "<KEY>", diff --git a/examples/2.3.x/server-dotnet/examples/tablesdb/update-transaction.md b/examples/2.3.x/server-dotnet/examples/tablesdb/update-transaction.md index 2010f673b..a6e69526d 100644 --- a/examples/2.3.x/server-dotnet/examples/tablesdb/update-transaction.md +++ b/examples/2.3.x/server-dotnet/examples/tablesdb/update-transaction.md @@ -10,7 +10,7 @@ Client client = new Client() TablesDB tablesDB = new TablesDB(client); -Transaction result = await tablesDB.UpdateTransaction( +Appwrite.Models.Transaction result = await tablesDB.UpdateTransaction( transactionId: "<TRANSACTION_ID>", commit: false, // optional rollback: false // optional diff --git a/examples/2.3.x/server-dotnet/examples/tablesdb/update-url-column.md b/examples/2.3.x/server-dotnet/examples/tablesdb/update-url-column.md index f32ce01a6..c4c3d4d39 100644 --- a/examples/2.3.x/server-dotnet/examples/tablesdb/update-url-column.md +++ b/examples/2.3.x/server-dotnet/examples/tablesdb/update-url-column.md @@ -10,7 +10,7 @@ Client client = new Client() TablesDB tablesDB = new TablesDB(client); -ColumnUrl result = await tablesDB.UpdateUrlColumn( +Appwrite.Models.ColumnUrl result = await tablesDB.UpdateUrlColumn( databaseId: "<DATABASE_ID>", tableId: "<TABLE_ID>", key: "<KEY>", diff --git a/examples/2.3.x/server-dotnet/examples/tablesdb/update-varchar-column.md b/examples/2.3.x/server-dotnet/examples/tablesdb/update-varchar-column.md index 3cd1f9c09..914ddedf0 100644 --- a/examples/2.3.x/server-dotnet/examples/tablesdb/update-varchar-column.md +++ b/examples/2.3.x/server-dotnet/examples/tablesdb/update-varchar-column.md @@ -10,7 +10,7 @@ Client client = new Client() TablesDB tablesDB = new TablesDB(client); -ColumnVarchar result = await tablesDB.UpdateVarcharColumn( +Appwrite.Models.ColumnVarchar result = await tablesDB.UpdateVarcharColumn( databaseId: "<DATABASE_ID>", tableId: "<TABLE_ID>", key: "<KEY>", diff --git a/examples/2.3.x/server-dotnet/examples/tablesdb/update.md b/examples/2.3.x/server-dotnet/examples/tablesdb/update.md index 8b28a996e..009afcdf0 100644 --- a/examples/2.3.x/server-dotnet/examples/tablesdb/update.md +++ b/examples/2.3.x/server-dotnet/examples/tablesdb/update.md @@ -10,7 +10,7 @@ Client client = new Client() TablesDB tablesDB = new TablesDB(client); -Database result = await tablesDB.Update( +Appwrite.Models.Database result = await tablesDB.Update( databaseId: "<DATABASE_ID>", name: "<NAME>", // optional enabled: false, // optional diff --git a/examples/2.3.x/server-dotnet/examples/tablesdb/upsert-row.md b/examples/2.3.x/server-dotnet/examples/tablesdb/upsert-row.md index ef38e305a..140e6be0a 100644 --- a/examples/2.3.x/server-dotnet/examples/tablesdb/upsert-row.md +++ b/examples/2.3.x/server-dotnet/examples/tablesdb/upsert-row.md @@ -10,7 +10,7 @@ Client client = new Client() TablesDB tablesDB = new TablesDB(client); -Row result = await tablesDB.UpsertRow( +Appwrite.Models.Row result = await tablesDB.UpsertRow( databaseId: "<DATABASE_ID>", tableId: "<TABLE_ID>", rowId: "<ROW_ID>", diff --git a/examples/2.3.x/server-dotnet/examples/tablesdb/upsert-rows.md b/examples/2.3.x/server-dotnet/examples/tablesdb/upsert-rows.md index 41d3bcd8c..a4809e55f 100644 --- a/examples/2.3.x/server-dotnet/examples/tablesdb/upsert-rows.md +++ b/examples/2.3.x/server-dotnet/examples/tablesdb/upsert-rows.md @@ -10,10 +10,19 @@ Client client = new Client() TablesDB tablesDB = new TablesDB(client); -RowList result = await tablesDB.UpsertRows( +Appwrite.Models.RowList result = await tablesDB.UpsertRows( databaseId: "<DATABASE_ID>", tableId: "<TABLE_ID>", - rows: new List<object>(), + rows: [ + { + "$id": "example1", + "username": "walter.obrien", + "email": "walter.obrien@example.com", + "fullName": "Walter O'Brien", + "age": 30, + "isAdmin": false + } + ], transactionId: "<TRANSACTION_ID>" // optional ); diff --git a/examples/2.3.x/server-dotnet/examples/teams/create-installation.md b/examples/2.3.x/server-dotnet/examples/teams/create-installation.md index 217d0a239..3c64b386e 100644 --- a/examples/2.3.x/server-dotnet/examples/teams/create-installation.md +++ b/examples/2.3.x/server-dotnet/examples/teams/create-installation.md @@ -10,7 +10,7 @@ Client client = new Client() Teams teams = new Teams(client); -AppInstallation result = await teams.CreateInstallation( +Appwrite.Models.AppInstallation result = await teams.CreateInstallation( teamId: "<TEAM_ID>", appId: "<APP_ID>", authorizationDetails: "<AUTHORIZATION_DETAILS>" // optional diff --git a/examples/2.3.x/server-dotnet/examples/teams/create-membership.md b/examples/2.3.x/server-dotnet/examples/teams/create-membership.md index 1092050b5..b8a2f4d2f 100644 --- a/examples/2.3.x/server-dotnet/examples/teams/create-membership.md +++ b/examples/2.3.x/server-dotnet/examples/teams/create-membership.md @@ -10,9 +10,9 @@ Client client = new Client() Teams teams = new Teams(client); -Membership result = await teams.CreateMembership( +Appwrite.Models.Membership result = await teams.CreateMembership( teamId: "<TEAM_ID>", - roles: new List<string>(), + roles: ["editor"], email: "email@example.com", // optional userId: "<USER_ID>", // optional phone: "+12065550100", // optional diff --git a/examples/2.3.x/server-dotnet/examples/teams/create.md b/examples/2.3.x/server-dotnet/examples/teams/create.md index fdc1e09cb..e98326468 100644 --- a/examples/2.3.x/server-dotnet/examples/teams/create.md +++ b/examples/2.3.x/server-dotnet/examples/teams/create.md @@ -10,7 +10,7 @@ Client client = new Client() Teams teams = new Teams(client); -Team result = await teams.Create( +Appwrite.Models.Team result = await teams.Create( teamId: "<TEAM_ID>", name: "<NAME>", roles: new List<string>() // optional diff --git a/examples/2.3.x/server-dotnet/examples/teams/get-installation.md b/examples/2.3.x/server-dotnet/examples/teams/get-installation.md index e23c47819..823874423 100644 --- a/examples/2.3.x/server-dotnet/examples/teams/get-installation.md +++ b/examples/2.3.x/server-dotnet/examples/teams/get-installation.md @@ -10,7 +10,7 @@ Client client = new Client() Teams teams = new Teams(client); -AppInstallation result = await teams.GetInstallation( +Appwrite.Models.AppInstallation result = await teams.GetInstallation( teamId: "<TEAM_ID>", installationId: "<INSTALLATION_ID>" ); diff --git a/examples/2.3.x/server-dotnet/examples/teams/get-membership.md b/examples/2.3.x/server-dotnet/examples/teams/get-membership.md index f359df1a6..dff88aa99 100644 --- a/examples/2.3.x/server-dotnet/examples/teams/get-membership.md +++ b/examples/2.3.x/server-dotnet/examples/teams/get-membership.md @@ -10,7 +10,7 @@ Client client = new Client() Teams teams = new Teams(client); -Membership result = await teams.GetMembership( +Appwrite.Models.Membership result = await teams.GetMembership( teamId: "<TEAM_ID>", membershipId: "<MEMBERSHIP_ID>" ); diff --git a/examples/2.3.x/server-dotnet/examples/teams/get-prefs.md b/examples/2.3.x/server-dotnet/examples/teams/get-prefs.md index 95a8c2880..a1b408d27 100644 --- a/examples/2.3.x/server-dotnet/examples/teams/get-prefs.md +++ b/examples/2.3.x/server-dotnet/examples/teams/get-prefs.md @@ -10,7 +10,7 @@ Client client = new Client() Teams teams = new Teams(client); -Preferences result = await teams.GetPrefs( +Appwrite.Models.Preferences result = await teams.GetPrefs( teamId: "<TEAM_ID>" ); diff --git a/examples/2.3.x/server-dotnet/examples/teams/get.md b/examples/2.3.x/server-dotnet/examples/teams/get.md index 900d932d5..d93d5fdca 100644 --- a/examples/2.3.x/server-dotnet/examples/teams/get.md +++ b/examples/2.3.x/server-dotnet/examples/teams/get.md @@ -10,7 +10,7 @@ Client client = new Client() Teams teams = new Teams(client); -Team result = await teams.Get( +Appwrite.Models.Team result = await teams.Get( teamId: "<TEAM_ID>" ); diff --git a/examples/2.3.x/server-dotnet/examples/teams/list-installations.md b/examples/2.3.x/server-dotnet/examples/teams/list-installations.md index 133f4278b..3c8ff9c30 100644 --- a/examples/2.3.x/server-dotnet/examples/teams/list-installations.md +++ b/examples/2.3.x/server-dotnet/examples/teams/list-installations.md @@ -10,7 +10,7 @@ Client client = new Client() Teams teams = new Teams(client); -AppInstallationList result = await teams.ListInstallations( +Appwrite.Models.AppInstallationList result = await teams.ListInstallations( teamId: "<TEAM_ID>", queries: new List<string>(), // optional total: false // optional diff --git a/examples/2.3.x/server-dotnet/examples/teams/list-memberships.md b/examples/2.3.x/server-dotnet/examples/teams/list-memberships.md index 64c25747f..bd070ae77 100644 --- a/examples/2.3.x/server-dotnet/examples/teams/list-memberships.md +++ b/examples/2.3.x/server-dotnet/examples/teams/list-memberships.md @@ -10,7 +10,7 @@ Client client = new Client() Teams teams = new Teams(client); -MembershipList result = await teams.ListMemberships( +Appwrite.Models.MembershipList result = await teams.ListMemberships( teamId: "<TEAM_ID>", queries: new List<string>(), // optional search: "<SEARCH>", // optional diff --git a/examples/2.3.x/server-dotnet/examples/teams/list.md b/examples/2.3.x/server-dotnet/examples/teams/list.md index 571c86634..f52c61c54 100644 --- a/examples/2.3.x/server-dotnet/examples/teams/list.md +++ b/examples/2.3.x/server-dotnet/examples/teams/list.md @@ -10,7 +10,7 @@ Client client = new Client() Teams teams = new Teams(client); -TeamList result = await teams.List( +Appwrite.Models.TeamList result = await teams.List( queries: new List<string>(), // optional search: "<SEARCH>", // optional total: false // optional diff --git a/examples/2.3.x/server-dotnet/examples/teams/update-installation.md b/examples/2.3.x/server-dotnet/examples/teams/update-installation.md index 7fa98101e..57913d698 100644 --- a/examples/2.3.x/server-dotnet/examples/teams/update-installation.md +++ b/examples/2.3.x/server-dotnet/examples/teams/update-installation.md @@ -10,7 +10,7 @@ Client client = new Client() Teams teams = new Teams(client); -AppInstallation result = await teams.UpdateInstallation( +Appwrite.Models.AppInstallation result = await teams.UpdateInstallation( teamId: "<TEAM_ID>", installationId: "<INSTALLATION_ID>", authorizationDetails: "<AUTHORIZATION_DETAILS>" // optional diff --git a/examples/2.3.x/server-dotnet/examples/teams/update-membership-status.md b/examples/2.3.x/server-dotnet/examples/teams/update-membership-status.md index 1f172dab3..ee4b89714 100644 --- a/examples/2.3.x/server-dotnet/examples/teams/update-membership-status.md +++ b/examples/2.3.x/server-dotnet/examples/teams/update-membership-status.md @@ -10,7 +10,7 @@ Client client = new Client() Teams teams = new Teams(client); -Membership result = await teams.UpdateMembershipStatus( +Appwrite.Models.Membership result = await teams.UpdateMembershipStatus( teamId: "<TEAM_ID>", membershipId: "<MEMBERSHIP_ID>", userId: "<USER_ID>", diff --git a/examples/2.3.x/server-dotnet/examples/teams/update-membership.md b/examples/2.3.x/server-dotnet/examples/teams/update-membership.md index ff4ad455e..64c95d630 100644 --- a/examples/2.3.x/server-dotnet/examples/teams/update-membership.md +++ b/examples/2.3.x/server-dotnet/examples/teams/update-membership.md @@ -10,10 +10,10 @@ Client client = new Client() Teams teams = new Teams(client); -Membership result = await teams.UpdateMembership( +Appwrite.Models.Membership result = await teams.UpdateMembership( teamId: "<TEAM_ID>", membershipId: "<MEMBERSHIP_ID>", - roles: new List<string>() + roles: ["editor"] ); ``` diff --git a/examples/2.3.x/server-dotnet/examples/teams/update-name.md b/examples/2.3.x/server-dotnet/examples/teams/update-name.md index 6f42ce5cb..776b38b74 100644 --- a/examples/2.3.x/server-dotnet/examples/teams/update-name.md +++ b/examples/2.3.x/server-dotnet/examples/teams/update-name.md @@ -10,7 +10,7 @@ Client client = new Client() Teams teams = new Teams(client); -Team result = await teams.UpdateName( +Appwrite.Models.Team result = await teams.UpdateName( teamId: "<TEAM_ID>", name: "<NAME>" ); diff --git a/examples/2.3.x/server-dotnet/examples/teams/update-prefs.md b/examples/2.3.x/server-dotnet/examples/teams/update-prefs.md index b2dbac7ac..698f669ab 100644 --- a/examples/2.3.x/server-dotnet/examples/teams/update-prefs.md +++ b/examples/2.3.x/server-dotnet/examples/teams/update-prefs.md @@ -10,7 +10,7 @@ Client client = new Client() Teams teams = new Teams(client); -Preferences result = await teams.UpdatePrefs( +Appwrite.Models.Preferences result = await teams.UpdatePrefs( teamId: "<TEAM_ID>", prefs: [object] ); diff --git a/examples/2.3.x/server-dotnet/examples/tokens/create-file-token.md b/examples/2.3.x/server-dotnet/examples/tokens/create-file-token.md index baf4c376e..04053fe9b 100644 --- a/examples/2.3.x/server-dotnet/examples/tokens/create-file-token.md +++ b/examples/2.3.x/server-dotnet/examples/tokens/create-file-token.md @@ -10,7 +10,7 @@ Client client = new Client() Tokens tokens = new Tokens(client); -ResourceToken result = await tokens.CreateFileToken( +Appwrite.Models.ResourceToken result = await tokens.CreateFileToken( bucketId: "<BUCKET_ID>", fileId: "<FILE_ID>", expire: "2020-10-15T06:38:00.000+00:00" // optional diff --git a/examples/2.3.x/server-dotnet/examples/tokens/get.md b/examples/2.3.x/server-dotnet/examples/tokens/get.md index 5466ae879..6884921bf 100644 --- a/examples/2.3.x/server-dotnet/examples/tokens/get.md +++ b/examples/2.3.x/server-dotnet/examples/tokens/get.md @@ -10,7 +10,7 @@ Client client = new Client() Tokens tokens = new Tokens(client); -ResourceToken result = await tokens.Get( +Appwrite.Models.ResourceToken result = await tokens.Get( tokenId: "<TOKEN_ID>" ); diff --git a/examples/2.3.x/server-dotnet/examples/tokens/list.md b/examples/2.3.x/server-dotnet/examples/tokens/list.md index 45e027d49..bd9476d95 100644 --- a/examples/2.3.x/server-dotnet/examples/tokens/list.md +++ b/examples/2.3.x/server-dotnet/examples/tokens/list.md @@ -10,7 +10,7 @@ Client client = new Client() Tokens tokens = new Tokens(client); -ResourceTokenList result = await tokens.List( +Appwrite.Models.ResourceTokenList result = await tokens.List( bucketId: "<BUCKET_ID>", fileId: "<FILE_ID>", queries: new List<string>(), // optional diff --git a/examples/2.3.x/server-dotnet/examples/tokens/update.md b/examples/2.3.x/server-dotnet/examples/tokens/update.md index 041dce974..67d0f3bd9 100644 --- a/examples/2.3.x/server-dotnet/examples/tokens/update.md +++ b/examples/2.3.x/server-dotnet/examples/tokens/update.md @@ -10,7 +10,7 @@ Client client = new Client() Tokens tokens = new Tokens(client); -ResourceToken result = await tokens.Update( +Appwrite.Models.ResourceToken result = await tokens.Update( tokenId: "<TOKEN_ID>", expire: "2020-10-15T06:38:00.000+00:00" // optional ); diff --git a/examples/2.3.x/server-dotnet/examples/users/create-argon-2-user.md b/examples/2.3.x/server-dotnet/examples/users/create-argon-2-user.md index 6c4ba6355..88d448431 100644 --- a/examples/2.3.x/server-dotnet/examples/users/create-argon-2-user.md +++ b/examples/2.3.x/server-dotnet/examples/users/create-argon-2-user.md @@ -10,7 +10,7 @@ Client client = new Client() Users users = new Users(client); -User result = await users.CreateArgon2User( +Appwrite.Models.User result = await users.CreateArgon2User( userId: "<USER_ID>", email: "email@example.com", password: "password", diff --git a/examples/2.3.x/server-dotnet/examples/users/create-bcrypt-user.md b/examples/2.3.x/server-dotnet/examples/users/create-bcrypt-user.md index d4a70e5bd..d32cff5fd 100644 --- a/examples/2.3.x/server-dotnet/examples/users/create-bcrypt-user.md +++ b/examples/2.3.x/server-dotnet/examples/users/create-bcrypt-user.md @@ -10,7 +10,7 @@ Client client = new Client() Users users = new Users(client); -User result = await users.CreateBcryptUser( +Appwrite.Models.User result = await users.CreateBcryptUser( userId: "<USER_ID>", email: "email@example.com", password: "password", diff --git a/examples/2.3.x/server-dotnet/examples/users/create-jwt.md b/examples/2.3.x/server-dotnet/examples/users/create-jwt.md index 0841f4eaf..890bab426 100644 --- a/examples/2.3.x/server-dotnet/examples/users/create-jwt.md +++ b/examples/2.3.x/server-dotnet/examples/users/create-jwt.md @@ -10,7 +10,7 @@ Client client = new Client() Users users = new Users(client); -JWT result = await users.CreateJWT( +Appwrite.Models.JWT result = await users.CreateJWT( userId: "<USER_ID>", sessionId: "recent()", // optional duration: 0 // optional diff --git a/examples/2.3.x/server-dotnet/examples/users/create-md-5-user.md b/examples/2.3.x/server-dotnet/examples/users/create-md-5-user.md index 268257113..6f3c8eae3 100644 --- a/examples/2.3.x/server-dotnet/examples/users/create-md-5-user.md +++ b/examples/2.3.x/server-dotnet/examples/users/create-md-5-user.md @@ -10,7 +10,7 @@ Client client = new Client() Users users = new Users(client); -User result = await users.CreateMD5User( +Appwrite.Models.User result = await users.CreateMD5User( userId: "<USER_ID>", email: "email@example.com", password: "password", diff --git a/examples/2.3.x/server-dotnet/examples/users/create-mfa-recovery-codes.md b/examples/2.3.x/server-dotnet/examples/users/create-mfa-recovery-codes.md index 02a34ab97..901ba3fb6 100644 --- a/examples/2.3.x/server-dotnet/examples/users/create-mfa-recovery-codes.md +++ b/examples/2.3.x/server-dotnet/examples/users/create-mfa-recovery-codes.md @@ -10,7 +10,7 @@ Client client = new Client() Users users = new Users(client); -MfaRecoveryCodes result = await users.CreateMFARecoveryCodes( +Appwrite.Models.MfaRecoveryCodes result = await users.CreateMFARecoveryCodes( userId: "<USER_ID>" ); diff --git a/examples/2.3.x/server-dotnet/examples/users/create-ph-pass-user.md b/examples/2.3.x/server-dotnet/examples/users/create-ph-pass-user.md index efcc9f273..77ebe01b0 100644 --- a/examples/2.3.x/server-dotnet/examples/users/create-ph-pass-user.md +++ b/examples/2.3.x/server-dotnet/examples/users/create-ph-pass-user.md @@ -10,7 +10,7 @@ Client client = new Client() Users users = new Users(client); -User result = await users.CreatePHPassUser( +Appwrite.Models.User result = await users.CreatePHPassUser( userId: "<USER_ID>", email: "email@example.com", password: "password", diff --git a/examples/2.3.x/server-dotnet/examples/users/create-scrypt-modified-user.md b/examples/2.3.x/server-dotnet/examples/users/create-scrypt-modified-user.md index 687282b20..8b3becb8c 100644 --- a/examples/2.3.x/server-dotnet/examples/users/create-scrypt-modified-user.md +++ b/examples/2.3.x/server-dotnet/examples/users/create-scrypt-modified-user.md @@ -10,7 +10,7 @@ Client client = new Client() Users users = new Users(client); -User result = await users.CreateScryptModifiedUser( +Appwrite.Models.User result = await users.CreateScryptModifiedUser( userId: "<USER_ID>", email: "email@example.com", password: "password", diff --git a/examples/2.3.x/server-dotnet/examples/users/create-scrypt-user.md b/examples/2.3.x/server-dotnet/examples/users/create-scrypt-user.md index ee7e61a12..1560c7be8 100644 --- a/examples/2.3.x/server-dotnet/examples/users/create-scrypt-user.md +++ b/examples/2.3.x/server-dotnet/examples/users/create-scrypt-user.md @@ -10,7 +10,7 @@ Client client = new Client() Users users = new Users(client); -User result = await users.CreateScryptUser( +Appwrite.Models.User result = await users.CreateScryptUser( userId: "<USER_ID>", email: "email@example.com", password: "password", diff --git a/examples/2.3.x/server-dotnet/examples/users/create-session.md b/examples/2.3.x/server-dotnet/examples/users/create-session.md index 5ca7121fb..03c23a0ea 100644 --- a/examples/2.3.x/server-dotnet/examples/users/create-session.md +++ b/examples/2.3.x/server-dotnet/examples/users/create-session.md @@ -10,7 +10,7 @@ Client client = new Client() Users users = new Users(client); -Session result = await users.CreateSession( +Appwrite.Models.Session result = await users.CreateSession( userId: "<USER_ID>" ); diff --git a/examples/2.3.x/server-dotnet/examples/users/create-sha-user.md b/examples/2.3.x/server-dotnet/examples/users/create-sha-user.md index 8dd3a160c..dcb8f750d 100644 --- a/examples/2.3.x/server-dotnet/examples/users/create-sha-user.md +++ b/examples/2.3.x/server-dotnet/examples/users/create-sha-user.md @@ -11,7 +11,7 @@ Client client = new Client() Users users = new Users(client); -User result = await users.CreateSHAUser( +Appwrite.Models.User result = await users.CreateSHAUser( userId: "<USER_ID>", email: "email@example.com", password: "password", diff --git a/examples/2.3.x/server-dotnet/examples/users/create-target.md b/examples/2.3.x/server-dotnet/examples/users/create-target.md index 281996df0..aaccc3654 100644 --- a/examples/2.3.x/server-dotnet/examples/users/create-target.md +++ b/examples/2.3.x/server-dotnet/examples/users/create-target.md @@ -11,7 +11,7 @@ Client client = new Client() Users users = new Users(client); -Target result = await users.CreateTarget( +Appwrite.Models.Target result = await users.CreateTarget( userId: "<USER_ID>", targetId: "<TARGET_ID>", providerType: MessagingProviderType.Email, diff --git a/examples/2.3.x/server-dotnet/examples/users/create-token.md b/examples/2.3.x/server-dotnet/examples/users/create-token.md index 3d9293469..1cf1954f2 100644 --- a/examples/2.3.x/server-dotnet/examples/users/create-token.md +++ b/examples/2.3.x/server-dotnet/examples/users/create-token.md @@ -10,7 +10,7 @@ Client client = new Client() Users users = new Users(client); -Token result = await users.CreateToken( +Appwrite.Models.Token result = await users.CreateToken( userId: "<USER_ID>", length: 4, // optional expire: 60 // optional diff --git a/examples/2.3.x/server-dotnet/examples/users/create.md b/examples/2.3.x/server-dotnet/examples/users/create.md index fb2a8095a..b29233f8b 100644 --- a/examples/2.3.x/server-dotnet/examples/users/create.md +++ b/examples/2.3.x/server-dotnet/examples/users/create.md @@ -10,7 +10,7 @@ Client client = new Client() Users users = new Users(client); -User result = await users.Create( +Appwrite.Models.User result = await users.Create( userId: "<USER_ID>", email: "email@example.com", // optional phone: "+12065550100", // optional diff --git a/examples/2.3.x/server-dotnet/examples/users/get-mfa-challenge.md b/examples/2.3.x/server-dotnet/examples/users/get-mfa-challenge.md index 98f2131b3..0562758d8 100644 --- a/examples/2.3.x/server-dotnet/examples/users/get-mfa-challenge.md +++ b/examples/2.3.x/server-dotnet/examples/users/get-mfa-challenge.md @@ -10,7 +10,7 @@ Client client = new Client() Users users = new Users(client); -MfaChallengeSecret result = await users.GetMFAChallenge( +Appwrite.Models.MfaChallengeSecret result = await users.GetMFAChallenge( userId: "<USER_ID>", challengeId: "<CHALLENGE_ID>" ); diff --git a/examples/2.3.x/server-dotnet/examples/users/get-mfa-recovery-codes.md b/examples/2.3.x/server-dotnet/examples/users/get-mfa-recovery-codes.md index b2c1e98a1..e26e67037 100644 --- a/examples/2.3.x/server-dotnet/examples/users/get-mfa-recovery-codes.md +++ b/examples/2.3.x/server-dotnet/examples/users/get-mfa-recovery-codes.md @@ -10,7 +10,7 @@ Client client = new Client() Users users = new Users(client); -MfaRecoveryCodes result = await users.GetMFARecoveryCodes( +Appwrite.Models.MfaRecoveryCodes result = await users.GetMFARecoveryCodes( userId: "<USER_ID>" ); diff --git a/examples/2.3.x/server-dotnet/examples/users/get-prefs.md b/examples/2.3.x/server-dotnet/examples/users/get-prefs.md index 70f55411f..e6a0784cf 100644 --- a/examples/2.3.x/server-dotnet/examples/users/get-prefs.md +++ b/examples/2.3.x/server-dotnet/examples/users/get-prefs.md @@ -10,7 +10,7 @@ Client client = new Client() Users users = new Users(client); -Preferences result = await users.GetPrefs( +Appwrite.Models.Preferences result = await users.GetPrefs( userId: "<USER_ID>" ); diff --git a/examples/2.3.x/server-dotnet/examples/users/get-target.md b/examples/2.3.x/server-dotnet/examples/users/get-target.md index 3011e5699..65f3eca6f 100644 --- a/examples/2.3.x/server-dotnet/examples/users/get-target.md +++ b/examples/2.3.x/server-dotnet/examples/users/get-target.md @@ -10,7 +10,7 @@ Client client = new Client() Users users = new Users(client); -Target result = await users.GetTarget( +Appwrite.Models.Target result = await users.GetTarget( userId: "<USER_ID>", targetId: "<TARGET_ID>" ); diff --git a/examples/2.3.x/server-dotnet/examples/users/get.md b/examples/2.3.x/server-dotnet/examples/users/get.md index 047ed83cb..69c184414 100644 --- a/examples/2.3.x/server-dotnet/examples/users/get.md +++ b/examples/2.3.x/server-dotnet/examples/users/get.md @@ -10,7 +10,7 @@ Client client = new Client() Users users = new Users(client); -User result = await users.Get( +Appwrite.Models.User result = await users.Get( userId: "<USER_ID>" ); diff --git a/examples/2.3.x/server-dotnet/examples/users/list-identities.md b/examples/2.3.x/server-dotnet/examples/users/list-identities.md index 08ee96bdb..d5a501a9d 100644 --- a/examples/2.3.x/server-dotnet/examples/users/list-identities.md +++ b/examples/2.3.x/server-dotnet/examples/users/list-identities.md @@ -10,7 +10,7 @@ Client client = new Client() Users users = new Users(client); -IdentityList result = await users.ListIdentities( +Appwrite.Models.IdentityList result = await users.ListIdentities( queries: new List<string>(), // optional search: "<SEARCH>", // optional total: false // optional diff --git a/examples/2.3.x/server-dotnet/examples/users/list-memberships.md b/examples/2.3.x/server-dotnet/examples/users/list-memberships.md index ad3e77a29..ddac4f9d7 100644 --- a/examples/2.3.x/server-dotnet/examples/users/list-memberships.md +++ b/examples/2.3.x/server-dotnet/examples/users/list-memberships.md @@ -10,7 +10,7 @@ Client client = new Client() Users users = new Users(client); -MembershipList result = await users.ListMemberships( +Appwrite.Models.MembershipList result = await users.ListMemberships( userId: "<USER_ID>", queries: new List<string>(), // optional search: "<SEARCH>", // optional diff --git a/examples/2.3.x/server-dotnet/examples/users/list-mfa-factors.md b/examples/2.3.x/server-dotnet/examples/users/list-mfa-factors.md index c1f7365e8..4522f6308 100644 --- a/examples/2.3.x/server-dotnet/examples/users/list-mfa-factors.md +++ b/examples/2.3.x/server-dotnet/examples/users/list-mfa-factors.md @@ -10,7 +10,7 @@ Client client = new Client() Users users = new Users(client); -MfaFactors result = await users.ListMFAFactors( +Appwrite.Models.MfaFactors result = await users.ListMFAFactors( userId: "<USER_ID>" ); diff --git a/examples/2.3.x/server-dotnet/examples/users/list-sessions.md b/examples/2.3.x/server-dotnet/examples/users/list-sessions.md index 495939567..1a0510bb4 100644 --- a/examples/2.3.x/server-dotnet/examples/users/list-sessions.md +++ b/examples/2.3.x/server-dotnet/examples/users/list-sessions.md @@ -10,7 +10,7 @@ Client client = new Client() Users users = new Users(client); -SessionList result = await users.ListSessions( +Appwrite.Models.SessionList result = await users.ListSessions( userId: "<USER_ID>", total: false // optional ); diff --git a/examples/2.3.x/server-dotnet/examples/users/list-targets.md b/examples/2.3.x/server-dotnet/examples/users/list-targets.md index d867b06f0..3e0c0084b 100644 --- a/examples/2.3.x/server-dotnet/examples/users/list-targets.md +++ b/examples/2.3.x/server-dotnet/examples/users/list-targets.md @@ -10,7 +10,7 @@ Client client = new Client() Users users = new Users(client); -TargetList result = await users.ListTargets( +Appwrite.Models.TargetList result = await users.ListTargets( userId: "<USER_ID>", queries: new List<string>(), // optional total: false // optional diff --git a/examples/2.3.x/server-dotnet/examples/users/list.md b/examples/2.3.x/server-dotnet/examples/users/list.md index 8f0ad9d5e..e4ecf8c9c 100644 --- a/examples/2.3.x/server-dotnet/examples/users/list.md +++ b/examples/2.3.x/server-dotnet/examples/users/list.md @@ -10,7 +10,7 @@ Client client = new Client() Users users = new Users(client); -UserList result = await users.List( +Appwrite.Models.UserList result = await users.List( queries: new List<string>(), // optional search: "<SEARCH>", // optional total: false // optional diff --git a/examples/2.3.x/server-dotnet/examples/users/update-email-verification.md b/examples/2.3.x/server-dotnet/examples/users/update-email-verification.md index 0f6233c38..886722b11 100644 --- a/examples/2.3.x/server-dotnet/examples/users/update-email-verification.md +++ b/examples/2.3.x/server-dotnet/examples/users/update-email-verification.md @@ -10,7 +10,7 @@ Client client = new Client() Users users = new Users(client); -User result = await users.UpdateEmailVerification( +Appwrite.Models.User result = await users.UpdateEmailVerification( userId: "<USER_ID>", emailVerification: false ); diff --git a/examples/2.3.x/server-dotnet/examples/users/update-email.md b/examples/2.3.x/server-dotnet/examples/users/update-email.md index be7bc521e..4a90b7e58 100644 --- a/examples/2.3.x/server-dotnet/examples/users/update-email.md +++ b/examples/2.3.x/server-dotnet/examples/users/update-email.md @@ -10,7 +10,7 @@ Client client = new Client() Users users = new Users(client); -User result = await users.UpdateEmail( +Appwrite.Models.User result = await users.UpdateEmail( userId: "<USER_ID>", email: "email@example.com" ); diff --git a/examples/2.3.x/server-dotnet/examples/users/update-impersonator.md b/examples/2.3.x/server-dotnet/examples/users/update-impersonator.md index 91d94e783..afdad7ffb 100644 --- a/examples/2.3.x/server-dotnet/examples/users/update-impersonator.md +++ b/examples/2.3.x/server-dotnet/examples/users/update-impersonator.md @@ -10,7 +10,7 @@ Client client = new Client() Users users = new Users(client); -User result = await users.UpdateImpersonator( +Appwrite.Models.User result = await users.UpdateImpersonator( userId: "<USER_ID>", impersonator: false ); diff --git a/examples/2.3.x/server-dotnet/examples/users/update-labels.md b/examples/2.3.x/server-dotnet/examples/users/update-labels.md index f6c0b5547..e02a14e9b 100644 --- a/examples/2.3.x/server-dotnet/examples/users/update-labels.md +++ b/examples/2.3.x/server-dotnet/examples/users/update-labels.md @@ -10,9 +10,9 @@ Client client = new Client() Users users = new Users(client); -User result = await users.UpdateLabels( +Appwrite.Models.User result = await users.UpdateLabels( userId: "<USER_ID>", - labels: new List<string>() + labels: ["subscriber"] ); ``` diff --git a/examples/2.3.x/server-dotnet/examples/users/update-mfa-recovery-codes.md b/examples/2.3.x/server-dotnet/examples/users/update-mfa-recovery-codes.md index 78018690d..24dbd92fe 100644 --- a/examples/2.3.x/server-dotnet/examples/users/update-mfa-recovery-codes.md +++ b/examples/2.3.x/server-dotnet/examples/users/update-mfa-recovery-codes.md @@ -10,7 +10,7 @@ Client client = new Client() Users users = new Users(client); -MfaRecoveryCodes result = await users.UpdateMFARecoveryCodes( +Appwrite.Models.MfaRecoveryCodes result = await users.UpdateMFARecoveryCodes( userId: "<USER_ID>" ); diff --git a/examples/2.3.x/server-dotnet/examples/users/update-mfa.md b/examples/2.3.x/server-dotnet/examples/users/update-mfa.md index 4e51f9f1d..e5ae2daab 100644 --- a/examples/2.3.x/server-dotnet/examples/users/update-mfa.md +++ b/examples/2.3.x/server-dotnet/examples/users/update-mfa.md @@ -10,7 +10,7 @@ Client client = new Client() Users users = new Users(client); -User result = await users.UpdateMFA( +Appwrite.Models.User result = await users.UpdateMFA( userId: "<USER_ID>", mfa: false ); diff --git a/examples/2.3.x/server-dotnet/examples/users/update-name.md b/examples/2.3.x/server-dotnet/examples/users/update-name.md index 4a58aa860..e5b84cd56 100644 --- a/examples/2.3.x/server-dotnet/examples/users/update-name.md +++ b/examples/2.3.x/server-dotnet/examples/users/update-name.md @@ -10,7 +10,7 @@ Client client = new Client() Users users = new Users(client); -User result = await users.UpdateName( +Appwrite.Models.User result = await users.UpdateName( userId: "<USER_ID>", name: "<NAME>" ); diff --git a/examples/2.3.x/server-dotnet/examples/users/update-password.md b/examples/2.3.x/server-dotnet/examples/users/update-password.md index 4306cd73b..d9f355cc4 100644 --- a/examples/2.3.x/server-dotnet/examples/users/update-password.md +++ b/examples/2.3.x/server-dotnet/examples/users/update-password.md @@ -10,7 +10,7 @@ Client client = new Client() Users users = new Users(client); -User result = await users.UpdatePassword( +Appwrite.Models.User result = await users.UpdatePassword( userId: "<USER_ID>", password: "password" ); diff --git a/examples/2.3.x/server-dotnet/examples/users/update-phone-verification.md b/examples/2.3.x/server-dotnet/examples/users/update-phone-verification.md index 81fedf8a7..a0c73561f 100644 --- a/examples/2.3.x/server-dotnet/examples/users/update-phone-verification.md +++ b/examples/2.3.x/server-dotnet/examples/users/update-phone-verification.md @@ -10,7 +10,7 @@ Client client = new Client() Users users = new Users(client); -User result = await users.UpdatePhoneVerification( +Appwrite.Models.User result = await users.UpdatePhoneVerification( userId: "<USER_ID>", phoneVerification: false ); diff --git a/examples/2.3.x/server-dotnet/examples/users/update-phone.md b/examples/2.3.x/server-dotnet/examples/users/update-phone.md index de2a0723b..fdcb6a738 100644 --- a/examples/2.3.x/server-dotnet/examples/users/update-phone.md +++ b/examples/2.3.x/server-dotnet/examples/users/update-phone.md @@ -10,7 +10,7 @@ Client client = new Client() Users users = new Users(client); -User result = await users.UpdatePhone( +Appwrite.Models.User result = await users.UpdatePhone( userId: "<USER_ID>", number: "+12065550100" ); diff --git a/examples/2.3.x/server-dotnet/examples/users/update-prefs.md b/examples/2.3.x/server-dotnet/examples/users/update-prefs.md index db20bfc80..a4a6498ee 100644 --- a/examples/2.3.x/server-dotnet/examples/users/update-prefs.md +++ b/examples/2.3.x/server-dotnet/examples/users/update-prefs.md @@ -10,7 +10,7 @@ Client client = new Client() Users users = new Users(client); -Preferences result = await users.UpdatePrefs( +Appwrite.Models.Preferences result = await users.UpdatePrefs( userId: "<USER_ID>", prefs: [object] ); diff --git a/examples/2.3.x/server-dotnet/examples/users/update-status.md b/examples/2.3.x/server-dotnet/examples/users/update-status.md index bd9f4839c..1e4b2393c 100644 --- a/examples/2.3.x/server-dotnet/examples/users/update-status.md +++ b/examples/2.3.x/server-dotnet/examples/users/update-status.md @@ -10,7 +10,7 @@ Client client = new Client() Users users = new Users(client); -User result = await users.UpdateStatus( +Appwrite.Models.User result = await users.UpdateStatus( userId: "<USER_ID>", status: false ); diff --git a/examples/2.3.x/server-dotnet/examples/users/update-target.md b/examples/2.3.x/server-dotnet/examples/users/update-target.md index a2c184191..e6436b80f 100644 --- a/examples/2.3.x/server-dotnet/examples/users/update-target.md +++ b/examples/2.3.x/server-dotnet/examples/users/update-target.md @@ -10,7 +10,7 @@ Client client = new Client() Users users = new Users(client); -Target result = await users.UpdateTarget( +Appwrite.Models.Target result = await users.UpdateTarget( userId: "<USER_ID>", targetId: "<TARGET_ID>", identifier: "<IDENTIFIER>", // optional diff --git a/examples/2.3.x/server-dotnet/examples/vectorsdb/create-collection.md b/examples/2.3.x/server-dotnet/examples/vectorsdb/create-collection.md index b0cebcd40..4d7f5327b 100644 --- a/examples/2.3.x/server-dotnet/examples/vectorsdb/create-collection.md +++ b/examples/2.3.x/server-dotnet/examples/vectorsdb/create-collection.md @@ -10,11 +10,11 @@ Client client = new Client() VectorsDB vectorsDB = new VectorsDB(client); -VectorsdbCollection result = await vectorsDB.CreateCollection( +Appwrite.Models.VectorsdbCollection result = await vectorsDB.CreateCollection( databaseId: "<DATABASE_ID>", collectionId: "<COLLECTION_ID>", name: "<NAME>", - dimension: 1, + dimension: 4, permissions: new List<string> { Permission.Read(Role.Any()) }, // optional documentSecurity: false, // optional enabled: false // optional diff --git a/examples/2.3.x/server-dotnet/examples/vectorsdb/create-document.md b/examples/2.3.x/server-dotnet/examples/vectorsdb/create-document.md index 54260d78d..c197e8a9e 100644 --- a/examples/2.3.x/server-dotnet/examples/vectorsdb/create-document.md +++ b/examples/2.3.x/server-dotnet/examples/vectorsdb/create-document.md @@ -10,7 +10,7 @@ Client client = new Client() VectorsDB vectorsDB = new VectorsDB(client); -Document result = await vectorsDB.CreateDocument( +Appwrite.Models.Document result = await vectorsDB.CreateDocument( databaseId: "<DATABASE_ID>", collectionId: "<COLLECTION_ID>", documentId: "<DOCUMENT_ID>", diff --git a/examples/2.3.x/server-dotnet/examples/vectorsdb/create-documents.md b/examples/2.3.x/server-dotnet/examples/vectorsdb/create-documents.md index af00ea000..39ba7fb3b 100644 --- a/examples/2.3.x/server-dotnet/examples/vectorsdb/create-documents.md +++ b/examples/2.3.x/server-dotnet/examples/vectorsdb/create-documents.md @@ -10,10 +10,23 @@ Client client = new Client() VectorsDB vectorsDB = new VectorsDB(client); -DocumentList result = await vectorsDB.CreateDocuments( +Appwrite.Models.DocumentList result = await vectorsDB.CreateDocuments( databaseId: "<DATABASE_ID>", collectionId: "<COLLECTION_ID>", - documents: new List<object>(), + documents: [ + { + "$id": "example1", + "embeddings": [ + 0.12, + -0.55, + 0.88, + 1.02 + ], + "metadata": { + "name": "First document" + } + } + ], transactionId: "<TRANSACTION_ID>" // optional ); diff --git a/examples/2.3.x/server-dotnet/examples/vectorsdb/create-failover.md b/examples/2.3.x/server-dotnet/examples/vectorsdb/create-failover.md index dd50d8dc7..169af8eed 100644 --- a/examples/2.3.x/server-dotnet/examples/vectorsdb/create-failover.md +++ b/examples/2.3.x/server-dotnet/examples/vectorsdb/create-failover.md @@ -10,7 +10,7 @@ Client client = new Client() VectorsDB vectorsDB = new VectorsDB(client); -DedicatedDatabase result = await vectorsDB.CreateFailover( +Appwrite.Models.DedicatedDatabase result = await vectorsDB.CreateFailover( databaseId: "<DATABASE_ID>", targetReplicaId: "<TARGET_REPLICA_ID>" // optional ); diff --git a/examples/2.3.x/server-dotnet/examples/vectorsdb/create-index.md b/examples/2.3.x/server-dotnet/examples/vectorsdb/create-index.md index 5adac04cf..9e8032266 100644 --- a/examples/2.3.x/server-dotnet/examples/vectorsdb/create-index.md +++ b/examples/2.3.x/server-dotnet/examples/vectorsdb/create-index.md @@ -11,12 +11,12 @@ Client client = new Client() VectorsDB vectorsDB = new VectorsDB(client); -Index result = await vectorsDB.CreateIndex( +Appwrite.Models.Index result = await vectorsDB.CreateIndex( databaseId: "<DATABASE_ID>", collectionId: "<COLLECTION_ID>", key: "<KEY>", type: VectorsDBIndexType.HnswEuclidean, - attributes: new List<string>(), + attributes: ["embeddings"], orders: new List<OrderBy> { OrderBy.Asc }, // optional lengths: new List<long>() // optional ); diff --git a/examples/2.3.x/server-dotnet/examples/vectorsdb/create-operations.md b/examples/2.3.x/server-dotnet/examples/vectorsdb/create-operations.md index 346c7d247..0aea2b5db 100644 --- a/examples/2.3.x/server-dotnet/examples/vectorsdb/create-operations.md +++ b/examples/2.3.x/server-dotnet/examples/vectorsdb/create-operations.md @@ -10,7 +10,7 @@ Client client = new Client() VectorsDB vectorsDB = new VectorsDB(client); -Transaction result = await vectorsDB.CreateOperations( +Appwrite.Models.Transaction result = await vectorsDB.CreateOperations( transactionId: "<TRANSACTION_ID>", operations: [ { @@ -19,7 +19,15 @@ Transaction result = await vectorsDB.CreateOperations( "collectionId": "<COLLECTION_ID>", "documentId": "<DOCUMENT_ID>", "data": { - "name": "Walter O'Brien" + "embeddings": [ + 0.12, + -0.55, + 0.88, + 1.02 + ], + "metadata": { + "name": "First document" + } } } ] // optional diff --git a/examples/2.3.x/server-dotnet/examples/vectorsdb/create-query.md b/examples/2.3.x/server-dotnet/examples/vectorsdb/create-query.md index bcc28eda4..b09e0fa77 100644 --- a/examples/2.3.x/server-dotnet/examples/vectorsdb/create-query.md +++ b/examples/2.3.x/server-dotnet/examples/vectorsdb/create-query.md @@ -10,7 +10,7 @@ Client client = new Client() VectorsDB vectorsDB = new VectorsDB(client); -DocumentList result = await vectorsDB.CreateQuery( +Appwrite.Models.DocumentList result = await vectorsDB.CreateQuery( databaseId: "<DATABASE_ID>", collectionId: "<COLLECTION_ID>", queries: new List<string>(), // optional diff --git a/examples/2.3.x/server-dotnet/examples/vectorsdb/create-transaction.md b/examples/2.3.x/server-dotnet/examples/vectorsdb/create-transaction.md index 133e6bbdd..27cdbacf8 100644 --- a/examples/2.3.x/server-dotnet/examples/vectorsdb/create-transaction.md +++ b/examples/2.3.x/server-dotnet/examples/vectorsdb/create-transaction.md @@ -10,7 +10,7 @@ Client client = new Client() VectorsDB vectorsDB = new VectorsDB(client); -Transaction result = await vectorsDB.CreateTransaction( +Appwrite.Models.Transaction result = await vectorsDB.CreateTransaction( ttl: 60 // optional ); diff --git a/examples/2.3.x/server-dotnet/examples/vectorsdb/create.md b/examples/2.3.x/server-dotnet/examples/vectorsdb/create.md index 5ef6db08e..8783086b0 100644 --- a/examples/2.3.x/server-dotnet/examples/vectorsdb/create.md +++ b/examples/2.3.x/server-dotnet/examples/vectorsdb/create.md @@ -10,7 +10,7 @@ Client client = new Client() VectorsDB vectorsDB = new VectorsDB(client); -Database result = await vectorsDB.Create( +Appwrite.Models.Database result = await vectorsDB.Create( databaseId: "<DATABASE_ID>", name: "<NAME>", enabled: false, // optional diff --git a/examples/2.3.x/server-dotnet/examples/vectorsdb/delete-documents.md b/examples/2.3.x/server-dotnet/examples/vectorsdb/delete-documents.md index e7d21a4ba..3a75c78ab 100644 --- a/examples/2.3.x/server-dotnet/examples/vectorsdb/delete-documents.md +++ b/examples/2.3.x/server-dotnet/examples/vectorsdb/delete-documents.md @@ -13,7 +13,7 @@ VectorsDB vectorsDB = new VectorsDB(client); await vectorsDB.DeleteDocuments( databaseId: "<DATABASE_ID>", collectionId: "<COLLECTION_ID>", - queries: new List<string>(), // optional + queries: ["{\"method\":\"equal\", \"attribute\":\"$id\", \"values\":[\"<DOCUMENT_ID>\"]}"], // optional transactionId: "<TRANSACTION_ID>" // optional ); diff --git a/examples/2.3.x/server-dotnet/examples/vectorsdb/get-collection.md b/examples/2.3.x/server-dotnet/examples/vectorsdb/get-collection.md index 9111b7403..b0970dd7b 100644 --- a/examples/2.3.x/server-dotnet/examples/vectorsdb/get-collection.md +++ b/examples/2.3.x/server-dotnet/examples/vectorsdb/get-collection.md @@ -10,7 +10,7 @@ Client client = new Client() VectorsDB vectorsDB = new VectorsDB(client); -VectorsdbCollection result = await vectorsDB.GetCollection( +Appwrite.Models.VectorsdbCollection result = await vectorsDB.GetCollection( databaseId: "<DATABASE_ID>", collectionId: "<COLLECTION_ID>" ); diff --git a/examples/2.3.x/server-dotnet/examples/vectorsdb/get-document.md b/examples/2.3.x/server-dotnet/examples/vectorsdb/get-document.md index 98762a930..9c8388940 100644 --- a/examples/2.3.x/server-dotnet/examples/vectorsdb/get-document.md +++ b/examples/2.3.x/server-dotnet/examples/vectorsdb/get-document.md @@ -10,7 +10,7 @@ Client client = new Client() VectorsDB vectorsDB = new VectorsDB(client); -Document result = await vectorsDB.GetDocument( +Appwrite.Models.Document result = await vectorsDB.GetDocument( databaseId: "<DATABASE_ID>", collectionId: "<COLLECTION_ID>", documentId: "<DOCUMENT_ID>", diff --git a/examples/2.3.x/server-dotnet/examples/vectorsdb/get-index.md b/examples/2.3.x/server-dotnet/examples/vectorsdb/get-index.md index 6c2d1dfb4..3030531f9 100644 --- a/examples/2.3.x/server-dotnet/examples/vectorsdb/get-index.md +++ b/examples/2.3.x/server-dotnet/examples/vectorsdb/get-index.md @@ -10,7 +10,7 @@ Client client = new Client() VectorsDB vectorsDB = new VectorsDB(client); -Index result = await vectorsDB.GetIndex( +Appwrite.Models.Index result = await vectorsDB.GetIndex( databaseId: "<DATABASE_ID>", collectionId: "<COLLECTION_ID>", key: "<KEY>" diff --git a/examples/2.3.x/server-dotnet/examples/vectorsdb/get-replicas.md b/examples/2.3.x/server-dotnet/examples/vectorsdb/get-replicas.md index b1a849f37..e00254835 100644 --- a/examples/2.3.x/server-dotnet/examples/vectorsdb/get-replicas.md +++ b/examples/2.3.x/server-dotnet/examples/vectorsdb/get-replicas.md @@ -10,7 +10,7 @@ Client client = new Client() VectorsDB vectorsDB = new VectorsDB(client); -DedicatedDatabaseReplicas result = await vectorsDB.GetReplicas( +Appwrite.Models.DedicatedDatabaseReplicas result = await vectorsDB.GetReplicas( databaseId: "<DATABASE_ID>" ); diff --git a/examples/2.3.x/server-dotnet/examples/vectorsdb/get-status.md b/examples/2.3.x/server-dotnet/examples/vectorsdb/get-status.md index e019656db..5295da9e6 100644 --- a/examples/2.3.x/server-dotnet/examples/vectorsdb/get-status.md +++ b/examples/2.3.x/server-dotnet/examples/vectorsdb/get-status.md @@ -10,7 +10,7 @@ Client client = new Client() VectorsDB vectorsDB = new VectorsDB(client); -DatabaseStatus result = await vectorsDB.GetStatus( +Appwrite.Models.DatabaseStatus result = await vectorsDB.GetStatus( databaseId: "<DATABASE_ID>" ); diff --git a/examples/2.3.x/server-dotnet/examples/vectorsdb/get-transaction.md b/examples/2.3.x/server-dotnet/examples/vectorsdb/get-transaction.md index 4cd0b3fdd..382e02c31 100644 --- a/examples/2.3.x/server-dotnet/examples/vectorsdb/get-transaction.md +++ b/examples/2.3.x/server-dotnet/examples/vectorsdb/get-transaction.md @@ -10,7 +10,7 @@ Client client = new Client() VectorsDB vectorsDB = new VectorsDB(client); -Transaction result = await vectorsDB.GetTransaction( +Appwrite.Models.Transaction result = await vectorsDB.GetTransaction( transactionId: "<TRANSACTION_ID>" ); diff --git a/examples/2.3.x/server-dotnet/examples/vectorsdb/get.md b/examples/2.3.x/server-dotnet/examples/vectorsdb/get.md index 5b605e57c..e7725971f 100644 --- a/examples/2.3.x/server-dotnet/examples/vectorsdb/get.md +++ b/examples/2.3.x/server-dotnet/examples/vectorsdb/get.md @@ -10,7 +10,7 @@ Client client = new Client() VectorsDB vectorsDB = new VectorsDB(client); -Database result = await vectorsDB.Get( +Appwrite.Models.Database result = await vectorsDB.Get( databaseId: "<DATABASE_ID>" ); diff --git a/examples/2.3.x/server-dotnet/examples/vectorsdb/list-collections.md b/examples/2.3.x/server-dotnet/examples/vectorsdb/list-collections.md index 5e9f2737c..b69869327 100644 --- a/examples/2.3.x/server-dotnet/examples/vectorsdb/list-collections.md +++ b/examples/2.3.x/server-dotnet/examples/vectorsdb/list-collections.md @@ -10,7 +10,7 @@ Client client = new Client() VectorsDB vectorsDB = new VectorsDB(client); -VectorsdbCollectionList result = await vectorsDB.ListCollections( +Appwrite.Models.VectorsdbCollectionList result = await vectorsDB.ListCollections( databaseId: "<DATABASE_ID>", queries: new List<string>(), // optional search: "<SEARCH>", // optional diff --git a/examples/2.3.x/server-dotnet/examples/vectorsdb/list-documents.md b/examples/2.3.x/server-dotnet/examples/vectorsdb/list-documents.md index 934116732..64405f469 100644 --- a/examples/2.3.x/server-dotnet/examples/vectorsdb/list-documents.md +++ b/examples/2.3.x/server-dotnet/examples/vectorsdb/list-documents.md @@ -10,7 +10,7 @@ Client client = new Client() VectorsDB vectorsDB = new VectorsDB(client); -DocumentList result = await vectorsDB.ListDocuments( +Appwrite.Models.DocumentList result = await vectorsDB.ListDocuments( databaseId: "<DATABASE_ID>", collectionId: "<COLLECTION_ID>", queries: new List<string>(), // optional diff --git a/examples/2.3.x/server-dotnet/examples/vectorsdb/list-indexes.md b/examples/2.3.x/server-dotnet/examples/vectorsdb/list-indexes.md index acf0af7a4..accc8dee7 100644 --- a/examples/2.3.x/server-dotnet/examples/vectorsdb/list-indexes.md +++ b/examples/2.3.x/server-dotnet/examples/vectorsdb/list-indexes.md @@ -10,7 +10,7 @@ Client client = new Client() VectorsDB vectorsDB = new VectorsDB(client); -IndexList result = await vectorsDB.ListIndexes( +Appwrite.Models.IndexList result = await vectorsDB.ListIndexes( databaseId: "<DATABASE_ID>", collectionId: "<COLLECTION_ID>", queries: new List<string>(), // optional diff --git a/examples/2.3.x/server-dotnet/examples/vectorsdb/list-operations.md b/examples/2.3.x/server-dotnet/examples/vectorsdb/list-operations.md index 90a4327fc..7d700454b 100644 --- a/examples/2.3.x/server-dotnet/examples/vectorsdb/list-operations.md +++ b/examples/2.3.x/server-dotnet/examples/vectorsdb/list-operations.md @@ -10,7 +10,7 @@ Client client = new Client() VectorsDB vectorsDB = new VectorsDB(client); -DedicatedDatabaseOperationList result = await vectorsDB.ListOperations( +Appwrite.Models.DedicatedDatabaseOperationList result = await vectorsDB.ListOperations( databaseId: "<DATABASE_ID>", status: "queued", // optional limit: 1, // optional diff --git a/examples/2.3.x/server-dotnet/examples/vectorsdb/list-specifications.md b/examples/2.3.x/server-dotnet/examples/vectorsdb/list-specifications.md index 652d23243..906b8bfd6 100644 --- a/examples/2.3.x/server-dotnet/examples/vectorsdb/list-specifications.md +++ b/examples/2.3.x/server-dotnet/examples/vectorsdb/list-specifications.md @@ -10,7 +10,7 @@ Client client = new Client() VectorsDB vectorsDB = new VectorsDB(client); -DedicatedDatabaseSpecificationList result = await vectorsDB.ListSpecifications(); +Appwrite.Models.DedicatedDatabaseSpecificationList result = await vectorsDB.ListSpecifications(); ``` diff --git a/examples/2.3.x/server-dotnet/examples/vectorsdb/list-transactions.md b/examples/2.3.x/server-dotnet/examples/vectorsdb/list-transactions.md index 54ada0e63..11b1323b3 100644 --- a/examples/2.3.x/server-dotnet/examples/vectorsdb/list-transactions.md +++ b/examples/2.3.x/server-dotnet/examples/vectorsdb/list-transactions.md @@ -10,8 +10,9 @@ Client client = new Client() VectorsDB vectorsDB = new VectorsDB(client); -TransactionList result = await vectorsDB.ListTransactions( - queries: new List<string>() // optional +Appwrite.Models.TransactionList result = await vectorsDB.ListTransactions( + queries: new List<string>(), // optional + total: false // optional ); ``` diff --git a/examples/2.3.x/server-dotnet/examples/vectorsdb/list.md b/examples/2.3.x/server-dotnet/examples/vectorsdb/list.md index f2c0e930b..ca952fa8a 100644 --- a/examples/2.3.x/server-dotnet/examples/vectorsdb/list.md +++ b/examples/2.3.x/server-dotnet/examples/vectorsdb/list.md @@ -10,7 +10,7 @@ Client client = new Client() VectorsDB vectorsDB = new VectorsDB(client); -DatabaseList result = await vectorsDB.List( +Appwrite.Models.DatabaseList result = await vectorsDB.List( queries: new List<string>(), // optional total: false // optional ); diff --git a/examples/2.3.x/server-dotnet/examples/vectorsdb/update-collection.md b/examples/2.3.x/server-dotnet/examples/vectorsdb/update-collection.md index bcadbda24..dad4b3117 100644 --- a/examples/2.3.x/server-dotnet/examples/vectorsdb/update-collection.md +++ b/examples/2.3.x/server-dotnet/examples/vectorsdb/update-collection.md @@ -10,11 +10,11 @@ Client client = new Client() VectorsDB vectorsDB = new VectorsDB(client); -VectorsdbCollection result = await vectorsDB.UpdateCollection( +Appwrite.Models.VectorsdbCollection result = await vectorsDB.UpdateCollection( databaseId: "<DATABASE_ID>", collectionId: "<COLLECTION_ID>", name: "<NAME>", - dimension: 1, // optional + dimension: 4, // optional permissions: new List<string> { Permission.Read(Role.Any()) }, // optional documentSecurity: false, // optional enabled: false // optional diff --git a/examples/2.3.x/server-dotnet/examples/vectorsdb/update-document.md b/examples/2.3.x/server-dotnet/examples/vectorsdb/update-document.md index d1d0d0788..232f5d449 100644 --- a/examples/2.3.x/server-dotnet/examples/vectorsdb/update-document.md +++ b/examples/2.3.x/server-dotnet/examples/vectorsdb/update-document.md @@ -10,7 +10,7 @@ Client client = new Client() VectorsDB vectorsDB = new VectorsDB(client); -Document result = await vectorsDB.UpdateDocument( +Appwrite.Models.Document result = await vectorsDB.UpdateDocument( databaseId: "<DATABASE_ID>", collectionId: "<COLLECTION_ID>", documentId: "<DOCUMENT_ID>", diff --git a/examples/2.3.x/server-dotnet/examples/vectorsdb/update-documents.md b/examples/2.3.x/server-dotnet/examples/vectorsdb/update-documents.md index 5833aac17..71f5d50f2 100644 --- a/examples/2.3.x/server-dotnet/examples/vectorsdb/update-documents.md +++ b/examples/2.3.x/server-dotnet/examples/vectorsdb/update-documents.md @@ -10,7 +10,7 @@ Client client = new Client() VectorsDB vectorsDB = new VectorsDB(client); -DocumentList result = await vectorsDB.UpdateDocuments( +Appwrite.Models.DocumentList result = await vectorsDB.UpdateDocuments( databaseId: "<DATABASE_ID>", collectionId: "<COLLECTION_ID>", data: [object], // optional diff --git a/examples/2.3.x/server-dotnet/examples/vectorsdb/update-transaction.md b/examples/2.3.x/server-dotnet/examples/vectorsdb/update-transaction.md index 65320cc2f..3f747a230 100644 --- a/examples/2.3.x/server-dotnet/examples/vectorsdb/update-transaction.md +++ b/examples/2.3.x/server-dotnet/examples/vectorsdb/update-transaction.md @@ -10,7 +10,7 @@ Client client = new Client() VectorsDB vectorsDB = new VectorsDB(client); -Transaction result = await vectorsDB.UpdateTransaction( +Appwrite.Models.Transaction result = await vectorsDB.UpdateTransaction( transactionId: "<TRANSACTION_ID>", commit: false, // optional rollback: false // optional diff --git a/examples/2.3.x/server-dotnet/examples/vectorsdb/update.md b/examples/2.3.x/server-dotnet/examples/vectorsdb/update.md index c8184ece5..f55aa6d38 100644 --- a/examples/2.3.x/server-dotnet/examples/vectorsdb/update.md +++ b/examples/2.3.x/server-dotnet/examples/vectorsdb/update.md @@ -10,7 +10,7 @@ Client client = new Client() VectorsDB vectorsDB = new VectorsDB(client); -Database result = await vectorsDB.Update( +Appwrite.Models.Database result = await vectorsDB.Update( databaseId: "<DATABASE_ID>", name: "<NAME>", enabled: false, // optional diff --git a/examples/2.3.x/server-dotnet/examples/vectorsdb/upsert-document.md b/examples/2.3.x/server-dotnet/examples/vectorsdb/upsert-document.md index edb18673b..ccd995c6c 100644 --- a/examples/2.3.x/server-dotnet/examples/vectorsdb/upsert-document.md +++ b/examples/2.3.x/server-dotnet/examples/vectorsdb/upsert-document.md @@ -10,7 +10,7 @@ Client client = new Client() VectorsDB vectorsDB = new VectorsDB(client); -Document result = await vectorsDB.UpsertDocument( +Appwrite.Models.Document result = await vectorsDB.UpsertDocument( databaseId: "<DATABASE_ID>", collectionId: "<COLLECTION_ID>", documentId: "<DOCUMENT_ID>", diff --git a/examples/2.3.x/server-dotnet/examples/vectorsdb/upsert-documents.md b/examples/2.3.x/server-dotnet/examples/vectorsdb/upsert-documents.md index d9209fd9a..b466b0878 100644 --- a/examples/2.3.x/server-dotnet/examples/vectorsdb/upsert-documents.md +++ b/examples/2.3.x/server-dotnet/examples/vectorsdb/upsert-documents.md @@ -10,10 +10,23 @@ Client client = new Client() VectorsDB vectorsDB = new VectorsDB(client); -DocumentList result = await vectorsDB.UpsertDocuments( +Appwrite.Models.DocumentList result = await vectorsDB.UpsertDocuments( databaseId: "<DATABASE_ID>", collectionId: "<COLLECTION_ID>", - documents: new List<object>(), + documents: [ + { + "$id": "example1", + "embeddings": [ + 0.12, + -0.55, + 0.88, + 1.02 + ], + "metadata": { + "name": "First document" + } + } + ], transactionId: "<TRANSACTION_ID>" // optional ); diff --git a/examples/2.3.x/server-dotnet/examples/webhooks/create.md b/examples/2.3.x/server-dotnet/examples/webhooks/create.md index 28a5222fe..6956a490c 100644 --- a/examples/2.3.x/server-dotnet/examples/webhooks/create.md +++ b/examples/2.3.x/server-dotnet/examples/webhooks/create.md @@ -10,11 +10,11 @@ Client client = new Client() Webhooks webhooks = new Webhooks(client); -Webhook result = await webhooks.Create( +Appwrite.Models.Webhook result = await webhooks.Create( webhookId: "<WEBHOOK_ID>", url: "https://example.com/webhook", name: "<NAME>", - events: new List<string>(), + events: ["users.*.create"], enabled: false, // optional tls: false, // optional authUsername: "<AUTH_USERNAME>", // optional diff --git a/examples/2.3.x/server-dotnet/examples/webhooks/get.md b/examples/2.3.x/server-dotnet/examples/webhooks/get.md index 2b6ce7dd3..ab24d06aa 100644 --- a/examples/2.3.x/server-dotnet/examples/webhooks/get.md +++ b/examples/2.3.x/server-dotnet/examples/webhooks/get.md @@ -10,7 +10,7 @@ Client client = new Client() Webhooks webhooks = new Webhooks(client); -Webhook result = await webhooks.Get( +Appwrite.Models.Webhook result = await webhooks.Get( webhookId: "<WEBHOOK_ID>" ); diff --git a/examples/2.3.x/server-dotnet/examples/webhooks/list.md b/examples/2.3.x/server-dotnet/examples/webhooks/list.md index c8c4b065c..ef7d24029 100644 --- a/examples/2.3.x/server-dotnet/examples/webhooks/list.md +++ b/examples/2.3.x/server-dotnet/examples/webhooks/list.md @@ -10,7 +10,7 @@ Client client = new Client() Webhooks webhooks = new Webhooks(client); -WebhookList result = await webhooks.List( +Appwrite.Models.WebhookList result = await webhooks.List( queries: new List<string>(), // optional total: false // optional ); diff --git a/examples/2.3.x/server-dotnet/examples/webhooks/update-secret.md b/examples/2.3.x/server-dotnet/examples/webhooks/update-secret.md index c6d945511..520b4cef1 100644 --- a/examples/2.3.x/server-dotnet/examples/webhooks/update-secret.md +++ b/examples/2.3.x/server-dotnet/examples/webhooks/update-secret.md @@ -10,7 +10,7 @@ Client client = new Client() Webhooks webhooks = new Webhooks(client); -Webhook result = await webhooks.UpdateSecret( +Appwrite.Models.Webhook result = await webhooks.UpdateSecret( webhookId: "<WEBHOOK_ID>", secret: "<SECRET>" // optional ); diff --git a/examples/2.3.x/server-dotnet/examples/webhooks/update.md b/examples/2.3.x/server-dotnet/examples/webhooks/update.md index 795cfafe6..c24ac7ff3 100644 --- a/examples/2.3.x/server-dotnet/examples/webhooks/update.md +++ b/examples/2.3.x/server-dotnet/examples/webhooks/update.md @@ -10,11 +10,11 @@ Client client = new Client() Webhooks webhooks = new Webhooks(client); -Webhook result = await webhooks.Update( +Appwrite.Models.Webhook result = await webhooks.Update( webhookId: "<WEBHOOK_ID>", name: "<NAME>", url: "https://example.com/webhook", - events: new List<string>(), + events: ["users.*.create"], enabled: false, // optional tls: false, // optional authUsername: "<AUTH_USERNAME>", // optional diff --git a/examples/2.3.x/server-go/examples/account/create-email-password-session.md b/examples/2.3.x/server-go/examples/account/create-email-password-session.md index 0fc7cb4b3..f922baf2d 100644 --- a/examples/2.3.x/server-go/examples/account/create-email-password-session.md +++ b/examples/2.3.x/server-go/examples/account/create-email-password-session.md @@ -20,6 +20,7 @@ func main() { response, err := service.CreateEmailPasswordSession( "email@example.com", "password", + service.WithCreateEmailPasswordSessionDuration(60), ) fmt.Println(response, err) } diff --git a/examples/2.3.x/server-go/examples/account/delete-sessions.md b/examples/2.3.x/server-go/examples/account/delete-sessions.md index 2cae6cb06..5f741a694 100644 --- a/examples/2.3.x/server-go/examples/account/delete-sessions.md +++ b/examples/2.3.x/server-go/examples/account/delete-sessions.md @@ -17,7 +17,9 @@ func main() { service := account.New(client) - response, err := service.DeleteSessions() + response, err := service.DeleteSessions( + service.WithDeleteSessionsCurrent(false), + ) fmt.Println(response, err) } ``` diff --git a/examples/2.3.x/server-go/examples/account/list-sessions.md b/examples/2.3.x/server-go/examples/account/list-sessions.md index 6d4315e1b..44429f0b3 100644 --- a/examples/2.3.x/server-go/examples/account/list-sessions.md +++ b/examples/2.3.x/server-go/examples/account/list-sessions.md @@ -17,7 +17,9 @@ func main() { service := account.New(client) - response, err := service.ListSessions() + response, err := service.ListSessions( + service.WithListSessionsTotal(false), + ) fmt.Println(response, err) } ``` diff --git a/examples/2.3.x/server-go/examples/analytics/create-event.md b/examples/2.3.x/server-go/examples/analytics/create-event.md new file mode 100644 index 000000000..7cf153d10 --- /dev/null +++ b/examples/2.3.x/server-go/examples/analytics/create-event.md @@ -0,0 +1,37 @@ +```go +package main + +import ( + "fmt" + + "github.com/appwrite/sdk-for-go/v7/analytics" + "github.com/appwrite/sdk-for-go/v7/appwrite" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithSession(""), + ) + + service := analytics.New(client) + + response, err := service.CreateEvent( + "<PROPERTY_ID>", + "<NAME>", + "https://example.com", + service.WithCreateEventDomain("<DOMAIN>"), + service.WithCreateEventReferrer("<REFERRER>"), + service.WithCreateEventScreenWidth(0), + service.WithCreateEventSessionHash("<SESSION_HASH>"), + service.WithCreateEventScrollDepth(0), + service.WithCreateEventEngagementTime(0), + service.WithCreateEventProps([]string{"example"}), + service.WithCreateEventUserId("<USER_ID>"), + service.WithCreateEventIp("<IP>"), + service.WithCreateEventUserAgent("<USER_AGENT>"), + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/analytics/create-property.md b/examples/2.3.x/server-go/examples/analytics/create-property.md new file mode 100644 index 000000000..6b4c356e2 --- /dev/null +++ b/examples/2.3.x/server-go/examples/analytics/create-property.md @@ -0,0 +1,31 @@ +```go +package main + +import ( + "fmt" + + "github.com/appwrite/sdk-for-go/v7/analytics" + "github.com/appwrite/sdk-for-go/v7/appwrite" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithKey("<YOUR_API_KEY>"), + ) + + service := analytics.New(client) + + response, err := service.CreateProperty( + "<PROPERTY_ID>", + "<NAME>", + service.WithCreatePropertyDomain("<DOMAIN>"), + service.WithCreatePropertyTimezone("<TIMEZONE>"), + service.WithCreatePropertyEnabled(false), + service.WithCreatePropertyPublic(false), + service.WithCreatePropertyAllowedOrigins([]string{"example"}), + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/analytics/delete-property.md b/examples/2.3.x/server-go/examples/analytics/delete-property.md new file mode 100644 index 000000000..f1153f554 --- /dev/null +++ b/examples/2.3.x/server-go/examples/analytics/delete-property.md @@ -0,0 +1,25 @@ +```go +package main + +import ( + "fmt" + + "github.com/appwrite/sdk-for-go/v7/analytics" + "github.com/appwrite/sdk-for-go/v7/appwrite" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithKey("<YOUR_API_KEY>"), + ) + + service := analytics.New(client) + + response, err := service.DeleteProperty( + "<PROPERTY_ID>", + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/analytics/get-property.md b/examples/2.3.x/server-go/examples/analytics/get-property.md new file mode 100644 index 000000000..446b26cda --- /dev/null +++ b/examples/2.3.x/server-go/examples/analytics/get-property.md @@ -0,0 +1,25 @@ +```go +package main + +import ( + "fmt" + + "github.com/appwrite/sdk-for-go/v7/analytics" + "github.com/appwrite/sdk-for-go/v7/appwrite" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithKey("<YOUR_API_KEY>"), + ) + + service := analytics.New(client) + + response, err := service.GetProperty( + "<PROPERTY_ID>", + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/analytics/list-metrics.md b/examples/2.3.x/server-go/examples/analytics/list-metrics.md new file mode 100644 index 000000000..ccfe492ea --- /dev/null +++ b/examples/2.3.x/server-go/examples/analytics/list-metrics.md @@ -0,0 +1,32 @@ +```go +package main + +import ( + "fmt" + + "github.com/appwrite/sdk-for-go/v7/analytics" + "github.com/appwrite/sdk-for-go/v7/appwrite" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithKey("<YOUR_API_KEY>"), + ) + + service := analytics.New(client) + + response, err := service.ListMetrics( + "<PROPERTY_ID>", + service.WithListMetricsQueries([]string{"example"}), + service.WithListMetricsInterval("1h"), + service.WithListMetricsDimensions([]string{"example"}), + service.WithListMetricsDateRange("<DATE_RANGE>"), + service.WithListMetricsStartAt("2020-10-15T06:38:00.000+00:00"), + service.WithListMetricsEndAt("2020-10-15T06:38:00.000+00:00"), + service.WithListMetricsLimit(1), + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/analytics/list-properties.md b/examples/2.3.x/server-go/examples/analytics/list-properties.md new file mode 100644 index 000000000..21141f681 --- /dev/null +++ b/examples/2.3.x/server-go/examples/analytics/list-properties.md @@ -0,0 +1,27 @@ +```go +package main + +import ( + "fmt" + + "github.com/appwrite/sdk-for-go/v7/analytics" + "github.com/appwrite/sdk-for-go/v7/appwrite" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithKey("<YOUR_API_KEY>"), + ) + + service := analytics.New(client) + + response, err := service.ListProperties( + service.WithListPropertiesQueries([]string{"example"}), + service.WithListPropertiesSearch("<SEARCH>"), + service.WithListPropertiesTotal(false), + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/analytics/update-property.md b/examples/2.3.x/server-go/examples/analytics/update-property.md new file mode 100644 index 000000000..f29df5884 --- /dev/null +++ b/examples/2.3.x/server-go/examples/analytics/update-property.md @@ -0,0 +1,31 @@ +```go +package main + +import ( + "fmt" + + "github.com/appwrite/sdk-for-go/v7/analytics" + "github.com/appwrite/sdk-for-go/v7/appwrite" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithKey("<YOUR_API_KEY>"), + ) + + service := analytics.New(client) + + response, err := service.UpdateProperty( + "<PROPERTY_ID>", + service.WithUpdatePropertyName("<NAME>"), + service.WithUpdatePropertyDomain("<DOMAIN>"), + service.WithUpdatePropertyTimezone("<TIMEZONE>"), + service.WithUpdatePropertyEnabled(false), + service.WithUpdatePropertyPublic(false), + service.WithUpdatePropertyAllowedOrigins([]string{"example"}), + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/avatars/delete-photo.md b/examples/2.3.x/server-go/examples/avatars/delete-photo.md new file mode 100644 index 000000000..c3fb60b98 --- /dev/null +++ b/examples/2.3.x/server-go/examples/avatars/delete-photo.md @@ -0,0 +1,23 @@ +```go +package main + +import ( + "fmt" + + "github.com/appwrite/sdk-for-go/v7/appwrite" + "github.com/appwrite/sdk-for-go/v7/avatars" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithSession(""), + ) + + service := avatars.New(client) + + response, err := service.DeletePhoto() + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/avatars/get-screenshot.md b/examples/2.3.x/server-go/examples/avatars/get-screenshot.md index 2fa9098f9..1f699b7fd 100644 --- a/examples/2.3.x/server-go/examples/avatars/get-screenshot.md +++ b/examples/2.3.x/server-go/examples/avatars/get-screenshot.md @@ -19,7 +19,7 @@ func main() { response, err := service.GetScreenshot( "https://example.com", - service.WithGetScreenshotHeaders(map[string]interface{}{"Authorization": "Bearer token123", "X-Custom-Header": "value"}), + service.WithGetScreenshotHeaders(map[string]interface{}{"Accept-Language": "en-US,en;q=0.9"}), service.WithGetScreenshotViewportWidth(1920), service.WithGetScreenshotViewportHeight(1080), service.WithGetScreenshotScale(2), diff --git a/examples/2.3.x/server-go/examples/avatars/update-photo.md b/examples/2.3.x/server-go/examples/avatars/update-photo.md new file mode 100644 index 000000000..36c161e8a --- /dev/null +++ b/examples/2.3.x/server-go/examples/avatars/update-photo.md @@ -0,0 +1,26 @@ +```go +package main + +import ( + "fmt" + + "github.com/appwrite/sdk-for-go/v7/appwrite" + "github.com/appwrite/sdk-for-go/v7/avatars" + "github.com/appwrite/sdk-for-go/v7/file" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithSession(""), + ) + + service := avatars.New(client) + + response, err := service.UpdatePhoto( + file.NewInputFile("/path/to/file.png", "file.png"), + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/databases/create-documents.md b/examples/2.3.x/server-go/examples/databases/create-documents.md index de2d3247a..261dc6fa7 100644 --- a/examples/2.3.x/server-go/examples/databases/create-documents.md +++ b/examples/2.3.x/server-go/examples/databases/create-documents.md @@ -20,7 +20,7 @@ func main() { response, err := service.CreateDocuments( "<DATABASE_ID>", "<COLLECTION_ID>", - []interface{}{}, + []interface{}{map[string]interface{}{"$id": "example1", "username": "walter.obrien", "email": "walter.obrien@example.com", "fullName": "Walter O'Brien", "age": 30, "isAdmin": false}}, service.WithCreateDocumentsTransactionId("<TRANSACTION_ID>"), ) fmt.Println(response, err) diff --git a/examples/2.3.x/server-go/examples/databases/create-index.md b/examples/2.3.x/server-go/examples/databases/create-index.md index 570b81b80..8177a9696 100644 --- a/examples/2.3.x/server-go/examples/databases/create-index.md +++ b/examples/2.3.x/server-go/examples/databases/create-index.md @@ -22,7 +22,7 @@ func main() { "<COLLECTION_ID>", "<KEY>", "key", - []string{"example"}, + []string{"username"}, service.WithCreateIndexOrders([]string{"example"}), service.WithCreateIndexLengths([]int{0}), ) diff --git a/examples/2.3.x/server-go/examples/databases/delete-documents.md b/examples/2.3.x/server-go/examples/databases/delete-documents.md index f153ba510..e4aeabae3 100644 --- a/examples/2.3.x/server-go/examples/databases/delete-documents.md +++ b/examples/2.3.x/server-go/examples/databases/delete-documents.md @@ -20,7 +20,7 @@ func main() { response, err := service.DeleteDocuments( "<DATABASE_ID>", "<COLLECTION_ID>", - service.WithDeleteDocumentsQueries([]string{"example"}), + service.WithDeleteDocumentsQueries([]string{"{\"method\":\"equal\", \"attribute\":\"$id\", \"values\":[\"<DOCUMENT_ID>\"]}"}), service.WithDeleteDocumentsTransactionId("<TRANSACTION_ID>"), ) fmt.Println(response, err) diff --git a/examples/2.3.x/server-go/examples/databases/list-transactions.md b/examples/2.3.x/server-go/examples/databases/list-transactions.md index 1c991e744..f006b5a14 100644 --- a/examples/2.3.x/server-go/examples/databases/list-transactions.md +++ b/examples/2.3.x/server-go/examples/databases/list-transactions.md @@ -19,6 +19,7 @@ func main() { response, err := service.ListTransactions( service.WithListTransactionsQueries([]string{"example"}), + service.WithListTransactionsTotal(false), ) fmt.Println(response, err) } diff --git a/examples/2.3.x/server-go/examples/databases/upsert-documents.md b/examples/2.3.x/server-go/examples/databases/upsert-documents.md index d68270f02..a446aed52 100644 --- a/examples/2.3.x/server-go/examples/databases/upsert-documents.md +++ b/examples/2.3.x/server-go/examples/databases/upsert-documents.md @@ -20,7 +20,7 @@ func main() { response, err := service.UpsertDocuments( "<DATABASE_ID>", "<COLLECTION_ID>", - []interface{}{}, + []interface{}{map[string]interface{}{"$id": "example1", "username": "walter.obrien", "email": "walter.obrien@example.com", "fullName": "Walter O'Brien", "age": 30, "isAdmin": false}}, service.WithUpsertDocumentsTransactionId("<TRANSACTION_ID>"), ) fmt.Println(response, err) diff --git a/examples/2.3.x/server-go/examples/documentsdb/create-documents.md b/examples/2.3.x/server-go/examples/documentsdb/create-documents.md index 818cfe82c..db95f4d16 100644 --- a/examples/2.3.x/server-go/examples/documentsdb/create-documents.md +++ b/examples/2.3.x/server-go/examples/documentsdb/create-documents.md @@ -20,7 +20,7 @@ func main() { response, err := service.CreateDocuments( "<DATABASE_ID>", "<COLLECTION_ID>", - []interface{}{}, + []interface{}{map[string]interface{}{"$id": "example1", "username": "walter.obrien", "email": "walter.obrien@example.com", "fullName": "Walter O'Brien", "age": 30, "isAdmin": false}}, service.WithCreateDocumentsTransactionId("<TRANSACTION_ID>"), ) fmt.Println(response, err) diff --git a/examples/2.3.x/server-go/examples/documentsdb/create-index.md b/examples/2.3.x/server-go/examples/documentsdb/create-index.md index 93fbf2f0b..1135d6238 100644 --- a/examples/2.3.x/server-go/examples/documentsdb/create-index.md +++ b/examples/2.3.x/server-go/examples/documentsdb/create-index.md @@ -22,7 +22,7 @@ func main() { "<COLLECTION_ID>", "<KEY>", "key", - []string{"example"}, + []string{"username"}, service.WithCreateIndexOrders([]string{"example"}), service.WithCreateIndexLengths([]int{0}), ) diff --git a/examples/2.3.x/server-go/examples/documentsdb/delete-documents.md b/examples/2.3.x/server-go/examples/documentsdb/delete-documents.md index b976aab9a..15c4c3cb2 100644 --- a/examples/2.3.x/server-go/examples/documentsdb/delete-documents.md +++ b/examples/2.3.x/server-go/examples/documentsdb/delete-documents.md @@ -20,7 +20,7 @@ func main() { response, err := service.DeleteDocuments( "<DATABASE_ID>", "<COLLECTION_ID>", - service.WithDeleteDocumentsQueries([]string{"example"}), + service.WithDeleteDocumentsQueries([]string{"{\"method\":\"equal\", \"attribute\":\"$id\", \"values\":[\"<DOCUMENT_ID>\"]}"}), service.WithDeleteDocumentsTransactionId("<TRANSACTION_ID>"), ) fmt.Println(response, err) diff --git a/examples/2.3.x/server-go/examples/documentsdb/list-transactions.md b/examples/2.3.x/server-go/examples/documentsdb/list-transactions.md index e2d8553f7..89efe5511 100644 --- a/examples/2.3.x/server-go/examples/documentsdb/list-transactions.md +++ b/examples/2.3.x/server-go/examples/documentsdb/list-transactions.md @@ -19,6 +19,7 @@ func main() { response, err := service.ListTransactions( service.WithListTransactionsQueries([]string{"example"}), + service.WithListTransactionsTotal(false), ) fmt.Println(response, err) } diff --git a/examples/2.3.x/server-go/examples/documentsdb/upsert-documents.md b/examples/2.3.x/server-go/examples/documentsdb/upsert-documents.md index 7a5bec386..0bad6f906 100644 --- a/examples/2.3.x/server-go/examples/documentsdb/upsert-documents.md +++ b/examples/2.3.x/server-go/examples/documentsdb/upsert-documents.md @@ -20,7 +20,7 @@ func main() { response, err := service.UpsertDocuments( "<DATABASE_ID>", "<COLLECTION_ID>", - []interface{}{}, + []interface{}{map[string]interface{}{"$id": "example1", "username": "walter.obrien", "email": "walter.obrien@example.com", "fullName": "Walter O'Brien", "age": 30, "isAdmin": false}}, service.WithUpsertDocumentsTransactionId("<TRANSACTION_ID>"), ) fmt.Println(response, err) diff --git a/examples/2.3.x/server-go/examples/embeddings/create-text-embeddings.md b/examples/2.3.x/server-go/examples/embeddings/create-text-embeddings.md index b3013d861..e2f64b0df 100644 --- a/examples/2.3.x/server-go/examples/embeddings/create-text-embeddings.md +++ b/examples/2.3.x/server-go/examples/embeddings/create-text-embeddings.md @@ -18,7 +18,7 @@ func main() { service := embeddings.New(client) response, err := service.CreateTextEmbeddings( - []string{"example"}, + []string{"Appwrite helps developers build applications.", "Find documents with semantic search."}, service.WithCreateTextEmbeddingsModel("nomic-embed-text"), ) fmt.Println(response, err) diff --git a/examples/2.3.x/server-go/examples/functions/list-runtimes.md b/examples/2.3.x/server-go/examples/functions/list-runtimes.md index 86c2ecfe1..ae03a1af8 100644 --- a/examples/2.3.x/server-go/examples/functions/list-runtimes.md +++ b/examples/2.3.x/server-go/examples/functions/list-runtimes.md @@ -17,7 +17,9 @@ func main() { service := functions.New(client) - response, err := service.ListRuntimes() + response, err := service.ListRuntimes( + service.WithListRuntimesTotal(false), + ) fmt.Println(response, err) } ``` diff --git a/examples/2.3.x/server-go/examples/functions/list-specifications.md b/examples/2.3.x/server-go/examples/functions/list-specifications.md index e96ac131d..59438f97e 100644 --- a/examples/2.3.x/server-go/examples/functions/list-specifications.md +++ b/examples/2.3.x/server-go/examples/functions/list-specifications.md @@ -19,6 +19,7 @@ func main() { response, err := service.ListSpecifications( service.WithListSpecificationsType("runtimes"), + service.WithListSpecificationsTotal(false), ) fmt.Println(response, err) } diff --git a/examples/2.3.x/server-go/examples/graphql/mutation.md b/examples/2.3.x/server-go/examples/graphql/mutation.md index 24dadaedb..05d0aaa73 100644 --- a/examples/2.3.x/server-go/examples/graphql/mutation.md +++ b/examples/2.3.x/server-go/examples/graphql/mutation.md @@ -18,7 +18,7 @@ func main() { service := graphql.New(client) response, err := service.Mutation( - []interface{}{}, + map[string]interface{}{"query": "mutation { accountUpdateName(name: \"Walter\") { name } }"}, ) fmt.Println(response, err) } diff --git a/examples/2.3.x/server-go/examples/graphql/query.md b/examples/2.3.x/server-go/examples/graphql/query.md index 40cb3b8d7..6bf9fd8e7 100644 --- a/examples/2.3.x/server-go/examples/graphql/query.md +++ b/examples/2.3.x/server-go/examples/graphql/query.md @@ -18,7 +18,7 @@ func main() { service := graphql.New(client) response, err := service.Query( - []interface{}{}, + map[string]interface{}{"query": "query { localeGet { ip } }"}, ) fmt.Println(response, err) } diff --git a/examples/2.3.x/server-go/examples/locale/list-codes.md b/examples/2.3.x/server-go/examples/locale/list-codes.md index 392e9ad78..ade207f87 100644 --- a/examples/2.3.x/server-go/examples/locale/list-codes.md +++ b/examples/2.3.x/server-go/examples/locale/list-codes.md @@ -17,7 +17,9 @@ func main() { service := locale.New(client) - response, err := service.ListCodes() + response, err := service.ListCodes( + service.WithListCodesTotal(false), + ) fmt.Println(response, err) } ``` diff --git a/examples/2.3.x/server-go/examples/locale/list-continents.md b/examples/2.3.x/server-go/examples/locale/list-continents.md index 137084c5d..643734b9a 100644 --- a/examples/2.3.x/server-go/examples/locale/list-continents.md +++ b/examples/2.3.x/server-go/examples/locale/list-continents.md @@ -17,7 +17,9 @@ func main() { service := locale.New(client) - response, err := service.ListContinents() + response, err := service.ListContinents( + service.WithListContinentsTotal(false), + ) fmt.Println(response, err) } ``` diff --git a/examples/2.3.x/server-go/examples/locale/list-countries-eu.md b/examples/2.3.x/server-go/examples/locale/list-countries-eu.md index bfa6d66f1..cc88ed191 100644 --- a/examples/2.3.x/server-go/examples/locale/list-countries-eu.md +++ b/examples/2.3.x/server-go/examples/locale/list-countries-eu.md @@ -17,7 +17,9 @@ func main() { service := locale.New(client) - response, err := service.ListCountriesEU() + response, err := service.ListCountriesEU( + service.WithListCountriesEUTotal(false), + ) fmt.Println(response, err) } ``` diff --git a/examples/2.3.x/server-go/examples/locale/list-countries-phones.md b/examples/2.3.x/server-go/examples/locale/list-countries-phones.md index f4732a1c1..682a9171d 100644 --- a/examples/2.3.x/server-go/examples/locale/list-countries-phones.md +++ b/examples/2.3.x/server-go/examples/locale/list-countries-phones.md @@ -17,7 +17,9 @@ func main() { service := locale.New(client) - response, err := service.ListCountriesPhones() + response, err := service.ListCountriesPhones( + service.WithListCountriesPhonesTotal(false), + ) fmt.Println(response, err) } ``` diff --git a/examples/2.3.x/server-go/examples/locale/list-countries.md b/examples/2.3.x/server-go/examples/locale/list-countries.md index 85e9f3e8e..bd7b5e199 100644 --- a/examples/2.3.x/server-go/examples/locale/list-countries.md +++ b/examples/2.3.x/server-go/examples/locale/list-countries.md @@ -17,7 +17,9 @@ func main() { service := locale.New(client) - response, err := service.ListCountries() + response, err := service.ListCountries( + service.WithListCountriesTotal(false), + ) fmt.Println(response, err) } ``` diff --git a/examples/2.3.x/server-go/examples/locale/list-currencies.md b/examples/2.3.x/server-go/examples/locale/list-currencies.md index 6ab6d25d6..940167317 100644 --- a/examples/2.3.x/server-go/examples/locale/list-currencies.md +++ b/examples/2.3.x/server-go/examples/locale/list-currencies.md @@ -17,7 +17,9 @@ func main() { service := locale.New(client) - response, err := service.ListCurrencies() + response, err := service.ListCurrencies( + service.WithListCurrenciesTotal(false), + ) fmt.Println(response, err) } ``` diff --git a/examples/2.3.x/server-go/examples/locale/list-languages.md b/examples/2.3.x/server-go/examples/locale/list-languages.md index 3806001bb..98e8bc9b3 100644 --- a/examples/2.3.x/server-go/examples/locale/list-languages.md +++ b/examples/2.3.x/server-go/examples/locale/list-languages.md @@ -17,7 +17,9 @@ func main() { service := locale.New(client) - response, err := service.ListLanguages() + response, err := service.ListLanguages( + service.WithListLanguagesTotal(false), + ) fmt.Println(response, err) } ``` diff --git a/examples/2.3.x/server-go/examples/messaging/create-push.md b/examples/2.3.x/server-go/examples/messaging/create-push.md index 70659949c..e1ca0fa46 100644 --- a/examples/2.3.x/server-go/examples/messaging/create-push.md +++ b/examples/2.3.x/server-go/examples/messaging/create-push.md @@ -37,6 +37,7 @@ func main() { service.WithCreatePushContentAvailable(false), service.WithCreatePushCritical(false), service.WithCreatePushPriority("normal"), + service.WithCreatePushChannelId("<CHANNEL_ID>"), ) fmt.Println(response, err) } diff --git a/examples/2.3.x/server-go/examples/messaging/update-email.md b/examples/2.3.x/server-go/examples/messaging/update-email.md index 05ff62a71..5b26875bb 100644 --- a/examples/2.3.x/server-go/examples/messaging/update-email.md +++ b/examples/2.3.x/server-go/examples/messaging/update-email.md @@ -19,19 +19,19 @@ func main() { response, err := service.UpdateEmail( "<MESSAGE_ID>", + service.WithUpdateEmailSubject("<SUBJECT>"), + service.WithUpdateEmailContent("<CONTENT>"), service.WithUpdateEmailTopics([]string{"example"}), service.WithUpdateEmailUsers([]string{"example"}), service.WithUpdateEmailTargets([]string{"example"}), - service.WithUpdateEmailSubject("<SUBJECT>"), - service.WithUpdateEmailContent("<CONTENT>"), - service.WithUpdateEmailDraft(false), - service.WithUpdateEmailHtml(false), service.WithUpdateEmailCc([]string{"example"}), service.WithUpdateEmailBcc([]string{"example"}), + service.WithUpdateEmailAttachments([]string{"example"}), service.WithUpdateEmailReplyToEmail("email@example.com"), service.WithUpdateEmailReplyToName("<REPLY_TO_NAME>"), + service.WithUpdateEmailDraft(false), + service.WithUpdateEmailHtml(false), service.WithUpdateEmailScheduledAt("2020-10-15T06:38:00.000+00:00"), - service.WithUpdateEmailAttachments([]string{"example"}), ) fmt.Println(response, err) } diff --git a/examples/2.3.x/server-go/examples/messaging/update-push.md b/examples/2.3.x/server-go/examples/messaging/update-push.md index 8d3b933a6..450567c88 100644 --- a/examples/2.3.x/server-go/examples/messaging/update-push.md +++ b/examples/2.3.x/server-go/examples/messaging/update-push.md @@ -19,11 +19,11 @@ func main() { response, err := service.UpdatePush( "<MESSAGE_ID>", + service.WithUpdatePushTitle("<TITLE>"), + service.WithUpdatePushBody("<BODY>"), service.WithUpdatePushTopics([]string{"example"}), service.WithUpdatePushUsers([]string{"example"}), service.WithUpdatePushTargets([]string{"example"}), - service.WithUpdatePushTitle("<TITLE>"), - service.WithUpdatePushBody("<BODY>"), service.WithUpdatePushData([]interface{}{}), service.WithUpdatePushAction("<ACTION>"), service.WithUpdatePushImage("<ID1:ID2>"), @@ -37,6 +37,7 @@ func main() { service.WithUpdatePushContentAvailable(false), service.WithUpdatePushCritical(false), service.WithUpdatePushPriority("normal"), + service.WithUpdatePushChannelId("<CHANNEL_ID>"), ) fmt.Println(response, err) } diff --git a/examples/2.3.x/server-go/examples/messaging/update-sms.md b/examples/2.3.x/server-go/examples/messaging/update-sms.md index 22f60b3d0..9503eb804 100644 --- a/examples/2.3.x/server-go/examples/messaging/update-sms.md +++ b/examples/2.3.x/server-go/examples/messaging/update-sms.md @@ -19,10 +19,10 @@ func main() { response, err := service.UpdateSMS( "<MESSAGE_ID>", + service.WithUpdateSMSContent("<CONTENT>"), service.WithUpdateSMSTopics([]string{"example"}), service.WithUpdateSMSUsers([]string{"example"}), service.WithUpdateSMSTargets([]string{"example"}), - service.WithUpdateSMSContent("<CONTENT>"), service.WithUpdateSMSDraft(false), service.WithUpdateSMSScheduledAt("2020-10-15T06:38:00.000+00:00"), ) diff --git a/examples/2.3.x/server-go/examples/oauth2/introspect.md b/examples/2.3.x/server-go/examples/oauth2/introspect.md new file mode 100644 index 000000000..e10eb953c --- /dev/null +++ b/examples/2.3.x/server-go/examples/oauth2/introspect.md @@ -0,0 +1,28 @@ +```go +package main + +import ( + "fmt" + + "github.com/appwrite/sdk-for-go/v7/appwrite" + "github.com/appwrite/sdk-for-go/v7/oauth2" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithKey("<YOUR_API_KEY>"), + ) + + service := oauth2.New(client) + + response, err := service.Introspect( + "<TOKEN>", + service.WithIntrospectTokenTypeHint("access_token"), + service.WithIntrospectClientId("<CLIENT_ID>"), + service.WithIntrospectClientSecret("<CLIENT_SECRET>"), + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/organization/create-ephemeral-project-key.md b/examples/2.3.x/server-go/examples/organization/create-ephemeral-project-key.md index 012b2cafc..65635e6d1 100644 --- a/examples/2.3.x/server-go/examples/organization/create-ephemeral-project-key.md +++ b/examples/2.3.x/server-go/examples/organization/create-ephemeral-project-key.md @@ -19,7 +19,7 @@ func main() { response, err := service.CreateEphemeralProjectKey( "<PROJECT_ID>", - []string{"example"}, + []string{"users.read"}, 600, ) fmt.Println(response, err) diff --git a/examples/2.3.x/server-go/examples/organization/update-project-key.md b/examples/2.3.x/server-go/examples/organization/update-project-key.md index 3b4a1b655..86d63d29b 100644 --- a/examples/2.3.x/server-go/examples/organization/update-project-key.md +++ b/examples/2.3.x/server-go/examples/organization/update-project-key.md @@ -21,7 +21,7 @@ func main() { "<PROJECT_ID>", "<KEY_ID>", "<NAME>", - []string{"example"}, + []string{"users.read"}, service.WithUpdateProjectKeyExpire("2020-10-15T06:38:00.000+00:00"), ) fmt.Println(response, err) diff --git a/examples/2.3.x/server-go/examples/project/create-ephemeral-key.md b/examples/2.3.x/server-go/examples/project/create-ephemeral-key.md index 0ee5d7ce3..c35fab144 100644 --- a/examples/2.3.x/server-go/examples/project/create-ephemeral-key.md +++ b/examples/2.3.x/server-go/examples/project/create-ephemeral-key.md @@ -18,7 +18,7 @@ func main() { service := project.New(client) response, err := service.CreateEphemeralKey( - []string{"example"}, + []string{"users.read"}, 600, ) fmt.Println(response, err) diff --git a/examples/2.3.x/server-go/examples/project/create-smtp-test.md b/examples/2.3.x/server-go/examples/project/create-smtp-test.md index 9c3965275..4ca1e10d8 100644 --- a/examples/2.3.x/server-go/examples/project/create-smtp-test.md +++ b/examples/2.3.x/server-go/examples/project/create-smtp-test.md @@ -18,7 +18,7 @@ func main() { service := project.New(client) response, err := service.CreateSMTPTest( - []string{"example"}, + []string{"recipient@example.com"}, ) fmt.Println(response, err) } diff --git a/examples/2.3.x/server-go/examples/project/update-key.md b/examples/2.3.x/server-go/examples/project/update-key.md index 53c120533..6224b0c2f 100644 --- a/examples/2.3.x/server-go/examples/project/update-key.md +++ b/examples/2.3.x/server-go/examples/project/update-key.md @@ -20,7 +20,7 @@ func main() { response, err := service.UpdateKey( "<KEY_ID>", "<NAME>", - []string{"example"}, + []string{"users.read"}, service.WithUpdateKeyExpire("2020-10-15T06:38:00.000+00:00"), ) fmt.Println(response, err) diff --git a/examples/2.3.x/server-go/examples/project/update-labels.md b/examples/2.3.x/server-go/examples/project/update-labels.md index 4bf910b03..98fca5427 100644 --- a/examples/2.3.x/server-go/examples/project/update-labels.md +++ b/examples/2.3.x/server-go/examples/project/update-labels.md @@ -18,7 +18,7 @@ func main() { service := project.New(client) response, err := service.UpdateLabels( - []string{"example"}, + []string{"production"}, ) fmt.Println(response, err) } diff --git a/examples/2.3.x/server-go/examples/project/update-o-auth-2-auth-0.md b/examples/2.3.x/server-go/examples/project/update-o-auth-2-auth-0.md index 1b423dd3d..45966276b 100644 --- a/examples/2.3.x/server-go/examples/project/update-o-auth-2-auth-0.md +++ b/examples/2.3.x/server-go/examples/project/update-o-auth-2-auth-0.md @@ -21,6 +21,7 @@ func main() { service.WithUpdateOAuth2Auth0ClientId("<CLIENT_ID>"), service.WithUpdateOAuth2Auth0ClientSecret("<CLIENT_SECRET>"), service.WithUpdateOAuth2Auth0Endpoint("<ENDPOINT>"), + service.WithUpdateOAuth2Auth0Prompt([]string{"example"}), service.WithUpdateOAuth2Auth0Enabled(false), ) fmt.Println(response, err) diff --git a/examples/2.3.x/server-go/examples/project/update-o-auth-2-discord.md b/examples/2.3.x/server-go/examples/project/update-o-auth-2-discord.md index de4dffc80..75a00165d 100644 --- a/examples/2.3.x/server-go/examples/project/update-o-auth-2-discord.md +++ b/examples/2.3.x/server-go/examples/project/update-o-auth-2-discord.md @@ -20,6 +20,7 @@ func main() { response, err := service.UpdateOAuth2Discord( service.WithUpdateOAuth2DiscordClientId("<CLIENT_ID>"), service.WithUpdateOAuth2DiscordClientSecret("<CLIENT_SECRET>"), + service.WithUpdateOAuth2DiscordPrompt([]string{"example"}), service.WithUpdateOAuth2DiscordEnabled(false), ) fmt.Println(response, err) diff --git a/examples/2.3.x/server-go/examples/project/update-o-auth-2-git-hub.md b/examples/2.3.x/server-go/examples/project/update-o-auth-2-git-hub.md index 19475e4b6..cb0ab1643 100644 --- a/examples/2.3.x/server-go/examples/project/update-o-auth-2-git-hub.md +++ b/examples/2.3.x/server-go/examples/project/update-o-auth-2-git-hub.md @@ -20,6 +20,7 @@ func main() { response, err := service.UpdateOAuth2GitHub( service.WithUpdateOAuth2GitHubClientId("<CLIENT_ID>"), service.WithUpdateOAuth2GitHubClientSecret("<CLIENT_SECRET>"), + service.WithUpdateOAuth2GitHubPrompt([]string{"example"}), service.WithUpdateOAuth2GitHubEnabled(false), ) fmt.Println(response, err) diff --git a/examples/2.3.x/server-go/examples/project/update-o-auth-2-kakao.md b/examples/2.3.x/server-go/examples/project/update-o-auth-2-kakao.md index 5979e6dfa..7dff64ac5 100644 --- a/examples/2.3.x/server-go/examples/project/update-o-auth-2-kakao.md +++ b/examples/2.3.x/server-go/examples/project/update-o-auth-2-kakao.md @@ -20,6 +20,7 @@ func main() { response, err := service.UpdateOAuth2Kakao( service.WithUpdateOAuth2KakaoClientId("<CLIENT_ID>"), service.WithUpdateOAuth2KakaoClientSecret("<CLIENT_SECRET>"), + service.WithUpdateOAuth2KakaoPrompt([]string{"example"}), service.WithUpdateOAuth2KakaoEnabled(false), ) fmt.Println(response, err) diff --git a/examples/2.3.x/server-go/examples/project/update-o-auth-2-microsoft.md b/examples/2.3.x/server-go/examples/project/update-o-auth-2-microsoft.md index 3a6606aa6..3c6888c76 100644 --- a/examples/2.3.x/server-go/examples/project/update-o-auth-2-microsoft.md +++ b/examples/2.3.x/server-go/examples/project/update-o-auth-2-microsoft.md @@ -21,6 +21,7 @@ func main() { service.WithUpdateOAuth2MicrosoftApplicationId("<APPLICATION_ID>"), service.WithUpdateOAuth2MicrosoftApplicationSecret("<APPLICATION_SECRET>"), service.WithUpdateOAuth2MicrosoftTenant("<TENANT>"), + service.WithUpdateOAuth2MicrosoftPrompt([]string{"example"}), service.WithUpdateOAuth2MicrosoftEnabled(false), ) fmt.Println(response, err) diff --git a/examples/2.3.x/server-go/examples/project/update-o-auth-2-okta.md b/examples/2.3.x/server-go/examples/project/update-o-auth-2-okta.md index 187e372f9..354ffff8c 100644 --- a/examples/2.3.x/server-go/examples/project/update-o-auth-2-okta.md +++ b/examples/2.3.x/server-go/examples/project/update-o-auth-2-okta.md @@ -22,6 +22,7 @@ func main() { service.WithUpdateOAuth2OktaClientSecret("<CLIENT_SECRET>"), service.WithUpdateOAuth2OktaDomain("example.com"), service.WithUpdateOAuth2OktaAuthorizationServerId("<AUTHORIZATION_SERVER_ID>"), + service.WithUpdateOAuth2OktaPrompt([]string{"example"}), service.WithUpdateOAuth2OktaEnabled(false), ) fmt.Println(response, err) diff --git a/examples/2.3.x/server-go/examples/project/update-o-auth-2-salesforce.md b/examples/2.3.x/server-go/examples/project/update-o-auth-2-salesforce.md index 7777013b3..12ac87ea0 100644 --- a/examples/2.3.x/server-go/examples/project/update-o-auth-2-salesforce.md +++ b/examples/2.3.x/server-go/examples/project/update-o-auth-2-salesforce.md @@ -20,6 +20,7 @@ func main() { response, err := service.UpdateOAuth2Salesforce( service.WithUpdateOAuth2SalesforceCustomerKey("<CUSTOMER_KEY>"), service.WithUpdateOAuth2SalesforceCustomerSecret("<CUSTOMER_SECRET>"), + service.WithUpdateOAuth2SalesforcePrompt([]string{"example"}), service.WithUpdateOAuth2SalesforceEnabled(false), ) fmt.Println(response, err) diff --git a/examples/2.3.x/server-go/examples/project/update-o-auth-2-webflow.md b/examples/2.3.x/server-go/examples/project/update-o-auth-2-webflow.md new file mode 100644 index 000000000..1c8d8d3a1 --- /dev/null +++ b/examples/2.3.x/server-go/examples/project/update-o-auth-2-webflow.md @@ -0,0 +1,27 @@ +```go +package main + +import ( + "fmt" + + "github.com/appwrite/sdk-for-go/v7/appwrite" + "github.com/appwrite/sdk-for-go/v7/project" +) + +func main() { + client := appwrite.NewClient( + appwrite.WithEndpoint("https://<REGION>.cloud.appwrite.io/v1"), + appwrite.WithProject("<YOUR_PROJECT_ID>"), + appwrite.WithKey("<YOUR_API_KEY>"), + ) + + service := project.New(client) + + response, err := service.UpdateOAuth2Webflow( + service.WithUpdateOAuth2WebflowClientId("<CLIENT_ID>"), + service.WithUpdateOAuth2WebflowClientSecret("<CLIENT_SECRET>"), + service.WithUpdateOAuth2WebflowEnabled(false), + ) + fmt.Println(response, err) +} +``` diff --git a/examples/2.3.x/server-go/examples/project/update-o-auth-2-zoho.md b/examples/2.3.x/server-go/examples/project/update-o-auth-2-zoho.md index 4c4991006..07d6c9577 100644 --- a/examples/2.3.x/server-go/examples/project/update-o-auth-2-zoho.md +++ b/examples/2.3.x/server-go/examples/project/update-o-auth-2-zoho.md @@ -20,6 +20,7 @@ func main() { response, err := service.UpdateOAuth2Zoho( service.WithUpdateOAuth2ZohoClientId("<CLIENT_ID>"), service.WithUpdateOAuth2ZohoClientSecret("<CLIENT_SECRET>"), + service.WithUpdateOAuth2ZohoPrompt([]string{"example"}), service.WithUpdateOAuth2ZohoEnabled(false), ) fmt.Println(response, err) diff --git a/examples/2.3.x/server-go/examples/sites/list-frameworks.md b/examples/2.3.x/server-go/examples/sites/list-frameworks.md index 6862114fb..96829e8b1 100644 --- a/examples/2.3.x/server-go/examples/sites/list-frameworks.md +++ b/examples/2.3.x/server-go/examples/sites/list-frameworks.md @@ -17,7 +17,9 @@ func main() { service := sites.New(client) - response, err := service.ListFrameworks() + response, err := service.ListFrameworks( + service.WithListFrameworksTotal(false), + ) fmt.Println(response, err) } ``` diff --git a/examples/2.3.x/server-go/examples/sites/list-specifications.md b/examples/2.3.x/server-go/examples/sites/list-specifications.md index ef95d028f..c3279c241 100644 --- a/examples/2.3.x/server-go/examples/sites/list-specifications.md +++ b/examples/2.3.x/server-go/examples/sites/list-specifications.md @@ -19,6 +19,7 @@ func main() { response, err := service.ListSpecifications( service.WithListSpecificationsType("runtimes"), + service.WithListSpecificationsTotal(false), ) fmt.Println(response, err) } diff --git a/examples/2.3.x/server-go/examples/tablesdb/create-index.md b/examples/2.3.x/server-go/examples/tablesdb/create-index.md index e39b2c13b..df3b2d951 100644 --- a/examples/2.3.x/server-go/examples/tablesdb/create-index.md +++ b/examples/2.3.x/server-go/examples/tablesdb/create-index.md @@ -22,7 +22,7 @@ func main() { "<TABLE_ID>", "<KEY>", "key", - []string{"example"}, + []string{"username"}, service.WithCreateIndexOrders([]string{"example"}), service.WithCreateIndexLengths([]int{0}), ) diff --git a/examples/2.3.x/server-go/examples/tablesdb/create-rows.md b/examples/2.3.x/server-go/examples/tablesdb/create-rows.md index 42ebd01af..ab2df626b 100644 --- a/examples/2.3.x/server-go/examples/tablesdb/create-rows.md +++ b/examples/2.3.x/server-go/examples/tablesdb/create-rows.md @@ -20,7 +20,7 @@ func main() { response, err := service.CreateRows( "<DATABASE_ID>", "<TABLE_ID>", - []interface{}{}, + []interface{}{map[string]interface{}{"$id": "example1", "username": "walter.obrien", "email": "walter.obrien@example.com", "fullName": "Walter O'Brien", "age": 30, "isAdmin": false}}, service.WithCreateRowsTransactionId("<TRANSACTION_ID>"), ) fmt.Println(response, err) diff --git a/examples/2.3.x/server-go/examples/tablesdb/delete-rows.md b/examples/2.3.x/server-go/examples/tablesdb/delete-rows.md index 9c2089943..262d59b4f 100644 --- a/examples/2.3.x/server-go/examples/tablesdb/delete-rows.md +++ b/examples/2.3.x/server-go/examples/tablesdb/delete-rows.md @@ -20,7 +20,7 @@ func main() { response, err := service.DeleteRows( "<DATABASE_ID>", "<TABLE_ID>", - service.WithDeleteRowsQueries([]string{"example"}), + service.WithDeleteRowsQueries([]string{"{\"method\":\"equal\", \"attribute\":\"$id\", \"values\":[\"<ROW_ID>\"]}"}), service.WithDeleteRowsTransactionId("<TRANSACTION_ID>"), ) fmt.Println(response, err) diff --git a/examples/2.3.x/server-go/examples/tablesdb/list-transactions.md b/examples/2.3.x/server-go/examples/tablesdb/list-transactions.md index e5019450b..0f3da4bfa 100644 --- a/examples/2.3.x/server-go/examples/tablesdb/list-transactions.md +++ b/examples/2.3.x/server-go/examples/tablesdb/list-transactions.md @@ -19,6 +19,7 @@ func main() { response, err := service.ListTransactions( service.WithListTransactionsQueries([]string{"example"}), + service.WithListTransactionsTotal(false), ) fmt.Println(response, err) } diff --git a/examples/2.3.x/server-go/examples/tablesdb/upsert-rows.md b/examples/2.3.x/server-go/examples/tablesdb/upsert-rows.md index b90c54b90..866433ed9 100644 --- a/examples/2.3.x/server-go/examples/tablesdb/upsert-rows.md +++ b/examples/2.3.x/server-go/examples/tablesdb/upsert-rows.md @@ -20,7 +20,7 @@ func main() { response, err := service.UpsertRows( "<DATABASE_ID>", "<TABLE_ID>", - []interface{}{}, + []interface{}{map[string]interface{}{"$id": "example1", "username": "walter.obrien", "email": "walter.obrien@example.com", "fullName": "Walter O'Brien", "age": 30, "isAdmin": false}}, service.WithUpsertRowsTransactionId("<TRANSACTION_ID>"), ) fmt.Println(response, err) diff --git a/examples/2.3.x/server-go/examples/teams/create-membership.md b/examples/2.3.x/server-go/examples/teams/create-membership.md index c57f11ca6..026549fcd 100644 --- a/examples/2.3.x/server-go/examples/teams/create-membership.md +++ b/examples/2.3.x/server-go/examples/teams/create-membership.md @@ -19,7 +19,7 @@ func main() { response, err := service.CreateMembership( "<TEAM_ID>", - []string{"example"}, + []string{"editor"}, service.WithCreateMembershipEmail("email@example.com"), service.WithCreateMembershipUserId("<USER_ID>"), service.WithCreateMembershipPhone("+12065550100"), diff --git a/examples/2.3.x/server-go/examples/teams/update-membership.md b/examples/2.3.x/server-go/examples/teams/update-membership.md index a94eaf2b2..b4ab5effa 100644 --- a/examples/2.3.x/server-go/examples/teams/update-membership.md +++ b/examples/2.3.x/server-go/examples/teams/update-membership.md @@ -20,7 +20,7 @@ func main() { response, err := service.UpdateMembership( "<TEAM_ID>", "<MEMBERSHIP_ID>", - []string{"example"}, + []string{"editor"}, ) fmt.Println(response, err) } diff --git a/examples/2.3.x/server-go/examples/users/update-labels.md b/examples/2.3.x/server-go/examples/users/update-labels.md index d673b10d0..635364c57 100644 --- a/examples/2.3.x/server-go/examples/users/update-labels.md +++ b/examples/2.3.x/server-go/examples/users/update-labels.md @@ -19,7 +19,7 @@ func main() { response, err := service.UpdateLabels( "<USER_ID>", - []string{"example"}, + []string{"subscriber"}, ) fmt.Println(response, err) } diff --git a/examples/2.3.x/server-go/examples/vectorsdb/create-collection.md b/examples/2.3.x/server-go/examples/vectorsdb/create-collection.md index 6df7ac496..c8e6ba7e6 100644 --- a/examples/2.3.x/server-go/examples/vectorsdb/create-collection.md +++ b/examples/2.3.x/server-go/examples/vectorsdb/create-collection.md @@ -21,7 +21,7 @@ func main() { "<DATABASE_ID>", "<COLLECTION_ID>", "<NAME>", - 1, + 4, service.WithCreateCollectionPermissions([]string{"read(\"any\")"}), service.WithCreateCollectionDocumentSecurity(false), service.WithCreateCollectionEnabled(false), diff --git a/examples/2.3.x/server-go/examples/vectorsdb/create-documents.md b/examples/2.3.x/server-go/examples/vectorsdb/create-documents.md index 1f1eacde0..b9939c6b7 100644 --- a/examples/2.3.x/server-go/examples/vectorsdb/create-documents.md +++ b/examples/2.3.x/server-go/examples/vectorsdb/create-documents.md @@ -20,7 +20,7 @@ func main() { response, err := service.CreateDocuments( "<DATABASE_ID>", "<COLLECTION_ID>", - []interface{}{}, + []interface{}{map[string]interface{}{"$id": "example1", "embeddings": []interface{}{0.12, -0.55, 0.88, 1.02}, "metadata": map[string]interface{}{"name": "First document"}}}, service.WithCreateDocumentsTransactionId("<TRANSACTION_ID>"), ) fmt.Println(response, err) diff --git a/examples/2.3.x/server-go/examples/vectorsdb/create-index.md b/examples/2.3.x/server-go/examples/vectorsdb/create-index.md index 7be384220..d26529477 100644 --- a/examples/2.3.x/server-go/examples/vectorsdb/create-index.md +++ b/examples/2.3.x/server-go/examples/vectorsdb/create-index.md @@ -22,7 +22,7 @@ func main() { "<COLLECTION_ID>", "<KEY>", "hnsw_euclidean", - []string{"example"}, + []string{"embeddings"}, service.WithCreateIndexOrders([]string{"example"}), service.WithCreateIndexLengths([]int{0}), ) diff --git a/examples/2.3.x/server-go/examples/vectorsdb/create-operations.md b/examples/2.3.x/server-go/examples/vectorsdb/create-operations.md index c6e7737cb..49050089b 100644 --- a/examples/2.3.x/server-go/examples/vectorsdb/create-operations.md +++ b/examples/2.3.x/server-go/examples/vectorsdb/create-operations.md @@ -19,7 +19,7 @@ func main() { response, err := service.CreateOperations( "<TRANSACTION_ID>", - service.WithCreateOperationsOperations([]interface{}{map[string]interface{}{"action": "create", "databaseId": "<DATABASE_ID>", "collectionId": "<COLLECTION_ID>", "documentId": "<DOCUMENT_ID>", "data": map[string]interface{}{"name": "Walter O'Brien"}}}), + service.WithCreateOperationsOperations([]interface{}{map[string]interface{}{"action": "create", "databaseId": "<DATABASE_ID>", "collectionId": "<COLLECTION_ID>", "documentId": "<DOCUMENT_ID>", "data": map[string]interface{}{"embeddings": []interface{}{0.12, -0.55, 0.88, 1.02}, "metadata": map[string]interface{}{"name": "First document"}}}}), ) fmt.Println(response, err) } diff --git a/examples/2.3.x/server-go/examples/vectorsdb/delete-documents.md b/examples/2.3.x/server-go/examples/vectorsdb/delete-documents.md index 6242d445f..b0f0cd93c 100644 --- a/examples/2.3.x/server-go/examples/vectorsdb/delete-documents.md +++ b/examples/2.3.x/server-go/examples/vectorsdb/delete-documents.md @@ -20,7 +20,7 @@ func main() { response, err := service.DeleteDocuments( "<DATABASE_ID>", "<COLLECTION_ID>", - service.WithDeleteDocumentsQueries([]string{"example"}), + service.WithDeleteDocumentsQueries([]string{"{\"method\":\"equal\", \"attribute\":\"$id\", \"values\":[\"<DOCUMENT_ID>\"]}"}), service.WithDeleteDocumentsTransactionId("<TRANSACTION_ID>"), ) fmt.Println(response, err) diff --git a/examples/2.3.x/server-go/examples/vectorsdb/list-transactions.md b/examples/2.3.x/server-go/examples/vectorsdb/list-transactions.md index 5d70bdd05..1789ed9d0 100644 --- a/examples/2.3.x/server-go/examples/vectorsdb/list-transactions.md +++ b/examples/2.3.x/server-go/examples/vectorsdb/list-transactions.md @@ -19,6 +19,7 @@ func main() { response, err := service.ListTransactions( service.WithListTransactionsQueries([]string{"example"}), + service.WithListTransactionsTotal(false), ) fmt.Println(response, err) } diff --git a/examples/2.3.x/server-go/examples/vectorsdb/update-collection.md b/examples/2.3.x/server-go/examples/vectorsdb/update-collection.md index 6483561a7..34168ec5b 100644 --- a/examples/2.3.x/server-go/examples/vectorsdb/update-collection.md +++ b/examples/2.3.x/server-go/examples/vectorsdb/update-collection.md @@ -21,7 +21,7 @@ func main() { "<DATABASE_ID>", "<COLLECTION_ID>", "<NAME>", - service.WithUpdateCollectionDimension(1), + service.WithUpdateCollectionDimension(4), service.WithUpdateCollectionPermissions([]string{"read(\"any\")"}), service.WithUpdateCollectionDocumentSecurity(false), service.WithUpdateCollectionEnabled(false), diff --git a/examples/2.3.x/server-go/examples/vectorsdb/upsert-documents.md b/examples/2.3.x/server-go/examples/vectorsdb/upsert-documents.md index 85fc23658..6c3ac5d4a 100644 --- a/examples/2.3.x/server-go/examples/vectorsdb/upsert-documents.md +++ b/examples/2.3.x/server-go/examples/vectorsdb/upsert-documents.md @@ -20,7 +20,7 @@ func main() { response, err := service.UpsertDocuments( "<DATABASE_ID>", "<COLLECTION_ID>", - []interface{}{}, + []interface{}{map[string]interface{}{"$id": "example1", "embeddings": []interface{}{0.12, -0.55, 0.88, 1.02}, "metadata": map[string]interface{}{"name": "First document"}}}, service.WithUpsertDocumentsTransactionId("<TRANSACTION_ID>"), ) fmt.Println(response, err) diff --git a/examples/2.3.x/server-go/examples/webhooks/create.md b/examples/2.3.x/server-go/examples/webhooks/create.md index 90561b70e..5ac9d50b7 100644 --- a/examples/2.3.x/server-go/examples/webhooks/create.md +++ b/examples/2.3.x/server-go/examples/webhooks/create.md @@ -21,7 +21,7 @@ func main() { "<WEBHOOK_ID>", "https://example.com/webhook", "<NAME>", - []string{"example"}, + []string{"users.*.create"}, service.WithCreateEnabled(false), service.WithCreateTls(false), service.WithCreateAuthUsername("<AUTH_USERNAME>"), diff --git a/examples/2.3.x/server-go/examples/webhooks/update.md b/examples/2.3.x/server-go/examples/webhooks/update.md index e344b75f8..b5ce3bd00 100644 --- a/examples/2.3.x/server-go/examples/webhooks/update.md +++ b/examples/2.3.x/server-go/examples/webhooks/update.md @@ -21,7 +21,7 @@ func main() { "<WEBHOOK_ID>", "<NAME>", "https://example.com/webhook", - []string{"example"}, + []string{"users.*.create"}, service.WithUpdateEnabled(false), service.WithUpdateTls(false), service.WithUpdateAuthUsername("<AUTH_USERNAME>"), diff --git a/examples/2.3.x/server-graphql/examples/account/create-email-password-session.md b/examples/2.3.x/server-graphql/examples/account/create-email-password-session.md index c68a4feb2..530acb1ed 100644 --- a/examples/2.3.x/server-graphql/examples/account/create-email-password-session.md +++ b/examples/2.3.x/server-graphql/examples/account/create-email-password-session.md @@ -2,7 +2,8 @@ mutation { accountCreateEmailPasswordSession( email: "email@example.com", - password: "password" + password: "password", + duration: 60 ) { _id _createdAt diff --git a/examples/2.3.x/server-graphql/examples/account/delete-sessions.md b/examples/2.3.x/server-graphql/examples/account/delete-sessions.md index 65f6900e5..9edcbc74a 100644 --- a/examples/2.3.x/server-graphql/examples/account/delete-sessions.md +++ b/examples/2.3.x/server-graphql/examples/account/delete-sessions.md @@ -1,6 +1,8 @@ ```graphql mutation { - accountDeleteSessions { + accountDeleteSessions( + current: false + ) { status } } diff --git a/examples/2.3.x/server-graphql/examples/account/list-sessions.md b/examples/2.3.x/server-graphql/examples/account/list-sessions.md index 106419a76..62cf7fc2c 100644 --- a/examples/2.3.x/server-graphql/examples/account/list-sessions.md +++ b/examples/2.3.x/server-graphql/examples/account/list-sessions.md @@ -1,6 +1,8 @@ ```graphql query { - accountListSessions { + accountListSessions( + total: false + ) { total sessions { _id diff --git a/examples/2.3.x/server-graphql/examples/analytics/create-event.md b/examples/2.3.x/server-graphql/examples/analytics/create-event.md new file mode 100644 index 000000000..5e58df415 --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/analytics/create-event.md @@ -0,0 +1,21 @@ +```graphql +mutation { + analyticsCreateEvent( + propertyId: "<PROPERTY_ID>", + name: "<NAME>", + url: "https://example.com", + domain: "<DOMAIN>", + referrer: "<REFERRER>", + screenWidth: 0, + sessionHash: "<SESSION_HASH>", + scrollDepth: 0, + engagementTime: 0, + props: [], + userId: "<USER_ID>", + ip: "<IP>", + userAgent: "<USER_AGENT>" + ) { + status + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/analytics/create-property.md b/examples/2.3.x/server-graphql/examples/analytics/create-property.md new file mode 100644 index 000000000..eacdcbad2 --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/analytics/create-property.md @@ -0,0 +1,24 @@ +```graphql +mutation { + analyticsCreateProperty( + propertyId: "<PROPERTY_ID>", + name: "<NAME>", + domain: "<DOMAIN>", + timezone: "<TIMEZONE>", + enabled: false, + public: false, + allowedOrigins: [] + ) { + _id + _createdAt + _updatedAt + name + domain + timezone + enabled + public + allowedOrigins + snippetId + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/analytics/delete-property.md b/examples/2.3.x/server-graphql/examples/analytics/delete-property.md new file mode 100644 index 000000000..34de4c472 --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/analytics/delete-property.md @@ -0,0 +1,9 @@ +```graphql +mutation { + analyticsDeleteProperty( + propertyId: "<PROPERTY_ID>" + ) { + status + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/analytics/get-property.md b/examples/2.3.x/server-graphql/examples/analytics/get-property.md new file mode 100644 index 000000000..8787a761e --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/analytics/get-property.md @@ -0,0 +1,18 @@ +```graphql +query { + analyticsGetProperty( + propertyId: "<PROPERTY_ID>" + ) { + _id + _createdAt + _updatedAt + name + domain + timezone + enabled + public + allowedOrigins + snippetId + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/analytics/list-metrics.md b/examples/2.3.x/server-graphql/examples/analytics/list-metrics.md new file mode 100644 index 000000000..7d28be8c7 --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/analytics/list-metrics.md @@ -0,0 +1,30 @@ +```graphql +query { + analyticsListMetrics( + propertyId: "<PROPERTY_ID>", + queries: [], + interval: "1h", + dimensions: [], + dateRange: "<DATE_RANGE>", + startAt: "2020-10-15T06:38:00.000+00:00", + endAt: "2020-10-15T06:38:00.000+00:00", + limit: 1 + ) { + total + metrics { + value + date + visitors + sessions + pageviews + events + visits + bounceRate + visitDuration + viewsPerVisit + scrollDepth + engagementTime + } + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/analytics/list-properties.md b/examples/2.3.x/server-graphql/examples/analytics/list-properties.md new file mode 100644 index 000000000..db02e01b1 --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/analytics/list-properties.md @@ -0,0 +1,23 @@ +```graphql +query { + analyticsListProperties( + queries: [], + search: "<SEARCH>", + total: false + ) { + total + properties { + _id + _createdAt + _updatedAt + name + domain + timezone + enabled + public + allowedOrigins + snippetId + } + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/analytics/update-property.md b/examples/2.3.x/server-graphql/examples/analytics/update-property.md new file mode 100644 index 000000000..1a7bb6079 --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/analytics/update-property.md @@ -0,0 +1,24 @@ +```graphql +mutation { + analyticsUpdateProperty( + propertyId: "<PROPERTY_ID>", + name: "<NAME>", + domain: "<DOMAIN>", + timezone: "<TIMEZONE>", + enabled: false, + public: false, + allowedOrigins: [] + ) { + _id + _createdAt + _updatedAt + name + domain + timezone + enabled + public + allowedOrigins + snippetId + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/avatars/delete-photo.md b/examples/2.3.x/server-graphql/examples/avatars/delete-photo.md new file mode 100644 index 000000000..6c7d6afef --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/avatars/delete-photo.md @@ -0,0 +1,7 @@ +```graphql +mutation { + avatarsDeletePhoto { + status + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/avatars/get-screenshot.md b/examples/2.3.x/server-graphql/examples/avatars/get-screenshot.md index f5cab660c..2b6612c38 100644 --- a/examples/2.3.x/server-graphql/examples/avatars/get-screenshot.md +++ b/examples/2.3.x/server-graphql/examples/avatars/get-screenshot.md @@ -2,7 +2,7 @@ query { avatarsGetScreenshot( url: "https://example.com", - headers: "{\"Authorization\":\"Bearer token123\",\"X-Custom-Header\":\"value\"}", + headers: "{\"Accept-Language\":\"en-US,en;q=0.9\"}", viewportWidth: 1920, viewportHeight: 1080, scale: 2, diff --git a/examples/2.3.x/server-graphql/examples/avatars/update-photo.md b/examples/2.3.x/server-graphql/examples/avatars/update-photo.md new file mode 100644 index 000000000..de86d4034 --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/avatars/update-photo.md @@ -0,0 +1,26 @@ +```graphql +PUT /v1/avatars/photo HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: multipart/form-data; boundary="cec8e8123c05ba25" +Accept: application/json +X-Appwrite-Response-Format: 2.3.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +Content-Length: *Length of your entity body in bytes* + +--cec8e8123c05ba25 +Content-Disposition: form-data; name="operations" + +{ "query": "mutation { avatarsUpdatePhoto(file: $file) { id }" }, "variables": { "file": null } } + +--cec8e8123c05ba25 +Content-Disposition: form-data; name="map" + +{ "0": ["variables.file"] } + +--cec8e8123c05ba25 +Content-Disposition: form-data; name="0"; filename="file.ext" + +File contents + +--cec8e8123c05ba25-- +``` diff --git a/examples/2.3.x/server-graphql/examples/databases/create-documents.md b/examples/2.3.x/server-graphql/examples/databases/create-documents.md index 67d038e93..8a81ce381 100644 --- a/examples/2.3.x/server-graphql/examples/databases/create-documents.md +++ b/examples/2.3.x/server-graphql/examples/databases/create-documents.md @@ -3,7 +3,16 @@ mutation { databasesCreateDocuments( databaseId: "<DATABASE_ID>", collectionId: "<COLLECTION_ID>", - documents: [], + documents: [ + { + "$id": "example1", + "username": "walter.obrien", + "email": "walter.obrien@example.com", + "fullName": "Walter O'Brien", + "age": 30, + "isAdmin": false + } + ], transactionId: "<TRANSACTION_ID>" ) { total diff --git a/examples/2.3.x/server-graphql/examples/databases/create-index.md b/examples/2.3.x/server-graphql/examples/databases/create-index.md index 6676113e4..0f02f414b 100644 --- a/examples/2.3.x/server-graphql/examples/databases/create-index.md +++ b/examples/2.3.x/server-graphql/examples/databases/create-index.md @@ -5,7 +5,7 @@ mutation { collectionId: "<COLLECTION_ID>", key: "<KEY>", type: "key", - attributes: [], + attributes: ["username"], orders: [], lengths: [] ) { diff --git a/examples/2.3.x/server-graphql/examples/databases/delete-documents.md b/examples/2.3.x/server-graphql/examples/databases/delete-documents.md index 6cf4405ca..5ea1fc44a 100644 --- a/examples/2.3.x/server-graphql/examples/databases/delete-documents.md +++ b/examples/2.3.x/server-graphql/examples/databases/delete-documents.md @@ -3,7 +3,7 @@ mutation { databasesDeleteDocuments( databaseId: "<DATABASE_ID>", collectionId: "<COLLECTION_ID>", - queries: [], + queries: ["{\"method\":\"equal\", \"attribute\":\"$id\", \"values\":[\"<DOCUMENT_ID>\"]}"], transactionId: "<TRANSACTION_ID>" ) { total diff --git a/examples/2.3.x/server-graphql/examples/databases/list-transactions.md b/examples/2.3.x/server-graphql/examples/databases/list-transactions.md index 2fc18db35..093d901bf 100644 --- a/examples/2.3.x/server-graphql/examples/databases/list-transactions.md +++ b/examples/2.3.x/server-graphql/examples/databases/list-transactions.md @@ -1,7 +1,8 @@ ```graphql query { databasesListTransactions( - queries: [] + queries: [], + total: false ) { total transactions { diff --git a/examples/2.3.x/server-graphql/examples/databases/upsert-documents.md b/examples/2.3.x/server-graphql/examples/databases/upsert-documents.md index eb0573545..6fd59b82d 100644 --- a/examples/2.3.x/server-graphql/examples/databases/upsert-documents.md +++ b/examples/2.3.x/server-graphql/examples/databases/upsert-documents.md @@ -3,7 +3,16 @@ mutation { databasesUpsertDocuments( databaseId: "<DATABASE_ID>", collectionId: "<COLLECTION_ID>", - documents: [], + documents: [ + { + "$id": "example1", + "username": "walter.obrien", + "email": "walter.obrien@example.com", + "fullName": "Walter O'Brien", + "age": 30, + "isAdmin": false + } + ], transactionId: "<TRANSACTION_ID>" ) { total diff --git a/examples/2.3.x/server-graphql/examples/documentsdb/create-documents.md b/examples/2.3.x/server-graphql/examples/documentsdb/create-documents.md index 211576113..aa16ec584 100644 --- a/examples/2.3.x/server-graphql/examples/documentsdb/create-documents.md +++ b/examples/2.3.x/server-graphql/examples/documentsdb/create-documents.md @@ -3,7 +3,16 @@ mutation { documentsDBCreateDocuments( databaseId: "<DATABASE_ID>", collectionId: "<COLLECTION_ID>", - documents: [], + documents: [ + { + "$id": "example1", + "username": "walter.obrien", + "email": "walter.obrien@example.com", + "fullName": "Walter O'Brien", + "age": 30, + "isAdmin": false + } + ], transactionId: "<TRANSACTION_ID>" ) { total diff --git a/examples/2.3.x/server-graphql/examples/documentsdb/create-index.md b/examples/2.3.x/server-graphql/examples/documentsdb/create-index.md index bc51f4562..ef27ea458 100644 --- a/examples/2.3.x/server-graphql/examples/documentsdb/create-index.md +++ b/examples/2.3.x/server-graphql/examples/documentsdb/create-index.md @@ -5,7 +5,7 @@ mutation { collectionId: "<COLLECTION_ID>", key: "<KEY>", type: "key", - attributes: [], + attributes: ["username"], orders: [], lengths: [] ) { diff --git a/examples/2.3.x/server-graphql/examples/documentsdb/delete-documents.md b/examples/2.3.x/server-graphql/examples/documentsdb/delete-documents.md index 46deb6f75..5ffa52b6a 100644 --- a/examples/2.3.x/server-graphql/examples/documentsdb/delete-documents.md +++ b/examples/2.3.x/server-graphql/examples/documentsdb/delete-documents.md @@ -3,7 +3,7 @@ mutation { documentsDBDeleteDocuments( databaseId: "<DATABASE_ID>", collectionId: "<COLLECTION_ID>", - queries: [], + queries: ["{\"method\":\"equal\", \"attribute\":\"$id\", \"values\":[\"<DOCUMENT_ID>\"]}"], transactionId: "<TRANSACTION_ID>" ) { total diff --git a/examples/2.3.x/server-graphql/examples/documentsdb/list-transactions.md b/examples/2.3.x/server-graphql/examples/documentsdb/list-transactions.md index 2569dde05..231b6ef78 100644 --- a/examples/2.3.x/server-graphql/examples/documentsdb/list-transactions.md +++ b/examples/2.3.x/server-graphql/examples/documentsdb/list-transactions.md @@ -1,7 +1,8 @@ ```graphql query { documentsDBListTransactions( - queries: [] + queries: [], + total: false ) { total transactions { diff --git a/examples/2.3.x/server-graphql/examples/documentsdb/upsert-documents.md b/examples/2.3.x/server-graphql/examples/documentsdb/upsert-documents.md index 2a6ed4885..fee387850 100644 --- a/examples/2.3.x/server-graphql/examples/documentsdb/upsert-documents.md +++ b/examples/2.3.x/server-graphql/examples/documentsdb/upsert-documents.md @@ -3,7 +3,16 @@ mutation { documentsDBUpsertDocuments( databaseId: "<DATABASE_ID>", collectionId: "<COLLECTION_ID>", - documents: [], + documents: [ + { + "$id": "example1", + "username": "walter.obrien", + "email": "walter.obrien@example.com", + "fullName": "Walter O'Brien", + "age": 30, + "isAdmin": false + } + ], transactionId: "<TRANSACTION_ID>" ) { total diff --git a/examples/2.3.x/server-graphql/examples/embeddings/create-text-embeddings.md b/examples/2.3.x/server-graphql/examples/embeddings/create-text-embeddings.md index 0fcc63982..727ce198c 100644 --- a/examples/2.3.x/server-graphql/examples/embeddings/create-text-embeddings.md +++ b/examples/2.3.x/server-graphql/examples/embeddings/create-text-embeddings.md @@ -1,7 +1,7 @@ ```graphql mutation { embeddingsCreateTextEmbeddings( - texts: [], + texts: ["Appwrite helps developers build applications.", "Find documents with semantic search."], model: "nomic-embed-text" ) { total diff --git a/examples/2.3.x/server-graphql/examples/functions/list-runtimes.md b/examples/2.3.x/server-graphql/examples/functions/list-runtimes.md index ef88ce307..f8f35340e 100644 --- a/examples/2.3.x/server-graphql/examples/functions/list-runtimes.md +++ b/examples/2.3.x/server-graphql/examples/functions/list-runtimes.md @@ -1,6 +1,8 @@ ```graphql query { - functionsListRuntimes { + functionsListRuntimes( + total: false + ) { total runtimes { _id diff --git a/examples/2.3.x/server-graphql/examples/functions/list-specifications.md b/examples/2.3.x/server-graphql/examples/functions/list-specifications.md index 75402c357..cd5175b08 100644 --- a/examples/2.3.x/server-graphql/examples/functions/list-specifications.md +++ b/examples/2.3.x/server-graphql/examples/functions/list-specifications.md @@ -1,7 +1,8 @@ ```graphql query { functionsListSpecifications( - type: "runtimes" + type: "runtimes", + total: false ) { total specifications { diff --git a/examples/2.3.x/server-graphql/examples/locale/list-codes.md b/examples/2.3.x/server-graphql/examples/locale/list-codes.md index 0e3967246..a644a58f0 100644 --- a/examples/2.3.x/server-graphql/examples/locale/list-codes.md +++ b/examples/2.3.x/server-graphql/examples/locale/list-codes.md @@ -1,6 +1,8 @@ ```graphql query { - localeListCodes { + localeListCodes( + total: false + ) { total localeCodes { code diff --git a/examples/2.3.x/server-graphql/examples/locale/list-continents.md b/examples/2.3.x/server-graphql/examples/locale/list-continents.md index 16ad0fd94..36fe38f20 100644 --- a/examples/2.3.x/server-graphql/examples/locale/list-continents.md +++ b/examples/2.3.x/server-graphql/examples/locale/list-continents.md @@ -1,6 +1,8 @@ ```graphql query { - localeListContinents { + localeListContinents( + total: false + ) { total continents { name diff --git a/examples/2.3.x/server-graphql/examples/locale/list-countries-eu.md b/examples/2.3.x/server-graphql/examples/locale/list-countries-eu.md index 293d32c9c..fc9bf2538 100644 --- a/examples/2.3.x/server-graphql/examples/locale/list-countries-eu.md +++ b/examples/2.3.x/server-graphql/examples/locale/list-countries-eu.md @@ -1,6 +1,8 @@ ```graphql query { - localeListCountriesEU { + localeListCountriesEU( + total: false + ) { total countries { name diff --git a/examples/2.3.x/server-graphql/examples/locale/list-countries-phones.md b/examples/2.3.x/server-graphql/examples/locale/list-countries-phones.md index b17b065e3..d298bfc99 100644 --- a/examples/2.3.x/server-graphql/examples/locale/list-countries-phones.md +++ b/examples/2.3.x/server-graphql/examples/locale/list-countries-phones.md @@ -1,6 +1,8 @@ ```graphql query { - localeListCountriesPhones { + localeListCountriesPhones( + total: false + ) { total phones { code diff --git a/examples/2.3.x/server-graphql/examples/locale/list-countries.md b/examples/2.3.x/server-graphql/examples/locale/list-countries.md index 15f566af0..2e8a3e95e 100644 --- a/examples/2.3.x/server-graphql/examples/locale/list-countries.md +++ b/examples/2.3.x/server-graphql/examples/locale/list-countries.md @@ -1,6 +1,8 @@ ```graphql query { - localeListCountries { + localeListCountries( + total: false + ) { total countries { name diff --git a/examples/2.3.x/server-graphql/examples/locale/list-currencies.md b/examples/2.3.x/server-graphql/examples/locale/list-currencies.md index 374d67126..cdc8bf320 100644 --- a/examples/2.3.x/server-graphql/examples/locale/list-currencies.md +++ b/examples/2.3.x/server-graphql/examples/locale/list-currencies.md @@ -1,6 +1,8 @@ ```graphql query { - localeListCurrencies { + localeListCurrencies( + total: false + ) { total currencies { symbol diff --git a/examples/2.3.x/server-graphql/examples/locale/list-languages.md b/examples/2.3.x/server-graphql/examples/locale/list-languages.md index ed108f5a4..bf61dfd7c 100644 --- a/examples/2.3.x/server-graphql/examples/locale/list-languages.md +++ b/examples/2.3.x/server-graphql/examples/locale/list-languages.md @@ -1,6 +1,8 @@ ```graphql query { - localeListLanguages { + localeListLanguages( + total: false + ) { total languages { name diff --git a/examples/2.3.x/server-graphql/examples/messaging/create-push.md b/examples/2.3.x/server-graphql/examples/messaging/create-push.md index 0f5f68545..85bb76772 100644 --- a/examples/2.3.x/server-graphql/examples/messaging/create-push.md +++ b/examples/2.3.x/server-graphql/examples/messaging/create-push.md @@ -19,7 +19,8 @@ mutation { scheduledAt: "2020-10-15T06:38:00.000+00:00", contentAvailable: false, critical: false, - priority: "normal" + priority: "normal", + channelId: "<CHANNEL_ID>" ) { _id _createdAt diff --git a/examples/2.3.x/server-graphql/examples/messaging/update-email.md b/examples/2.3.x/server-graphql/examples/messaging/update-email.md index 75e45a507..b61b6b080 100644 --- a/examples/2.3.x/server-graphql/examples/messaging/update-email.md +++ b/examples/2.3.x/server-graphql/examples/messaging/update-email.md @@ -2,19 +2,19 @@ mutation { messagingUpdateEmail( messageId: "<MESSAGE_ID>", + subject: "<SUBJECT>", + content: "<CONTENT>", topics: [], users: [], targets: [], - subject: "<SUBJECT>", - content: "<CONTENT>", - draft: false, - html: false, cc: [], bcc: [], + attachments: [], replyToEmail: "email@example.com", replyToName: "<REPLY_TO_NAME>", - scheduledAt: "2020-10-15T06:38:00.000+00:00", - attachments: [] + draft: false, + html: false, + scheduledAt: "2020-10-15T06:38:00.000+00:00" ) { _id _createdAt diff --git a/examples/2.3.x/server-graphql/examples/messaging/update-push.md b/examples/2.3.x/server-graphql/examples/messaging/update-push.md index 6431427d1..d44938fae 100644 --- a/examples/2.3.x/server-graphql/examples/messaging/update-push.md +++ b/examples/2.3.x/server-graphql/examples/messaging/update-push.md @@ -2,11 +2,11 @@ mutation { messagingUpdatePush( messageId: "<MESSAGE_ID>", + title: "<TITLE>", + body: "<BODY>", topics: [], users: [], targets: [], - title: "<TITLE>", - body: "<BODY>", data: "{}", action: "<ACTION>", image: "<ID1:ID2>", @@ -19,7 +19,8 @@ mutation { scheduledAt: "2020-10-15T06:38:00.000+00:00", contentAvailable: false, critical: false, - priority: "normal" + priority: "normal", + channelId: "<CHANNEL_ID>" ) { _id _createdAt diff --git a/examples/2.3.x/server-graphql/examples/messaging/update-sms.md b/examples/2.3.x/server-graphql/examples/messaging/update-sms.md index 4f02a8256..59f4d2128 100644 --- a/examples/2.3.x/server-graphql/examples/messaging/update-sms.md +++ b/examples/2.3.x/server-graphql/examples/messaging/update-sms.md @@ -2,10 +2,10 @@ mutation { messagingUpdateSMS( messageId: "<MESSAGE_ID>", + content: "<CONTENT>", topics: [], users: [], targets: [], - content: "<CONTENT>", draft: false, scheduledAt: "2020-10-15T06:38:00.000+00:00" ) { diff --git a/examples/2.3.x/server-graphql/examples/oauth2/introspect.md b/examples/2.3.x/server-graphql/examples/oauth2/introspect.md new file mode 100644 index 000000000..831783511 --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/oauth2/introspect.md @@ -0,0 +1,23 @@ +```graphql +mutation { + oauth2Introspect( + token: "<TOKEN>", + tokenTypeHint: "access_token", + clientId: "<CLIENT_ID>", + clientSecret: "<CLIENT_SECRET>" + ) { + active + token_use + token_type + scope + client_id + sub + aud + iss + exp + iat + jti + authorization_details + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/organization/create-ephemeral-project-key.md b/examples/2.3.x/server-graphql/examples/organization/create-ephemeral-project-key.md index 0cf04734f..eea1c666e 100644 --- a/examples/2.3.x/server-graphql/examples/organization/create-ephemeral-project-key.md +++ b/examples/2.3.x/server-graphql/examples/organization/create-ephemeral-project-key.md @@ -2,7 +2,7 @@ mutation { organizationCreateEphemeralProjectKey( projectId: "<PROJECT_ID>", - scopes: [], + scopes: ["users.read"], duration: 600 ) { _id diff --git a/examples/2.3.x/server-graphql/examples/organization/update-project-key.md b/examples/2.3.x/server-graphql/examples/organization/update-project-key.md index e9d3661f4..92a9979d1 100644 --- a/examples/2.3.x/server-graphql/examples/organization/update-project-key.md +++ b/examples/2.3.x/server-graphql/examples/organization/update-project-key.md @@ -4,7 +4,7 @@ mutation { projectId: "<PROJECT_ID>", keyId: "<KEY_ID>", name: "<NAME>", - scopes: [], + scopes: ["users.read"], expire: "2020-10-15T06:38:00.000+00:00" ) { _id diff --git a/examples/2.3.x/server-graphql/examples/project/create-ephemeral-key.md b/examples/2.3.x/server-graphql/examples/project/create-ephemeral-key.md index c4b996d3d..93ea5ddb1 100644 --- a/examples/2.3.x/server-graphql/examples/project/create-ephemeral-key.md +++ b/examples/2.3.x/server-graphql/examples/project/create-ephemeral-key.md @@ -1,7 +1,7 @@ ```graphql mutation { projectCreateEphemeralKey( - scopes: [], + scopes: ["users.read"], duration: 600 ) { _id diff --git a/examples/2.3.x/server-graphql/examples/project/create-smtp-test.md b/examples/2.3.x/server-graphql/examples/project/create-smtp-test.md index 2640b7658..8638cb8cc 100644 --- a/examples/2.3.x/server-graphql/examples/project/create-smtp-test.md +++ b/examples/2.3.x/server-graphql/examples/project/create-smtp-test.md @@ -1,7 +1,7 @@ ```graphql mutation { projectCreateSMTPTest( - emails: [] + emails: ["recipient@example.com"] ) { status } diff --git a/examples/2.3.x/server-graphql/examples/project/get-o-auth-2-provider.md b/examples/2.3.x/server-graphql/examples/project/get-o-auth-2-provider.md index 5e49dccd6..cdcbcc4db 100644 --- a/examples/2.3.x/server-graphql/examples/project/get-o-auth-2-provider.md +++ b/examples/2.3.x/server-graphql/examples/project/get-o-auth-2-provider.md @@ -7,6 +7,7 @@ query { enabled clientId clientSecret + prompt } } ``` diff --git a/examples/2.3.x/server-graphql/examples/project/update-key.md b/examples/2.3.x/server-graphql/examples/project/update-key.md index a981941eb..3634fc1a3 100644 --- a/examples/2.3.x/server-graphql/examples/project/update-key.md +++ b/examples/2.3.x/server-graphql/examples/project/update-key.md @@ -3,7 +3,7 @@ mutation { projectUpdateKey( keyId: "<KEY_ID>", name: "<NAME>", - scopes: [], + scopes: ["users.read"], expire: "2020-10-15T06:38:00.000+00:00" ) { _id diff --git a/examples/2.3.x/server-graphql/examples/project/update-labels.md b/examples/2.3.x/server-graphql/examples/project/update-labels.md index cc25ff201..3011d9b6b 100644 --- a/examples/2.3.x/server-graphql/examples/project/update-labels.md +++ b/examples/2.3.x/server-graphql/examples/project/update-labels.md @@ -1,7 +1,7 @@ ```graphql mutation { projectUpdateLabels( - labels: [] + labels: ["production"] ) { _id _createdAt diff --git a/examples/2.3.x/server-graphql/examples/project/update-o-auth-2-auth-0.md b/examples/2.3.x/server-graphql/examples/project/update-o-auth-2-auth-0.md index 746d0517f..c183b581b 100644 --- a/examples/2.3.x/server-graphql/examples/project/update-o-auth-2-auth-0.md +++ b/examples/2.3.x/server-graphql/examples/project/update-o-auth-2-auth-0.md @@ -4,12 +4,14 @@ mutation { clientId: "<CLIENT_ID>", clientSecret: "<CLIENT_SECRET>", endpoint: "<ENDPOINT>", + prompt: [], enabled: false ) { _id enabled clientId clientSecret + prompt endpoint } } diff --git a/examples/2.3.x/server-graphql/examples/project/update-o-auth-2-discord.md b/examples/2.3.x/server-graphql/examples/project/update-o-auth-2-discord.md index 0b3ed71c6..cff29a87a 100644 --- a/examples/2.3.x/server-graphql/examples/project/update-o-auth-2-discord.md +++ b/examples/2.3.x/server-graphql/examples/project/update-o-auth-2-discord.md @@ -3,12 +3,14 @@ mutation { projectUpdateOAuth2Discord( clientId: "<CLIENT_ID>", clientSecret: "<CLIENT_SECRET>", + prompt: [], enabled: false ) { _id enabled clientId clientSecret + prompt } } ``` diff --git a/examples/2.3.x/server-graphql/examples/project/update-o-auth-2-git-hub.md b/examples/2.3.x/server-graphql/examples/project/update-o-auth-2-git-hub.md index f5a3880bd..a67232d98 100644 --- a/examples/2.3.x/server-graphql/examples/project/update-o-auth-2-git-hub.md +++ b/examples/2.3.x/server-graphql/examples/project/update-o-auth-2-git-hub.md @@ -3,12 +3,14 @@ mutation { projectUpdateOAuth2GitHub( clientId: "<CLIENT_ID>", clientSecret: "<CLIENT_SECRET>", + prompt: [], enabled: false ) { _id enabled clientId clientSecret + prompt } } ``` diff --git a/examples/2.3.x/server-graphql/examples/project/update-o-auth-2-kakao.md b/examples/2.3.x/server-graphql/examples/project/update-o-auth-2-kakao.md index 5efba028a..d7bd0d5f2 100644 --- a/examples/2.3.x/server-graphql/examples/project/update-o-auth-2-kakao.md +++ b/examples/2.3.x/server-graphql/examples/project/update-o-auth-2-kakao.md @@ -3,12 +3,14 @@ mutation { projectUpdateOAuth2Kakao( clientId: "<CLIENT_ID>", clientSecret: "<CLIENT_SECRET>", + prompt: [], enabled: false ) { _id enabled clientId clientSecret + prompt } } ``` diff --git a/examples/2.3.x/server-graphql/examples/project/update-o-auth-2-microsoft.md b/examples/2.3.x/server-graphql/examples/project/update-o-auth-2-microsoft.md index b80848c01..b78b8cb7d 100644 --- a/examples/2.3.x/server-graphql/examples/project/update-o-auth-2-microsoft.md +++ b/examples/2.3.x/server-graphql/examples/project/update-o-auth-2-microsoft.md @@ -4,12 +4,14 @@ mutation { applicationId: "<APPLICATION_ID>", applicationSecret: "<APPLICATION_SECRET>", tenant: "<TENANT>", + prompt: [], enabled: false ) { _id enabled applicationId applicationSecret + prompt tenant } } diff --git a/examples/2.3.x/server-graphql/examples/project/update-o-auth-2-oidc.md b/examples/2.3.x/server-graphql/examples/project/update-o-auth-2-oidc.md index ddbd12084..0c663aad9 100644 --- a/examples/2.3.x/server-graphql/examples/project/update-o-auth-2-oidc.md +++ b/examples/2.3.x/server-graphql/examples/project/update-o-auth-2-oidc.md @@ -15,11 +15,11 @@ mutation { enabled clientId clientSecret + prompt wellKnownURL authorizationURL tokenURL userInfoURL - prompt maxAge } } diff --git a/examples/2.3.x/server-graphql/examples/project/update-o-auth-2-okta.md b/examples/2.3.x/server-graphql/examples/project/update-o-auth-2-okta.md index 5075b3f27..e88634d28 100644 --- a/examples/2.3.x/server-graphql/examples/project/update-o-auth-2-okta.md +++ b/examples/2.3.x/server-graphql/examples/project/update-o-auth-2-okta.md @@ -5,12 +5,14 @@ mutation { clientSecret: "<CLIENT_SECRET>", domain: "example.com", authorizationServerId: "<AUTHORIZATION_SERVER_ID>", + prompt: [], enabled: false ) { _id enabled clientId clientSecret + prompt domain authorizationServerId } diff --git a/examples/2.3.x/server-graphql/examples/project/update-o-auth-2-salesforce.md b/examples/2.3.x/server-graphql/examples/project/update-o-auth-2-salesforce.md index ab63ff525..df3f00fc9 100644 --- a/examples/2.3.x/server-graphql/examples/project/update-o-auth-2-salesforce.md +++ b/examples/2.3.x/server-graphql/examples/project/update-o-auth-2-salesforce.md @@ -3,12 +3,14 @@ mutation { projectUpdateOAuth2Salesforce( customerKey: "<CUSTOMER_KEY>", customerSecret: "<CUSTOMER_SECRET>", + prompt: [], enabled: false ) { _id enabled customerKey customerSecret + prompt } } ``` diff --git a/examples/2.3.x/server-graphql/examples/project/update-o-auth-2-webflow.md b/examples/2.3.x/server-graphql/examples/project/update-o-auth-2-webflow.md new file mode 100644 index 000000000..889267b5d --- /dev/null +++ b/examples/2.3.x/server-graphql/examples/project/update-o-auth-2-webflow.md @@ -0,0 +1,14 @@ +```graphql +mutation { + projectUpdateOAuth2Webflow( + clientId: "<CLIENT_ID>", + clientSecret: "<CLIENT_SECRET>", + enabled: false + ) { + _id + enabled + clientId + clientSecret + } +} +``` diff --git a/examples/2.3.x/server-graphql/examples/project/update-o-auth-2-zoho.md b/examples/2.3.x/server-graphql/examples/project/update-o-auth-2-zoho.md index b71bd18d5..67479ac71 100644 --- a/examples/2.3.x/server-graphql/examples/project/update-o-auth-2-zoho.md +++ b/examples/2.3.x/server-graphql/examples/project/update-o-auth-2-zoho.md @@ -3,12 +3,14 @@ mutation { projectUpdateOAuth2Zoho( clientId: "<CLIENT_ID>", clientSecret: "<CLIENT_SECRET>", + prompt: [], enabled: false ) { _id enabled clientId clientSecret + prompt } } ``` diff --git a/examples/2.3.x/server-graphql/examples/sites/list-frameworks.md b/examples/2.3.x/server-graphql/examples/sites/list-frameworks.md index 1faf1fd83..1cc0c6007 100644 --- a/examples/2.3.x/server-graphql/examples/sites/list-frameworks.md +++ b/examples/2.3.x/server-graphql/examples/sites/list-frameworks.md @@ -1,6 +1,8 @@ ```graphql query { - sitesListFrameworks { + sitesListFrameworks( + total: false + ) { total frameworks { key diff --git a/examples/2.3.x/server-graphql/examples/sites/list-specifications.md b/examples/2.3.x/server-graphql/examples/sites/list-specifications.md index db5395067..b2758c63e 100644 --- a/examples/2.3.x/server-graphql/examples/sites/list-specifications.md +++ b/examples/2.3.x/server-graphql/examples/sites/list-specifications.md @@ -1,7 +1,8 @@ ```graphql query { sitesListSpecifications( - type: "runtimes" + type: "runtimes", + total: false ) { total specifications { diff --git a/examples/2.3.x/server-graphql/examples/tablesdb/create-index.md b/examples/2.3.x/server-graphql/examples/tablesdb/create-index.md index 4edc9f94e..41e9a3acb 100644 --- a/examples/2.3.x/server-graphql/examples/tablesdb/create-index.md +++ b/examples/2.3.x/server-graphql/examples/tablesdb/create-index.md @@ -5,7 +5,7 @@ mutation { tableId: "<TABLE_ID>", key: "<KEY>", type: "key", - columns: [], + columns: ["username"], orders: [], lengths: [] ) { diff --git a/examples/2.3.x/server-graphql/examples/tablesdb/create-rows.md b/examples/2.3.x/server-graphql/examples/tablesdb/create-rows.md index 9a93b02fa..9598c99b5 100644 --- a/examples/2.3.x/server-graphql/examples/tablesdb/create-rows.md +++ b/examples/2.3.x/server-graphql/examples/tablesdb/create-rows.md @@ -3,7 +3,16 @@ mutation { tablesDBCreateRows( databaseId: "<DATABASE_ID>", tableId: "<TABLE_ID>", - rows: [], + rows: [ + { + "$id": "example1", + "username": "walter.obrien", + "email": "walter.obrien@example.com", + "fullName": "Walter O'Brien", + "age": 30, + "isAdmin": false + } + ], transactionId: "<TRANSACTION_ID>" ) { total diff --git a/examples/2.3.x/server-graphql/examples/tablesdb/delete-rows.md b/examples/2.3.x/server-graphql/examples/tablesdb/delete-rows.md index 6fa0a40fd..ee5a5b279 100644 --- a/examples/2.3.x/server-graphql/examples/tablesdb/delete-rows.md +++ b/examples/2.3.x/server-graphql/examples/tablesdb/delete-rows.md @@ -3,7 +3,7 @@ mutation { tablesDBDeleteRows( databaseId: "<DATABASE_ID>", tableId: "<TABLE_ID>", - queries: [], + queries: ["{\"method\":\"equal\", \"attribute\":\"$id\", \"values\":[\"<ROW_ID>\"]}"], transactionId: "<TRANSACTION_ID>" ) { total diff --git a/examples/2.3.x/server-graphql/examples/tablesdb/list-transactions.md b/examples/2.3.x/server-graphql/examples/tablesdb/list-transactions.md index bc3663bec..61d1d7a44 100644 --- a/examples/2.3.x/server-graphql/examples/tablesdb/list-transactions.md +++ b/examples/2.3.x/server-graphql/examples/tablesdb/list-transactions.md @@ -1,7 +1,8 @@ ```graphql query { tablesDBListTransactions( - queries: [] + queries: [], + total: false ) { total transactions { diff --git a/examples/2.3.x/server-graphql/examples/tablesdb/upsert-rows.md b/examples/2.3.x/server-graphql/examples/tablesdb/upsert-rows.md index fe106a6d5..77904611f 100644 --- a/examples/2.3.x/server-graphql/examples/tablesdb/upsert-rows.md +++ b/examples/2.3.x/server-graphql/examples/tablesdb/upsert-rows.md @@ -3,7 +3,16 @@ mutation { tablesDBUpsertRows( databaseId: "<DATABASE_ID>", tableId: "<TABLE_ID>", - rows: [], + rows: [ + { + "$id": "example1", + "username": "walter.obrien", + "email": "walter.obrien@example.com", + "fullName": "Walter O'Brien", + "age": 30, + "isAdmin": false + } + ], transactionId: "<TRANSACTION_ID>" ) { total diff --git a/examples/2.3.x/server-graphql/examples/teams/create-membership.md b/examples/2.3.x/server-graphql/examples/teams/create-membership.md index 67b153ea1..223760490 100644 --- a/examples/2.3.x/server-graphql/examples/teams/create-membership.md +++ b/examples/2.3.x/server-graphql/examples/teams/create-membership.md @@ -2,7 +2,7 @@ mutation { teamsCreateMembership( teamId: "<TEAM_ID>", - roles: [], + roles: ["editor"], email: "email@example.com", userId: "<USER_ID>", phone: "+12065550100", diff --git a/examples/2.3.x/server-graphql/examples/teams/update-membership.md b/examples/2.3.x/server-graphql/examples/teams/update-membership.md index c08593729..d456b7239 100644 --- a/examples/2.3.x/server-graphql/examples/teams/update-membership.md +++ b/examples/2.3.x/server-graphql/examples/teams/update-membership.md @@ -3,7 +3,7 @@ mutation { teamsUpdateMembership( teamId: "<TEAM_ID>", membershipId: "<MEMBERSHIP_ID>", - roles: [] + roles: ["editor"] ) { _id _createdAt diff --git a/examples/2.3.x/server-graphql/examples/users/update-labels.md b/examples/2.3.x/server-graphql/examples/users/update-labels.md index 518dbc487..b53c25cb5 100644 --- a/examples/2.3.x/server-graphql/examples/users/update-labels.md +++ b/examples/2.3.x/server-graphql/examples/users/update-labels.md @@ -2,7 +2,7 @@ mutation { usersUpdateLabels( userId: "<USER_ID>", - labels: [] + labels: ["subscriber"] ) { _id _createdAt diff --git a/examples/2.3.x/server-graphql/examples/vectorsdb/create-collection.md b/examples/2.3.x/server-graphql/examples/vectorsdb/create-collection.md index be4bcde18..e4b934ed1 100644 --- a/examples/2.3.x/server-graphql/examples/vectorsdb/create-collection.md +++ b/examples/2.3.x/server-graphql/examples/vectorsdb/create-collection.md @@ -4,7 +4,7 @@ mutation { databaseId: "<DATABASE_ID>", collectionId: "<COLLECTION_ID>", name: "<NAME>", - dimension: 1, + dimension: 4, permissions: ["read(\"any\")"], documentSecurity: false, enabled: false diff --git a/examples/2.3.x/server-graphql/examples/vectorsdb/create-documents.md b/examples/2.3.x/server-graphql/examples/vectorsdb/create-documents.md index 6b7a5298d..e68a3f039 100644 --- a/examples/2.3.x/server-graphql/examples/vectorsdb/create-documents.md +++ b/examples/2.3.x/server-graphql/examples/vectorsdb/create-documents.md @@ -3,7 +3,20 @@ mutation { vectorsDBCreateDocuments( databaseId: "<DATABASE_ID>", collectionId: "<COLLECTION_ID>", - documents: [], + documents: [ + { + "$id": "example1", + "embeddings": [ + 0.12, + -0.55, + 0.88, + 1.02 + ], + "metadata": { + "name": "First document" + } + } + ], transactionId: "<TRANSACTION_ID>" ) { total diff --git a/examples/2.3.x/server-graphql/examples/vectorsdb/create-index.md b/examples/2.3.x/server-graphql/examples/vectorsdb/create-index.md index c24dab95f..d85fdc8a3 100644 --- a/examples/2.3.x/server-graphql/examples/vectorsdb/create-index.md +++ b/examples/2.3.x/server-graphql/examples/vectorsdb/create-index.md @@ -5,7 +5,7 @@ mutation { collectionId: "<COLLECTION_ID>", key: "<KEY>", type: "hnsw_euclidean", - attributes: [], + attributes: ["embeddings"], orders: [], lengths: [] ) { diff --git a/examples/2.3.x/server-graphql/examples/vectorsdb/create-operations.md b/examples/2.3.x/server-graphql/examples/vectorsdb/create-operations.md index b1d86d55b..b9fc3fc7f 100644 --- a/examples/2.3.x/server-graphql/examples/vectorsdb/create-operations.md +++ b/examples/2.3.x/server-graphql/examples/vectorsdb/create-operations.md @@ -9,7 +9,15 @@ mutation { "collectionId": "<COLLECTION_ID>", "documentId": "<DOCUMENT_ID>", "data": { - "name": "Walter O'Brien" + "embeddings": [ + 0.12, + -0.55, + 0.88, + 1.02 + ], + "metadata": { + "name": "First document" + } } } ] diff --git a/examples/2.3.x/server-graphql/examples/vectorsdb/delete-documents.md b/examples/2.3.x/server-graphql/examples/vectorsdb/delete-documents.md index e84bededa..578a4dc42 100644 --- a/examples/2.3.x/server-graphql/examples/vectorsdb/delete-documents.md +++ b/examples/2.3.x/server-graphql/examples/vectorsdb/delete-documents.md @@ -3,7 +3,7 @@ mutation { vectorsDBDeleteDocuments( databaseId: "<DATABASE_ID>", collectionId: "<COLLECTION_ID>", - queries: [], + queries: ["{\"method\":\"equal\", \"attribute\":\"$id\", \"values\":[\"<DOCUMENT_ID>\"]}"], transactionId: "<TRANSACTION_ID>" ) { total diff --git a/examples/2.3.x/server-graphql/examples/vectorsdb/list-transactions.md b/examples/2.3.x/server-graphql/examples/vectorsdb/list-transactions.md index 1f2ea4aa4..307764ec2 100644 --- a/examples/2.3.x/server-graphql/examples/vectorsdb/list-transactions.md +++ b/examples/2.3.x/server-graphql/examples/vectorsdb/list-transactions.md @@ -1,7 +1,8 @@ ```graphql query { vectorsDBListTransactions( - queries: [] + queries: [], + total: false ) { total transactions { diff --git a/examples/2.3.x/server-graphql/examples/vectorsdb/update-collection.md b/examples/2.3.x/server-graphql/examples/vectorsdb/update-collection.md index 4728d0970..35db26ca2 100644 --- a/examples/2.3.x/server-graphql/examples/vectorsdb/update-collection.md +++ b/examples/2.3.x/server-graphql/examples/vectorsdb/update-collection.md @@ -4,7 +4,7 @@ mutation { databaseId: "<DATABASE_ID>", collectionId: "<COLLECTION_ID>", name: "<NAME>", - dimension: 1, + dimension: 4, permissions: ["read(\"any\")"], documentSecurity: false, enabled: false diff --git a/examples/2.3.x/server-graphql/examples/vectorsdb/upsert-documents.md b/examples/2.3.x/server-graphql/examples/vectorsdb/upsert-documents.md index 852f90d7c..cf92eb896 100644 --- a/examples/2.3.x/server-graphql/examples/vectorsdb/upsert-documents.md +++ b/examples/2.3.x/server-graphql/examples/vectorsdb/upsert-documents.md @@ -3,7 +3,20 @@ mutation { vectorsDBUpsertDocuments( databaseId: "<DATABASE_ID>", collectionId: "<COLLECTION_ID>", - documents: [], + documents: [ + { + "$id": "example1", + "embeddings": [ + 0.12, + -0.55, + 0.88, + 1.02 + ], + "metadata": { + "name": "First document" + } + } + ], transactionId: "<TRANSACTION_ID>" ) { total diff --git a/examples/2.3.x/server-graphql/examples/webhooks/create.md b/examples/2.3.x/server-graphql/examples/webhooks/create.md index 20182a3b9..3852bc89b 100644 --- a/examples/2.3.x/server-graphql/examples/webhooks/create.md +++ b/examples/2.3.x/server-graphql/examples/webhooks/create.md @@ -4,7 +4,7 @@ mutation { webhookId: "<WEBHOOK_ID>", url: "https://example.com/webhook", name: "<NAME>", - events: [], + events: ["users.*.create"], enabled: false, tls: false, authUsername: "<AUTH_USERNAME>", diff --git a/examples/2.3.x/server-graphql/examples/webhooks/update.md b/examples/2.3.x/server-graphql/examples/webhooks/update.md index 6917853a7..035f83f98 100644 --- a/examples/2.3.x/server-graphql/examples/webhooks/update.md +++ b/examples/2.3.x/server-graphql/examples/webhooks/update.md @@ -4,7 +4,7 @@ mutation { webhookId: "<WEBHOOK_ID>", name: "<NAME>", url: "https://example.com/webhook", - events: [], + events: ["users.*.create"], enabled: false, tls: false, authUsername: "<AUTH_USERNAME>", diff --git a/examples/2.3.x/server-kotlin/java/account/create-email-password-session.md b/examples/2.3.x/server-kotlin/java/account/create-email-password-session.md index c6c08c959..fc7ba2eed 100644 --- a/examples/2.3.x/server-kotlin/java/account/create-email-password-session.md +++ b/examples/2.3.x/server-kotlin/java/account/create-email-password-session.md @@ -13,6 +13,7 @@ Account account = new Account(client); account.createEmailPasswordSession( "email@example.com", // email "password", // password + 60L, // duration (optional) new CoroutineCallback<>((result, error) -> { if (error != null) { error.printStackTrace(); diff --git a/examples/2.3.x/server-kotlin/java/account/create-id-token-session.md b/examples/2.3.x/server-kotlin/java/account/create-id-token-session.md index 358d32266..0ce1d7000 100644 --- a/examples/2.3.x/server-kotlin/java/account/create-id-token-session.md +++ b/examples/2.3.x/server-kotlin/java/account/create-id-token-session.md @@ -16,7 +16,7 @@ account.createIdTokenSession( "<ID_TOKEN>", // idToken "<NONCE>", // nonce (optional) "<ACCESS_TOKEN>", // accessToken (optional) - 0, // accessTokenExpiry (optional) + 0L, // accessTokenExpiry (optional) "<NAME>", // name (optional) new CoroutineCallback<>((result, error) -> { if (error != null) { diff --git a/examples/2.3.x/server-kotlin/java/account/delete-sessions.md b/examples/2.3.x/server-kotlin/java/account/delete-sessions.md index ef087fd4a..533f99518 100644 --- a/examples/2.3.x/server-kotlin/java/account/delete-sessions.md +++ b/examples/2.3.x/server-kotlin/java/account/delete-sessions.md @@ -10,12 +10,16 @@ Client client = new Client() Account account = new Account(client); -account.deleteSessions(new CoroutineCallback<>((result, error) -> { - if (error != null) { - error.printStackTrace(); - return; - } +account.deleteSessions( + false, // current (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); - System.out.println(result); -})); ``` diff --git a/examples/2.3.x/server-kotlin/java/account/list-sessions.md b/examples/2.3.x/server-kotlin/java/account/list-sessions.md index bb25cff16..38b803432 100644 --- a/examples/2.3.x/server-kotlin/java/account/list-sessions.md +++ b/examples/2.3.x/server-kotlin/java/account/list-sessions.md @@ -10,12 +10,16 @@ Client client = new Client() Account account = new Account(client); -account.listSessions(new CoroutineCallback<>((result, error) -> { - if (error != null) { - error.printStackTrace(); - return; - } +account.listSessions( + false, // total (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); - System.out.println(result); -})); ``` diff --git a/examples/2.3.x/server-kotlin/java/analytics/create-event.md b/examples/2.3.x/server-kotlin/java/analytics/create-event.md new file mode 100644 index 000000000..21106da77 --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/analytics/create-event.md @@ -0,0 +1,37 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Analytics; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession(""); // The user session to authenticate with + +Analytics analytics = new Analytics(client); + +analytics.createEvent( + "<PROPERTY_ID>", // propertyId + "<NAME>", // name + "https://example.com", // url + "<DOMAIN>", // domain (optional) + "<REFERRER>", // referrer (optional) + 0L, // screenWidth (optional) + "<SESSION_HASH>", // sessionHash (optional) + 0L, // scrollDepth (optional) + 0L, // engagementTime (optional) + List.of(), // props (optional) + "<USER_ID>", // userId (optional) + "<IP>", // ip (optional) + "<USER_AGENT>", // userAgent (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + +``` diff --git a/examples/2.3.x/server-kotlin/java/analytics/create-property.md b/examples/2.3.x/server-kotlin/java/analytics/create-property.md new file mode 100644 index 000000000..1a6247e1a --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/analytics/create-property.md @@ -0,0 +1,31 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Analytics; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Analytics analytics = new Analytics(client); + +analytics.createProperty( + "<PROPERTY_ID>", // propertyId + "<NAME>", // name + "<DOMAIN>", // domain (optional) + "<TIMEZONE>", // timezone (optional) + false, // enabled (optional) + false, // public (optional) + List.of(), // allowedOrigins (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + +``` diff --git a/examples/2.3.x/server-kotlin/java/analytics/delete-property.md b/examples/2.3.x/server-kotlin/java/analytics/delete-property.md new file mode 100644 index 000000000..1cdfc0f9f --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/analytics/delete-property.md @@ -0,0 +1,25 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Analytics; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Analytics analytics = new Analytics(client); + +analytics.deleteProperty( + "<PROPERTY_ID>", // propertyId + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + +``` diff --git a/examples/2.3.x/server-kotlin/java/analytics/get-property.md b/examples/2.3.x/server-kotlin/java/analytics/get-property.md new file mode 100644 index 000000000..c029fc870 --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/analytics/get-property.md @@ -0,0 +1,25 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Analytics; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Analytics analytics = new Analytics(client); + +analytics.getProperty( + "<PROPERTY_ID>", // propertyId + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + +``` diff --git a/examples/2.3.x/server-kotlin/java/analytics/list-metrics.md b/examples/2.3.x/server-kotlin/java/analytics/list-metrics.md new file mode 100644 index 000000000..ccdf23644 --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/analytics/list-metrics.md @@ -0,0 +1,34 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Analytics; +import io.appwrite.enums.AnalyticsInterval; +import io.appwrite.enums.AnalyticsDimension; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Analytics analytics = new Analytics(client); + +analytics.listMetrics( + "<PROPERTY_ID>", // propertyId + List.of(), // queries (optional) + AnalyticsInterval.ONE_HOUR, // interval (optional) + List.of(AnalyticsDimension.COUNTRY), // dimensions (optional) + "<DATE_RANGE>", // dateRange (optional) + "2020-10-15T06:38:00.000+00:00", // startAt (optional) + "2020-10-15T06:38:00.000+00:00", // endAt (optional) + 1L, // limit (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + +``` diff --git a/examples/2.3.x/server-kotlin/java/analytics/list-properties.md b/examples/2.3.x/server-kotlin/java/analytics/list-properties.md new file mode 100644 index 000000000..fc634f5d8 --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/analytics/list-properties.md @@ -0,0 +1,27 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Analytics; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Analytics analytics = new Analytics(client); + +analytics.listProperties( + List.of(), // queries (optional) + "<SEARCH>", // search (optional) + false, // total (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + +``` diff --git a/examples/2.3.x/server-kotlin/java/analytics/update-property.md b/examples/2.3.x/server-kotlin/java/analytics/update-property.md new file mode 100644 index 000000000..2dd36d6bc --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/analytics/update-property.md @@ -0,0 +1,31 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Analytics; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Analytics analytics = new Analytics(client); + +analytics.updateProperty( + "<PROPERTY_ID>", // propertyId + "<NAME>", // name (optional) + "<DOMAIN>", // domain (optional) + "<TIMEZONE>", // timezone (optional) + false, // enabled (optional) + false, // public (optional) + List.of(), // allowedOrigins (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + +``` diff --git a/examples/2.3.x/server-kotlin/java/avatars/delete-photo.md b/examples/2.3.x/server-kotlin/java/avatars/delete-photo.md new file mode 100644 index 000000000..49b2f8653 --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/avatars/delete-photo.md @@ -0,0 +1,21 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Avatars; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession(""); // The user session to authenticate with + +Avatars avatars = new Avatars(client); + +avatars.deletePhoto(new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); +})); +``` diff --git a/examples/2.3.x/server-kotlin/java/avatars/get-browser.md b/examples/2.3.x/server-kotlin/java/avatars/get-browser.md index 72748afcb..475c7321b 100644 --- a/examples/2.3.x/server-kotlin/java/avatars/get-browser.md +++ b/examples/2.3.x/server-kotlin/java/avatars/get-browser.md @@ -13,9 +13,9 @@ Avatars avatars = new Avatars(client); avatars.getBrowser( Browser.AVANT_BROWSER, // code - 0, // width (optional) - 0, // height (optional) - -1, // quality (optional) + 0L, // width (optional) + 0L, // height (optional) + -1L, // quality (optional) new CoroutineCallback<>((result, error) -> { if (error != null) { error.printStackTrace(); diff --git a/examples/2.3.x/server-kotlin/java/avatars/get-credit-card.md b/examples/2.3.x/server-kotlin/java/avatars/get-credit-card.md index 8f93da91a..af05b09f3 100644 --- a/examples/2.3.x/server-kotlin/java/avatars/get-credit-card.md +++ b/examples/2.3.x/server-kotlin/java/avatars/get-credit-card.md @@ -13,9 +13,9 @@ Avatars avatars = new Avatars(client); avatars.getCreditCard( CreditCard.AMERICAN_EXPRESS, // code - 0, // width (optional) - 0, // height (optional) - -1, // quality (optional) + 0L, // width (optional) + 0L, // height (optional) + -1L, // quality (optional) new CoroutineCallback<>((result, error) -> { if (error != null) { error.printStackTrace(); diff --git a/examples/2.3.x/server-kotlin/java/avatars/get-flag.md b/examples/2.3.x/server-kotlin/java/avatars/get-flag.md index f66a872d3..ec5d4ac74 100644 --- a/examples/2.3.x/server-kotlin/java/avatars/get-flag.md +++ b/examples/2.3.x/server-kotlin/java/avatars/get-flag.md @@ -13,9 +13,9 @@ Avatars avatars = new Avatars(client); avatars.getFlag( Flag.AFGHANISTAN, // code - 0, // width (optional) - 0, // height (optional) - -1, // quality (optional) + 0L, // width (optional) + 0L, // height (optional) + -1L, // quality (optional) new CoroutineCallback<>((result, error) -> { if (error != null) { error.printStackTrace(); diff --git a/examples/2.3.x/server-kotlin/java/avatars/get-image.md b/examples/2.3.x/server-kotlin/java/avatars/get-image.md index 7f93b9f9f..bbd07b7ad 100644 --- a/examples/2.3.x/server-kotlin/java/avatars/get-image.md +++ b/examples/2.3.x/server-kotlin/java/avatars/get-image.md @@ -12,8 +12,8 @@ Avatars avatars = new Avatars(client); avatars.getImage( "https://example.com", // url - 0, // width (optional) - 0, // height (optional) + 0L, // width (optional) + 0L, // height (optional) new CoroutineCallback<>((result, error) -> { if (error != null) { error.printStackTrace(); diff --git a/examples/2.3.x/server-kotlin/java/avatars/get-initials.md b/examples/2.3.x/server-kotlin/java/avatars/get-initials.md index 79e9c7b14..634467ca7 100644 --- a/examples/2.3.x/server-kotlin/java/avatars/get-initials.md +++ b/examples/2.3.x/server-kotlin/java/avatars/get-initials.md @@ -12,8 +12,8 @@ Avatars avatars = new Avatars(client); avatars.getInitials( "<NAME>", // name (optional) - 0, // width (optional) - 0, // height (optional) + 0L, // width (optional) + 0L, // height (optional) "FFFFFF", // background (optional) new CoroutineCallback<>((result, error) -> { if (error != null) { diff --git a/examples/2.3.x/server-kotlin/java/avatars/get-photo.md b/examples/2.3.x/server-kotlin/java/avatars/get-photo.md index 831e9cc3d..6b1b92b00 100644 --- a/examples/2.3.x/server-kotlin/java/avatars/get-photo.md +++ b/examples/2.3.x/server-kotlin/java/avatars/get-photo.md @@ -11,9 +11,9 @@ Client client = new Client() Avatars avatars = new Avatars(client); avatars.getPhoto( - 0, // width (optional) - 0, // height (optional) - 0, // quality (optional) + 0L, // width (optional) + 0L, // height (optional) + 0L, // quality (optional) "png", // output (optional) "g", // rating (optional) "current()", // userId (optional) diff --git a/examples/2.3.x/server-kotlin/java/avatars/get-qr.md b/examples/2.3.x/server-kotlin/java/avatars/get-qr.md index 0e22f63f1..24208c3c5 100644 --- a/examples/2.3.x/server-kotlin/java/avatars/get-qr.md +++ b/examples/2.3.x/server-kotlin/java/avatars/get-qr.md @@ -12,8 +12,8 @@ Avatars avatars = new Avatars(client); avatars.getQR( "<TEXT>", // text - 1, // size (optional) - 0, // margin (optional) + 1L, // size (optional) + 0L, // margin (optional) false, // download (optional) new CoroutineCallback<>((result, error) -> { if (error != null) { diff --git a/examples/2.3.x/server-kotlin/java/avatars/get-screenshot.md b/examples/2.3.x/server-kotlin/java/avatars/get-screenshot.md index c8b5966fe..8769ee587 100644 --- a/examples/2.3.x/server-kotlin/java/avatars/get-screenshot.md +++ b/examples/2.3.x/server-kotlin/java/avatars/get-screenshot.md @@ -17,12 +17,11 @@ Avatars avatars = new Avatars(client); avatars.getScreenshot( "https://example.com", // url Map.of( - "Authorization", "Bearer token123", - "X-Custom-Header", "value" + "Accept-Language", "en-US,en;q=0.9" ), // headers (optional) - 1920, // viewportWidth (optional) - 1080, // viewportHeight (optional) - 2, // scale (optional) + 1920L, // viewportWidth (optional) + 1080L, // viewportHeight (optional) + 2.0, // scale (optional) BrowserTheme.DARK, // theme (optional) "Mozilla/5.0 (iPhone; CPU iPhone OS 14_0 like Mac OS X) AppleWebKit/605.1.15", // userAgent (optional) true, // fullpage (optional) @@ -30,13 +29,13 @@ avatars.getScreenshot( Timezone.AFRICA_ABIDJAN, // timezone (optional) 37.7749, // latitude (optional) -122.4194, // longitude (optional) - 100, // accuracy (optional) + 100.0, // accuracy (optional) true, // touch (optional) List.of(BrowserPermission.GEOLOCATION, BrowserPermission.NOTIFICATIONS), // permissions (optional) - 3, // sleep (optional) - 800, // width (optional) - 600, // height (optional) - 85, // quality (optional) + 3L, // sleep (optional) + 800L, // width (optional) + 600L, // height (optional) + 85L, // quality (optional) ImageFormat.JPEG, // output (optional) new CoroutineCallback<>((result, error) -> { if (error != null) { diff --git a/examples/2.3.x/server-kotlin/java/avatars/update-photo.md b/examples/2.3.x/server-kotlin/java/avatars/update-photo.md new file mode 100644 index 000000000..41a94954a --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/avatars/update-photo.md @@ -0,0 +1,26 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.models.InputFile; +import io.appwrite.services.Avatars; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession(""); // The user session to authenticate with + +Avatars avatars = new Avatars(client); + +avatars.updatePhoto( + InputFile.fromPath("file.png"), // file + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + +``` diff --git a/examples/2.3.x/server-kotlin/java/backups/create-policy.md b/examples/2.3.x/server-kotlin/java/backups/create-policy.md index 42003cc4a..da8e83386 100644 --- a/examples/2.3.x/server-kotlin/java/backups/create-policy.md +++ b/examples/2.3.x/server-kotlin/java/backups/create-policy.md @@ -14,7 +14,7 @@ Backups backups = new Backups(client); backups.createPolicy( "<POLICY_ID>", // policyId List.of(BackupServices.DATABASES), // services - 1, // retention + 1L, // retention "", // schedule "<NAME>", // name (optional) "<RESOURCE_ID>", // resourceId (optional) diff --git a/examples/2.3.x/server-kotlin/java/backups/update-policy.md b/examples/2.3.x/server-kotlin/java/backups/update-policy.md index c27053628..12f450e2f 100644 --- a/examples/2.3.x/server-kotlin/java/backups/update-policy.md +++ b/examples/2.3.x/server-kotlin/java/backups/update-policy.md @@ -13,7 +13,7 @@ Backups backups = new Backups(client); backups.updatePolicy( "<POLICY_ID>", // policyId "<NAME>", // name (optional) - 1, // retention (optional) + 1L, // retention (optional) "", // schedule (optional) false, // enabled (optional) new CoroutineCallback<>((result, error) -> { diff --git a/examples/2.3.x/server-kotlin/java/databases/create-big-int-attribute.md b/examples/2.3.x/server-kotlin/java/databases/create-big-int-attribute.md index ab0a21c6a..16724e328 100644 --- a/examples/2.3.x/server-kotlin/java/databases/create-big-int-attribute.md +++ b/examples/2.3.x/server-kotlin/java/databases/create-big-int-attribute.md @@ -15,9 +15,9 @@ databases.createBigIntAttribute( "<COLLECTION_ID>", // collectionId "<KEY>", // key false, // required - 0, // min (optional) - 1000000, // max (optional) - 0, // default (optional) + 0L, // min (optional) + 1000000L, // max (optional) + 0L, // default (optional) false, // array (optional) new CoroutineCallback<>((result, error) -> { if (error != null) { diff --git a/examples/2.3.x/server-kotlin/java/databases/create-documents.md b/examples/2.3.x/server-kotlin/java/databases/create-documents.md index 5a158bf59..a6ca64d8d 100644 --- a/examples/2.3.x/server-kotlin/java/databases/create-documents.md +++ b/examples/2.3.x/server-kotlin/java/databases/create-documents.md @@ -13,7 +13,14 @@ Databases databases = new Databases(client); databases.createDocuments( "<DATABASE_ID>", // databaseId "<COLLECTION_ID>", // collectionId - List.of(), // documents + List.of(Map.of( + "$id", "example1", + "username", "walter.obrien", + "email", "walter.obrien@example.com", + "fullName", "Walter O'Brien", + "age", 30, + "isAdmin", false + )), // documents "<TRANSACTION_ID>", // transactionId (optional) new CoroutineCallback<>((result, error) -> { if (error != null) { diff --git a/examples/2.3.x/server-kotlin/java/databases/create-float-attribute.md b/examples/2.3.x/server-kotlin/java/databases/create-float-attribute.md index 6af5f366b..ec24a9176 100644 --- a/examples/2.3.x/server-kotlin/java/databases/create-float-attribute.md +++ b/examples/2.3.x/server-kotlin/java/databases/create-float-attribute.md @@ -15,8 +15,8 @@ databases.createFloatAttribute( "<COLLECTION_ID>", // collectionId "<KEY>", // key false, // required - 0, // min (optional) - 100, // max (optional) + 0.0, // min (optional) + 100.0, // max (optional) 10.5, // default (optional) false, // array (optional) new CoroutineCallback<>((result, error) -> { diff --git a/examples/2.3.x/server-kotlin/java/databases/create-index.md b/examples/2.3.x/server-kotlin/java/databases/create-index.md index 357440dc8..61ad2fbde 100644 --- a/examples/2.3.x/server-kotlin/java/databases/create-index.md +++ b/examples/2.3.x/server-kotlin/java/databases/create-index.md @@ -17,7 +17,7 @@ databases.createIndex( "<COLLECTION_ID>", // collectionId "<KEY>", // key DatabasesIndexType.KEY, // type - List.of(), // attributes + List.of("username"), // attributes List.of(OrderBy.ASC), // orders (optional) List.of(), // lengths (optional) new CoroutineCallback<>((result, error) -> { diff --git a/examples/2.3.x/server-kotlin/java/databases/create-integer-attribute.md b/examples/2.3.x/server-kotlin/java/databases/create-integer-attribute.md index 72cccd75d..5f71458d3 100644 --- a/examples/2.3.x/server-kotlin/java/databases/create-integer-attribute.md +++ b/examples/2.3.x/server-kotlin/java/databases/create-integer-attribute.md @@ -15,9 +15,9 @@ databases.createIntegerAttribute( "<COLLECTION_ID>", // collectionId "<KEY>", // key false, // required - 0, // min (optional) - 100, // max (optional) - 10, // default (optional) + 0L, // min (optional) + 100L, // max (optional) + 10L, // default (optional) false, // array (optional) new CoroutineCallback<>((result, error) -> { if (error != null) { diff --git a/examples/2.3.x/server-kotlin/java/databases/create-string-attribute.md b/examples/2.3.x/server-kotlin/java/databases/create-string-attribute.md index 2a06f8c12..cdd10dbf4 100644 --- a/examples/2.3.x/server-kotlin/java/databases/create-string-attribute.md +++ b/examples/2.3.x/server-kotlin/java/databases/create-string-attribute.md @@ -14,7 +14,7 @@ databases.createStringAttribute( "<DATABASE_ID>", // databaseId "<COLLECTION_ID>", // collectionId "<KEY>", // key - 1, // size + 1L, // size false, // required "Hello World", // default (optional) false, // array (optional) diff --git a/examples/2.3.x/server-kotlin/java/databases/create-transaction.md b/examples/2.3.x/server-kotlin/java/databases/create-transaction.md index 4cbee4edb..a5b1b5e8a 100644 --- a/examples/2.3.x/server-kotlin/java/databases/create-transaction.md +++ b/examples/2.3.x/server-kotlin/java/databases/create-transaction.md @@ -11,7 +11,7 @@ Client client = new Client() Databases databases = new Databases(client); databases.createTransaction( - 60, // ttl (optional) + 60L, // ttl (optional) new CoroutineCallback<>((result, error) -> { if (error != null) { error.printStackTrace(); diff --git a/examples/2.3.x/server-kotlin/java/databases/create-varchar-attribute.md b/examples/2.3.x/server-kotlin/java/databases/create-varchar-attribute.md index 0b16ca203..017c9b0dd 100644 --- a/examples/2.3.x/server-kotlin/java/databases/create-varchar-attribute.md +++ b/examples/2.3.x/server-kotlin/java/databases/create-varchar-attribute.md @@ -14,7 +14,7 @@ databases.createVarcharAttribute( "<DATABASE_ID>", // databaseId "<COLLECTION_ID>", // collectionId "<KEY>", // key - 1, // size + 1L, // size false, // required "Hello World", // default (optional) false, // array (optional) diff --git a/examples/2.3.x/server-kotlin/java/databases/decrement-document-attribute.md b/examples/2.3.x/server-kotlin/java/databases/decrement-document-attribute.md index 9c271f5b7..46ca93569 100644 --- a/examples/2.3.x/server-kotlin/java/databases/decrement-document-attribute.md +++ b/examples/2.3.x/server-kotlin/java/databases/decrement-document-attribute.md @@ -15,8 +15,8 @@ databases.decrementDocumentAttribute( "<COLLECTION_ID>", // collectionId "<DOCUMENT_ID>", // documentId "<ATTRIBUTE>", // attribute - 1, // value (optional) - 0, // min (optional) + 1.0, // value (optional) + 0.0, // min (optional) "<TRANSACTION_ID>", // transactionId (optional) new CoroutineCallback<>((result, error) -> { if (error != null) { diff --git a/examples/2.3.x/server-kotlin/java/databases/delete-documents.md b/examples/2.3.x/server-kotlin/java/databases/delete-documents.md index 5c4392309..46d4da3d0 100644 --- a/examples/2.3.x/server-kotlin/java/databases/delete-documents.md +++ b/examples/2.3.x/server-kotlin/java/databases/delete-documents.md @@ -13,7 +13,7 @@ Databases databases = new Databases(client); databases.deleteDocuments( "<DATABASE_ID>", // databaseId "<COLLECTION_ID>", // collectionId - List.of(), // queries (optional) + List.of("{\"method\":\"equal\", \"attribute\":\"$id\", \"values\":[\"<DOCUMENT_ID>\"]}"), // queries (optional) "<TRANSACTION_ID>", // transactionId (optional) new CoroutineCallback<>((result, error) -> { if (error != null) { diff --git a/examples/2.3.x/server-kotlin/java/databases/increment-document-attribute.md b/examples/2.3.x/server-kotlin/java/databases/increment-document-attribute.md index b78f9af02..34ffc07ee 100644 --- a/examples/2.3.x/server-kotlin/java/databases/increment-document-attribute.md +++ b/examples/2.3.x/server-kotlin/java/databases/increment-document-attribute.md @@ -15,8 +15,8 @@ databases.incrementDocumentAttribute( "<COLLECTION_ID>", // collectionId "<DOCUMENT_ID>", // documentId "<ATTRIBUTE>", // attribute - 1, // value (optional) - 100, // max (optional) + 1.0, // value (optional) + 100.0, // max (optional) "<TRANSACTION_ID>", // transactionId (optional) new CoroutineCallback<>((result, error) -> { if (error != null) { diff --git a/examples/2.3.x/server-kotlin/java/databases/list-documents.md b/examples/2.3.x/server-kotlin/java/databases/list-documents.md index f961c7a18..a24524a32 100644 --- a/examples/2.3.x/server-kotlin/java/databases/list-documents.md +++ b/examples/2.3.x/server-kotlin/java/databases/list-documents.md @@ -16,7 +16,7 @@ databases.listDocuments( List.of(), // queries (optional) "<TRANSACTION_ID>", // transactionId (optional) false, // total (optional) - 0, // ttl (optional) + 0L, // ttl (optional) new CoroutineCallback<>((result, error) -> { if (error != null) { error.printStackTrace(); diff --git a/examples/2.3.x/server-kotlin/java/databases/list-transactions.md b/examples/2.3.x/server-kotlin/java/databases/list-transactions.md index 27fe4e936..61957f0fd 100644 --- a/examples/2.3.x/server-kotlin/java/databases/list-transactions.md +++ b/examples/2.3.x/server-kotlin/java/databases/list-transactions.md @@ -12,6 +12,7 @@ Databases databases = new Databases(client); databases.listTransactions( List.of(), // queries (optional) + false, // total (optional) new CoroutineCallback<>((result, error) -> { if (error != null) { error.printStackTrace(); diff --git a/examples/2.3.x/server-kotlin/java/databases/update-big-int-attribute.md b/examples/2.3.x/server-kotlin/java/databases/update-big-int-attribute.md index def245d7b..e43a8e9ca 100644 --- a/examples/2.3.x/server-kotlin/java/databases/update-big-int-attribute.md +++ b/examples/2.3.x/server-kotlin/java/databases/update-big-int-attribute.md @@ -15,9 +15,9 @@ databases.updateBigIntAttribute( "<COLLECTION_ID>", // collectionId "<KEY>", // key false, // required - 0, // default - 0, // min (optional) - 1000000, // max (optional) + 0L, // default + 0L, // min (optional) + 1000000L, // max (optional) "<NEW_KEY>", // newKey (optional) new CoroutineCallback<>((result, error) -> { if (error != null) { diff --git a/examples/2.3.x/server-kotlin/java/databases/update-float-attribute.md b/examples/2.3.x/server-kotlin/java/databases/update-float-attribute.md index b8277c551..a42467924 100644 --- a/examples/2.3.x/server-kotlin/java/databases/update-float-attribute.md +++ b/examples/2.3.x/server-kotlin/java/databases/update-float-attribute.md @@ -16,8 +16,8 @@ databases.updateFloatAttribute( "<KEY>", // key false, // required 10.5, // default - 0, // min (optional) - 100, // max (optional) + 0.0, // min (optional) + 100.0, // max (optional) "<NEW_KEY>", // newKey (optional) new CoroutineCallback<>((result, error) -> { if (error != null) { diff --git a/examples/2.3.x/server-kotlin/java/databases/update-integer-attribute.md b/examples/2.3.x/server-kotlin/java/databases/update-integer-attribute.md index ae0d0ccdc..185c3c926 100644 --- a/examples/2.3.x/server-kotlin/java/databases/update-integer-attribute.md +++ b/examples/2.3.x/server-kotlin/java/databases/update-integer-attribute.md @@ -15,9 +15,9 @@ databases.updateIntegerAttribute( "<COLLECTION_ID>", // collectionId "<KEY>", // key false, // required - 10, // default - 0, // min (optional) - 100, // max (optional) + 10L, // default + 0L, // min (optional) + 100L, // max (optional) "<NEW_KEY>", // newKey (optional) new CoroutineCallback<>((result, error) -> { if (error != null) { diff --git a/examples/2.3.x/server-kotlin/java/databases/update-string-attribute.md b/examples/2.3.x/server-kotlin/java/databases/update-string-attribute.md index 49c4f9558..f9b0fdef4 100644 --- a/examples/2.3.x/server-kotlin/java/databases/update-string-attribute.md +++ b/examples/2.3.x/server-kotlin/java/databases/update-string-attribute.md @@ -16,7 +16,7 @@ databases.updateStringAttribute( "<KEY>", // key false, // required "Hello World", // default - 1, // size (optional) + 1L, // size (optional) "<NEW_KEY>", // newKey (optional) new CoroutineCallback<>((result, error) -> { if (error != null) { diff --git a/examples/2.3.x/server-kotlin/java/databases/update-varchar-attribute.md b/examples/2.3.x/server-kotlin/java/databases/update-varchar-attribute.md index a00d323a8..18610a9a8 100644 --- a/examples/2.3.x/server-kotlin/java/databases/update-varchar-attribute.md +++ b/examples/2.3.x/server-kotlin/java/databases/update-varchar-attribute.md @@ -16,7 +16,7 @@ databases.updateVarcharAttribute( "<KEY>", // key false, // required "Hello World", // default - 1, // size (optional) + 1L, // size (optional) "<NEW_KEY>", // newKey (optional) new CoroutineCallback<>((result, error) -> { if (error != null) { diff --git a/examples/2.3.x/server-kotlin/java/databases/upsert-documents.md b/examples/2.3.x/server-kotlin/java/databases/upsert-documents.md index 80e3862e1..7d8f04acb 100644 --- a/examples/2.3.x/server-kotlin/java/databases/upsert-documents.md +++ b/examples/2.3.x/server-kotlin/java/databases/upsert-documents.md @@ -13,7 +13,14 @@ Databases databases = new Databases(client); databases.upsertDocuments( "<DATABASE_ID>", // databaseId "<COLLECTION_ID>", // collectionId - List.of(), // documents + List.of(Map.of( + "$id", "example1", + "username", "walter.obrien", + "email", "walter.obrien@example.com", + "fullName", "Walter O'Brien", + "age", 30, + "isAdmin", false + )), // documents "<TRANSACTION_ID>", // transactionId (optional) new CoroutineCallback<>((result, error) -> { if (error != null) { diff --git a/examples/2.3.x/server-kotlin/java/documentsdb/create-documents.md b/examples/2.3.x/server-kotlin/java/documentsdb/create-documents.md index 10058e931..039a7ded1 100644 --- a/examples/2.3.x/server-kotlin/java/documentsdb/create-documents.md +++ b/examples/2.3.x/server-kotlin/java/documentsdb/create-documents.md @@ -13,7 +13,14 @@ DocumentsDB documentsDB = new DocumentsDB(client); documentsDB.createDocuments( "<DATABASE_ID>", // databaseId "<COLLECTION_ID>", // collectionId - List.of(), // documents + List.of(Map.of( + "$id", "example1", + "username", "walter.obrien", + "email", "walter.obrien@example.com", + "fullName", "Walter O'Brien", + "age", 30, + "isAdmin", false + )), // documents "<TRANSACTION_ID>", // transactionId (optional) new CoroutineCallback<>((result, error) -> { if (error != null) { diff --git a/examples/2.3.x/server-kotlin/java/documentsdb/create-index.md b/examples/2.3.x/server-kotlin/java/documentsdb/create-index.md index b72b576bf..bc02e79d5 100644 --- a/examples/2.3.x/server-kotlin/java/documentsdb/create-index.md +++ b/examples/2.3.x/server-kotlin/java/documentsdb/create-index.md @@ -17,7 +17,7 @@ documentsDB.createIndex( "<COLLECTION_ID>", // collectionId "<KEY>", // key DocumentsDBIndexType.KEY, // type - List.of(), // attributes + List.of("username"), // attributes List.of(OrderBy.ASC), // orders (optional) List.of(), // lengths (optional) new CoroutineCallback<>((result, error) -> { diff --git a/examples/2.3.x/server-kotlin/java/documentsdb/create-transaction.md b/examples/2.3.x/server-kotlin/java/documentsdb/create-transaction.md index 1cd52e528..b2330d86c 100644 --- a/examples/2.3.x/server-kotlin/java/documentsdb/create-transaction.md +++ b/examples/2.3.x/server-kotlin/java/documentsdb/create-transaction.md @@ -11,7 +11,7 @@ Client client = new Client() DocumentsDB documentsDB = new DocumentsDB(client); documentsDB.createTransaction( - 60, // ttl (optional) + 60L, // ttl (optional) new CoroutineCallback<>((result, error) -> { if (error != null) { error.printStackTrace(); diff --git a/examples/2.3.x/server-kotlin/java/documentsdb/create.md b/examples/2.3.x/server-kotlin/java/documentsdb/create.md index 3911b1e89..3646082e5 100644 --- a/examples/2.3.x/server-kotlin/java/documentsdb/create.md +++ b/examples/2.3.x/server-kotlin/java/documentsdb/create.md @@ -15,7 +15,7 @@ documentsDB.create( "<NAME>", // name false, // enabled (optional) "serverless", // specification (optional) - 0, // replicas (optional) + 0L, // replicas (optional) "async", // syncMode (optional) new CoroutineCallback<>((result, error) -> { if (error != null) { diff --git a/examples/2.3.x/server-kotlin/java/documentsdb/decrement-document-attribute.md b/examples/2.3.x/server-kotlin/java/documentsdb/decrement-document-attribute.md index 6f5803d23..461a348c5 100644 --- a/examples/2.3.x/server-kotlin/java/documentsdb/decrement-document-attribute.md +++ b/examples/2.3.x/server-kotlin/java/documentsdb/decrement-document-attribute.md @@ -15,8 +15,8 @@ documentsDB.decrementDocumentAttribute( "<COLLECTION_ID>", // collectionId "<DOCUMENT_ID>", // documentId "<ATTRIBUTE>", // attribute - 1, // value (optional) - 0, // min (optional) + 1.0, // value (optional) + 0.0, // min (optional) "<TRANSACTION_ID>", // transactionId (optional) new CoroutineCallback<>((result, error) -> { if (error != null) { diff --git a/examples/2.3.x/server-kotlin/java/documentsdb/delete-documents.md b/examples/2.3.x/server-kotlin/java/documentsdb/delete-documents.md index 38acb98c3..0fc376108 100644 --- a/examples/2.3.x/server-kotlin/java/documentsdb/delete-documents.md +++ b/examples/2.3.x/server-kotlin/java/documentsdb/delete-documents.md @@ -13,7 +13,7 @@ DocumentsDB documentsDB = new DocumentsDB(client); documentsDB.deleteDocuments( "<DATABASE_ID>", // databaseId "<COLLECTION_ID>", // collectionId - List.of(), // queries (optional) + List.of("{\"method\":\"equal\", \"attribute\":\"$id\", \"values\":[\"<DOCUMENT_ID>\"]}"), // queries (optional) "<TRANSACTION_ID>", // transactionId (optional) new CoroutineCallback<>((result, error) -> { if (error != null) { diff --git a/examples/2.3.x/server-kotlin/java/documentsdb/increment-document-attribute.md b/examples/2.3.x/server-kotlin/java/documentsdb/increment-document-attribute.md index 9b3082fc7..bb51aceef 100644 --- a/examples/2.3.x/server-kotlin/java/documentsdb/increment-document-attribute.md +++ b/examples/2.3.x/server-kotlin/java/documentsdb/increment-document-attribute.md @@ -15,8 +15,8 @@ documentsDB.incrementDocumentAttribute( "<COLLECTION_ID>", // collectionId "<DOCUMENT_ID>", // documentId "<ATTRIBUTE>", // attribute - 1, // value (optional) - 100, // max (optional) + 1.0, // value (optional) + 100.0, // max (optional) "<TRANSACTION_ID>", // transactionId (optional) new CoroutineCallback<>((result, error) -> { if (error != null) { diff --git a/examples/2.3.x/server-kotlin/java/documentsdb/list-documents.md b/examples/2.3.x/server-kotlin/java/documentsdb/list-documents.md index 8cbcd8aaf..0a90cff66 100644 --- a/examples/2.3.x/server-kotlin/java/documentsdb/list-documents.md +++ b/examples/2.3.x/server-kotlin/java/documentsdb/list-documents.md @@ -16,7 +16,7 @@ documentsDB.listDocuments( List.of(), // queries (optional) "<TRANSACTION_ID>", // transactionId (optional) false, // total (optional) - 0, // ttl (optional) + 0L, // ttl (optional) new CoroutineCallback<>((result, error) -> { if (error != null) { error.printStackTrace(); diff --git a/examples/2.3.x/server-kotlin/java/documentsdb/list-operations.md b/examples/2.3.x/server-kotlin/java/documentsdb/list-operations.md index b2b20ec98..aa87d11f4 100644 --- a/examples/2.3.x/server-kotlin/java/documentsdb/list-operations.md +++ b/examples/2.3.x/server-kotlin/java/documentsdb/list-operations.md @@ -13,8 +13,8 @@ DocumentsDB documentsDB = new DocumentsDB(client); documentsDB.listOperations( "<DATABASE_ID>", // databaseId "queued", // status (optional) - 1, // limit (optional) - 0, // offset (optional) + 1L, // limit (optional) + 0L, // offset (optional) new CoroutineCallback<>((result, error) -> { if (error != null) { error.printStackTrace(); diff --git a/examples/2.3.x/server-kotlin/java/documentsdb/list-transactions.md b/examples/2.3.x/server-kotlin/java/documentsdb/list-transactions.md index cc56f53e8..ceb5df97c 100644 --- a/examples/2.3.x/server-kotlin/java/documentsdb/list-transactions.md +++ b/examples/2.3.x/server-kotlin/java/documentsdb/list-transactions.md @@ -12,6 +12,7 @@ DocumentsDB documentsDB = new DocumentsDB(client); documentsDB.listTransactions( List.of(), // queries (optional) + false, // total (optional) new CoroutineCallback<>((result, error) -> { if (error != null) { error.printStackTrace(); diff --git a/examples/2.3.x/server-kotlin/java/documentsdb/update.md b/examples/2.3.x/server-kotlin/java/documentsdb/update.md index 9e4115325..b0abb22a8 100644 --- a/examples/2.3.x/server-kotlin/java/documentsdb/update.md +++ b/examples/2.3.x/server-kotlin/java/documentsdb/update.md @@ -15,7 +15,7 @@ documentsDB.update( "<NAME>", // name false, // enabled (optional) "serverless", // specification (optional) - 0, // replicas (optional) + 0L, // replicas (optional) "async", // syncMode (optional) new CoroutineCallback<>((result, error) -> { if (error != null) { diff --git a/examples/2.3.x/server-kotlin/java/documentsdb/upsert-documents.md b/examples/2.3.x/server-kotlin/java/documentsdb/upsert-documents.md index 97582524b..3e8d98677 100644 --- a/examples/2.3.x/server-kotlin/java/documentsdb/upsert-documents.md +++ b/examples/2.3.x/server-kotlin/java/documentsdb/upsert-documents.md @@ -13,7 +13,14 @@ DocumentsDB documentsDB = new DocumentsDB(client); documentsDB.upsertDocuments( "<DATABASE_ID>", // databaseId "<COLLECTION_ID>", // collectionId - List.of(), // documents + List.of(Map.of( + "$id", "example1", + "username", "walter.obrien", + "email", "walter.obrien@example.com", + "fullName", "Walter O'Brien", + "age", 30, + "isAdmin", false + )), // documents "<TRANSACTION_ID>", // transactionId (optional) new CoroutineCallback<>((result, error) -> { if (error != null) { diff --git a/examples/2.3.x/server-kotlin/java/domains/create-record-a.md b/examples/2.3.x/server-kotlin/java/domains/create-record-a.md index 13c81cd60..4649d9808 100644 --- a/examples/2.3.x/server-kotlin/java/domains/create-record-a.md +++ b/examples/2.3.x/server-kotlin/java/domains/create-record-a.md @@ -14,7 +14,7 @@ domains.createRecordA( "<DOMAIN_ID>", // domainId "", // name "", // value - 1, // ttl + 1L, // ttl "<COMMENT>", // comment (optional) new CoroutineCallback<>((result, error) -> { if (error != null) { diff --git a/examples/2.3.x/server-kotlin/java/domains/create-record-aaaa.md b/examples/2.3.x/server-kotlin/java/domains/create-record-aaaa.md index 36762ae43..adda2574c 100644 --- a/examples/2.3.x/server-kotlin/java/domains/create-record-aaaa.md +++ b/examples/2.3.x/server-kotlin/java/domains/create-record-aaaa.md @@ -14,7 +14,7 @@ domains.createRecordAAAA( "<DOMAIN_ID>", // domainId "", // name "", // value - 1, // ttl + 1L, // ttl "<COMMENT>", // comment (optional) new CoroutineCallback<>((result, error) -> { if (error != null) { diff --git a/examples/2.3.x/server-kotlin/java/domains/create-record-alias.md b/examples/2.3.x/server-kotlin/java/domains/create-record-alias.md index a9a41bfc7..6072d65c2 100644 --- a/examples/2.3.x/server-kotlin/java/domains/create-record-alias.md +++ b/examples/2.3.x/server-kotlin/java/domains/create-record-alias.md @@ -14,7 +14,7 @@ domains.createRecordAlias( "<DOMAIN_ID>", // domainId "", // name "<VALUE>", // value - 1, // ttl + 1L, // ttl "<COMMENT>", // comment (optional) new CoroutineCallback<>((result, error) -> { if (error != null) { diff --git a/examples/2.3.x/server-kotlin/java/domains/create-record-caa.md b/examples/2.3.x/server-kotlin/java/domains/create-record-caa.md index d8df0f89e..4782c7ef6 100644 --- a/examples/2.3.x/server-kotlin/java/domains/create-record-caa.md +++ b/examples/2.3.x/server-kotlin/java/domains/create-record-caa.md @@ -14,7 +14,7 @@ domains.createRecordCAA( "<DOMAIN_ID>", // domainId "", // name "", // value - 1, // ttl + 1L, // ttl "<COMMENT>", // comment (optional) new CoroutineCallback<>((result, error) -> { if (error != null) { diff --git a/examples/2.3.x/server-kotlin/java/domains/create-record-cname.md b/examples/2.3.x/server-kotlin/java/domains/create-record-cname.md index 157681188..2b146c5d3 100644 --- a/examples/2.3.x/server-kotlin/java/domains/create-record-cname.md +++ b/examples/2.3.x/server-kotlin/java/domains/create-record-cname.md @@ -14,7 +14,7 @@ domains.createRecordCNAME( "<DOMAIN_ID>", // domainId "", // name "<VALUE>", // value - 1, // ttl + 1L, // ttl "<COMMENT>", // comment (optional) new CoroutineCallback<>((result, error) -> { if (error != null) { diff --git a/examples/2.3.x/server-kotlin/java/domains/create-record-https.md b/examples/2.3.x/server-kotlin/java/domains/create-record-https.md index e8bd7b963..e0dc50b93 100644 --- a/examples/2.3.x/server-kotlin/java/domains/create-record-https.md +++ b/examples/2.3.x/server-kotlin/java/domains/create-record-https.md @@ -14,7 +14,7 @@ domains.createRecordHTTPS( "<DOMAIN_ID>", // domainId "", // name "<VALUE>", // value - 1, // ttl + 1L, // ttl "<COMMENT>", // comment (optional) new CoroutineCallback<>((result, error) -> { if (error != null) { diff --git a/examples/2.3.x/server-kotlin/java/domains/create-record-mx.md b/examples/2.3.x/server-kotlin/java/domains/create-record-mx.md index beb99ac6f..4ff3d953e 100644 --- a/examples/2.3.x/server-kotlin/java/domains/create-record-mx.md +++ b/examples/2.3.x/server-kotlin/java/domains/create-record-mx.md @@ -14,8 +14,8 @@ domains.createRecordMX( "<DOMAIN_ID>", // domainId "", // name "<VALUE>", // value - 1, // ttl - 0, // priority + 1L, // ttl + 0L, // priority "<COMMENT>", // comment (optional) new CoroutineCallback<>((result, error) -> { if (error != null) { diff --git a/examples/2.3.x/server-kotlin/java/domains/create-record-ns.md b/examples/2.3.x/server-kotlin/java/domains/create-record-ns.md index e4513db25..c7df5b355 100644 --- a/examples/2.3.x/server-kotlin/java/domains/create-record-ns.md +++ b/examples/2.3.x/server-kotlin/java/domains/create-record-ns.md @@ -14,7 +14,7 @@ domains.createRecordNS( "<DOMAIN_ID>", // domainId "", // name "<VALUE>", // value - 1, // ttl + 1L, // ttl "<COMMENT>", // comment (optional) new CoroutineCallback<>((result, error) -> { if (error != null) { diff --git a/examples/2.3.x/server-kotlin/java/domains/create-record-srv.md b/examples/2.3.x/server-kotlin/java/domains/create-record-srv.md index 3abf748aa..4add41478 100644 --- a/examples/2.3.x/server-kotlin/java/domains/create-record-srv.md +++ b/examples/2.3.x/server-kotlin/java/domains/create-record-srv.md @@ -14,10 +14,10 @@ domains.createRecordSRV( "<DOMAIN_ID>", // domainId "", // name "<VALUE>", // value - 1, // ttl - 0, // priority - 0, // weight - 0, // port + 1L, // ttl + 0L, // priority + 0L, // weight + 0L, // port "<COMMENT>", // comment (optional) new CoroutineCallback<>((result, error) -> { if (error != null) { diff --git a/examples/2.3.x/server-kotlin/java/domains/create-record-txt.md b/examples/2.3.x/server-kotlin/java/domains/create-record-txt.md index 73d543104..6693833c0 100644 --- a/examples/2.3.x/server-kotlin/java/domains/create-record-txt.md +++ b/examples/2.3.x/server-kotlin/java/domains/create-record-txt.md @@ -13,7 +13,7 @@ Domains domains = new Domains(client); domains.createRecordTXT( "<DOMAIN_ID>", // domainId "", // name - 1, // ttl + 1L, // ttl "<VALUE>", // value (optional) "<COMMENT>", // comment (optional) new CoroutineCallback<>((result, error) -> { diff --git a/examples/2.3.x/server-kotlin/java/domains/get-price.md b/examples/2.3.x/server-kotlin/java/domains/get-price.md index 41ef166b9..b58192178 100644 --- a/examples/2.3.x/server-kotlin/java/domains/get-price.md +++ b/examples/2.3.x/server-kotlin/java/domains/get-price.md @@ -13,7 +13,7 @@ Domains domains = new Domains(client); domains.getPrice( "example.com", // domain - 0, // periodYears (optional) + 0L, // periodYears (optional) DomainRegistrationType.NEW, // registrationType (optional) new CoroutineCallback<>((result, error) -> { if (error != null) { diff --git a/examples/2.3.x/server-kotlin/java/domains/list-prices.md b/examples/2.3.x/server-kotlin/java/domains/list-prices.md index d5b3eeba3..1c5de1bef 100644 --- a/examples/2.3.x/server-kotlin/java/domains/list-prices.md +++ b/examples/2.3.x/server-kotlin/java/domains/list-prices.md @@ -13,7 +13,7 @@ Domains domains = new Domains(client); domains.listPrices( List.of(), // domains - 0, // periodYears (optional) + 0L, // periodYears (optional) DomainRegistrationType.NEW, // registrationType (optional) new CoroutineCallback<>((result, error) -> { if (error != null) { diff --git a/examples/2.3.x/server-kotlin/java/domains/update-record-a.md b/examples/2.3.x/server-kotlin/java/domains/update-record-a.md index a5f6582e3..ae2f0bfb6 100644 --- a/examples/2.3.x/server-kotlin/java/domains/update-record-a.md +++ b/examples/2.3.x/server-kotlin/java/domains/update-record-a.md @@ -15,7 +15,7 @@ domains.updateRecordA( "<RECORD_ID>", // recordId "", // name "", // value - 1, // ttl + 1L, // ttl "<COMMENT>", // comment (optional) new CoroutineCallback<>((result, error) -> { if (error != null) { diff --git a/examples/2.3.x/server-kotlin/java/domains/update-record-aaaa.md b/examples/2.3.x/server-kotlin/java/domains/update-record-aaaa.md index 35c9920bd..2b9b7f4f7 100644 --- a/examples/2.3.x/server-kotlin/java/domains/update-record-aaaa.md +++ b/examples/2.3.x/server-kotlin/java/domains/update-record-aaaa.md @@ -15,7 +15,7 @@ domains.updateRecordAAAA( "<RECORD_ID>", // recordId "", // name "", // value - 1, // ttl + 1L, // ttl "<COMMENT>", // comment (optional) new CoroutineCallback<>((result, error) -> { if (error != null) { diff --git a/examples/2.3.x/server-kotlin/java/domains/update-record-alias.md b/examples/2.3.x/server-kotlin/java/domains/update-record-alias.md index 61c4b2ba8..e1026f92e 100644 --- a/examples/2.3.x/server-kotlin/java/domains/update-record-alias.md +++ b/examples/2.3.x/server-kotlin/java/domains/update-record-alias.md @@ -15,7 +15,7 @@ domains.updateRecordAlias( "<RECORD_ID>", // recordId "", // name "<VALUE>", // value - 1, // ttl + 1L, // ttl "<COMMENT>", // comment (optional) new CoroutineCallback<>((result, error) -> { if (error != null) { diff --git a/examples/2.3.x/server-kotlin/java/domains/update-record-caa.md b/examples/2.3.x/server-kotlin/java/domains/update-record-caa.md index 42abda737..881fd23d8 100644 --- a/examples/2.3.x/server-kotlin/java/domains/update-record-caa.md +++ b/examples/2.3.x/server-kotlin/java/domains/update-record-caa.md @@ -15,7 +15,7 @@ domains.updateRecordCAA( "<RECORD_ID>", // recordId "", // name "", // value - 1, // ttl + 1L, // ttl "<COMMENT>", // comment (optional) new CoroutineCallback<>((result, error) -> { if (error != null) { diff --git a/examples/2.3.x/server-kotlin/java/domains/update-record-cname.md b/examples/2.3.x/server-kotlin/java/domains/update-record-cname.md index aa25f8b37..577bbc12b 100644 --- a/examples/2.3.x/server-kotlin/java/domains/update-record-cname.md +++ b/examples/2.3.x/server-kotlin/java/domains/update-record-cname.md @@ -15,7 +15,7 @@ domains.updateRecordCNAME( "<RECORD_ID>", // recordId "", // name "<VALUE>", // value - 1, // ttl + 1L, // ttl "<COMMENT>", // comment (optional) new CoroutineCallback<>((result, error) -> { if (error != null) { diff --git a/examples/2.3.x/server-kotlin/java/domains/update-record-https.md b/examples/2.3.x/server-kotlin/java/domains/update-record-https.md index e5ef1feb8..9aa758a2e 100644 --- a/examples/2.3.x/server-kotlin/java/domains/update-record-https.md +++ b/examples/2.3.x/server-kotlin/java/domains/update-record-https.md @@ -15,7 +15,7 @@ domains.updateRecordHTTPS( "<RECORD_ID>", // recordId "", // name "<VALUE>", // value - 1, // ttl + 1L, // ttl "<COMMENT>", // comment (optional) new CoroutineCallback<>((result, error) -> { if (error != null) { diff --git a/examples/2.3.x/server-kotlin/java/domains/update-record-mx.md b/examples/2.3.x/server-kotlin/java/domains/update-record-mx.md index 30294b7cd..03978420f 100644 --- a/examples/2.3.x/server-kotlin/java/domains/update-record-mx.md +++ b/examples/2.3.x/server-kotlin/java/domains/update-record-mx.md @@ -15,8 +15,8 @@ domains.updateRecordMX( "<RECORD_ID>", // recordId "", // name "<VALUE>", // value - 1, // ttl - 0, // priority + 1L, // ttl + 0L, // priority "<COMMENT>", // comment (optional) new CoroutineCallback<>((result, error) -> { if (error != null) { diff --git a/examples/2.3.x/server-kotlin/java/domains/update-record-ns.md b/examples/2.3.x/server-kotlin/java/domains/update-record-ns.md index f7ab6c3df..b6e2d94e5 100644 --- a/examples/2.3.x/server-kotlin/java/domains/update-record-ns.md +++ b/examples/2.3.x/server-kotlin/java/domains/update-record-ns.md @@ -15,7 +15,7 @@ domains.updateRecordNS( "<RECORD_ID>", // recordId "", // name "<VALUE>", // value - 1, // ttl + 1L, // ttl "<COMMENT>", // comment (optional) new CoroutineCallback<>((result, error) -> { if (error != null) { diff --git a/examples/2.3.x/server-kotlin/java/domains/update-record-srv.md b/examples/2.3.x/server-kotlin/java/domains/update-record-srv.md index 050374932..b03ae4a63 100644 --- a/examples/2.3.x/server-kotlin/java/domains/update-record-srv.md +++ b/examples/2.3.x/server-kotlin/java/domains/update-record-srv.md @@ -15,10 +15,10 @@ domains.updateRecordSRV( "<RECORD_ID>", // recordId "", // name "<VALUE>", // value - 1, // ttl - 0, // priority - 0, // weight - 0, // port + 1L, // ttl + 0L, // priority + 0L, // weight + 0L, // port "<COMMENT>", // comment (optional) new CoroutineCallback<>((result, error) -> { if (error != null) { diff --git a/examples/2.3.x/server-kotlin/java/domains/update-record-txt.md b/examples/2.3.x/server-kotlin/java/domains/update-record-txt.md index f46042fdf..d429eca66 100644 --- a/examples/2.3.x/server-kotlin/java/domains/update-record-txt.md +++ b/examples/2.3.x/server-kotlin/java/domains/update-record-txt.md @@ -15,7 +15,7 @@ domains.updateRecordTXT( "<RECORD_ID>", // recordId "", // name "<VALUE>", // value - 1, // ttl + 1L, // ttl "<COMMENT>", // comment (optional) new CoroutineCallback<>((result, error) -> { if (error != null) { diff --git a/examples/2.3.x/server-kotlin/java/embeddings/create-text-embeddings.md b/examples/2.3.x/server-kotlin/java/embeddings/create-text-embeddings.md index 92d9ee998..5dd31a9be 100644 --- a/examples/2.3.x/server-kotlin/java/embeddings/create-text-embeddings.md +++ b/examples/2.3.x/server-kotlin/java/embeddings/create-text-embeddings.md @@ -12,7 +12,7 @@ Client client = new Client() Embeddings embeddings = new Embeddings(client); embeddings.createTextEmbeddings( - List.of(), // texts + List.of("Appwrite helps developers build applications.", "Find documents with semantic search."), // texts EmbeddingModel.NOMIC_EMBED_TEXT, // model (optional) new CoroutineCallback<>((result, error) -> { if (error != null) { diff --git a/examples/2.3.x/server-kotlin/java/functions/create.md b/examples/2.3.x/server-kotlin/java/functions/create.md index a02365dc6..1b280c257 100644 --- a/examples/2.3.x/server-kotlin/java/functions/create.md +++ b/examples/2.3.x/server-kotlin/java/functions/create.md @@ -19,7 +19,7 @@ functions.create( List.of("any"), // execute (optional) List.of(), // events (optional) "0 0 * * *", // schedule (optional) - 1, // timeout (optional) + 1L, // timeout (optional) false, // enabled (optional) false, // logging (optional) "<ENTRYPOINT>", // entrypoint (optional) @@ -34,7 +34,7 @@ functions.create( List.of(), // providerPaths (optional) "s-1vcpu-512mb", // buildSpecification (optional) "s-1vcpu-512mb", // runtimeSpecification (optional) - 0, // deploymentRetention (optional) + 0L, // deploymentRetention (optional) new CoroutineCallback<>((result, error) -> { if (error != null) { error.printStackTrace(); diff --git a/examples/2.3.x/server-kotlin/java/functions/list-runtimes.md b/examples/2.3.x/server-kotlin/java/functions/list-runtimes.md index 0a4a240c8..d45deece8 100644 --- a/examples/2.3.x/server-kotlin/java/functions/list-runtimes.md +++ b/examples/2.3.x/server-kotlin/java/functions/list-runtimes.md @@ -10,12 +10,16 @@ Client client = new Client() Functions functions = new Functions(client); -functions.listRuntimes(new CoroutineCallback<>((result, error) -> { - if (error != null) { - error.printStackTrace(); - return; - } +functions.listRuntimes( + false, // total (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); - System.out.println(result); -})); ``` diff --git a/examples/2.3.x/server-kotlin/java/functions/list-specifications.md b/examples/2.3.x/server-kotlin/java/functions/list-specifications.md index 7a6c7f51c..145e691cc 100644 --- a/examples/2.3.x/server-kotlin/java/functions/list-specifications.md +++ b/examples/2.3.x/server-kotlin/java/functions/list-specifications.md @@ -12,6 +12,7 @@ Functions functions = new Functions(client); functions.listSpecifications( "runtimes", // type (optional) + false, // total (optional) new CoroutineCallback<>((result, error) -> { if (error != null) { error.printStackTrace(); diff --git a/examples/2.3.x/server-kotlin/java/functions/update.md b/examples/2.3.x/server-kotlin/java/functions/update.md index 30bb95586..b8164c896 100644 --- a/examples/2.3.x/server-kotlin/java/functions/update.md +++ b/examples/2.3.x/server-kotlin/java/functions/update.md @@ -19,7 +19,7 @@ functions.update( List.of("any"), // execute (optional) List.of(), // events (optional) "0 0 * * *", // schedule (optional) - 1, // timeout (optional) + 1L, // timeout (optional) false, // enabled (optional) false, // logging (optional) "<ENTRYPOINT>", // entrypoint (optional) @@ -34,7 +34,7 @@ functions.update( List.of(), // providerPaths (optional) "s-1vcpu-512mb", // buildSpecification (optional) "s-1vcpu-512mb", // runtimeSpecification (optional) - 0, // deploymentRetention (optional) + 0L, // deploymentRetention (optional) new CoroutineCallback<>((result, error) -> { if (error != null) { error.printStackTrace(); diff --git a/examples/2.3.x/server-kotlin/java/graphql/mutation.md b/examples/2.3.x/server-kotlin/java/graphql/mutation.md index 1f327de50..9c973ce2e 100644 --- a/examples/2.3.x/server-kotlin/java/graphql/mutation.md +++ b/examples/2.3.x/server-kotlin/java/graphql/mutation.md @@ -11,7 +11,9 @@ Client client = new Client() Graphql graphql = new Graphql(client); graphql.mutation( - Map.of("a", "b"), // query + Map.of( + "query", "mutation { accountUpdateName(name: \"Walter\") { name } }" + ), // query new CoroutineCallback<>((result, error) -> { if (error != null) { error.printStackTrace(); diff --git a/examples/2.3.x/server-kotlin/java/graphql/query.md b/examples/2.3.x/server-kotlin/java/graphql/query.md index 29ea821d6..96b479b68 100644 --- a/examples/2.3.x/server-kotlin/java/graphql/query.md +++ b/examples/2.3.x/server-kotlin/java/graphql/query.md @@ -11,7 +11,9 @@ Client client = new Client() Graphql graphql = new Graphql(client); graphql.query( - Map.of("a", "b"), // query + Map.of( + "query", "query { localeGet { ip } }" + ), // query new CoroutineCallback<>((result, error) -> { if (error != null) { error.printStackTrace(); diff --git a/examples/2.3.x/server-kotlin/java/locale/list-codes.md b/examples/2.3.x/server-kotlin/java/locale/list-codes.md index 25555499b..3a77e308a 100644 --- a/examples/2.3.x/server-kotlin/java/locale/list-codes.md +++ b/examples/2.3.x/server-kotlin/java/locale/list-codes.md @@ -10,12 +10,16 @@ Client client = new Client() Locale locale = new Locale(client); -locale.listCodes(new CoroutineCallback<>((result, error) -> { - if (error != null) { - error.printStackTrace(); - return; - } +locale.listCodes( + false, // total (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); - System.out.println(result); -})); ``` diff --git a/examples/2.3.x/server-kotlin/java/locale/list-continents.md b/examples/2.3.x/server-kotlin/java/locale/list-continents.md index f7098f332..d2620eb83 100644 --- a/examples/2.3.x/server-kotlin/java/locale/list-continents.md +++ b/examples/2.3.x/server-kotlin/java/locale/list-continents.md @@ -10,12 +10,16 @@ Client client = new Client() Locale locale = new Locale(client); -locale.listContinents(new CoroutineCallback<>((result, error) -> { - if (error != null) { - error.printStackTrace(); - return; - } +locale.listContinents( + false, // total (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); - System.out.println(result); -})); ``` diff --git a/examples/2.3.x/server-kotlin/java/locale/list-countries-eu.md b/examples/2.3.x/server-kotlin/java/locale/list-countries-eu.md index b312639fc..35dbccdd5 100644 --- a/examples/2.3.x/server-kotlin/java/locale/list-countries-eu.md +++ b/examples/2.3.x/server-kotlin/java/locale/list-countries-eu.md @@ -10,12 +10,16 @@ Client client = new Client() Locale locale = new Locale(client); -locale.listCountriesEU(new CoroutineCallback<>((result, error) -> { - if (error != null) { - error.printStackTrace(); - return; - } +locale.listCountriesEU( + false, // total (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); - System.out.println(result); -})); ``` diff --git a/examples/2.3.x/server-kotlin/java/locale/list-countries-phones.md b/examples/2.3.x/server-kotlin/java/locale/list-countries-phones.md index aed72e0ff..eb6b24e71 100644 --- a/examples/2.3.x/server-kotlin/java/locale/list-countries-phones.md +++ b/examples/2.3.x/server-kotlin/java/locale/list-countries-phones.md @@ -10,12 +10,16 @@ Client client = new Client() Locale locale = new Locale(client); -locale.listCountriesPhones(new CoroutineCallback<>((result, error) -> { - if (error != null) { - error.printStackTrace(); - return; - } +locale.listCountriesPhones( + false, // total (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); - System.out.println(result); -})); ``` diff --git a/examples/2.3.x/server-kotlin/java/locale/list-countries.md b/examples/2.3.x/server-kotlin/java/locale/list-countries.md index 8eef04d63..af1d55c90 100644 --- a/examples/2.3.x/server-kotlin/java/locale/list-countries.md +++ b/examples/2.3.x/server-kotlin/java/locale/list-countries.md @@ -10,12 +10,16 @@ Client client = new Client() Locale locale = new Locale(client); -locale.listCountries(new CoroutineCallback<>((result, error) -> { - if (error != null) { - error.printStackTrace(); - return; - } +locale.listCountries( + false, // total (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); - System.out.println(result); -})); ``` diff --git a/examples/2.3.x/server-kotlin/java/locale/list-currencies.md b/examples/2.3.x/server-kotlin/java/locale/list-currencies.md index fc4ee4d9d..00719a631 100644 --- a/examples/2.3.x/server-kotlin/java/locale/list-currencies.md +++ b/examples/2.3.x/server-kotlin/java/locale/list-currencies.md @@ -10,12 +10,16 @@ Client client = new Client() Locale locale = new Locale(client); -locale.listCurrencies(new CoroutineCallback<>((result, error) -> { - if (error != null) { - error.printStackTrace(); - return; - } +locale.listCurrencies( + false, // total (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); - System.out.println(result); -})); ``` diff --git a/examples/2.3.x/server-kotlin/java/locale/list-languages.md b/examples/2.3.x/server-kotlin/java/locale/list-languages.md index 44d101564..99bc1681d 100644 --- a/examples/2.3.x/server-kotlin/java/locale/list-languages.md +++ b/examples/2.3.x/server-kotlin/java/locale/list-languages.md @@ -10,12 +10,16 @@ Client client = new Client() Locale locale = new Locale(client); -locale.listLanguages(new CoroutineCallback<>((result, error) -> { - if (error != null) { - error.printStackTrace(); - return; - } +locale.listLanguages( + false, // total (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); - System.out.println(result); -})); ``` diff --git a/examples/2.3.x/server-kotlin/java/messaging/create-appwrite-provider.md b/examples/2.3.x/server-kotlin/java/messaging/create-appwrite-provider.md index d60e304d7..082ce376a 100644 --- a/examples/2.3.x/server-kotlin/java/messaging/create-appwrite-provider.md +++ b/examples/2.3.x/server-kotlin/java/messaging/create-appwrite-provider.md @@ -14,8 +14,8 @@ messaging.createAppwriteProvider( "<PROVIDER_ID>", // providerId "<NAME>", // name false, // enabled (optional) - 0, // qos (optional) - 0, // expiry (optional) + 0L, // qos (optional) + 0L, // expiry (optional) new CoroutineCallback<>((result, error) -> { if (error != null) { error.printStackTrace(); diff --git a/examples/2.3.x/server-kotlin/java/messaging/create-push.md b/examples/2.3.x/server-kotlin/java/messaging/create-push.md index 9caac2d47..6b43ef84e 100644 --- a/examples/2.3.x/server-kotlin/java/messaging/create-push.md +++ b/examples/2.3.x/server-kotlin/java/messaging/create-push.md @@ -25,12 +25,13 @@ messaging.createPush( "<SOUND>", // sound (optional) "<COLOR>", // color (optional) "<TAG>", // tag (optional) - 1, // badge (optional) + 1L, // badge (optional) false, // draft (optional) "2020-10-15T06:38:00.000+00:00", // scheduledAt (optional) false, // contentAvailable (optional) false, // critical (optional) MessagePriority.NORMAL, // priority (optional) + "<CHANNEL_ID>", // channelId (optional) new CoroutineCallback<>((result, error) -> { if (error != null) { error.printStackTrace(); diff --git a/examples/2.3.x/server-kotlin/java/messaging/create-smtp-provider.md b/examples/2.3.x/server-kotlin/java/messaging/create-smtp-provider.md index 2b0046bc4..2a890982d 100644 --- a/examples/2.3.x/server-kotlin/java/messaging/create-smtp-provider.md +++ b/examples/2.3.x/server-kotlin/java/messaging/create-smtp-provider.md @@ -15,7 +15,7 @@ messaging.createSMTPProvider( "<PROVIDER_ID>", // providerId "<NAME>", // name "<HOST>", // host - 587, // port (optional) + 587L, // port (optional) "<USERNAME>", // username (optional) "password", // password (optional) SmtpEncryption.NONE, // encryption (optional) diff --git a/examples/2.3.x/server-kotlin/java/messaging/create-topic.md b/examples/2.3.x/server-kotlin/java/messaging/create-topic.md index 5a1e5f2f5..f1bad78d4 100644 --- a/examples/2.3.x/server-kotlin/java/messaging/create-topic.md +++ b/examples/2.3.x/server-kotlin/java/messaging/create-topic.md @@ -14,8 +14,8 @@ messaging.createTopic( "<TOPIC_ID>", // topicId "<NAME>", // name List.of("any"), // subscribe (optional) - 0, // qos (optional) - 0, // expiry (optional) + 0L, // qos (optional) + 0L, // expiry (optional) new CoroutineCallback<>((result, error) -> { if (error != null) { error.printStackTrace(); diff --git a/examples/2.3.x/server-kotlin/java/messaging/update-appwrite-provider.md b/examples/2.3.x/server-kotlin/java/messaging/update-appwrite-provider.md index 10cc9e55f..2a3b7fe7d 100644 --- a/examples/2.3.x/server-kotlin/java/messaging/update-appwrite-provider.md +++ b/examples/2.3.x/server-kotlin/java/messaging/update-appwrite-provider.md @@ -14,8 +14,8 @@ messaging.updateAppwriteProvider( "<PROVIDER_ID>", // providerId "<NAME>", // name (optional) false, // enabled (optional) - 0, // qos (optional) - 0, // expiry (optional) + 0L, // qos (optional) + 0L, // expiry (optional) new CoroutineCallback<>((result, error) -> { if (error != null) { error.printStackTrace(); diff --git a/examples/2.3.x/server-kotlin/java/messaging/update-email.md b/examples/2.3.x/server-kotlin/java/messaging/update-email.md index 71d82db5b..9bbf4222b 100644 --- a/examples/2.3.x/server-kotlin/java/messaging/update-email.md +++ b/examples/2.3.x/server-kotlin/java/messaging/update-email.md @@ -12,19 +12,19 @@ Messaging messaging = new Messaging(client); messaging.updateEmail( "<MESSAGE_ID>", // messageId + "<SUBJECT>", // subject (optional) + "<CONTENT>", // content (optional) List.of(), // topics (optional) List.of(), // users (optional) List.of(), // targets (optional) - "<SUBJECT>", // subject (optional) - "<CONTENT>", // content (optional) - false, // draft (optional) - false, // html (optional) List.of(), // cc (optional) List.of(), // bcc (optional) + List.of(), // attachments (optional) "email@example.com", // replyToEmail (optional) "<REPLY_TO_NAME>", // replyToName (optional) + false, // draft (optional) + false, // html (optional) "2020-10-15T06:38:00.000+00:00", // scheduledAt (optional) - List.of(), // attachments (optional) new CoroutineCallback<>((result, error) -> { if (error != null) { error.printStackTrace(); diff --git a/examples/2.3.x/server-kotlin/java/messaging/update-push.md b/examples/2.3.x/server-kotlin/java/messaging/update-push.md index 263dfaab1..e7ca28563 100644 --- a/examples/2.3.x/server-kotlin/java/messaging/update-push.md +++ b/examples/2.3.x/server-kotlin/java/messaging/update-push.md @@ -13,11 +13,11 @@ Messaging messaging = new Messaging(client); messaging.updatePush( "<MESSAGE_ID>", // messageId + "<TITLE>", // title (optional) + "<BODY>", // body (optional) List.of(), // topics (optional) List.of(), // users (optional) List.of(), // targets (optional) - "<TITLE>", // title (optional) - "<BODY>", // body (optional) Map.of("a", "b"), // data (optional) "<ACTION>", // action (optional) "<ID1:ID2>", // image (optional) @@ -25,12 +25,13 @@ messaging.updatePush( "<SOUND>", // sound (optional) "<COLOR>", // color (optional) "<TAG>", // tag (optional) - 1, // badge (optional) + 1L, // badge (optional) false, // draft (optional) "2020-10-15T06:38:00.000+00:00", // scheduledAt (optional) false, // contentAvailable (optional) false, // critical (optional) MessagePriority.NORMAL, // priority (optional) + "<CHANNEL_ID>", // channelId (optional) new CoroutineCallback<>((result, error) -> { if (error != null) { error.printStackTrace(); diff --git a/examples/2.3.x/server-kotlin/java/messaging/update-sms.md b/examples/2.3.x/server-kotlin/java/messaging/update-sms.md index 808be650a..e86f22e19 100644 --- a/examples/2.3.x/server-kotlin/java/messaging/update-sms.md +++ b/examples/2.3.x/server-kotlin/java/messaging/update-sms.md @@ -12,10 +12,10 @@ Messaging messaging = new Messaging(client); messaging.updateSMS( "<MESSAGE_ID>", // messageId + "<CONTENT>", // content (optional) List.of(), // topics (optional) List.of(), // users (optional) List.of(), // targets (optional) - "<CONTENT>", // content (optional) false, // draft (optional) "2020-10-15T06:38:00.000+00:00", // scheduledAt (optional) new CoroutineCallback<>((result, error) -> { diff --git a/examples/2.3.x/server-kotlin/java/messaging/update-smtp-provider.md b/examples/2.3.x/server-kotlin/java/messaging/update-smtp-provider.md index 70a017c9b..f946342e1 100644 --- a/examples/2.3.x/server-kotlin/java/messaging/update-smtp-provider.md +++ b/examples/2.3.x/server-kotlin/java/messaging/update-smtp-provider.md @@ -15,7 +15,7 @@ messaging.updateSMTPProvider( "<PROVIDER_ID>", // providerId "<NAME>", // name (optional) "<HOST>", // host (optional) - 1, // port (optional) + 1L, // port (optional) "<USERNAME>", // username (optional) "password", // password (optional) SmtpEncryption.NONE, // encryption (optional) diff --git a/examples/2.3.x/server-kotlin/java/messaging/update-topic.md b/examples/2.3.x/server-kotlin/java/messaging/update-topic.md index 88a30e0cf..04213fdd9 100644 --- a/examples/2.3.x/server-kotlin/java/messaging/update-topic.md +++ b/examples/2.3.x/server-kotlin/java/messaging/update-topic.md @@ -14,8 +14,8 @@ messaging.updateTopic( "<TOPIC_ID>", // topicId "<NAME>", // name (optional) List.of("any"), // subscribe (optional) - 0, // qos (optional) - 0, // expiry (optional) + 0L, // qos (optional) + 0L, // expiry (optional) new CoroutineCallback<>((result, error) -> { if (error != null) { error.printStackTrace(); diff --git a/examples/2.3.x/server-kotlin/java/mongo/create-backup-policy.md b/examples/2.3.x/server-kotlin/java/mongo/create-backup-policy.md index 0ef94ad13..e936c29a9 100644 --- a/examples/2.3.x/server-kotlin/java/mongo/create-backup-policy.md +++ b/examples/2.3.x/server-kotlin/java/mongo/create-backup-policy.md @@ -15,7 +15,7 @@ mongo.createBackupPolicy( "<POLICY_ID>", // policyId "<NAME>", // name "", // schedule - 1, // retention + 1L, // retention "full", // type (optional) false, // enabled (optional) new CoroutineCallback<>((result, error) -> { diff --git a/examples/2.3.x/server-kotlin/java/mongo/create-branch.md b/examples/2.3.x/server-kotlin/java/mongo/create-branch.md index 122dec847..7c9e49e01 100644 --- a/examples/2.3.x/server-kotlin/java/mongo/create-branch.md +++ b/examples/2.3.x/server-kotlin/java/mongo/create-branch.md @@ -13,7 +13,7 @@ Mongo mongo = new Mongo(client); mongo.createBranch( "<DATABASE_ID>", // databaseId "<BRANCH_ID>", // branchId (optional) - 300, // ttl (optional) + 300L, // ttl (optional) new CoroutineCallback<>((result, error) -> { if (error != null) { error.printStackTrace(); diff --git a/examples/2.3.x/server-kotlin/java/mongo/create.md b/examples/2.3.x/server-kotlin/java/mongo/create.md index fda3da697..bd3ffb8ae 100644 --- a/examples/2.3.x/server-kotlin/java/mongo/create.md +++ b/examples/2.3.x/server-kotlin/java/mongo/create.md @@ -15,16 +15,16 @@ mongo.create( "<NAME>", // name "17", // version (optional) "<SPECIFICATION>", // specification (optional) - 0, // replicas (optional) + 0L, // replicas (optional) "async", // syncMode (optional) - 60, // networkIdleTimeoutSeconds (optional) + 60L, // networkIdleTimeoutSeconds (optional) List.of(), // networkIPAllowlist (optional) - 5, // idleTimeoutMinutes (optional) + 5L, // idleTimeoutMinutes (optional) false, // pitr (optional) - 1, // pitrRetentionDays (optional) + 1L, // pitrRetentionDays (optional) false, // storageAutoscaling (optional) - 50, // storageAutoscalingThresholdPercent (optional) - 0, // storageAutoscalingMaxGb (optional) + 50L, // storageAutoscalingThresholdPercent (optional) + 0L, // storageAutoscalingMaxGb (optional) new CoroutineCallback<>((result, error) -> { if (error != null) { error.printStackTrace(); diff --git a/examples/2.3.x/server-kotlin/java/mongo/list-operations.md b/examples/2.3.x/server-kotlin/java/mongo/list-operations.md index a54f416fc..f7b2dc99b 100644 --- a/examples/2.3.x/server-kotlin/java/mongo/list-operations.md +++ b/examples/2.3.x/server-kotlin/java/mongo/list-operations.md @@ -13,8 +13,8 @@ Mongo mongo = new Mongo(client); mongo.listOperations( "<DATABASE_ID>", // databaseId "queued", // status (optional) - 1, // limit (optional) - 0, // offset (optional) + 1L, // limit (optional) + 0L, // offset (optional) new CoroutineCallback<>((result, error) -> { if (error != null) { error.printStackTrace(); diff --git a/examples/2.3.x/server-kotlin/java/mongo/list-restorations.md b/examples/2.3.x/server-kotlin/java/mongo/list-restorations.md index 1b714093e..913405bae 100644 --- a/examples/2.3.x/server-kotlin/java/mongo/list-restorations.md +++ b/examples/2.3.x/server-kotlin/java/mongo/list-restorations.md @@ -14,8 +14,8 @@ mongo.listRestorations( "<DATABASE_ID>", // databaseId "pending", // status (optional) "backup", // type (optional) - 1, // limit (optional) - 0, // offset (optional) + 1L, // limit (optional) + 0L, // offset (optional) new CoroutineCallback<>((result, error) -> { if (error != null) { error.printStackTrace(); diff --git a/examples/2.3.x/server-kotlin/java/mongo/update-backup-policy.md b/examples/2.3.x/server-kotlin/java/mongo/update-backup-policy.md index 976f4f077..7691246c3 100644 --- a/examples/2.3.x/server-kotlin/java/mongo/update-backup-policy.md +++ b/examples/2.3.x/server-kotlin/java/mongo/update-backup-policy.md @@ -15,7 +15,7 @@ mongo.updateBackupPolicy( "<POLICY_ID>", // policyId "<NAME>", // name (optional) "", // schedule (optional) - 1, // retention (optional) + 1L, // retention (optional) false, // enabled (optional) new CoroutineCallback<>((result, error) -> { if (error != null) { diff --git a/examples/2.3.x/server-kotlin/java/mongo/update-maintenance.md b/examples/2.3.x/server-kotlin/java/mongo/update-maintenance.md index fd3ea6a7b..df3d2cbb3 100644 --- a/examples/2.3.x/server-kotlin/java/mongo/update-maintenance.md +++ b/examples/2.3.x/server-kotlin/java/mongo/update-maintenance.md @@ -13,7 +13,7 @@ Mongo mongo = new Mongo(client); mongo.updateMaintenance( "<DATABASE_ID>", // databaseId "sun", // day - 0, // hourUtc + 0L, // hourUtc new CoroutineCallback<>((result, error) -> { if (error != null) { error.printStackTrace(); diff --git a/examples/2.3.x/server-kotlin/java/mongo/update.md b/examples/2.3.x/server-kotlin/java/mongo/update.md index e5bb32e2a..e92f458d0 100644 --- a/examples/2.3.x/server-kotlin/java/mongo/update.md +++ b/examples/2.3.x/server-kotlin/java/mongo/update.md @@ -15,23 +15,23 @@ mongo.update( "<NAME>", // name (optional) "ready", // status (optional) "<SPECIFICATION>", // specification (optional) - 0, // replicas (optional) + 0L, // replicas (optional) "async", // syncMode (optional) - 60, // networkIdleTimeoutSeconds (optional) + 60L, // networkIdleTimeoutSeconds (optional) List.of(), // networkIPAllowlist (optional) - 5, // idleTimeoutMinutes (optional) + 5L, // idleTimeoutMinutes (optional) false, // pitr (optional) - 1, // pitrRetentionDays (optional) + 1L, // pitrRetentionDays (optional) false, // storageAutoscaling (optional) - 50, // storageAutoscalingThresholdPercent (optional) - 0, // storageAutoscalingMaxGb (optional) - 0, // metricsTraceSampleRate (optional) - 0, // metricsSlowQueryLogThresholdMs (optional) + 50L, // storageAutoscalingThresholdPercent (optional) + 0L, // storageAutoscalingMaxGb (optional) + 0.0, // metricsTraceSampleRate (optional) + 0L, // metricsSlowQueryLogThresholdMs (optional) false, // sqlApiEnabled (optional) List.of(), // sqlApiAllowedStatements (optional) - 1, // sqlApiMaxRows (optional) - 1024, // sqlApiMaxBytes (optional) - 1, // sqlApiTimeoutSeconds (optional) + 1L, // sqlApiMaxRows (optional) + 1024L, // sqlApiMaxBytes (optional) + 1L, // sqlApiTimeoutSeconds (optional) new CoroutineCallback<>((result, error) -> { if (error != null) { error.printStackTrace(); diff --git a/examples/2.3.x/server-kotlin/java/mysql/create-backup-policy.md b/examples/2.3.x/server-kotlin/java/mysql/create-backup-policy.md index c419db167..7b7b52dd8 100644 --- a/examples/2.3.x/server-kotlin/java/mysql/create-backup-policy.md +++ b/examples/2.3.x/server-kotlin/java/mysql/create-backup-policy.md @@ -15,7 +15,7 @@ mysql.createBackupPolicy( "<POLICY_ID>", // policyId "<NAME>", // name "", // schedule - 1, // retention + 1L, // retention "full", // type (optional) false, // enabled (optional) new CoroutineCallback<>((result, error) -> { diff --git a/examples/2.3.x/server-kotlin/java/mysql/create-branch.md b/examples/2.3.x/server-kotlin/java/mysql/create-branch.md index 5b8798941..20e477e13 100644 --- a/examples/2.3.x/server-kotlin/java/mysql/create-branch.md +++ b/examples/2.3.x/server-kotlin/java/mysql/create-branch.md @@ -13,7 +13,7 @@ Mysql mysql = new Mysql(client); mysql.createBranch( "<DATABASE_ID>", // databaseId "<BRANCH_ID>", // branchId (optional) - 300, // ttl (optional) + 300L, // ttl (optional) new CoroutineCallback<>((result, error) -> { if (error != null) { error.printStackTrace(); diff --git a/examples/2.3.x/server-kotlin/java/mysql/create-execution.md b/examples/2.3.x/server-kotlin/java/mysql/create-execution.md index ecf9d48c8..33e71ad33 100644 --- a/examples/2.3.x/server-kotlin/java/mysql/create-execution.md +++ b/examples/2.3.x/server-kotlin/java/mysql/create-execution.md @@ -14,7 +14,7 @@ mysql.createExecution( "<DATABASE_ID>", // databaseId "<SQL>", // sql Map.of("a", "b"), // bindings (optional) - 1, // timeoutSeconds (optional) + 1L, // timeoutSeconds (optional) new CoroutineCallback<>((result, error) -> { if (error != null) { error.printStackTrace(); diff --git a/examples/2.3.x/server-kotlin/java/mysql/create.md b/examples/2.3.x/server-kotlin/java/mysql/create.md index 9017b6c9b..0f89c2945 100644 --- a/examples/2.3.x/server-kotlin/java/mysql/create.md +++ b/examples/2.3.x/server-kotlin/java/mysql/create.md @@ -15,16 +15,16 @@ mysql.create( "<NAME>", // name "17", // version (optional) "<SPECIFICATION>", // specification (optional) - 0, // replicas (optional) + 0L, // replicas (optional) "async", // syncMode (optional) - 60, // networkIdleTimeoutSeconds (optional) + 60L, // networkIdleTimeoutSeconds (optional) List.of(), // networkIPAllowlist (optional) - 5, // idleTimeoutMinutes (optional) + 5L, // idleTimeoutMinutes (optional) false, // pitr (optional) - 1, // pitrRetentionDays (optional) + 1L, // pitrRetentionDays (optional) false, // storageAutoscaling (optional) - 50, // storageAutoscalingThresholdPercent (optional) - 0, // storageAutoscalingMaxGb (optional) + 50L, // storageAutoscalingThresholdPercent (optional) + 0L, // storageAutoscalingMaxGb (optional) new CoroutineCallback<>((result, error) -> { if (error != null) { error.printStackTrace(); diff --git a/examples/2.3.x/server-kotlin/java/mysql/list-operations.md b/examples/2.3.x/server-kotlin/java/mysql/list-operations.md index 199611a9a..aed636c04 100644 --- a/examples/2.3.x/server-kotlin/java/mysql/list-operations.md +++ b/examples/2.3.x/server-kotlin/java/mysql/list-operations.md @@ -13,8 +13,8 @@ Mysql mysql = new Mysql(client); mysql.listOperations( "<DATABASE_ID>", // databaseId "queued", // status (optional) - 1, // limit (optional) - 0, // offset (optional) + 1L, // limit (optional) + 0L, // offset (optional) new CoroutineCallback<>((result, error) -> { if (error != null) { error.printStackTrace(); diff --git a/examples/2.3.x/server-kotlin/java/mysql/list-restorations.md b/examples/2.3.x/server-kotlin/java/mysql/list-restorations.md index 6f852b7cd..3145b7bac 100644 --- a/examples/2.3.x/server-kotlin/java/mysql/list-restorations.md +++ b/examples/2.3.x/server-kotlin/java/mysql/list-restorations.md @@ -14,8 +14,8 @@ mysql.listRestorations( "<DATABASE_ID>", // databaseId "pending", // status (optional) "backup", // type (optional) - 1, // limit (optional) - 0, // offset (optional) + 1L, // limit (optional) + 0L, // offset (optional) new CoroutineCallback<>((result, error) -> { if (error != null) { error.printStackTrace(); diff --git a/examples/2.3.x/server-kotlin/java/mysql/update-backup-policy.md b/examples/2.3.x/server-kotlin/java/mysql/update-backup-policy.md index 6496629a2..59468c0b4 100644 --- a/examples/2.3.x/server-kotlin/java/mysql/update-backup-policy.md +++ b/examples/2.3.x/server-kotlin/java/mysql/update-backup-policy.md @@ -15,7 +15,7 @@ mysql.updateBackupPolicy( "<POLICY_ID>", // policyId "<NAME>", // name (optional) "", // schedule (optional) - 1, // retention (optional) + 1L, // retention (optional) false, // enabled (optional) new CoroutineCallback<>((result, error) -> { if (error != null) { diff --git a/examples/2.3.x/server-kotlin/java/mysql/update-maintenance.md b/examples/2.3.x/server-kotlin/java/mysql/update-maintenance.md index a1fdc41ff..ed1418afb 100644 --- a/examples/2.3.x/server-kotlin/java/mysql/update-maintenance.md +++ b/examples/2.3.x/server-kotlin/java/mysql/update-maintenance.md @@ -13,7 +13,7 @@ Mysql mysql = new Mysql(client); mysql.updateMaintenance( "<DATABASE_ID>", // databaseId "sun", // day - 0, // hourUtc + 0L, // hourUtc new CoroutineCallback<>((result, error) -> { if (error != null) { error.printStackTrace(); diff --git a/examples/2.3.x/server-kotlin/java/mysql/update-pooler.md b/examples/2.3.x/server-kotlin/java/mysql/update-pooler.md index 1eaf09c02..c912ff303 100644 --- a/examples/2.3.x/server-kotlin/java/mysql/update-pooler.md +++ b/examples/2.3.x/server-kotlin/java/mysql/update-pooler.md @@ -13,8 +13,8 @@ Mysql mysql = new Mysql(client); mysql.updatePooler( "<DATABASE_ID>", // databaseId "transaction", // mode (optional) - 10, // maxConnections (optional) - 1, // defaultPoolSize (optional) + 10L, // maxConnections (optional) + 1L, // defaultPoolSize (optional) false, // readWriteSplitting (optional) "<POOLER_CPU_REQUEST>", // poolerCpuRequest (optional) "<POOLER_CPU_LIMIT>", // poolerCpuLimit (optional) diff --git a/examples/2.3.x/server-kotlin/java/mysql/update.md b/examples/2.3.x/server-kotlin/java/mysql/update.md index 32a2b48e2..04c3caf0d 100644 --- a/examples/2.3.x/server-kotlin/java/mysql/update.md +++ b/examples/2.3.x/server-kotlin/java/mysql/update.md @@ -15,23 +15,23 @@ mysql.update( "<NAME>", // name (optional) "ready", // status (optional) "<SPECIFICATION>", // specification (optional) - 0, // replicas (optional) + 0L, // replicas (optional) "async", // syncMode (optional) - 60, // networkIdleTimeoutSeconds (optional) + 60L, // networkIdleTimeoutSeconds (optional) List.of(), // networkIPAllowlist (optional) - 5, // idleTimeoutMinutes (optional) + 5L, // idleTimeoutMinutes (optional) false, // pitr (optional) - 1, // pitrRetentionDays (optional) + 1L, // pitrRetentionDays (optional) false, // storageAutoscaling (optional) - 50, // storageAutoscalingThresholdPercent (optional) - 0, // storageAutoscalingMaxGb (optional) - 0, // metricsTraceSampleRate (optional) - 0, // metricsSlowQueryLogThresholdMs (optional) + 50L, // storageAutoscalingThresholdPercent (optional) + 0L, // storageAutoscalingMaxGb (optional) + 0.0, // metricsTraceSampleRate (optional) + 0L, // metricsSlowQueryLogThresholdMs (optional) false, // sqlApiEnabled (optional) List.of(), // sqlApiAllowedStatements (optional) - 1, // sqlApiMaxRows (optional) - 1024, // sqlApiMaxBytes (optional) - 1, // sqlApiTimeoutSeconds (optional) + 1L, // sqlApiMaxRows (optional) + 1024L, // sqlApiMaxBytes (optional) + 1L, // sqlApiTimeoutSeconds (optional) new CoroutineCallback<>((result, error) -> { if (error != null) { error.printStackTrace(); diff --git a/examples/2.3.x/server-kotlin/java/oauth2/authorize-post.md b/examples/2.3.x/server-kotlin/java/oauth2/authorize-post.md index 2818bca17..2d68706f0 100644 --- a/examples/2.3.x/server-kotlin/java/oauth2/authorize-post.md +++ b/examples/2.3.x/server-kotlin/java/oauth2/authorize-post.md @@ -20,7 +20,7 @@ oauth2.authorizePost( "<CODE_CHALLENGE>", // code_challenge (optional) "s256", // code_challenge_method (optional) "<PROMPT>", // prompt (optional) - 0, // max_age (optional) + 0L, // max_age (optional) "<AUTHORIZATION_DETAILS>", // authorization_details (optional) "", // resource (optional) "<AUDIENCE>", // audience (optional) diff --git a/examples/2.3.x/server-kotlin/java/oauth2/authorize.md b/examples/2.3.x/server-kotlin/java/oauth2/authorize.md index 4c43fc45c..1f5bbe42a 100644 --- a/examples/2.3.x/server-kotlin/java/oauth2/authorize.md +++ b/examples/2.3.x/server-kotlin/java/oauth2/authorize.md @@ -20,7 +20,7 @@ oauth2.authorize( "<CODE_CHALLENGE>", // code_challenge (optional) "s256", // code_challenge_method (optional) "<PROMPT>", // prompt (optional) - 0, // max_age (optional) + 0L, // max_age (optional) "<AUTHORIZATION_DETAILS>", // authorization_details (optional) "", // resource (optional) "<AUDIENCE>", // audience (optional) diff --git a/examples/2.3.x/server-kotlin/java/oauth2/create-par.md b/examples/2.3.x/server-kotlin/java/oauth2/create-par.md index 4e26ea3ed..360dfd023 100644 --- a/examples/2.3.x/server-kotlin/java/oauth2/create-par.md +++ b/examples/2.3.x/server-kotlin/java/oauth2/create-par.md @@ -20,7 +20,7 @@ oauth2.createPAR( "<CODE_CHALLENGE>", // code_challenge (optional) "s256", // code_challenge_method (optional) "<PROMPT>", // prompt (optional) - 0, // max_age (optional) + 0L, // max_age (optional) "<AUTHORIZATION_DETAILS>", // authorization_details (optional) "", // resource (optional) "<AUDIENCE>", // audience (optional) diff --git a/examples/2.3.x/server-kotlin/java/oauth2/introspect.md b/examples/2.3.x/server-kotlin/java/oauth2/introspect.md new file mode 100644 index 000000000..39d7687bc --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/oauth2/introspect.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://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Oauth2 oauth2 = new Oauth2(client); + +oauth2.introspect( + "<TOKEN>", // token + "access_token", // token_type_hint (optional) + "<CLIENT_ID>", // client_id (optional) + "<CLIENT_SECRET>", // client_secret (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + +``` diff --git a/examples/2.3.x/server-kotlin/java/oauth2/list-organizations.md b/examples/2.3.x/server-kotlin/java/oauth2/list-organizations.md index 80ff8c445..c39d072b1 100644 --- a/examples/2.3.x/server-kotlin/java/oauth2/list-organizations.md +++ b/examples/2.3.x/server-kotlin/java/oauth2/list-organizations.md @@ -11,8 +11,8 @@ Client client = new Client() Oauth2 oauth2 = new Oauth2(client); oauth2.listOrganizations( - 1, // limit (optional) - 0, // offset (optional) + 1L, // limit (optional) + 0L, // offset (optional) "<SEARCH>", // search (optional) new CoroutineCallback<>((result, error) -> { if (error != null) { diff --git a/examples/2.3.x/server-kotlin/java/oauth2/list-projects.md b/examples/2.3.x/server-kotlin/java/oauth2/list-projects.md index 6f712d3d1..94b055e8d 100644 --- a/examples/2.3.x/server-kotlin/java/oauth2/list-projects.md +++ b/examples/2.3.x/server-kotlin/java/oauth2/list-projects.md @@ -11,8 +11,8 @@ Client client = new Client() Oauth2 oauth2 = new Oauth2(client); oauth2.listProjects( - 1, // limit (optional) - 0, // offset (optional) + 1L, // limit (optional) + 0L, // offset (optional) "<SEARCH>", // search (optional) new CoroutineCallback<>((result, error) -> { if (error != null) { diff --git a/examples/2.3.x/server-kotlin/java/organization/create-ephemeral-project-key.md b/examples/2.3.x/server-kotlin/java/organization/create-ephemeral-project-key.md index 8530b4eca..607b66550 100644 --- a/examples/2.3.x/server-kotlin/java/organization/create-ephemeral-project-key.md +++ b/examples/2.3.x/server-kotlin/java/organization/create-ephemeral-project-key.md @@ -13,8 +13,8 @@ Organization organization = new Organization(client); organization.createEphemeralProjectKey( "<PROJECT_ID>", // projectId - List.of(ProjectKeyScopes.PROJECT_READ), // scopes - 600, // duration + List.of(ProjectKeyScopes.USERS_READ), // scopes + 600L, // duration new CoroutineCallback<>((result, error) -> { if (error != null) { error.printStackTrace(); diff --git a/examples/2.3.x/server-kotlin/java/organization/update-project-key.md b/examples/2.3.x/server-kotlin/java/organization/update-project-key.md index 30ad4c649..5725b5fb5 100644 --- a/examples/2.3.x/server-kotlin/java/organization/update-project-key.md +++ b/examples/2.3.x/server-kotlin/java/organization/update-project-key.md @@ -15,7 +15,7 @@ organization.updateProjectKey( "<PROJECT_ID>", // projectId "<KEY_ID>", // keyId "<NAME>", // name - List.of(ProjectKeyScopes.PROJECT_READ), // scopes + List.of(ProjectKeyScopes.USERS_READ), // scopes "2020-10-15T06:38:00.000+00:00", // expire (optional) new CoroutineCallback<>((result, error) -> { if (error != null) { diff --git a/examples/2.3.x/server-kotlin/java/postgresql/create-backup-policy.md b/examples/2.3.x/server-kotlin/java/postgresql/create-backup-policy.md index fb9715a41..2cc9da493 100644 --- a/examples/2.3.x/server-kotlin/java/postgresql/create-backup-policy.md +++ b/examples/2.3.x/server-kotlin/java/postgresql/create-backup-policy.md @@ -15,7 +15,7 @@ postgresql.createBackupPolicy( "<POLICY_ID>", // policyId "<NAME>", // name "", // schedule - 1, // retention + 1L, // retention "full", // type (optional) false, // enabled (optional) new CoroutineCallback<>((result, error) -> { diff --git a/examples/2.3.x/server-kotlin/java/postgresql/create-branch.md b/examples/2.3.x/server-kotlin/java/postgresql/create-branch.md index 0c8fb8372..5a9cbb4f7 100644 --- a/examples/2.3.x/server-kotlin/java/postgresql/create-branch.md +++ b/examples/2.3.x/server-kotlin/java/postgresql/create-branch.md @@ -13,7 +13,7 @@ Postgresql postgresql = new Postgresql(client); postgresql.createBranch( "<DATABASE_ID>", // databaseId "<BRANCH_ID>", // branchId (optional) - 300, // ttl (optional) + 300L, // ttl (optional) new CoroutineCallback<>((result, error) -> { if (error != null) { error.printStackTrace(); diff --git a/examples/2.3.x/server-kotlin/java/postgresql/create-execution.md b/examples/2.3.x/server-kotlin/java/postgresql/create-execution.md index 4ea6a48b5..b9b3720f3 100644 --- a/examples/2.3.x/server-kotlin/java/postgresql/create-execution.md +++ b/examples/2.3.x/server-kotlin/java/postgresql/create-execution.md @@ -14,7 +14,7 @@ postgresql.createExecution( "<DATABASE_ID>", // databaseId "<SQL>", // sql Map.of("a", "b"), // bindings (optional) - 1, // timeoutSeconds (optional) + 1L, // timeoutSeconds (optional) new CoroutineCallback<>((result, error) -> { if (error != null) { error.printStackTrace(); diff --git a/examples/2.3.x/server-kotlin/java/postgresql/create.md b/examples/2.3.x/server-kotlin/java/postgresql/create.md index 4bc32d31c..fe731e19d 100644 --- a/examples/2.3.x/server-kotlin/java/postgresql/create.md +++ b/examples/2.3.x/server-kotlin/java/postgresql/create.md @@ -15,16 +15,16 @@ postgresql.create( "<NAME>", // name "17", // version (optional) "<SPECIFICATION>", // specification (optional) - 0, // replicas (optional) + 0L, // replicas (optional) "async", // syncMode (optional) - 60, // networkIdleTimeoutSeconds (optional) + 60L, // networkIdleTimeoutSeconds (optional) List.of(), // networkIPAllowlist (optional) - 5, // idleTimeoutMinutes (optional) + 5L, // idleTimeoutMinutes (optional) false, // pitr (optional) - 1, // pitrRetentionDays (optional) + 1L, // pitrRetentionDays (optional) false, // storageAutoscaling (optional) - 50, // storageAutoscalingThresholdPercent (optional) - 0, // storageAutoscalingMaxGb (optional) + 50L, // storageAutoscalingThresholdPercent (optional) + 0L, // storageAutoscalingMaxGb (optional) new CoroutineCallback<>((result, error) -> { if (error != null) { error.printStackTrace(); diff --git a/examples/2.3.x/server-kotlin/java/postgresql/list-operations.md b/examples/2.3.x/server-kotlin/java/postgresql/list-operations.md index 3018a960b..6c5f1b281 100644 --- a/examples/2.3.x/server-kotlin/java/postgresql/list-operations.md +++ b/examples/2.3.x/server-kotlin/java/postgresql/list-operations.md @@ -13,8 +13,8 @@ Postgresql postgresql = new Postgresql(client); postgresql.listOperations( "<DATABASE_ID>", // databaseId "queued", // status (optional) - 1, // limit (optional) - 0, // offset (optional) + 1L, // limit (optional) + 0L, // offset (optional) new CoroutineCallback<>((result, error) -> { if (error != null) { error.printStackTrace(); diff --git a/examples/2.3.x/server-kotlin/java/postgresql/list-restorations.md b/examples/2.3.x/server-kotlin/java/postgresql/list-restorations.md index 151f1dc94..1b1110107 100644 --- a/examples/2.3.x/server-kotlin/java/postgresql/list-restorations.md +++ b/examples/2.3.x/server-kotlin/java/postgresql/list-restorations.md @@ -14,8 +14,8 @@ postgresql.listRestorations( "<DATABASE_ID>", // databaseId "pending", // status (optional) "backup", // type (optional) - 1, // limit (optional) - 0, // offset (optional) + 1L, // limit (optional) + 0L, // offset (optional) new CoroutineCallback<>((result, error) -> { if (error != null) { error.printStackTrace(); diff --git a/examples/2.3.x/server-kotlin/java/postgresql/update-backup-policy.md b/examples/2.3.x/server-kotlin/java/postgresql/update-backup-policy.md index fd21de689..a312aa394 100644 --- a/examples/2.3.x/server-kotlin/java/postgresql/update-backup-policy.md +++ b/examples/2.3.x/server-kotlin/java/postgresql/update-backup-policy.md @@ -15,7 +15,7 @@ postgresql.updateBackupPolicy( "<POLICY_ID>", // policyId "<NAME>", // name (optional) "", // schedule (optional) - 1, // retention (optional) + 1L, // retention (optional) false, // enabled (optional) new CoroutineCallback<>((result, error) -> { if (error != null) { diff --git a/examples/2.3.x/server-kotlin/java/postgresql/update-maintenance.md b/examples/2.3.x/server-kotlin/java/postgresql/update-maintenance.md index 471d0e278..19d43d2b5 100644 --- a/examples/2.3.x/server-kotlin/java/postgresql/update-maintenance.md +++ b/examples/2.3.x/server-kotlin/java/postgresql/update-maintenance.md @@ -13,7 +13,7 @@ Postgresql postgresql = new Postgresql(client); postgresql.updateMaintenance( "<DATABASE_ID>", // databaseId "sun", // day - 0, // hourUtc + 0L, // hourUtc new CoroutineCallback<>((result, error) -> { if (error != null) { error.printStackTrace(); diff --git a/examples/2.3.x/server-kotlin/java/postgresql/update-pooler.md b/examples/2.3.x/server-kotlin/java/postgresql/update-pooler.md index 35fbadec9..529cb7e50 100644 --- a/examples/2.3.x/server-kotlin/java/postgresql/update-pooler.md +++ b/examples/2.3.x/server-kotlin/java/postgresql/update-pooler.md @@ -13,8 +13,8 @@ Postgresql postgresql = new Postgresql(client); postgresql.updatePooler( "<DATABASE_ID>", // databaseId "transaction", // mode (optional) - 10, // maxConnections (optional) - 1, // defaultPoolSize (optional) + 10L, // maxConnections (optional) + 1L, // defaultPoolSize (optional) false, // readWriteSplitting (optional) "<POOLER_CPU_REQUEST>", // poolerCpuRequest (optional) "<POOLER_CPU_LIMIT>", // poolerCpuLimit (optional) diff --git a/examples/2.3.x/server-kotlin/java/postgresql/update.md b/examples/2.3.x/server-kotlin/java/postgresql/update.md index a7b35cd64..5033d25ea 100644 --- a/examples/2.3.x/server-kotlin/java/postgresql/update.md +++ b/examples/2.3.x/server-kotlin/java/postgresql/update.md @@ -15,23 +15,23 @@ postgresql.update( "<NAME>", // name (optional) "ready", // status (optional) "<SPECIFICATION>", // specification (optional) - 0, // replicas (optional) + 0L, // replicas (optional) "async", // syncMode (optional) - 60, // networkIdleTimeoutSeconds (optional) + 60L, // networkIdleTimeoutSeconds (optional) List.of(), // networkIPAllowlist (optional) - 5, // idleTimeoutMinutes (optional) + 5L, // idleTimeoutMinutes (optional) false, // pitr (optional) - 1, // pitrRetentionDays (optional) + 1L, // pitrRetentionDays (optional) false, // storageAutoscaling (optional) - 50, // storageAutoscalingThresholdPercent (optional) - 0, // storageAutoscalingMaxGb (optional) - 0, // metricsTraceSampleRate (optional) - 0, // metricsSlowQueryLogThresholdMs (optional) + 50L, // storageAutoscalingThresholdPercent (optional) + 0L, // storageAutoscalingMaxGb (optional) + 0.0, // metricsTraceSampleRate (optional) + 0L, // metricsSlowQueryLogThresholdMs (optional) false, // sqlApiEnabled (optional) List.of(), // sqlApiAllowedStatements (optional) - 1, // sqlApiMaxRows (optional) - 1024, // sqlApiMaxBytes (optional) - 1, // sqlApiTimeoutSeconds (optional) + 1L, // sqlApiMaxRows (optional) + 1024L, // sqlApiMaxBytes (optional) + 1L, // sqlApiTimeoutSeconds (optional) new CoroutineCallback<>((result, error) -> { if (error != null) { error.printStackTrace(); diff --git a/examples/2.3.x/server-kotlin/java/presences/list.md b/examples/2.3.x/server-kotlin/java/presences/list.md index b43741d29..c4aaad34c 100644 --- a/examples/2.3.x/server-kotlin/java/presences/list.md +++ b/examples/2.3.x/server-kotlin/java/presences/list.md @@ -13,7 +13,7 @@ Presences presences = new Presences(client); presences.list( List.of(), // queries (optional) false, // total (optional) - 0, // ttl (optional) + 0L, // ttl (optional) new CoroutineCallback<>((result, error) -> { if (error != null) { error.printStackTrace(); diff --git a/examples/2.3.x/server-kotlin/java/project/create-ephemeral-key.md b/examples/2.3.x/server-kotlin/java/project/create-ephemeral-key.md index 545e16d25..3a5ad262a 100644 --- a/examples/2.3.x/server-kotlin/java/project/create-ephemeral-key.md +++ b/examples/2.3.x/server-kotlin/java/project/create-ephemeral-key.md @@ -12,8 +12,8 @@ Client client = new Client() Project project = new Project(client); project.createEphemeralKey( - List.of(ProjectKeyScopes.PROJECT_READ), // scopes - 600, // duration + List.of(ProjectKeyScopes.USERS_READ), // scopes + 600L, // duration new CoroutineCallback<>((result, error) -> { if (error != null) { error.printStackTrace(); diff --git a/examples/2.3.x/server-kotlin/java/project/create-smtp-test.md b/examples/2.3.x/server-kotlin/java/project/create-smtp-test.md index e6a700663..02394284c 100644 --- a/examples/2.3.x/server-kotlin/java/project/create-smtp-test.md +++ b/examples/2.3.x/server-kotlin/java/project/create-smtp-test.md @@ -11,7 +11,7 @@ Client client = new Client() Project project = new Project(client); project.createSMTPTest( - List.of(), // emails + List.of("recipient@example.com"), // emails new CoroutineCallback<>((result, error) -> { if (error != null) { error.printStackTrace(); diff --git a/examples/2.3.x/server-kotlin/java/project/update-key.md b/examples/2.3.x/server-kotlin/java/project/update-key.md index 4fa79bbbb..d381b2b9d 100644 --- a/examples/2.3.x/server-kotlin/java/project/update-key.md +++ b/examples/2.3.x/server-kotlin/java/project/update-key.md @@ -14,7 +14,7 @@ Project project = new Project(client); project.updateKey( "<KEY_ID>", // keyId "<NAME>", // name - List.of(ProjectKeyScopes.PROJECT_READ), // scopes + List.of(ProjectKeyScopes.USERS_READ), // scopes "2020-10-15T06:38:00.000+00:00", // expire (optional) new CoroutineCallback<>((result, error) -> { if (error != null) { diff --git a/examples/2.3.x/server-kotlin/java/project/update-labels.md b/examples/2.3.x/server-kotlin/java/project/update-labels.md index c8c9e1bce..ef367da6a 100644 --- a/examples/2.3.x/server-kotlin/java/project/update-labels.md +++ b/examples/2.3.x/server-kotlin/java/project/update-labels.md @@ -11,7 +11,7 @@ Client client = new Client() Project project = new Project(client); project.updateLabels( - List.of(), // labels + List.of("production"), // labels new CoroutineCallback<>((result, error) -> { if (error != null) { error.printStackTrace(); diff --git a/examples/2.3.x/server-kotlin/java/project/update-o-auth-2-auth-0.md b/examples/2.3.x/server-kotlin/java/project/update-o-auth-2-auth-0.md index c14a8ef5f..4891c7239 100644 --- a/examples/2.3.x/server-kotlin/java/project/update-o-auth-2-auth-0.md +++ b/examples/2.3.x/server-kotlin/java/project/update-o-auth-2-auth-0.md @@ -2,6 +2,7 @@ import io.appwrite.Client; import io.appwrite.coroutines.CoroutineCallback; import io.appwrite.services.Project; +import io.appwrite.enums.ProjectOAuth2Auth0Prompt; Client client = new Client() .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint @@ -14,6 +15,7 @@ project.updateOAuth2Auth0( "<CLIENT_ID>", // clientId (optional) "<CLIENT_SECRET>", // clientSecret (optional) "<ENDPOINT>", // endpoint (optional) + List.of(ProjectOAuth2Auth0Prompt.NONE), // prompt (optional) false, // enabled (optional) new CoroutineCallback<>((result, error) -> { if (error != null) { diff --git a/examples/2.3.x/server-kotlin/java/project/update-o-auth-2-discord.md b/examples/2.3.x/server-kotlin/java/project/update-o-auth-2-discord.md index 82139314b..a293cc996 100644 --- a/examples/2.3.x/server-kotlin/java/project/update-o-auth-2-discord.md +++ b/examples/2.3.x/server-kotlin/java/project/update-o-auth-2-discord.md @@ -2,6 +2,7 @@ import io.appwrite.Client; import io.appwrite.coroutines.CoroutineCallback; import io.appwrite.services.Project; +import io.appwrite.enums.ProjectOAuth2DiscordPrompt; Client client = new Client() .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint @@ -13,6 +14,7 @@ Project project = new Project(client); project.updateOAuth2Discord( "<CLIENT_ID>", // clientId (optional) "<CLIENT_SECRET>", // clientSecret (optional) + List.of(ProjectOAuth2DiscordPrompt.NONE), // prompt (optional) false, // enabled (optional) new CoroutineCallback<>((result, error) -> { if (error != null) { diff --git a/examples/2.3.x/server-kotlin/java/project/update-o-auth-2-git-hub.md b/examples/2.3.x/server-kotlin/java/project/update-o-auth-2-git-hub.md index e795770a5..28f2bb764 100644 --- a/examples/2.3.x/server-kotlin/java/project/update-o-auth-2-git-hub.md +++ b/examples/2.3.x/server-kotlin/java/project/update-o-auth-2-git-hub.md @@ -2,6 +2,7 @@ import io.appwrite.Client; import io.appwrite.coroutines.CoroutineCallback; import io.appwrite.services.Project; +import io.appwrite.enums.ProjectOAuth2GitHubPrompt; Client client = new Client() .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint @@ -13,6 +14,7 @@ Project project = new Project(client); project.updateOAuth2GitHub( "<CLIENT_ID>", // clientId (optional) "<CLIENT_SECRET>", // clientSecret (optional) + List.of(ProjectOAuth2GitHubPrompt.SELECT_ACCOUNT), // prompt (optional) false, // enabled (optional) new CoroutineCallback<>((result, error) -> { if (error != null) { diff --git a/examples/2.3.x/server-kotlin/java/project/update-o-auth-2-kakao.md b/examples/2.3.x/server-kotlin/java/project/update-o-auth-2-kakao.md index da93f607b..cee7eebd7 100644 --- a/examples/2.3.x/server-kotlin/java/project/update-o-auth-2-kakao.md +++ b/examples/2.3.x/server-kotlin/java/project/update-o-auth-2-kakao.md @@ -2,6 +2,7 @@ import io.appwrite.Client; import io.appwrite.coroutines.CoroutineCallback; import io.appwrite.services.Project; +import io.appwrite.enums.ProjectOAuth2KakaoPrompt; Client client = new Client() .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint @@ -13,6 +14,7 @@ Project project = new Project(client); project.updateOAuth2Kakao( "<CLIENT_ID>", // clientId (optional) "<CLIENT_SECRET>", // clientSecret (optional) + List.of(ProjectOAuth2KakaoPrompt.NONE), // prompt (optional) false, // enabled (optional) new CoroutineCallback<>((result, error) -> { if (error != null) { diff --git a/examples/2.3.x/server-kotlin/java/project/update-o-auth-2-microsoft.md b/examples/2.3.x/server-kotlin/java/project/update-o-auth-2-microsoft.md index 801cc7c8a..934d4d366 100644 --- a/examples/2.3.x/server-kotlin/java/project/update-o-auth-2-microsoft.md +++ b/examples/2.3.x/server-kotlin/java/project/update-o-auth-2-microsoft.md @@ -2,6 +2,7 @@ import io.appwrite.Client; import io.appwrite.coroutines.CoroutineCallback; import io.appwrite.services.Project; +import io.appwrite.enums.ProjectOAuth2MicrosoftPrompt; Client client = new Client() .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint @@ -14,6 +15,7 @@ project.updateOAuth2Microsoft( "<APPLICATION_ID>", // applicationId (optional) "<APPLICATION_SECRET>", // applicationSecret (optional) "<TENANT>", // tenant (optional) + List.of(ProjectOAuth2MicrosoftPrompt.NONE), // prompt (optional) false, // enabled (optional) new CoroutineCallback<>((result, error) -> { if (error != null) { diff --git a/examples/2.3.x/server-kotlin/java/project/update-o-auth-2-oidc.md b/examples/2.3.x/server-kotlin/java/project/update-o-auth-2-oidc.md index 033173877..8b57d3e6c 100644 --- a/examples/2.3.x/server-kotlin/java/project/update-o-auth-2-oidc.md +++ b/examples/2.3.x/server-kotlin/java/project/update-o-auth-2-oidc.md @@ -19,7 +19,7 @@ project.updateOAuth2Oidc( "https://example.com", // tokenURL (optional) "https://example.com", // userInfoURL (optional) List.of(ProjectOAuth2OidcPrompt.NONE), // prompt (optional) - 0, // maxAge (optional) + 0L, // maxAge (optional) false, // enabled (optional) new CoroutineCallback<>((result, error) -> { if (error != null) { diff --git a/examples/2.3.x/server-kotlin/java/project/update-o-auth-2-okta.md b/examples/2.3.x/server-kotlin/java/project/update-o-auth-2-okta.md index 588894314..7e451d108 100644 --- a/examples/2.3.x/server-kotlin/java/project/update-o-auth-2-okta.md +++ b/examples/2.3.x/server-kotlin/java/project/update-o-auth-2-okta.md @@ -2,6 +2,7 @@ import io.appwrite.Client; import io.appwrite.coroutines.CoroutineCallback; import io.appwrite.services.Project; +import io.appwrite.enums.ProjectOAuth2OktaPrompt; Client client = new Client() .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint @@ -15,6 +16,7 @@ project.updateOAuth2Okta( "<CLIENT_SECRET>", // clientSecret (optional) "example.com", // domain (optional) "<AUTHORIZATION_SERVER_ID>", // authorizationServerId (optional) + List.of(ProjectOAuth2OktaPrompt.NONE), // prompt (optional) false, // enabled (optional) new CoroutineCallback<>((result, error) -> { if (error != null) { diff --git a/examples/2.3.x/server-kotlin/java/project/update-o-auth-2-salesforce.md b/examples/2.3.x/server-kotlin/java/project/update-o-auth-2-salesforce.md index e6aa570af..120430b74 100644 --- a/examples/2.3.x/server-kotlin/java/project/update-o-auth-2-salesforce.md +++ b/examples/2.3.x/server-kotlin/java/project/update-o-auth-2-salesforce.md @@ -2,6 +2,7 @@ import io.appwrite.Client; import io.appwrite.coroutines.CoroutineCallback; import io.appwrite.services.Project; +import io.appwrite.enums.ProjectOAuth2SalesforcePrompt; Client client = new Client() .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint @@ -13,6 +14,7 @@ Project project = new Project(client); project.updateOAuth2Salesforce( "<CUSTOMER_KEY>", // customerKey (optional) "<CUSTOMER_SECRET>", // customerSecret (optional) + List.of(ProjectOAuth2SalesforcePrompt.LOGIN), // prompt (optional) false, // enabled (optional) new CoroutineCallback<>((result, error) -> { if (error != null) { diff --git a/examples/2.3.x/server-kotlin/java/project/update-o-auth-2-server.md b/examples/2.3.x/server-kotlin/java/project/update-o-auth-2-server.md index df21916b6..fd0344be0 100644 --- a/examples/2.3.x/server-kotlin/java/project/update-o-auth-2-server.md +++ b/examples/2.3.x/server-kotlin/java/project/update-o-auth-2-server.md @@ -15,16 +15,16 @@ project.updateOAuth2Server( "https://example.com", // authorizationUrl List.of(), // scopes (optional) List.of(), // authorizationDetailsTypes (optional) - 60, // accessTokenDuration (optional) - 60, // refreshTokenDuration (optional) - 60, // publicAccessTokenDuration (optional) - 60, // publicRefreshTokenDuration (optional) - 60, // installationAccessTokenDuration (optional) + 60L, // accessTokenDuration (optional) + 60L, // refreshTokenDuration (optional) + 60L, // publicAccessTokenDuration (optional) + 60L, // publicRefreshTokenDuration (optional) + 60L, // installationAccessTokenDuration (optional) false, // confidentialPkce (optional) "https://example.com", // verificationUrl (optional) - 6, // userCodeLength (optional) + 6L, // userCodeLength (optional) "numeric", // userCodeFormat (optional) - 60, // deviceCodeDuration (optional) + 60L, // deviceCodeDuration (optional) List.of(), // defaultScopes (optional) List.of(), // installationScopes (optional) new CoroutineCallback<>((result, error) -> { diff --git a/examples/2.3.x/server-kotlin/java/project/update-o-auth-2-webflow.md b/examples/2.3.x/server-kotlin/java/project/update-o-auth-2-webflow.md new file mode 100644 index 000000000..ce67d0364 --- /dev/null +++ b/examples/2.3.x/server-kotlin/java/project/update-o-auth-2-webflow.md @@ -0,0 +1,27 @@ +```java +import io.appwrite.Client; +import io.appwrite.coroutines.CoroutineCallback; +import io.appwrite.services.Project; + +Client client = new Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>"); // Your secret API key + +Project project = new Project(client); + +project.updateOAuth2Webflow( + "<CLIENT_ID>", // clientId (optional) + "<CLIENT_SECRET>", // clientSecret (optional) + false, // enabled (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); + +``` diff --git a/examples/2.3.x/server-kotlin/java/project/update-o-auth-2-zoho.md b/examples/2.3.x/server-kotlin/java/project/update-o-auth-2-zoho.md index c8c5e1362..59b671bca 100644 --- a/examples/2.3.x/server-kotlin/java/project/update-o-auth-2-zoho.md +++ b/examples/2.3.x/server-kotlin/java/project/update-o-auth-2-zoho.md @@ -2,6 +2,7 @@ import io.appwrite.Client; import io.appwrite.coroutines.CoroutineCallback; import io.appwrite.services.Project; +import io.appwrite.enums.ProjectOAuth2ZohoPrompt; Client client = new Client() .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint @@ -13,6 +14,7 @@ Project project = new Project(client); project.updateOAuth2Zoho( "<CLIENT_ID>", // clientId (optional) "<CLIENT_SECRET>", // clientSecret (optional) + List.of(ProjectOAuth2ZohoPrompt.CONSENT), // prompt (optional) false, // enabled (optional) new CoroutineCallback<>((result, error) -> { if (error != null) { diff --git a/examples/2.3.x/server-kotlin/java/project/update-password-history-policy.md b/examples/2.3.x/server-kotlin/java/project/update-password-history-policy.md index e873c7f8f..de1c1e1b4 100644 --- a/examples/2.3.x/server-kotlin/java/project/update-password-history-policy.md +++ b/examples/2.3.x/server-kotlin/java/project/update-password-history-policy.md @@ -11,7 +11,7 @@ Client client = new Client() Project project = new Project(client); project.updatePasswordHistoryPolicy( - 1, // total + 1L, // total new CoroutineCallback<>((result, error) -> { if (error != null) { error.printStackTrace(); diff --git a/examples/2.3.x/server-kotlin/java/project/update-password-strength-policy.md b/examples/2.3.x/server-kotlin/java/project/update-password-strength-policy.md index a147d52d8..340687922 100644 --- a/examples/2.3.x/server-kotlin/java/project/update-password-strength-policy.md +++ b/examples/2.3.x/server-kotlin/java/project/update-password-strength-policy.md @@ -11,7 +11,7 @@ Client client = new Client() Project project = new Project(client); project.updatePasswordStrengthPolicy( - 8, // min (optional) + 8L, // min (optional) false, // uppercase (optional) false, // lowercase (optional) false, // number (optional) diff --git a/examples/2.3.x/server-kotlin/java/project/update-session-duration-policy.md b/examples/2.3.x/server-kotlin/java/project/update-session-duration-policy.md index 47c3f3be3..618482d35 100644 --- a/examples/2.3.x/server-kotlin/java/project/update-session-duration-policy.md +++ b/examples/2.3.x/server-kotlin/java/project/update-session-duration-policy.md @@ -11,7 +11,7 @@ Client client = new Client() Project project = new Project(client); project.updateSessionDurationPolicy( - 60, // duration + 60L, // duration new CoroutineCallback<>((result, error) -> { if (error != null) { error.printStackTrace(); diff --git a/examples/2.3.x/server-kotlin/java/project/update-session-limit-policy.md b/examples/2.3.x/server-kotlin/java/project/update-session-limit-policy.md index 13204c06c..6b11cac21 100644 --- a/examples/2.3.x/server-kotlin/java/project/update-session-limit-policy.md +++ b/examples/2.3.x/server-kotlin/java/project/update-session-limit-policy.md @@ -11,7 +11,7 @@ Client client = new Client() Project project = new Project(client); project.updateSessionLimitPolicy( - 1, // total + 1L, // total new CoroutineCallback<>((result, error) -> { if (error != null) { error.printStackTrace(); diff --git a/examples/2.3.x/server-kotlin/java/project/update-smtp.md b/examples/2.3.x/server-kotlin/java/project/update-smtp.md index 04a01b711..504bc0b22 100644 --- a/examples/2.3.x/server-kotlin/java/project/update-smtp.md +++ b/examples/2.3.x/server-kotlin/java/project/update-smtp.md @@ -13,7 +13,7 @@ Project project = new Project(client); project.updateSMTP( "example.com", // host (optional) - 587, // port (optional) + 587L, // port (optional) "<USERNAME>", // username (optional) "password", // password (optional) "email@example.com", // senderEmail (optional) diff --git a/examples/2.3.x/server-kotlin/java/project/update-user-limit-policy.md b/examples/2.3.x/server-kotlin/java/project/update-user-limit-policy.md index 4e0a99343..186fdaf45 100644 --- a/examples/2.3.x/server-kotlin/java/project/update-user-limit-policy.md +++ b/examples/2.3.x/server-kotlin/java/project/update-user-limit-policy.md @@ -11,7 +11,7 @@ Client client = new Client() Project project = new Project(client); project.updateUserLimitPolicy( - 0, // total + 0L, // total new CoroutineCallback<>((result, error) -> { if (error != null) { error.printStackTrace(); diff --git a/examples/2.3.x/server-kotlin/java/sites/create.md b/examples/2.3.x/server-kotlin/java/sites/create.md index fb154d30a..5c09756a0 100644 --- a/examples/2.3.x/server-kotlin/java/sites/create.md +++ b/examples/2.3.x/server-kotlin/java/sites/create.md @@ -21,7 +21,7 @@ sites.create( BuildRuntime.NODE_14_5, // buildRuntime false, // enabled (optional) false, // logging (optional) - 1, // timeout (optional) + 1L, // timeout (optional) "<INSTALL_COMMAND>", // installCommand (optional) "<BUILD_COMMAND>", // buildCommand (optional) "<START_COMMAND>", // startCommand (optional) @@ -37,7 +37,7 @@ sites.create( List.of(), // providerPaths (optional) "s-1vcpu-512mb", // buildSpecification (optional) "s-1vcpu-512mb", // runtimeSpecification (optional) - 0, // deploymentRetention (optional) + 0L, // deploymentRetention (optional) List.of(ProjectKeyScopes.PROJECT_READ), // scopes (optional) new CoroutineCallback<>((result, error) -> { if (error != null) { diff --git a/examples/2.3.x/server-kotlin/java/sites/list-frameworks.md b/examples/2.3.x/server-kotlin/java/sites/list-frameworks.md index 6192bf29f..b0f4c8e42 100644 --- a/examples/2.3.x/server-kotlin/java/sites/list-frameworks.md +++ b/examples/2.3.x/server-kotlin/java/sites/list-frameworks.md @@ -10,12 +10,16 @@ Client client = new Client() Sites sites = new Sites(client); -sites.listFrameworks(new CoroutineCallback<>((result, error) -> { - if (error != null) { - error.printStackTrace(); - return; - } +sites.listFrameworks( + false, // total (optional) + new CoroutineCallback<>((result, error) -> { + if (error != null) { + error.printStackTrace(); + return; + } + + System.out.println(result); + }) +); - System.out.println(result); -})); ``` diff --git a/examples/2.3.x/server-kotlin/java/sites/list-specifications.md b/examples/2.3.x/server-kotlin/java/sites/list-specifications.md index f9a8fe994..b14e8abd8 100644 --- a/examples/2.3.x/server-kotlin/java/sites/list-specifications.md +++ b/examples/2.3.x/server-kotlin/java/sites/list-specifications.md @@ -12,6 +12,7 @@ Sites sites = new Sites(client); sites.listSpecifications( "runtimes", // type (optional) + false, // total (optional) new CoroutineCallback<>((result, error) -> { if (error != null) { error.printStackTrace(); diff --git a/examples/2.3.x/server-kotlin/java/sites/update.md b/examples/2.3.x/server-kotlin/java/sites/update.md index d87f47a1a..8d4bd45ae 100644 --- a/examples/2.3.x/server-kotlin/java/sites/update.md +++ b/examples/2.3.x/server-kotlin/java/sites/update.md @@ -20,7 +20,7 @@ sites.update( Framework.ANALOG, // framework false, // enabled (optional) false, // logging (optional) - 1, // timeout (optional) + 1L, // timeout (optional) "<INSTALL_COMMAND>", // installCommand (optional) "<BUILD_COMMAND>", // buildCommand (optional) "<START_COMMAND>", // startCommand (optional) @@ -37,7 +37,7 @@ sites.update( List.of(), // providerPaths (optional) "s-1vcpu-512mb", // buildSpecification (optional) "s-1vcpu-512mb", // runtimeSpecification (optional) - 0, // deploymentRetention (optional) + 0L, // deploymentRetention (optional) List.of(ProjectKeyScopes.PROJECT_READ), // scopes (optional) new CoroutineCallback<>((result, error) -> { if (error != null) { diff --git a/examples/2.3.x/server-kotlin/java/storage/create-bucket.md b/examples/2.3.x/server-kotlin/java/storage/create-bucket.md index 7a15d3264..16305930a 100644 --- a/examples/2.3.x/server-kotlin/java/storage/create-bucket.md +++ b/examples/2.3.x/server-kotlin/java/storage/create-bucket.md @@ -19,7 +19,7 @@ storage.createBucket( List.of(Permission.read(Role.any())), // permissions (optional) false, // fileSecurity (optional) false, // enabled (optional) - 1, // maximumFileSize (optional) + 1L, // maximumFileSize (optional) List.of(), // allowedFileExtensions (optional) Compression.NONE, // compression (optional) false, // encryption (optional) diff --git a/examples/2.3.x/server-kotlin/java/storage/get-file-preview.md b/examples/2.3.x/server-kotlin/java/storage/get-file-preview.md index 45be19a5a..ddf0c7628 100644 --- a/examples/2.3.x/server-kotlin/java/storage/get-file-preview.md +++ b/examples/2.3.x/server-kotlin/java/storage/get-file-preview.md @@ -15,15 +15,15 @@ Storage storage = new Storage(client); storage.getFilePreview( "<BUCKET_ID>", // bucketId "<FILE_ID>", // fileId - 0, // width (optional) - 0, // height (optional) + 0L, // width (optional) + 0L, // height (optional) ImageGravity.AUTO, // gravity (optional) - -1, // quality (optional) - 0, // borderWidth (optional) + -1L, // quality (optional) + 0L, // borderWidth (optional) "FFFFFF", // borderColor (optional) - 0, // borderRadius (optional) - 0, // opacity (optional) - -360, // rotation (optional) + 0L, // borderRadius (optional) + 0.0, // opacity (optional) + -360L, // rotation (optional) "FFFFFF", // background (optional) ImageFormat.JPG, // output (optional) "<TOKEN>", // token (optional) diff --git a/examples/2.3.x/server-kotlin/java/storage/update-bucket.md b/examples/2.3.x/server-kotlin/java/storage/update-bucket.md index 7f94346da..abb9f57da 100644 --- a/examples/2.3.x/server-kotlin/java/storage/update-bucket.md +++ b/examples/2.3.x/server-kotlin/java/storage/update-bucket.md @@ -19,7 +19,7 @@ storage.updateBucket( List.of(Permission.read(Role.any())), // permissions (optional) false, // fileSecurity (optional) false, // enabled (optional) - 1, // maximumFileSize (optional) + 1L, // maximumFileSize (optional) List.of(), // allowedFileExtensions (optional) Compression.NONE, // compression (optional) false, // encryption (optional) diff --git a/examples/2.3.x/server-kotlin/java/tablesdb/create-big-int-column.md b/examples/2.3.x/server-kotlin/java/tablesdb/create-big-int-column.md index 3be25e2bd..164a7de47 100644 --- a/examples/2.3.x/server-kotlin/java/tablesdb/create-big-int-column.md +++ b/examples/2.3.x/server-kotlin/java/tablesdb/create-big-int-column.md @@ -15,9 +15,9 @@ tablesDB.createBigIntColumn( "<TABLE_ID>", // tableId "<KEY>", // key false, // required - 0, // min (optional) - 1000000, // max (optional) - 0, // default (optional) + 0L, // min (optional) + 1000000L, // max (optional) + 0L, // default (optional) false, // array (optional) new CoroutineCallback<>((result, error) -> { if (error != null) { diff --git a/examples/2.3.x/server-kotlin/java/tablesdb/create-float-column.md b/examples/2.3.x/server-kotlin/java/tablesdb/create-float-column.md index 5067f5cf6..f1e9c0e17 100644 --- a/examples/2.3.x/server-kotlin/java/tablesdb/create-float-column.md +++ b/examples/2.3.x/server-kotlin/java/tablesdb/create-float-column.md @@ -15,8 +15,8 @@ tablesDB.createFloatColumn( "<TABLE_ID>", // tableId "<KEY>", // key false, // required - 0, // min (optional) - 100, // max (optional) + 0.0, // min (optional) + 100.0, // max (optional) 10.5, // default (optional) false, // array (optional) new CoroutineCallback<>((result, error) -> { diff --git a/examples/2.3.x/server-kotlin/java/tablesdb/create-index.md b/examples/2.3.x/server-kotlin/java/tablesdb/create-index.md index 0eb20835e..477b0c427 100644 --- a/examples/2.3.x/server-kotlin/java/tablesdb/create-index.md +++ b/examples/2.3.x/server-kotlin/java/tablesdb/create-index.md @@ -17,7 +17,7 @@ tablesDB.createIndex( "<TABLE_ID>", // tableId "<KEY>", // key TablesDBIndexType.KEY, // type - List.of(), // columns + List.of("username"), // columns List.of(OrderBy.ASC), // orders (optional) List.of(), // lengths (optional) new CoroutineCallback<>((result, error) -> { diff --git a/examples/2.3.x/server-kotlin/java/tablesdb/create-integer-column.md b/examples/2.3.x/server-kotlin/java/tablesdb/create-integer-column.md index dd879b3bf..8932c3282 100644 --- a/examples/2.3.x/server-kotlin/java/tablesdb/create-integer-column.md +++ b/examples/2.3.x/server-kotlin/java/tablesdb/create-integer-column.md @@ -15,9 +15,9 @@ tablesDB.createIntegerColumn( "<TABLE_ID>", // tableId "<KEY>", // key false, // required - 0, // min (optional) - 100, // max (optional) - 10, // default (optional) + 0L, // min (optional) + 100L, // max (optional) + 10L, // default (optional) false, // array (optional) new CoroutineCallback<>((result, error) -> { if (error != null) { diff --git a/examples/2.3.x/server-kotlin/java/tablesdb/create-rows.md b/examples/2.3.x/server-kotlin/java/tablesdb/create-rows.md index 1e16a4dfd..dd6fbdf4d 100644 --- a/examples/2.3.x/server-kotlin/java/tablesdb/create-rows.md +++ b/examples/2.3.x/server-kotlin/java/tablesdb/create-rows.md @@ -13,7 +13,14 @@ TablesDB tablesDB = new TablesDB(client); tablesDB.createRows( "<DATABASE_ID>", // databaseId "<TABLE_ID>", // tableId - List.of(), // rows + List.of(Map.of( + "$id", "example1", + "username", "walter.obrien", + "email", "walter.obrien@example.com", + "fullName", "Walter O'Brien", + "age", 30, + "isAdmin", false + )), // rows "<TRANSACTION_ID>", // transactionId (optional) new CoroutineCallback<>((result, error) -> { if (error != null) { diff --git a/examples/2.3.x/server-kotlin/java/tablesdb/create-string-column.md b/examples/2.3.x/server-kotlin/java/tablesdb/create-string-column.md index e396357a4..f85102784 100644 --- a/examples/2.3.x/server-kotlin/java/tablesdb/create-string-column.md +++ b/examples/2.3.x/server-kotlin/java/tablesdb/create-string-column.md @@ -14,7 +14,7 @@ tablesDB.createStringColumn( "<DATABASE_ID>", // databaseId "<TABLE_ID>", // tableId "<KEY>", // key - 1, // size + 1L, // size false, // required "Hello World", // default (optional) false, // array (optional) diff --git a/examples/2.3.x/server-kotlin/java/tablesdb/create-transaction.md b/examples/2.3.x/server-kotlin/java/tablesdb/create-transaction.md index d66c22005..508df1a68 100644 --- a/examples/2.3.x/server-kotlin/java/tablesdb/create-transaction.md +++ b/examples/2.3.x/server-kotlin/java/tablesdb/create-transaction.md @@ -11,7 +11,7 @@ Client client = new Client() TablesDB tablesDB = new TablesDB(client); tablesDB.createTransaction( - 60, // ttl (optional) + 60L, // ttl (optional) new CoroutineCallback<>((result, error) -> { if (error != null) { error.printStackTrace(); diff --git a/examples/2.3.x/server-kotlin/java/tablesdb/create-varchar-column.md b/examples/2.3.x/server-kotlin/java/tablesdb/create-varchar-column.md index 7f8ecfa11..48016c8c2 100644 --- a/examples/2.3.x/server-kotlin/java/tablesdb/create-varchar-column.md +++ b/examples/2.3.x/server-kotlin/java/tablesdb/create-varchar-column.md @@ -14,7 +14,7 @@ tablesDB.createVarcharColumn( "<DATABASE_ID>", // databaseId "<TABLE_ID>", // tableId "<KEY>", // key - 1, // size + 1L, // size false, // required "Hello World", // default (optional) false, // array (optional) diff --git a/examples/2.3.x/server-kotlin/java/tablesdb/create.md b/examples/2.3.x/server-kotlin/java/tablesdb/create.md index aa47e87d1..05f6d4c1c 100644 --- a/examples/2.3.x/server-kotlin/java/tablesdb/create.md +++ b/examples/2.3.x/server-kotlin/java/tablesdb/create.md @@ -15,7 +15,7 @@ tablesDB.create( "<NAME>", // name false, // enabled (optional) "serverless", // specification (optional) - 0, // replicas (optional) + 0L, // replicas (optional) "async", // syncMode (optional) new CoroutineCallback<>((result, error) -> { if (error != null) { diff --git a/examples/2.3.x/server-kotlin/java/tablesdb/decrement-row-column.md b/examples/2.3.x/server-kotlin/java/tablesdb/decrement-row-column.md index b74427365..a1de53392 100644 --- a/examples/2.3.x/server-kotlin/java/tablesdb/decrement-row-column.md +++ b/examples/2.3.x/server-kotlin/java/tablesdb/decrement-row-column.md @@ -15,8 +15,8 @@ tablesDB.decrementRowColumn( "<TABLE_ID>", // tableId "<ROW_ID>", // rowId "<COLUMN>", // column - 1, // value (optional) - 0, // min (optional) + 1.0, // value (optional) + 0.0, // min (optional) "<TRANSACTION_ID>", // transactionId (optional) new CoroutineCallback<>((result, error) -> { if (error != null) { diff --git a/examples/2.3.x/server-kotlin/java/tablesdb/delete-rows.md b/examples/2.3.x/server-kotlin/java/tablesdb/delete-rows.md index f12aaa368..4fc061757 100644 --- a/examples/2.3.x/server-kotlin/java/tablesdb/delete-rows.md +++ b/examples/2.3.x/server-kotlin/java/tablesdb/delete-rows.md @@ -13,7 +13,7 @@ TablesDB tablesDB = new TablesDB(client); tablesDB.deleteRows( "<DATABASE_ID>", // databaseId "<TABLE_ID>", // tableId - List.of(), // queries (optional) + List.of("{\"method\":\"equal\", \"attribute\":\"$id\", \"values\":[\"<ROW_ID>\"]}"), // queries (optional) "<TRANSACTION_ID>", // transactionId (optional) new CoroutineCallback<>((result, error) -> { if (error != null) { diff --git a/examples/2.3.x/server-kotlin/java/tablesdb/increment-row-column.md b/examples/2.3.x/server-kotlin/java/tablesdb/increment-row-column.md index 3112170a2..febb767fe 100644 --- a/examples/2.3.x/server-kotlin/java/tablesdb/increment-row-column.md +++ b/examples/2.3.x/server-kotlin/java/tablesdb/increment-row-column.md @@ -15,8 +15,8 @@ tablesDB.incrementRowColumn( "<TABLE_ID>", // tableId "<ROW_ID>", // rowId "<COLUMN>", // column - 1, // value (optional) - 100, // max (optional) + 1.0, // value (optional) + 100.0, // max (optional) "<TRANSACTION_ID>", // transactionId (optional) new CoroutineCallback<>((result, error) -> { if (error != null) { diff --git a/examples/2.3.x/server-kotlin/java/tablesdb/list-operations.md b/examples/2.3.x/server-kotlin/java/tablesdb/list-operations.md index a0f4745af..69d04b90a 100644 --- a/examples/2.3.x/server-kotlin/java/tablesdb/list-operations.md +++ b/examples/2.3.x/server-kotlin/java/tablesdb/list-operations.md @@ -13,8 +13,8 @@ TablesDB tablesDB = new TablesDB(client); tablesDB.listOperations( "<DATABASE_ID>", // databaseId "queued", // status (optional) - 1, // limit (optional) - 0, // offset (optional) + 1L, // limit (optional) + 0L, // offset (optional) new CoroutineCallback<>((result, error) -> { if (error != null) { error.printStackTrace(); diff --git a/examples/2.3.x/server-kotlin/java/tablesdb/list-rows.md b/examples/2.3.x/server-kotlin/java/tablesdb/list-rows.md index 174b4255b..0c372db0f 100644 --- a/examples/2.3.x/server-kotlin/java/tablesdb/list-rows.md +++ b/examples/2.3.x/server-kotlin/java/tablesdb/list-rows.md @@ -16,7 +16,7 @@ tablesDB.listRows( List.of(), // queries (optional) "<TRANSACTION_ID>", // transactionId (optional) false, // total (optional) - 0, // ttl (optional) + 0L, // ttl (optional) new CoroutineCallback<>((result, error) -> { if (error != null) { error.printStackTrace(); diff --git a/examples/2.3.x/server-kotlin/java/tablesdb/list-transactions.md b/examples/2.3.x/server-kotlin/java/tablesdb/list-transactions.md index 38ae582b1..229ff8795 100644 --- a/examples/2.3.x/server-kotlin/java/tablesdb/list-transactions.md +++ b/examples/2.3.x/server-kotlin/java/tablesdb/list-transactions.md @@ -12,6 +12,7 @@ TablesDB tablesDB = new TablesDB(client); tablesDB.listTransactions( List.of(), // queries (optional) + false, // total (optional) new CoroutineCallback<>((result, error) -> { if (error != null) { error.printStackTrace(); diff --git a/examples/2.3.x/server-kotlin/java/tablesdb/update-big-int-column.md b/examples/2.3.x/server-kotlin/java/tablesdb/update-big-int-column.md index decd80da2..f8409387b 100644 --- a/examples/2.3.x/server-kotlin/java/tablesdb/update-big-int-column.md +++ b/examples/2.3.x/server-kotlin/java/tablesdb/update-big-int-column.md @@ -15,9 +15,9 @@ tablesDB.updateBigIntColumn( "<TABLE_ID>", // tableId "<KEY>", // key false, // required - 0, // default - 0, // min (optional) - 1000000, // max (optional) + 0L, // default + 0L, // min (optional) + 1000000L, // max (optional) "<NEW_KEY>", // newKey (optional) new CoroutineCallback<>((result, error) -> { if (error != null) { diff --git a/examples/2.3.x/server-kotlin/java/tablesdb/update-float-column.md b/examples/2.3.x/server-kotlin/java/tablesdb/update-float-column.md index edc988a5d..e10b7c6c8 100644 --- a/examples/2.3.x/server-kotlin/java/tablesdb/update-float-column.md +++ b/examples/2.3.x/server-kotlin/java/tablesdb/update-float-column.md @@ -16,8 +16,8 @@ tablesDB.updateFloatColumn( "<KEY>", // key false, // required 10.5, // default - 0, // min (optional) - 100, // max (optional) + 0.0, // min (optional) + 100.0, // max (optional) "<NEW_KEY>", // newKey (optional) new CoroutineCallback<>((result, error) -> { if (error != null) { diff --git a/examples/2.3.x/server-kotlin/java/tablesdb/update-integer-column.md b/examples/2.3.x/server-kotlin/java/tablesdb/update-integer-column.md index 84380679f..3921afb79 100644 --- a/examples/2.3.x/server-kotlin/java/tablesdb/update-integer-column.md +++ b/examples/2.3.x/server-kotlin/java/tablesdb/update-integer-column.md @@ -15,9 +15,9 @@ tablesDB.updateIntegerColumn( "<TABLE_ID>", // tableId "<KEY>", // key false, // required - 10, // default - 0, // min (optional) - 100, // max (optional) + 10L, // default + 0L, // min (optional) + 100L, // max (optional) "<NEW_KEY>", // newKey (optional) new CoroutineCallback<>((result, error) -> { if (error != null) { diff --git a/examples/2.3.x/server-kotlin/java/tablesdb/update-string-column.md b/examples/2.3.x/server-kotlin/java/tablesdb/update-string-column.md index 5478b4289..125a861ed 100644 --- a/examples/2.3.x/server-kotlin/java/tablesdb/update-string-column.md +++ b/examples/2.3.x/server-kotlin/java/tablesdb/update-string-column.md @@ -16,7 +16,7 @@ tablesDB.updateStringColumn( "<KEY>", // key false, // required "Hello World", // default - 1, // size (optional) + 1L, // size (optional) "<NEW_KEY>", // newKey (optional) new CoroutineCallback<>((result, error) -> { if (error != null) { diff --git a/examples/2.3.x/server-kotlin/java/tablesdb/update-varchar-column.md b/examples/2.3.x/server-kotlin/java/tablesdb/update-varchar-column.md index d1e44b5ad..091a71477 100644 --- a/examples/2.3.x/server-kotlin/java/tablesdb/update-varchar-column.md +++ b/examples/2.3.x/server-kotlin/java/tablesdb/update-varchar-column.md @@ -16,7 +16,7 @@ tablesDB.updateVarcharColumn( "<KEY>", // key false, // required "Hello World", // default - 1, // size (optional) + 1L, // size (optional) "<NEW_KEY>", // newKey (optional) new CoroutineCallback<>((result, error) -> { if (error != null) { diff --git a/examples/2.3.x/server-kotlin/java/tablesdb/update.md b/examples/2.3.x/server-kotlin/java/tablesdb/update.md index f341fee98..662f562b8 100644 --- a/examples/2.3.x/server-kotlin/java/tablesdb/update.md +++ b/examples/2.3.x/server-kotlin/java/tablesdb/update.md @@ -15,7 +15,7 @@ tablesDB.update( "<NAME>", // name (optional) false, // enabled (optional) "serverless", // specification (optional) - 0, // replicas (optional) + 0L, // replicas (optional) "async", // syncMode (optional) new CoroutineCallback<>((result, error) -> { if (error != null) { diff --git a/examples/2.3.x/server-kotlin/java/tablesdb/upsert-rows.md b/examples/2.3.x/server-kotlin/java/tablesdb/upsert-rows.md index 1c46abfe7..8d511a01b 100644 --- a/examples/2.3.x/server-kotlin/java/tablesdb/upsert-rows.md +++ b/examples/2.3.x/server-kotlin/java/tablesdb/upsert-rows.md @@ -13,7 +13,14 @@ TablesDB tablesDB = new TablesDB(client); tablesDB.upsertRows( "<DATABASE_ID>", // databaseId "<TABLE_ID>", // tableId - List.of(), // rows + List.of(Map.of( + "$id", "example1", + "username", "walter.obrien", + "email", "walter.obrien@example.com", + "fullName", "Walter O'Brien", + "age", 30, + "isAdmin", false + )), // rows "<TRANSACTION_ID>", // transactionId (optional) new CoroutineCallback<>((result, error) -> { if (error != null) { diff --git a/examples/2.3.x/server-kotlin/java/teams/create-membership.md b/examples/2.3.x/server-kotlin/java/teams/create-membership.md index 52cf1043d..f1f2d5af3 100644 --- a/examples/2.3.x/server-kotlin/java/teams/create-membership.md +++ b/examples/2.3.x/server-kotlin/java/teams/create-membership.md @@ -12,7 +12,7 @@ Teams teams = new Teams(client); teams.createMembership( "<TEAM_ID>", // teamId - List.of(), // roles + List.of("editor"), // roles "email@example.com", // email (optional) "<USER_ID>", // userId (optional) "+12065550100", // phone (optional) diff --git a/examples/2.3.x/server-kotlin/java/teams/update-membership.md b/examples/2.3.x/server-kotlin/java/teams/update-membership.md index 97034ae32..403c2a967 100644 --- a/examples/2.3.x/server-kotlin/java/teams/update-membership.md +++ b/examples/2.3.x/server-kotlin/java/teams/update-membership.md @@ -13,7 +13,7 @@ Teams teams = new Teams(client); teams.updateMembership( "<TEAM_ID>", // teamId "<MEMBERSHIP_ID>", // membershipId - List.of(), // roles + List.of("editor"), // roles new CoroutineCallback<>((result, error) -> { if (error != null) { error.printStackTrace(); diff --git a/examples/2.3.x/server-kotlin/java/users/create-jwt.md b/examples/2.3.x/server-kotlin/java/users/create-jwt.md index 0c88f2030..4a3911f1c 100644 --- a/examples/2.3.x/server-kotlin/java/users/create-jwt.md +++ b/examples/2.3.x/server-kotlin/java/users/create-jwt.md @@ -13,7 +13,7 @@ Users users = new Users(client); users.createJWT( "<USER_ID>", // userId "recent()", // sessionId (optional) - 0, // duration (optional) + 0L, // duration (optional) new CoroutineCallback<>((result, error) -> { if (error != null) { error.printStackTrace(); diff --git a/examples/2.3.x/server-kotlin/java/users/create-scrypt-user.md b/examples/2.3.x/server-kotlin/java/users/create-scrypt-user.md index 817264a99..803ee006c 100644 --- a/examples/2.3.x/server-kotlin/java/users/create-scrypt-user.md +++ b/examples/2.3.x/server-kotlin/java/users/create-scrypt-user.md @@ -15,10 +15,10 @@ users.createScryptUser( "email@example.com", // email "password", // password "<PASSWORD_SALT>", // passwordSalt - 8, // passwordCpu - 65536, // passwordMemory - 1, // passwordParallel - 64, // passwordLength + 8L, // passwordCpu + 65536L, // passwordMemory + 1L, // passwordParallel + 64L, // passwordLength "<NAME>", // name (optional) new CoroutineCallback<>((result, error) -> { if (error != null) { diff --git a/examples/2.3.x/server-kotlin/java/users/create-token.md b/examples/2.3.x/server-kotlin/java/users/create-token.md index fccdf6bae..37458e2f9 100644 --- a/examples/2.3.x/server-kotlin/java/users/create-token.md +++ b/examples/2.3.x/server-kotlin/java/users/create-token.md @@ -12,8 +12,8 @@ Users users = new Users(client); users.createToken( "<USER_ID>", // userId - 4, // length (optional) - 60, // expire (optional) + 4L, // length (optional) + 60L, // expire (optional) new CoroutineCallback<>((result, error) -> { if (error != null) { error.printStackTrace(); diff --git a/examples/2.3.x/server-kotlin/java/users/update-labels.md b/examples/2.3.x/server-kotlin/java/users/update-labels.md index ae52debaa..7b079ce5e 100644 --- a/examples/2.3.x/server-kotlin/java/users/update-labels.md +++ b/examples/2.3.x/server-kotlin/java/users/update-labels.md @@ -12,7 +12,7 @@ Users users = new Users(client); users.updateLabels( "<USER_ID>", // userId - List.of(), // labels + List.of("subscriber"), // labels new CoroutineCallback<>((result, error) -> { if (error != null) { error.printStackTrace(); diff --git a/examples/2.3.x/server-kotlin/java/vectorsdb/create-collection.md b/examples/2.3.x/server-kotlin/java/vectorsdb/create-collection.md index d3dc60bee..803cf0973 100644 --- a/examples/2.3.x/server-kotlin/java/vectorsdb/create-collection.md +++ b/examples/2.3.x/server-kotlin/java/vectorsdb/create-collection.md @@ -16,7 +16,7 @@ vectorsDB.createCollection( "<DATABASE_ID>", // databaseId "<COLLECTION_ID>", // collectionId "<NAME>", // name - 1, // dimension + 4L, // dimension List.of(Permission.read(Role.any())), // permissions (optional) false, // documentSecurity (optional) false, // enabled (optional) diff --git a/examples/2.3.x/server-kotlin/java/vectorsdb/create-documents.md b/examples/2.3.x/server-kotlin/java/vectorsdb/create-documents.md index 09628cb30..7392fba5c 100644 --- a/examples/2.3.x/server-kotlin/java/vectorsdb/create-documents.md +++ b/examples/2.3.x/server-kotlin/java/vectorsdb/create-documents.md @@ -13,7 +13,13 @@ VectorsDB vectorsDB = new VectorsDB(client); vectorsDB.createDocuments( "<DATABASE_ID>", // databaseId "<COLLECTION_ID>", // collectionId - List.of(), // documents + List.of(Map.of( + "$id", "example1", + "embeddings", List.of(0.12, -0.55, 0.88, 1.02), + "metadata", Map.of( + "name", "First document" + ) + )), // documents "<TRANSACTION_ID>", // transactionId (optional) new CoroutineCallback<>((result, error) -> { if (error != null) { diff --git a/examples/2.3.x/server-kotlin/java/vectorsdb/create-index.md b/examples/2.3.x/server-kotlin/java/vectorsdb/create-index.md index 8934428c4..7e3b0e432 100644 --- a/examples/2.3.x/server-kotlin/java/vectorsdb/create-index.md +++ b/examples/2.3.x/server-kotlin/java/vectorsdb/create-index.md @@ -17,7 +17,7 @@ vectorsDB.createIndex( "<COLLECTION_ID>", // collectionId "<KEY>", // key VectorsDBIndexType.HNSW_EUCLIDEAN, // type - List.of(), // attributes + List.of("embeddings"), // attributes List.of(OrderBy.ASC), // orders (optional) List.of(), // lengths (optional) new CoroutineCallback<>((result, error) -> { diff --git a/examples/2.3.x/server-kotlin/java/vectorsdb/create-operations.md b/examples/2.3.x/server-kotlin/java/vectorsdb/create-operations.md index bc2f85e7c..db3ad3ec9 100644 --- a/examples/2.3.x/server-kotlin/java/vectorsdb/create-operations.md +++ b/examples/2.3.x/server-kotlin/java/vectorsdb/create-operations.md @@ -18,7 +18,10 @@ vectorsDB.createOperations( "collectionId", "<COLLECTION_ID>", "documentId", "<DOCUMENT_ID>", "data", Map.of( - "name", "Walter O'Brien" + "embeddings", List.of(0.12, -0.55, 0.88, 1.02), + "metadata", Map.of( + "name", "First document" + ) ) )), // operations (optional) new CoroutineCallback<>((result, error) -> { diff --git a/examples/2.3.x/server-kotlin/java/vectorsdb/create-query.md b/examples/2.3.x/server-kotlin/java/vectorsdb/create-query.md index 21ca0cebb..c27a86fd3 100644 --- a/examples/2.3.x/server-kotlin/java/vectorsdb/create-query.md +++ b/examples/2.3.x/server-kotlin/java/vectorsdb/create-query.md @@ -16,7 +16,7 @@ vectorsDB.createQuery( List.of(), // queries (optional) "<TRANSACTION_ID>", // transactionId (optional) false, // total (optional) - 0, // ttl (optional) + 0L, // ttl (optional) new CoroutineCallback<>((result, error) -> { if (error != null) { error.printStackTrace(); diff --git a/examples/2.3.x/server-kotlin/java/vectorsdb/create-transaction.md b/examples/2.3.x/server-kotlin/java/vectorsdb/create-transaction.md index c855284b3..e4f2c762b 100644 --- a/examples/2.3.x/server-kotlin/java/vectorsdb/create-transaction.md +++ b/examples/2.3.x/server-kotlin/java/vectorsdb/create-transaction.md @@ -11,7 +11,7 @@ Client client = new Client() VectorsDB vectorsDB = new VectorsDB(client); vectorsDB.createTransaction( - 60, // ttl (optional) + 60L, // ttl (optional) new CoroutineCallback<>((result, error) -> { if (error != null) { error.printStackTrace(); diff --git a/examples/2.3.x/server-kotlin/java/vectorsdb/create.md b/examples/2.3.x/server-kotlin/java/vectorsdb/create.md index 433f6f08e..b21d941f3 100644 --- a/examples/2.3.x/server-kotlin/java/vectorsdb/create.md +++ b/examples/2.3.x/server-kotlin/java/vectorsdb/create.md @@ -15,7 +15,7 @@ vectorsDB.create( "<NAME>", // name false, // enabled (optional) "serverless", // specification (optional) - 0, // replicas (optional) + 0L, // replicas (optional) "async", // syncMode (optional) new CoroutineCallback<>((result, error) -> { if (error != null) { diff --git a/examples/2.3.x/server-kotlin/java/vectorsdb/delete-documents.md b/examples/2.3.x/server-kotlin/java/vectorsdb/delete-documents.md index 31a425a4e..4feaf614c 100644 --- a/examples/2.3.x/server-kotlin/java/vectorsdb/delete-documents.md +++ b/examples/2.3.x/server-kotlin/java/vectorsdb/delete-documents.md @@ -13,7 +13,7 @@ VectorsDB vectorsDB = new VectorsDB(client); vectorsDB.deleteDocuments( "<DATABASE_ID>", // databaseId "<COLLECTION_ID>", // collectionId - List.of(), // queries (optional) + List.of("{\"method\":\"equal\", \"attribute\":\"$id\", \"values\":[\"<DOCUMENT_ID>\"]}"), // queries (optional) "<TRANSACTION_ID>", // transactionId (optional) new CoroutineCallback<>((result, error) -> { if (error != null) { diff --git a/examples/2.3.x/server-kotlin/java/vectorsdb/list-documents.md b/examples/2.3.x/server-kotlin/java/vectorsdb/list-documents.md index 857d79677..460327df6 100644 --- a/examples/2.3.x/server-kotlin/java/vectorsdb/list-documents.md +++ b/examples/2.3.x/server-kotlin/java/vectorsdb/list-documents.md @@ -16,7 +16,7 @@ vectorsDB.listDocuments( List.of(), // queries (optional) "<TRANSACTION_ID>", // transactionId (optional) false, // total (optional) - 0, // ttl (optional) + 0L, // ttl (optional) new CoroutineCallback<>((result, error) -> { if (error != null) { error.printStackTrace(); diff --git a/examples/2.3.x/server-kotlin/java/vectorsdb/list-operations.md b/examples/2.3.x/server-kotlin/java/vectorsdb/list-operations.md index de53b2740..885daeaf6 100644 --- a/examples/2.3.x/server-kotlin/java/vectorsdb/list-operations.md +++ b/examples/2.3.x/server-kotlin/java/vectorsdb/list-operations.md @@ -13,8 +13,8 @@ VectorsDB vectorsDB = new VectorsDB(client); vectorsDB.listOperations( "<DATABASE_ID>", // databaseId "queued", // status (optional) - 1, // limit (optional) - 0, // offset (optional) + 1L, // limit (optional) + 0L, // offset (optional) new CoroutineCallback<>((result, error) -> { if (error != null) { error.printStackTrace(); diff --git a/examples/2.3.x/server-kotlin/java/vectorsdb/list-transactions.md b/examples/2.3.x/server-kotlin/java/vectorsdb/list-transactions.md index 6b0890a63..1d57acc4f 100644 --- a/examples/2.3.x/server-kotlin/java/vectorsdb/list-transactions.md +++ b/examples/2.3.x/server-kotlin/java/vectorsdb/list-transactions.md @@ -12,6 +12,7 @@ VectorsDB vectorsDB = new VectorsDB(client); vectorsDB.listTransactions( List.of(), // queries (optional) + false, // total (optional) new CoroutineCallback<>((result, error) -> { if (error != null) { error.printStackTrace(); diff --git a/examples/2.3.x/server-kotlin/java/vectorsdb/update-collection.md b/examples/2.3.x/server-kotlin/java/vectorsdb/update-collection.md index 9359c8086..8952e2db5 100644 --- a/examples/2.3.x/server-kotlin/java/vectorsdb/update-collection.md +++ b/examples/2.3.x/server-kotlin/java/vectorsdb/update-collection.md @@ -16,7 +16,7 @@ vectorsDB.updateCollection( "<DATABASE_ID>", // databaseId "<COLLECTION_ID>", // collectionId "<NAME>", // name - 1, // dimension (optional) + 4L, // dimension (optional) List.of(Permission.read(Role.any())), // permissions (optional) false, // documentSecurity (optional) false, // enabled (optional) diff --git a/examples/2.3.x/server-kotlin/java/vectorsdb/update.md b/examples/2.3.x/server-kotlin/java/vectorsdb/update.md index 01d23bdf9..a06e2d94e 100644 --- a/examples/2.3.x/server-kotlin/java/vectorsdb/update.md +++ b/examples/2.3.x/server-kotlin/java/vectorsdb/update.md @@ -15,7 +15,7 @@ vectorsDB.update( "<NAME>", // name false, // enabled (optional) "serverless", // specification (optional) - 0, // replicas (optional) + 0L, // replicas (optional) "async", // syncMode (optional) new CoroutineCallback<>((result, error) -> { if (error != null) { diff --git a/examples/2.3.x/server-kotlin/java/vectorsdb/upsert-documents.md b/examples/2.3.x/server-kotlin/java/vectorsdb/upsert-documents.md index 6371a0cb5..eea5748e7 100644 --- a/examples/2.3.x/server-kotlin/java/vectorsdb/upsert-documents.md +++ b/examples/2.3.x/server-kotlin/java/vectorsdb/upsert-documents.md @@ -13,7 +13,13 @@ VectorsDB vectorsDB = new VectorsDB(client); vectorsDB.upsertDocuments( "<DATABASE_ID>", // databaseId "<COLLECTION_ID>", // collectionId - List.of(), // documents + List.of(Map.of( + "$id", "example1", + "embeddings", List.of(0.12, -0.55, 0.88, 1.02), + "metadata", Map.of( + "name", "First document" + ) + )), // documents "<TRANSACTION_ID>", // transactionId (optional) new CoroutineCallback<>((result, error) -> { if (error != null) { diff --git a/examples/2.3.x/server-kotlin/java/webhooks/create.md b/examples/2.3.x/server-kotlin/java/webhooks/create.md index 9759465e8..32e42515b 100644 --- a/examples/2.3.x/server-kotlin/java/webhooks/create.md +++ b/examples/2.3.x/server-kotlin/java/webhooks/create.md @@ -14,7 +14,7 @@ webhooks.create( "<WEBHOOK_ID>", // webhookId "https://example.com/webhook", // url "<NAME>", // name - List.of(), // events + List.of("users.*.create"), // events false, // enabled (optional) false, // tls (optional) "<AUTH_USERNAME>", // authUsername (optional) diff --git a/examples/2.3.x/server-kotlin/java/webhooks/update.md b/examples/2.3.x/server-kotlin/java/webhooks/update.md index 5c7f85f83..274b4d88d 100644 --- a/examples/2.3.x/server-kotlin/java/webhooks/update.md +++ b/examples/2.3.x/server-kotlin/java/webhooks/update.md @@ -14,7 +14,7 @@ webhooks.update( "<WEBHOOK_ID>", // webhookId "<NAME>", // name "https://example.com/webhook", // url - List.of(), // events + List.of("users.*.create"), // events false, // enabled (optional) false, // tls (optional) "<AUTH_USERNAME>", // authUsername (optional) diff --git a/examples/2.3.x/server-kotlin/kotlin/account/create-email-password-session.md b/examples/2.3.x/server-kotlin/kotlin/account/create-email-password-session.md index a1cea8ff9..8039c0d72 100644 --- a/examples/2.3.x/server-kotlin/kotlin/account/create-email-password-session.md +++ b/examples/2.3.x/server-kotlin/kotlin/account/create-email-password-session.md @@ -12,6 +12,7 @@ val account = Account(client) val response = account.createEmailPasswordSession( email = "email@example.com", - password = "password" + password = "password", + duration = 60 // optional ) ``` diff --git a/examples/2.3.x/server-kotlin/kotlin/account/delete-sessions.md b/examples/2.3.x/server-kotlin/kotlin/account/delete-sessions.md index 5232e675e..16aab2410 100644 --- a/examples/2.3.x/server-kotlin/kotlin/account/delete-sessions.md +++ b/examples/2.3.x/server-kotlin/kotlin/account/delete-sessions.md @@ -10,5 +10,7 @@ val client = Client() val account = Account(client) -val response = account.deleteSessions() +val response = account.deleteSessions( + current = false // optional +) ``` diff --git a/examples/2.3.x/server-kotlin/kotlin/account/list-sessions.md b/examples/2.3.x/server-kotlin/kotlin/account/list-sessions.md index 120766637..0644bf135 100644 --- a/examples/2.3.x/server-kotlin/kotlin/account/list-sessions.md +++ b/examples/2.3.x/server-kotlin/kotlin/account/list-sessions.md @@ -10,5 +10,7 @@ val client = Client() val account = Account(client) -val response = account.listSessions() +val response = account.listSessions( + total = false // optional +) ``` diff --git a/examples/2.3.x/server-kotlin/kotlin/analytics/create-event.md b/examples/2.3.x/server-kotlin/kotlin/analytics/create-event.md new file mode 100644 index 000000000..6b76fb62f --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/analytics/create-event.md @@ -0,0 +1,28 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Analytics + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +val analytics = Analytics(client) + +val response = analytics.createEvent( + propertyId = "<PROPERTY_ID>", + name = "<NAME>", + url = "https://example.com", + domain = "<DOMAIN>", // optional + referrer = "<REFERRER>", // optional + screenWidth = 0, // optional + sessionHash = "<SESSION_HASH>", // optional + scrollDepth = 0, // optional + engagementTime = 0, // optional + props = listOf(), // optional + userId = "<USER_ID>", // optional + ip = "<IP>", // optional + userAgent = "<USER_AGENT>" // optional +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/analytics/create-property.md b/examples/2.3.x/server-kotlin/kotlin/analytics/create-property.md new file mode 100644 index 000000000..bec232510 --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/analytics/create-property.md @@ -0,0 +1,22 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Analytics + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val analytics = Analytics(client) + +val response = analytics.createProperty( + propertyId = "<PROPERTY_ID>", + name = "<NAME>", + domain = "<DOMAIN>", // optional + timezone = "<TIMEZONE>", // optional + enabled = false, // optional + public = false, // optional + allowedOrigins = listOf() // optional +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/analytics/delete-property.md b/examples/2.3.x/server-kotlin/kotlin/analytics/delete-property.md new file mode 100644 index 000000000..f9bbbf831 --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/analytics/delete-property.md @@ -0,0 +1,16 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Analytics + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val analytics = Analytics(client) + +val response = analytics.deleteProperty( + propertyId = "<PROPERTY_ID>" +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/analytics/get-property.md b/examples/2.3.x/server-kotlin/kotlin/analytics/get-property.md new file mode 100644 index 000000000..14478ecb4 --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/analytics/get-property.md @@ -0,0 +1,16 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Analytics + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val analytics = Analytics(client) + +val response = analytics.getProperty( + propertyId = "<PROPERTY_ID>" +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/analytics/list-metrics.md b/examples/2.3.x/server-kotlin/kotlin/analytics/list-metrics.md new file mode 100644 index 000000000..884af423e --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/analytics/list-metrics.md @@ -0,0 +1,25 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Analytics +import io.appwrite.enums.AnalyticsInterval +import io.appwrite.enums.AnalyticsDimension + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val analytics = Analytics(client) + +val response = analytics.listMetrics( + propertyId = "<PROPERTY_ID>", + queries = listOf(), // optional + interval = AnalyticsInterval.ONE_HOUR, // optional + dimensions = listOf(AnalyticsDimension.COUNTRY), // optional + dateRange = "<DATE_RANGE>", // optional + startAt = "2020-10-15T06:38:00.000+00:00", // optional + endAt = "2020-10-15T06:38:00.000+00:00", // optional + limit = 1 // optional +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/analytics/list-properties.md b/examples/2.3.x/server-kotlin/kotlin/analytics/list-properties.md new file mode 100644 index 000000000..afce64f86 --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/analytics/list-properties.md @@ -0,0 +1,18 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Analytics + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val analytics = Analytics(client) + +val response = analytics.listProperties( + queries = listOf(), // optional + search = "<SEARCH>", // optional + total = false // optional +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/analytics/update-property.md b/examples/2.3.x/server-kotlin/kotlin/analytics/update-property.md new file mode 100644 index 000000000..0e275a77a --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/analytics/update-property.md @@ -0,0 +1,22 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Analytics + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val analytics = Analytics(client) + +val response = analytics.updateProperty( + propertyId = "<PROPERTY_ID>", + name = "<NAME>", // optional + domain = "<DOMAIN>", // optional + timezone = "<TIMEZONE>", // optional + enabled = false, // optional + public = false, // optional + allowedOrigins = listOf() // optional +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/avatars/delete-photo.md b/examples/2.3.x/server-kotlin/kotlin/avatars/delete-photo.md new file mode 100644 index 000000000..c2ea65f3b --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/avatars/delete-photo.md @@ -0,0 +1,14 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Avatars + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +val avatars = Avatars(client) + +val response = avatars.deletePhoto() +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/avatars/get-screenshot.md b/examples/2.3.x/server-kotlin/kotlin/avatars/get-screenshot.md index ea26656a8..aee9eb6a8 100644 --- a/examples/2.3.x/server-kotlin/kotlin/avatars/get-screenshot.md +++ b/examples/2.3.x/server-kotlin/kotlin/avatars/get-screenshot.md @@ -17,12 +17,11 @@ val avatars = Avatars(client) val result = avatars.getScreenshot( url = "https://example.com", headers = mapOf( - "Authorization" to "Bearer token123", - "X-Custom-Header" to "value" + "Accept-Language" to "en-US,en;q=0.9" ), // optional viewportWidth = 1920, // optional viewportHeight = 1080, // optional - scale = 2, // optional + scale = 2.0, // optional theme = BrowserTheme.DARK, // optional userAgent = "Mozilla/5.0 (iPhone; CPU iPhone OS 14_0 like Mac OS X) AppleWebKit/605.1.15", // optional fullpage = true, // optional @@ -30,7 +29,7 @@ val result = avatars.getScreenshot( timezone = Timezone.AFRICA_ABIDJAN, // optional latitude = 37.7749, // optional longitude = -122.4194, // optional - accuracy = 100, // optional + accuracy = 100.0, // optional touch = true, // optional permissions = listOf(BrowserPermission.GEOLOCATION, BrowserPermission.NOTIFICATIONS), // optional sleep = 3, // optional diff --git a/examples/2.3.x/server-kotlin/kotlin/avatars/update-photo.md b/examples/2.3.x/server-kotlin/kotlin/avatars/update-photo.md new file mode 100644 index 000000000..130590c16 --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/avatars/update-photo.md @@ -0,0 +1,17 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.models.InputFile +import io.appwrite.services.Avatars + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +val avatars = Avatars(client) + +val response = avatars.updatePhoto( + file = InputFile.fromPath("file.png") +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/databases/create-documents.md b/examples/2.3.x/server-kotlin/kotlin/databases/create-documents.md index a0f32b6c3..19b9f5f02 100644 --- a/examples/2.3.x/server-kotlin/kotlin/databases/create-documents.md +++ b/examples/2.3.x/server-kotlin/kotlin/databases/create-documents.md @@ -13,7 +13,14 @@ val databases = Databases(client) val response = databases.createDocuments( databaseId = "<DATABASE_ID>", collectionId = "<COLLECTION_ID>", - documents = listOf(), + documents = listOf(mapOf( + "\$id" to "example1", + "username" to "walter.obrien", + "email" to "walter.obrien@example.com", + "fullName" to "Walter O'Brien", + "age" to 30, + "isAdmin" to false + )), transactionId = "<TRANSACTION_ID>" // optional ) ``` diff --git a/examples/2.3.x/server-kotlin/kotlin/databases/create-float-attribute.md b/examples/2.3.x/server-kotlin/kotlin/databases/create-float-attribute.md index 2476449b9..7acee4aa3 100644 --- a/examples/2.3.x/server-kotlin/kotlin/databases/create-float-attribute.md +++ b/examples/2.3.x/server-kotlin/kotlin/databases/create-float-attribute.md @@ -15,8 +15,8 @@ val response = databases.createFloatAttribute( collectionId = "<COLLECTION_ID>", key = "<KEY>", required = false, - min = 0, // optional - max = 100, // optional + min = 0.0, // optional + max = 100.0, // optional default = 10.5, // optional array = false // optional ) diff --git a/examples/2.3.x/server-kotlin/kotlin/databases/create-index.md b/examples/2.3.x/server-kotlin/kotlin/databases/create-index.md index 4dd7197c3..de5c64a51 100644 --- a/examples/2.3.x/server-kotlin/kotlin/databases/create-index.md +++ b/examples/2.3.x/server-kotlin/kotlin/databases/create-index.md @@ -17,7 +17,7 @@ val response = databases.createIndex( collectionId = "<COLLECTION_ID>", key = "<KEY>", type = DatabasesIndexType.KEY, - attributes = listOf(), + attributes = listOf("username"), orders = listOf(OrderBy.ASC), // optional lengths = listOf() // optional ) diff --git a/examples/2.3.x/server-kotlin/kotlin/databases/decrement-document-attribute.md b/examples/2.3.x/server-kotlin/kotlin/databases/decrement-document-attribute.md index fca8286ea..648879701 100644 --- a/examples/2.3.x/server-kotlin/kotlin/databases/decrement-document-attribute.md +++ b/examples/2.3.x/server-kotlin/kotlin/databases/decrement-document-attribute.md @@ -15,8 +15,8 @@ val response = databases.decrementDocumentAttribute( collectionId = "<COLLECTION_ID>", documentId = "<DOCUMENT_ID>", attribute = "<ATTRIBUTE>", - value = 1, // optional - min = 0, // optional + value = 1.0, // optional + min = 0.0, // optional transactionId = "<TRANSACTION_ID>" // optional ) ``` diff --git a/examples/2.3.x/server-kotlin/kotlin/databases/delete-documents.md b/examples/2.3.x/server-kotlin/kotlin/databases/delete-documents.md index 43baf47bc..1377db781 100644 --- a/examples/2.3.x/server-kotlin/kotlin/databases/delete-documents.md +++ b/examples/2.3.x/server-kotlin/kotlin/databases/delete-documents.md @@ -13,7 +13,7 @@ val databases = Databases(client) val response = databases.deleteDocuments( databaseId = "<DATABASE_ID>", collectionId = "<COLLECTION_ID>", - queries = listOf(), // optional + queries = listOf("{\"method\":\"equal\", \"attribute\":\"\$id\", \"values\":[\"<DOCUMENT_ID>\"]}"), // optional transactionId = "<TRANSACTION_ID>" // optional ) ``` diff --git a/examples/2.3.x/server-kotlin/kotlin/databases/increment-document-attribute.md b/examples/2.3.x/server-kotlin/kotlin/databases/increment-document-attribute.md index 4d0ffb2a9..0822e5b65 100644 --- a/examples/2.3.x/server-kotlin/kotlin/databases/increment-document-attribute.md +++ b/examples/2.3.x/server-kotlin/kotlin/databases/increment-document-attribute.md @@ -15,8 +15,8 @@ val response = databases.incrementDocumentAttribute( collectionId = "<COLLECTION_ID>", documentId = "<DOCUMENT_ID>", attribute = "<ATTRIBUTE>", - value = 1, // optional - max = 100, // optional + value = 1.0, // optional + max = 100.0, // optional transactionId = "<TRANSACTION_ID>" // optional ) ``` diff --git a/examples/2.3.x/server-kotlin/kotlin/databases/list-transactions.md b/examples/2.3.x/server-kotlin/kotlin/databases/list-transactions.md index 1195069e1..3058fdc43 100644 --- a/examples/2.3.x/server-kotlin/kotlin/databases/list-transactions.md +++ b/examples/2.3.x/server-kotlin/kotlin/databases/list-transactions.md @@ -11,6 +11,7 @@ val client = Client() val databases = Databases(client) val response = databases.listTransactions( - queries = listOf() // optional + queries = listOf(), // optional + total = false // optional ) ``` diff --git a/examples/2.3.x/server-kotlin/kotlin/databases/update-float-attribute.md b/examples/2.3.x/server-kotlin/kotlin/databases/update-float-attribute.md index d0049003c..8284539ad 100644 --- a/examples/2.3.x/server-kotlin/kotlin/databases/update-float-attribute.md +++ b/examples/2.3.x/server-kotlin/kotlin/databases/update-float-attribute.md @@ -16,8 +16,8 @@ val response = databases.updateFloatAttribute( key = "<KEY>", required = false, default = 10.5, - min = 0, // optional - max = 100, // optional + min = 0.0, // optional + max = 100.0, // optional newKey = "<NEW_KEY>" // optional ) ``` diff --git a/examples/2.3.x/server-kotlin/kotlin/databases/upsert-documents.md b/examples/2.3.x/server-kotlin/kotlin/databases/upsert-documents.md index a9e673c20..549b83e61 100644 --- a/examples/2.3.x/server-kotlin/kotlin/databases/upsert-documents.md +++ b/examples/2.3.x/server-kotlin/kotlin/databases/upsert-documents.md @@ -13,7 +13,14 @@ val databases = Databases(client) val response = databases.upsertDocuments( databaseId = "<DATABASE_ID>", collectionId = "<COLLECTION_ID>", - documents = listOf(), + documents = listOf(mapOf( + "\$id" to "example1", + "username" to "walter.obrien", + "email" to "walter.obrien@example.com", + "fullName" to "Walter O'Brien", + "age" to 30, + "isAdmin" to false + )), transactionId = "<TRANSACTION_ID>" // optional ) ``` diff --git a/examples/2.3.x/server-kotlin/kotlin/documentsdb/create-documents.md b/examples/2.3.x/server-kotlin/kotlin/documentsdb/create-documents.md index b6f084798..3b7e17651 100644 --- a/examples/2.3.x/server-kotlin/kotlin/documentsdb/create-documents.md +++ b/examples/2.3.x/server-kotlin/kotlin/documentsdb/create-documents.md @@ -13,7 +13,14 @@ val documentsDB = DocumentsDB(client) val response = documentsDB.createDocuments( databaseId = "<DATABASE_ID>", collectionId = "<COLLECTION_ID>", - documents = listOf(), + documents = listOf(mapOf( + "\$id" to "example1", + "username" to "walter.obrien", + "email" to "walter.obrien@example.com", + "fullName" to "Walter O'Brien", + "age" to 30, + "isAdmin" to false + )), transactionId = "<TRANSACTION_ID>" // optional ) ``` diff --git a/examples/2.3.x/server-kotlin/kotlin/documentsdb/create-index.md b/examples/2.3.x/server-kotlin/kotlin/documentsdb/create-index.md index df6fdb523..cb750802d 100644 --- a/examples/2.3.x/server-kotlin/kotlin/documentsdb/create-index.md +++ b/examples/2.3.x/server-kotlin/kotlin/documentsdb/create-index.md @@ -17,7 +17,7 @@ val response = documentsDB.createIndex( collectionId = "<COLLECTION_ID>", key = "<KEY>", type = DocumentsDBIndexType.KEY, - attributes = listOf(), + attributes = listOf("username"), orders = listOf(OrderBy.ASC), // optional lengths = listOf() // optional ) diff --git a/examples/2.3.x/server-kotlin/kotlin/documentsdb/decrement-document-attribute.md b/examples/2.3.x/server-kotlin/kotlin/documentsdb/decrement-document-attribute.md index c4668ec55..22e757751 100644 --- a/examples/2.3.x/server-kotlin/kotlin/documentsdb/decrement-document-attribute.md +++ b/examples/2.3.x/server-kotlin/kotlin/documentsdb/decrement-document-attribute.md @@ -15,8 +15,8 @@ val response = documentsDB.decrementDocumentAttribute( collectionId = "<COLLECTION_ID>", documentId = "<DOCUMENT_ID>", attribute = "<ATTRIBUTE>", - value = 1, // optional - min = 0, // optional + value = 1.0, // optional + min = 0.0, // optional transactionId = "<TRANSACTION_ID>" // optional ) ``` diff --git a/examples/2.3.x/server-kotlin/kotlin/documentsdb/delete-documents.md b/examples/2.3.x/server-kotlin/kotlin/documentsdb/delete-documents.md index 9a5397c07..1cf65006b 100644 --- a/examples/2.3.x/server-kotlin/kotlin/documentsdb/delete-documents.md +++ b/examples/2.3.x/server-kotlin/kotlin/documentsdb/delete-documents.md @@ -13,7 +13,7 @@ val documentsDB = DocumentsDB(client) val response = documentsDB.deleteDocuments( databaseId = "<DATABASE_ID>", collectionId = "<COLLECTION_ID>", - queries = listOf(), // optional + queries = listOf("{\"method\":\"equal\", \"attribute\":\"\$id\", \"values\":[\"<DOCUMENT_ID>\"]}"), // optional transactionId = "<TRANSACTION_ID>" // optional ) ``` diff --git a/examples/2.3.x/server-kotlin/kotlin/documentsdb/increment-document-attribute.md b/examples/2.3.x/server-kotlin/kotlin/documentsdb/increment-document-attribute.md index bfc586033..53ce0a7a3 100644 --- a/examples/2.3.x/server-kotlin/kotlin/documentsdb/increment-document-attribute.md +++ b/examples/2.3.x/server-kotlin/kotlin/documentsdb/increment-document-attribute.md @@ -15,8 +15,8 @@ val response = documentsDB.incrementDocumentAttribute( collectionId = "<COLLECTION_ID>", documentId = "<DOCUMENT_ID>", attribute = "<ATTRIBUTE>", - value = 1, // optional - max = 100, // optional + value = 1.0, // optional + max = 100.0, // optional transactionId = "<TRANSACTION_ID>" // optional ) ``` diff --git a/examples/2.3.x/server-kotlin/kotlin/documentsdb/list-transactions.md b/examples/2.3.x/server-kotlin/kotlin/documentsdb/list-transactions.md index 00967cc24..809b48ea0 100644 --- a/examples/2.3.x/server-kotlin/kotlin/documentsdb/list-transactions.md +++ b/examples/2.3.x/server-kotlin/kotlin/documentsdb/list-transactions.md @@ -11,6 +11,7 @@ val client = Client() val documentsDB = DocumentsDB(client) val response = documentsDB.listTransactions( - queries = listOf() // optional + queries = listOf(), // optional + total = false // optional ) ``` diff --git a/examples/2.3.x/server-kotlin/kotlin/documentsdb/upsert-documents.md b/examples/2.3.x/server-kotlin/kotlin/documentsdb/upsert-documents.md index abf463385..130ac785a 100644 --- a/examples/2.3.x/server-kotlin/kotlin/documentsdb/upsert-documents.md +++ b/examples/2.3.x/server-kotlin/kotlin/documentsdb/upsert-documents.md @@ -13,7 +13,14 @@ val documentsDB = DocumentsDB(client) val response = documentsDB.upsertDocuments( databaseId = "<DATABASE_ID>", collectionId = "<COLLECTION_ID>", - documents = listOf(), + documents = listOf(mapOf( + "\$id" to "example1", + "username" to "walter.obrien", + "email" to "walter.obrien@example.com", + "fullName" to "Walter O'Brien", + "age" to 30, + "isAdmin" to false + )), transactionId = "<TRANSACTION_ID>" // optional ) ``` diff --git a/examples/2.3.x/server-kotlin/kotlin/embeddings/create-text-embeddings.md b/examples/2.3.x/server-kotlin/kotlin/embeddings/create-text-embeddings.md index 6d0b3c1ca..0a7900a9d 100644 --- a/examples/2.3.x/server-kotlin/kotlin/embeddings/create-text-embeddings.md +++ b/examples/2.3.x/server-kotlin/kotlin/embeddings/create-text-embeddings.md @@ -12,7 +12,7 @@ val client = Client() val embeddings = Embeddings(client) val response = embeddings.createTextEmbeddings( - texts = listOf(), + texts = listOf("Appwrite helps developers build applications.", "Find documents with semantic search."), model = EmbeddingModel.NOMIC_EMBED_TEXT // optional ) ``` diff --git a/examples/2.3.x/server-kotlin/kotlin/functions/list-runtimes.md b/examples/2.3.x/server-kotlin/kotlin/functions/list-runtimes.md index b32e73bf0..59f6f8254 100644 --- a/examples/2.3.x/server-kotlin/kotlin/functions/list-runtimes.md +++ b/examples/2.3.x/server-kotlin/kotlin/functions/list-runtimes.md @@ -10,5 +10,7 @@ val client = Client() val functions = Functions(client) -val response = functions.listRuntimes() +val response = functions.listRuntimes( + total = false // optional +) ``` diff --git a/examples/2.3.x/server-kotlin/kotlin/functions/list-specifications.md b/examples/2.3.x/server-kotlin/kotlin/functions/list-specifications.md index 516eeb856..24f36457b 100644 --- a/examples/2.3.x/server-kotlin/kotlin/functions/list-specifications.md +++ b/examples/2.3.x/server-kotlin/kotlin/functions/list-specifications.md @@ -11,6 +11,7 @@ val client = Client() val functions = Functions(client) val response = functions.listSpecifications( - type = "runtimes" // optional + type = "runtimes", // optional + total = false // optional ) ``` diff --git a/examples/2.3.x/server-kotlin/kotlin/graphql/mutation.md b/examples/2.3.x/server-kotlin/kotlin/graphql/mutation.md index 3ec94a5d4..d5f6bade8 100644 --- a/examples/2.3.x/server-kotlin/kotlin/graphql/mutation.md +++ b/examples/2.3.x/server-kotlin/kotlin/graphql/mutation.md @@ -11,6 +11,8 @@ val client = Client() val graphql = Graphql(client) val response = graphql.mutation( - query = mapOf( "a" to "b" ) + query = mapOf( + "query" to "mutation { accountUpdateName(name: \"Walter\") { name } }" + ) ) ``` diff --git a/examples/2.3.x/server-kotlin/kotlin/graphql/query.md b/examples/2.3.x/server-kotlin/kotlin/graphql/query.md index e22d508b3..136eeb93a 100644 --- a/examples/2.3.x/server-kotlin/kotlin/graphql/query.md +++ b/examples/2.3.x/server-kotlin/kotlin/graphql/query.md @@ -11,6 +11,8 @@ val client = Client() val graphql = Graphql(client) val response = graphql.query( - query = mapOf( "a" to "b" ) + query = mapOf( + "query" to "query { localeGet { ip } }" + ) ) ``` diff --git a/examples/2.3.x/server-kotlin/kotlin/locale/list-codes.md b/examples/2.3.x/server-kotlin/kotlin/locale/list-codes.md index d7d323e4f..fe8fe003b 100644 --- a/examples/2.3.x/server-kotlin/kotlin/locale/list-codes.md +++ b/examples/2.3.x/server-kotlin/kotlin/locale/list-codes.md @@ -10,5 +10,7 @@ val client = Client() val locale = Locale(client) -val response = locale.listCodes() +val response = locale.listCodes( + total = false // optional +) ``` diff --git a/examples/2.3.x/server-kotlin/kotlin/locale/list-continents.md b/examples/2.3.x/server-kotlin/kotlin/locale/list-continents.md index 84fd76bcf..09fdfb045 100644 --- a/examples/2.3.x/server-kotlin/kotlin/locale/list-continents.md +++ b/examples/2.3.x/server-kotlin/kotlin/locale/list-continents.md @@ -10,5 +10,7 @@ val client = Client() val locale = Locale(client) -val response = locale.listContinents() +val response = locale.listContinents( + total = false // optional +) ``` diff --git a/examples/2.3.x/server-kotlin/kotlin/locale/list-countries-eu.md b/examples/2.3.x/server-kotlin/kotlin/locale/list-countries-eu.md index 4fbcee6c1..6767c7a25 100644 --- a/examples/2.3.x/server-kotlin/kotlin/locale/list-countries-eu.md +++ b/examples/2.3.x/server-kotlin/kotlin/locale/list-countries-eu.md @@ -10,5 +10,7 @@ val client = Client() val locale = Locale(client) -val response = locale.listCountriesEU() +val response = locale.listCountriesEU( + total = false // optional +) ``` diff --git a/examples/2.3.x/server-kotlin/kotlin/locale/list-countries-phones.md b/examples/2.3.x/server-kotlin/kotlin/locale/list-countries-phones.md index 02c56bbcc..d24c0fd3d 100644 --- a/examples/2.3.x/server-kotlin/kotlin/locale/list-countries-phones.md +++ b/examples/2.3.x/server-kotlin/kotlin/locale/list-countries-phones.md @@ -10,5 +10,7 @@ val client = Client() val locale = Locale(client) -val response = locale.listCountriesPhones() +val response = locale.listCountriesPhones( + total = false // optional +) ``` diff --git a/examples/2.3.x/server-kotlin/kotlin/locale/list-countries.md b/examples/2.3.x/server-kotlin/kotlin/locale/list-countries.md index 441e130e5..f8f0125d6 100644 --- a/examples/2.3.x/server-kotlin/kotlin/locale/list-countries.md +++ b/examples/2.3.x/server-kotlin/kotlin/locale/list-countries.md @@ -10,5 +10,7 @@ val client = Client() val locale = Locale(client) -val response = locale.listCountries() +val response = locale.listCountries( + total = false // optional +) ``` diff --git a/examples/2.3.x/server-kotlin/kotlin/locale/list-currencies.md b/examples/2.3.x/server-kotlin/kotlin/locale/list-currencies.md index c68d676a5..842dcece9 100644 --- a/examples/2.3.x/server-kotlin/kotlin/locale/list-currencies.md +++ b/examples/2.3.x/server-kotlin/kotlin/locale/list-currencies.md @@ -10,5 +10,7 @@ val client = Client() val locale = Locale(client) -val response = locale.listCurrencies() +val response = locale.listCurrencies( + total = false // optional +) ``` diff --git a/examples/2.3.x/server-kotlin/kotlin/locale/list-languages.md b/examples/2.3.x/server-kotlin/kotlin/locale/list-languages.md index 307d0b796..6943c46fe 100644 --- a/examples/2.3.x/server-kotlin/kotlin/locale/list-languages.md +++ b/examples/2.3.x/server-kotlin/kotlin/locale/list-languages.md @@ -10,5 +10,7 @@ val client = Client() val locale = Locale(client) -val response = locale.listLanguages() +val response = locale.listLanguages( + total = false // optional +) ``` diff --git a/examples/2.3.x/server-kotlin/kotlin/messaging/create-push.md b/examples/2.3.x/server-kotlin/kotlin/messaging/create-push.md index 500478d68..1d37c5680 100644 --- a/examples/2.3.x/server-kotlin/kotlin/messaging/create-push.md +++ b/examples/2.3.x/server-kotlin/kotlin/messaging/create-push.md @@ -30,6 +30,7 @@ val response = messaging.createPush( scheduledAt = "2020-10-15T06:38:00.000+00:00", // optional contentAvailable = false, // optional critical = false, // optional - priority = MessagePriority.NORMAL // optional + priority = MessagePriority.NORMAL, // optional + channelId = "<CHANNEL_ID>" // optional ) ``` diff --git a/examples/2.3.x/server-kotlin/kotlin/messaging/update-email.md b/examples/2.3.x/server-kotlin/kotlin/messaging/update-email.md index de4c73476..aa4c5c8aa 100644 --- a/examples/2.3.x/server-kotlin/kotlin/messaging/update-email.md +++ b/examples/2.3.x/server-kotlin/kotlin/messaging/update-email.md @@ -12,18 +12,18 @@ val messaging = Messaging(client) val response = messaging.updateEmail( messageId = "<MESSAGE_ID>", + subject = "<SUBJECT>", // optional + content = "<CONTENT>", // optional topics = listOf(), // optional users = listOf(), // optional targets = listOf(), // optional - subject = "<SUBJECT>", // optional - content = "<CONTENT>", // optional - draft = false, // optional - html = false, // optional cc = listOf(), // optional bcc = listOf(), // optional + attachments = listOf(), // optional replyToEmail = "email@example.com", // optional replyToName = "<REPLY_TO_NAME>", // optional - scheduledAt = "2020-10-15T06:38:00.000+00:00", // optional - attachments = listOf() // optional + draft = false, // optional + html = false, // optional + scheduledAt = "2020-10-15T06:38:00.000+00:00" // optional ) ``` diff --git a/examples/2.3.x/server-kotlin/kotlin/messaging/update-push.md b/examples/2.3.x/server-kotlin/kotlin/messaging/update-push.md index 9d9f24e6b..e752a99b6 100644 --- a/examples/2.3.x/server-kotlin/kotlin/messaging/update-push.md +++ b/examples/2.3.x/server-kotlin/kotlin/messaging/update-push.md @@ -13,11 +13,11 @@ val messaging = Messaging(client) val response = messaging.updatePush( messageId = "<MESSAGE_ID>", + title = "<TITLE>", // optional + body = "<BODY>", // optional topics = listOf(), // optional users = listOf(), // optional targets = listOf(), // optional - title = "<TITLE>", // optional - body = "<BODY>", // optional data = mapOf( "a" to "b" ), // optional action = "<ACTION>", // optional image = "<ID1:ID2>", // optional @@ -30,6 +30,7 @@ val response = messaging.updatePush( scheduledAt = "2020-10-15T06:38:00.000+00:00", // optional contentAvailable = false, // optional critical = false, // optional - priority = MessagePriority.NORMAL // optional + priority = MessagePriority.NORMAL, // optional + channelId = "<CHANNEL_ID>" // optional ) ``` diff --git a/examples/2.3.x/server-kotlin/kotlin/messaging/update-sms.md b/examples/2.3.x/server-kotlin/kotlin/messaging/update-sms.md index aa53bf147..7b8c9f853 100644 --- a/examples/2.3.x/server-kotlin/kotlin/messaging/update-sms.md +++ b/examples/2.3.x/server-kotlin/kotlin/messaging/update-sms.md @@ -12,10 +12,10 @@ val messaging = Messaging(client) val response = messaging.updateSMS( messageId = "<MESSAGE_ID>", + content = "<CONTENT>", // optional topics = listOf(), // optional users = listOf(), // optional targets = listOf(), // optional - content = "<CONTENT>", // optional draft = false, // optional scheduledAt = "2020-10-15T06:38:00.000+00:00" // optional ) diff --git a/examples/2.3.x/server-kotlin/kotlin/mongo/update.md b/examples/2.3.x/server-kotlin/kotlin/mongo/update.md index 3089cd928..f50ed9026 100644 --- a/examples/2.3.x/server-kotlin/kotlin/mongo/update.md +++ b/examples/2.3.x/server-kotlin/kotlin/mongo/update.md @@ -25,7 +25,7 @@ val response = mongo.update( storageAutoscaling = false, // optional storageAutoscalingThresholdPercent = 50, // optional storageAutoscalingMaxGb = 0, // optional - metricsTraceSampleRate = 0, // optional + metricsTraceSampleRate = 0.0, // optional metricsSlowQueryLogThresholdMs = 0, // optional sqlApiEnabled = false, // optional sqlApiAllowedStatements = listOf(), // optional diff --git a/examples/2.3.x/server-kotlin/kotlin/mysql/update.md b/examples/2.3.x/server-kotlin/kotlin/mysql/update.md index 1b38deedf..d20693a39 100644 --- a/examples/2.3.x/server-kotlin/kotlin/mysql/update.md +++ b/examples/2.3.x/server-kotlin/kotlin/mysql/update.md @@ -25,7 +25,7 @@ val response = mysql.update( storageAutoscaling = false, // optional storageAutoscalingThresholdPercent = 50, // optional storageAutoscalingMaxGb = 0, // optional - metricsTraceSampleRate = 0, // optional + metricsTraceSampleRate = 0.0, // optional metricsSlowQueryLogThresholdMs = 0, // optional sqlApiEnabled = false, // optional sqlApiAllowedStatements = listOf(), // optional diff --git a/examples/2.3.x/server-kotlin/kotlin/oauth2/approve.md b/examples/2.3.x/server-kotlin/kotlin/oauth2/approve.md index 7cde17080..8e7fbcbbd 100644 --- a/examples/2.3.x/server-kotlin/kotlin/oauth2/approve.md +++ b/examples/2.3.x/server-kotlin/kotlin/oauth2/approve.md @@ -11,8 +11,8 @@ val client = Client() val oauth2 = Oauth2(client) val response = oauth2.approve( - grant_id = "<GRANT_ID>", - authorization_details = "<AUTHORIZATION_DETAILS>", // optional + grantId = "<GRANT_ID>", + authorizationDetails = "<AUTHORIZATION_DETAILS>", // optional scope = "<SCOPE>" // optional ) ``` diff --git a/examples/2.3.x/server-kotlin/kotlin/oauth2/authorize-post.md b/examples/2.3.x/server-kotlin/kotlin/oauth2/authorize-post.md index 103466bca..9e24f0542 100644 --- a/examples/2.3.x/server-kotlin/kotlin/oauth2/authorize-post.md +++ b/examples/2.3.x/server-kotlin/kotlin/oauth2/authorize-post.md @@ -11,19 +11,19 @@ val client = Client() val oauth2 = Oauth2(client) val response = oauth2.authorizePost( - client_id = "<CLIENT_ID>", // optional - redirect_uri = "https://example.com", // optional - response_type = "", // optional + clientId = "<CLIENT_ID>", // optional + redirectUri = "https://example.com", // optional + responseType = "", // optional scope = "<SCOPE>", // optional state = "<STATE>", // optional nonce = "<NONCE>", // optional - code_challenge = "<CODE_CHALLENGE>", // optional - code_challenge_method = "s256", // optional + codeChallenge = "<CODE_CHALLENGE>", // optional + codeChallengeMethod = "s256", // optional prompt = "<PROMPT>", // optional - max_age = 0, // optional - authorization_details = "<AUTHORIZATION_DETAILS>", // optional + maxAge = 0, // optional + authorizationDetails = "<AUTHORIZATION_DETAILS>", // optional resource = "", // optional audience = "<AUDIENCE>", // optional - request_uri = "<REQUEST_URI>" // optional + requestUri = "<REQUEST_URI>" // optional ) ``` diff --git a/examples/2.3.x/server-kotlin/kotlin/oauth2/authorize.md b/examples/2.3.x/server-kotlin/kotlin/oauth2/authorize.md index 839bf24a2..206524295 100644 --- a/examples/2.3.x/server-kotlin/kotlin/oauth2/authorize.md +++ b/examples/2.3.x/server-kotlin/kotlin/oauth2/authorize.md @@ -11,19 +11,19 @@ val client = Client() val oauth2 = Oauth2(client) val response = oauth2.authorize( - client_id = "<CLIENT_ID>", // optional - redirect_uri = "https://example.com", // optional - response_type = "", // optional + clientId = "<CLIENT_ID>", // optional + redirectUri = "https://example.com", // optional + responseType = "", // optional scope = "<SCOPE>", // optional state = "<STATE>", // optional nonce = "<NONCE>", // optional - code_challenge = "<CODE_CHALLENGE>", // optional - code_challenge_method = "s256", // optional + codeChallenge = "<CODE_CHALLENGE>", // optional + codeChallengeMethod = "s256", // optional prompt = "<PROMPT>", // optional - max_age = 0, // optional - authorization_details = "<AUTHORIZATION_DETAILS>", // optional + maxAge = 0, // optional + authorizationDetails = "<AUTHORIZATION_DETAILS>", // optional resource = "", // optional audience = "<AUDIENCE>", // optional - request_uri = "<REQUEST_URI>" // optional + requestUri = "<REQUEST_URI>" // optional ) ``` diff --git a/examples/2.3.x/server-kotlin/kotlin/oauth2/create-device-authorization.md b/examples/2.3.x/server-kotlin/kotlin/oauth2/create-device-authorization.md index 60b7fa0d9..e2506689a 100644 --- a/examples/2.3.x/server-kotlin/kotlin/oauth2/create-device-authorization.md +++ b/examples/2.3.x/server-kotlin/kotlin/oauth2/create-device-authorization.md @@ -11,9 +11,9 @@ val client = Client() val oauth2 = Oauth2(client) val response = oauth2.createDeviceAuthorization( - client_id = "<CLIENT_ID>", // optional + clientId = "<CLIENT_ID>", // optional scope = "<SCOPE>", // optional - authorization_details = "<AUTHORIZATION_DETAILS>", // optional + authorizationDetails = "<AUTHORIZATION_DETAILS>", // optional resource = "", // optional audience = "<AUDIENCE>" // optional ) diff --git a/examples/2.3.x/server-kotlin/kotlin/oauth2/create-grant.md b/examples/2.3.x/server-kotlin/kotlin/oauth2/create-grant.md index 1fe13388d..76b4c1c97 100644 --- a/examples/2.3.x/server-kotlin/kotlin/oauth2/create-grant.md +++ b/examples/2.3.x/server-kotlin/kotlin/oauth2/create-grant.md @@ -11,6 +11,6 @@ val client = Client() val oauth2 = Oauth2(client) val response = oauth2.createGrant( - user_code = "<USER_CODE>" + userCode = "<USER_CODE>" ) ``` diff --git a/examples/2.3.x/server-kotlin/kotlin/oauth2/create-par.md b/examples/2.3.x/server-kotlin/kotlin/oauth2/create-par.md index 8d9789e1c..66496f375 100644 --- a/examples/2.3.x/server-kotlin/kotlin/oauth2/create-par.md +++ b/examples/2.3.x/server-kotlin/kotlin/oauth2/create-par.md @@ -11,17 +11,17 @@ val client = Client() val oauth2 = Oauth2(client) val response = oauth2.createPAR( - client_id = "<CLIENT_ID>", - redirect_uri = "https://example.com", - response_type = "code", + clientId = "<CLIENT_ID>", + redirectUri = "https://example.com", + responseType = "code", scope = "<SCOPE>", // optional state = "<STATE>", // optional nonce = "<NONCE>", // optional - code_challenge = "<CODE_CHALLENGE>", // optional - code_challenge_method = "s256", // optional + codeChallenge = "<CODE_CHALLENGE>", // optional + codeChallengeMethod = "s256", // optional prompt = "<PROMPT>", // optional - max_age = 0, // optional - authorization_details = "<AUTHORIZATION_DETAILS>", // optional + maxAge = 0, // optional + authorizationDetails = "<AUTHORIZATION_DETAILS>", // optional resource = "", // optional audience = "<AUDIENCE>" // optional ) diff --git a/examples/2.3.x/server-kotlin/kotlin/oauth2/create-token.md b/examples/2.3.x/server-kotlin/kotlin/oauth2/create-token.md index 6541e3aa2..8bb955cc6 100644 --- a/examples/2.3.x/server-kotlin/kotlin/oauth2/create-token.md +++ b/examples/2.3.x/server-kotlin/kotlin/oauth2/create-token.md @@ -11,14 +11,14 @@ val client = Client() val oauth2 = Oauth2(client) val response = oauth2.createToken( - grant_type = "<GRANT_TYPE>", + grantType = "<GRANT_TYPE>", code = "<CODE>", // optional - refresh_token = "<REFRESH_TOKEN>", // optional - device_code = "<DEVICE_CODE>", // optional - client_id = "<CLIENT_ID>", // optional - client_secret = "<CLIENT_SECRET>", // optional - code_verifier = "<CODE_VERIFIER>", // optional - redirect_uri = "https://example.com", // optional + refreshToken = "<REFRESH_TOKEN>", // optional + deviceCode = "<DEVICE_CODE>", // optional + clientId = "<CLIENT_ID>", // optional + clientSecret = "<CLIENT_SECRET>", // optional + codeVerifier = "<CODE_VERIFIER>", // optional + redirectUri = "https://example.com", // optional resource = "", // optional audience = "<AUDIENCE>" // optional ) diff --git a/examples/2.3.x/server-kotlin/kotlin/oauth2/get-grant.md b/examples/2.3.x/server-kotlin/kotlin/oauth2/get-grant.md index a4ef6641a..f0e642775 100644 --- a/examples/2.3.x/server-kotlin/kotlin/oauth2/get-grant.md +++ b/examples/2.3.x/server-kotlin/kotlin/oauth2/get-grant.md @@ -11,6 +11,6 @@ val client = Client() val oauth2 = Oauth2(client) val response = oauth2.getGrant( - grant_id = "<GRANT_ID>" + grantId = "<GRANT_ID>" ) ``` diff --git a/examples/2.3.x/server-kotlin/kotlin/oauth2/introspect.md b/examples/2.3.x/server-kotlin/kotlin/oauth2/introspect.md new file mode 100644 index 000000000..3107384ff --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/oauth2/introspect.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://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val oauth2 = Oauth2(client) + +val response = oauth2.introspect( + token = "<TOKEN>", + tokenTypeHint = "access_token", // optional + clientId = "<CLIENT_ID>", // optional + clientSecret = "<CLIENT_SECRET>" // optional +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/oauth2/reject.md b/examples/2.3.x/server-kotlin/kotlin/oauth2/reject.md index 88532e607..85ddd42b4 100644 --- a/examples/2.3.x/server-kotlin/kotlin/oauth2/reject.md +++ b/examples/2.3.x/server-kotlin/kotlin/oauth2/reject.md @@ -11,6 +11,6 @@ val client = Client() val oauth2 = Oauth2(client) val response = oauth2.reject( - grant_id = "<GRANT_ID>" + grantId = "<GRANT_ID>" ) ``` diff --git a/examples/2.3.x/server-kotlin/kotlin/oauth2/revoke.md b/examples/2.3.x/server-kotlin/kotlin/oauth2/revoke.md index 9d298a4ac..94cd5ec27 100644 --- a/examples/2.3.x/server-kotlin/kotlin/oauth2/revoke.md +++ b/examples/2.3.x/server-kotlin/kotlin/oauth2/revoke.md @@ -12,8 +12,8 @@ val oauth2 = Oauth2(client) val response = oauth2.revoke( token = "<TOKEN>", - token_type_hint = "access_token", // optional - client_id = "<CLIENT_ID>", // optional - client_secret = "<CLIENT_SECRET>" // optional + tokenTypeHint = "access_token", // optional + clientId = "<CLIENT_ID>", // optional + clientSecret = "<CLIENT_SECRET>" // optional ) ``` diff --git a/examples/2.3.x/server-kotlin/kotlin/organization/create-ephemeral-project-key.md b/examples/2.3.x/server-kotlin/kotlin/organization/create-ephemeral-project-key.md index df053ca63..6982b4901 100644 --- a/examples/2.3.x/server-kotlin/kotlin/organization/create-ephemeral-project-key.md +++ b/examples/2.3.x/server-kotlin/kotlin/organization/create-ephemeral-project-key.md @@ -13,7 +13,7 @@ val organization = Organization(client) val response = organization.createEphemeralProjectKey( projectId = "<PROJECT_ID>", - scopes = listOf(ProjectKeyScopes.PROJECT_READ), + scopes = listOf(ProjectKeyScopes.USERS_READ), duration = 600 ) ``` diff --git a/examples/2.3.x/server-kotlin/kotlin/organization/update-project-key.md b/examples/2.3.x/server-kotlin/kotlin/organization/update-project-key.md index 81c930dc9..8fc46f60d 100644 --- a/examples/2.3.x/server-kotlin/kotlin/organization/update-project-key.md +++ b/examples/2.3.x/server-kotlin/kotlin/organization/update-project-key.md @@ -15,7 +15,7 @@ val response = organization.updateProjectKey( projectId = "<PROJECT_ID>", keyId = "<KEY_ID>", name = "<NAME>", - scopes = listOf(ProjectKeyScopes.PROJECT_READ), + scopes = listOf(ProjectKeyScopes.USERS_READ), expire = "2020-10-15T06:38:00.000+00:00" // optional ) ``` diff --git a/examples/2.3.x/server-kotlin/kotlin/postgresql/update.md b/examples/2.3.x/server-kotlin/kotlin/postgresql/update.md index 3c3f1da54..68dbe35f4 100644 --- a/examples/2.3.x/server-kotlin/kotlin/postgresql/update.md +++ b/examples/2.3.x/server-kotlin/kotlin/postgresql/update.md @@ -25,7 +25,7 @@ val response = postgresql.update( storageAutoscaling = false, // optional storageAutoscalingThresholdPercent = 50, // optional storageAutoscalingMaxGb = 0, // optional - metricsTraceSampleRate = 0, // optional + metricsTraceSampleRate = 0.0, // optional metricsSlowQueryLogThresholdMs = 0, // optional sqlApiEnabled = false, // optional sqlApiAllowedStatements = listOf(), // optional diff --git a/examples/2.3.x/server-kotlin/kotlin/project/create-ephemeral-key.md b/examples/2.3.x/server-kotlin/kotlin/project/create-ephemeral-key.md index b29f4b406..c2a6aa08f 100644 --- a/examples/2.3.x/server-kotlin/kotlin/project/create-ephemeral-key.md +++ b/examples/2.3.x/server-kotlin/kotlin/project/create-ephemeral-key.md @@ -12,7 +12,7 @@ val client = Client() val project = Project(client) val response = project.createEphemeralKey( - scopes = listOf(ProjectKeyScopes.PROJECT_READ), + scopes = listOf(ProjectKeyScopes.USERS_READ), duration = 600 ) ``` diff --git a/examples/2.3.x/server-kotlin/kotlin/project/create-smtp-test.md b/examples/2.3.x/server-kotlin/kotlin/project/create-smtp-test.md index b457518ec..effd1d739 100644 --- a/examples/2.3.x/server-kotlin/kotlin/project/create-smtp-test.md +++ b/examples/2.3.x/server-kotlin/kotlin/project/create-smtp-test.md @@ -11,6 +11,6 @@ val client = Client() val project = Project(client) val response = project.createSMTPTest( - emails = listOf() + emails = listOf("recipient@example.com") ) ``` diff --git a/examples/2.3.x/server-kotlin/kotlin/project/update-key.md b/examples/2.3.x/server-kotlin/kotlin/project/update-key.md index 714a20e20..128c99851 100644 --- a/examples/2.3.x/server-kotlin/kotlin/project/update-key.md +++ b/examples/2.3.x/server-kotlin/kotlin/project/update-key.md @@ -14,7 +14,7 @@ val project = Project(client) val response = project.updateKey( keyId = "<KEY_ID>", name = "<NAME>", - scopes = listOf(ProjectKeyScopes.PROJECT_READ), + scopes = listOf(ProjectKeyScopes.USERS_READ), expire = "2020-10-15T06:38:00.000+00:00" // optional ) ``` diff --git a/examples/2.3.x/server-kotlin/kotlin/project/update-labels.md b/examples/2.3.x/server-kotlin/kotlin/project/update-labels.md index fd68ba524..40edc7ca5 100644 --- a/examples/2.3.x/server-kotlin/kotlin/project/update-labels.md +++ b/examples/2.3.x/server-kotlin/kotlin/project/update-labels.md @@ -11,6 +11,6 @@ val client = Client() val project = Project(client) val response = project.updateLabels( - labels = listOf() + labels = listOf("production") ) ``` diff --git a/examples/2.3.x/server-kotlin/kotlin/project/update-o-auth-2-auth-0.md b/examples/2.3.x/server-kotlin/kotlin/project/update-o-auth-2-auth-0.md index da0419765..039795a6a 100644 --- a/examples/2.3.x/server-kotlin/kotlin/project/update-o-auth-2-auth-0.md +++ b/examples/2.3.x/server-kotlin/kotlin/project/update-o-auth-2-auth-0.md @@ -2,6 +2,7 @@ import io.appwrite.Client import io.appwrite.coroutines.CoroutineCallback import io.appwrite.services.Project +import io.appwrite.enums.ProjectOAuth2Auth0Prompt val client = Client() .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint @@ -14,6 +15,7 @@ val response = project.updateOAuth2Auth0( clientId = "<CLIENT_ID>", // optional clientSecret = "<CLIENT_SECRET>", // optional endpoint = "<ENDPOINT>", // optional + prompt = listOf(ProjectOAuth2Auth0Prompt.NONE), // optional enabled = false // optional ) ``` diff --git a/examples/2.3.x/server-kotlin/kotlin/project/update-o-auth-2-discord.md b/examples/2.3.x/server-kotlin/kotlin/project/update-o-auth-2-discord.md index a4d506b3f..8c1446dd2 100644 --- a/examples/2.3.x/server-kotlin/kotlin/project/update-o-auth-2-discord.md +++ b/examples/2.3.x/server-kotlin/kotlin/project/update-o-auth-2-discord.md @@ -2,6 +2,7 @@ import io.appwrite.Client import io.appwrite.coroutines.CoroutineCallback import io.appwrite.services.Project +import io.appwrite.enums.ProjectOAuth2DiscordPrompt val client = Client() .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint @@ -13,6 +14,7 @@ val project = Project(client) val response = project.updateOAuth2Discord( clientId = "<CLIENT_ID>", // optional clientSecret = "<CLIENT_SECRET>", // optional + prompt = listOf(ProjectOAuth2DiscordPrompt.NONE), // optional enabled = false // optional ) ``` diff --git a/examples/2.3.x/server-kotlin/kotlin/project/update-o-auth-2-git-hub.md b/examples/2.3.x/server-kotlin/kotlin/project/update-o-auth-2-git-hub.md index e4070b396..b9c94d8ca 100644 --- a/examples/2.3.x/server-kotlin/kotlin/project/update-o-auth-2-git-hub.md +++ b/examples/2.3.x/server-kotlin/kotlin/project/update-o-auth-2-git-hub.md @@ -2,6 +2,7 @@ import io.appwrite.Client import io.appwrite.coroutines.CoroutineCallback import io.appwrite.services.Project +import io.appwrite.enums.ProjectOAuth2GitHubPrompt val client = Client() .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint @@ -13,6 +14,7 @@ val project = Project(client) val response = project.updateOAuth2GitHub( clientId = "<CLIENT_ID>", // optional clientSecret = "<CLIENT_SECRET>", // optional + prompt = listOf(ProjectOAuth2GitHubPrompt.SELECT_ACCOUNT), // optional enabled = false // optional ) ``` diff --git a/examples/2.3.x/server-kotlin/kotlin/project/update-o-auth-2-kakao.md b/examples/2.3.x/server-kotlin/kotlin/project/update-o-auth-2-kakao.md index 364c9b5df..8afddeb1a 100644 --- a/examples/2.3.x/server-kotlin/kotlin/project/update-o-auth-2-kakao.md +++ b/examples/2.3.x/server-kotlin/kotlin/project/update-o-auth-2-kakao.md @@ -2,6 +2,7 @@ import io.appwrite.Client import io.appwrite.coroutines.CoroutineCallback import io.appwrite.services.Project +import io.appwrite.enums.ProjectOAuth2KakaoPrompt val client = Client() .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint @@ -13,6 +14,7 @@ val project = Project(client) val response = project.updateOAuth2Kakao( clientId = "<CLIENT_ID>", // optional clientSecret = "<CLIENT_SECRET>", // optional + prompt = listOf(ProjectOAuth2KakaoPrompt.NONE), // optional enabled = false // optional ) ``` diff --git a/examples/2.3.x/server-kotlin/kotlin/project/update-o-auth-2-microsoft.md b/examples/2.3.x/server-kotlin/kotlin/project/update-o-auth-2-microsoft.md index c44372a88..41b30037f 100644 --- a/examples/2.3.x/server-kotlin/kotlin/project/update-o-auth-2-microsoft.md +++ b/examples/2.3.x/server-kotlin/kotlin/project/update-o-auth-2-microsoft.md @@ -2,6 +2,7 @@ import io.appwrite.Client import io.appwrite.coroutines.CoroutineCallback import io.appwrite.services.Project +import io.appwrite.enums.ProjectOAuth2MicrosoftPrompt val client = Client() .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint @@ -14,6 +15,7 @@ val response = project.updateOAuth2Microsoft( applicationId = "<APPLICATION_ID>", // optional applicationSecret = "<APPLICATION_SECRET>", // optional tenant = "<TENANT>", // optional + prompt = listOf(ProjectOAuth2MicrosoftPrompt.NONE), // optional enabled = false // optional ) ``` diff --git a/examples/2.3.x/server-kotlin/kotlin/project/update-o-auth-2-okta.md b/examples/2.3.x/server-kotlin/kotlin/project/update-o-auth-2-okta.md index 532079ae8..1a8fe396e 100644 --- a/examples/2.3.x/server-kotlin/kotlin/project/update-o-auth-2-okta.md +++ b/examples/2.3.x/server-kotlin/kotlin/project/update-o-auth-2-okta.md @@ -2,6 +2,7 @@ import io.appwrite.Client import io.appwrite.coroutines.CoroutineCallback import io.appwrite.services.Project +import io.appwrite.enums.ProjectOAuth2OktaPrompt val client = Client() .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint @@ -15,6 +16,7 @@ val response = project.updateOAuth2Okta( clientSecret = "<CLIENT_SECRET>", // optional domain = "example.com", // optional authorizationServerId = "<AUTHORIZATION_SERVER_ID>", // optional + prompt = listOf(ProjectOAuth2OktaPrompt.NONE), // optional enabled = false // optional ) ``` diff --git a/examples/2.3.x/server-kotlin/kotlin/project/update-o-auth-2-salesforce.md b/examples/2.3.x/server-kotlin/kotlin/project/update-o-auth-2-salesforce.md index a8b1244b4..38a5c58f4 100644 --- a/examples/2.3.x/server-kotlin/kotlin/project/update-o-auth-2-salesforce.md +++ b/examples/2.3.x/server-kotlin/kotlin/project/update-o-auth-2-salesforce.md @@ -2,6 +2,7 @@ import io.appwrite.Client import io.appwrite.coroutines.CoroutineCallback import io.appwrite.services.Project +import io.appwrite.enums.ProjectOAuth2SalesforcePrompt val client = Client() .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint @@ -13,6 +14,7 @@ val project = Project(client) val response = project.updateOAuth2Salesforce( customerKey = "<CUSTOMER_KEY>", // optional customerSecret = "<CUSTOMER_SECRET>", // optional + prompt = listOf(ProjectOAuth2SalesforcePrompt.LOGIN), // optional enabled = false // optional ) ``` diff --git a/examples/2.3.x/server-kotlin/kotlin/project/update-o-auth-2-webflow.md b/examples/2.3.x/server-kotlin/kotlin/project/update-o-auth-2-webflow.md new file mode 100644 index 000000000..e076145ff --- /dev/null +++ b/examples/2.3.x/server-kotlin/kotlin/project/update-o-auth-2-webflow.md @@ -0,0 +1,18 @@ +```kotlin +import io.appwrite.Client +import io.appwrite.coroutines.CoroutineCallback +import io.appwrite.services.Project + +val client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +val project = Project(client) + +val response = project.updateOAuth2Webflow( + clientId = "<CLIENT_ID>", // optional + clientSecret = "<CLIENT_SECRET>", // optional + enabled = false // optional +) +``` diff --git a/examples/2.3.x/server-kotlin/kotlin/project/update-o-auth-2-zoho.md b/examples/2.3.x/server-kotlin/kotlin/project/update-o-auth-2-zoho.md index 98f72a65f..84ec54c5a 100644 --- a/examples/2.3.x/server-kotlin/kotlin/project/update-o-auth-2-zoho.md +++ b/examples/2.3.x/server-kotlin/kotlin/project/update-o-auth-2-zoho.md @@ -2,6 +2,7 @@ import io.appwrite.Client import io.appwrite.coroutines.CoroutineCallback import io.appwrite.services.Project +import io.appwrite.enums.ProjectOAuth2ZohoPrompt val client = Client() .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint @@ -13,6 +14,7 @@ val project = Project(client) val response = project.updateOAuth2Zoho( clientId = "<CLIENT_ID>", // optional clientSecret = "<CLIENT_SECRET>", // optional + prompt = listOf(ProjectOAuth2ZohoPrompt.CONSENT), // optional enabled = false // optional ) ``` diff --git a/examples/2.3.x/server-kotlin/kotlin/sites/list-frameworks.md b/examples/2.3.x/server-kotlin/kotlin/sites/list-frameworks.md index 6c7aa92de..50ef800f7 100644 --- a/examples/2.3.x/server-kotlin/kotlin/sites/list-frameworks.md +++ b/examples/2.3.x/server-kotlin/kotlin/sites/list-frameworks.md @@ -10,5 +10,7 @@ val client = Client() val sites = Sites(client) -val response = sites.listFrameworks() +val response = sites.listFrameworks( + total = false // optional +) ``` diff --git a/examples/2.3.x/server-kotlin/kotlin/sites/list-specifications.md b/examples/2.3.x/server-kotlin/kotlin/sites/list-specifications.md index 12d0e9c8f..debd1aee9 100644 --- a/examples/2.3.x/server-kotlin/kotlin/sites/list-specifications.md +++ b/examples/2.3.x/server-kotlin/kotlin/sites/list-specifications.md @@ -11,6 +11,7 @@ val client = Client() val sites = Sites(client) val response = sites.listSpecifications( - type = "runtimes" // optional + type = "runtimes", // optional + total = false // optional ) ``` diff --git a/examples/2.3.x/server-kotlin/kotlin/storage/get-file-preview.md b/examples/2.3.x/server-kotlin/kotlin/storage/get-file-preview.md index a9df2c0cf..012b4616d 100644 --- a/examples/2.3.x/server-kotlin/kotlin/storage/get-file-preview.md +++ b/examples/2.3.x/server-kotlin/kotlin/storage/get-file-preview.md @@ -22,7 +22,7 @@ val result = storage.getFilePreview( borderWidth = 0, // optional borderColor = "FFFFFF", // optional borderRadius = 0, // optional - opacity = 0, // optional + opacity = 0.0, // optional rotation = -360, // optional background = "FFFFFF", // optional output = ImageFormat.JPG, // optional diff --git a/examples/2.3.x/server-kotlin/kotlin/tablesdb/create-float-column.md b/examples/2.3.x/server-kotlin/kotlin/tablesdb/create-float-column.md index 321b83c2c..7a8c7f4fc 100644 --- a/examples/2.3.x/server-kotlin/kotlin/tablesdb/create-float-column.md +++ b/examples/2.3.x/server-kotlin/kotlin/tablesdb/create-float-column.md @@ -15,8 +15,8 @@ val response = tablesDB.createFloatColumn( tableId = "<TABLE_ID>", key = "<KEY>", required = false, - min = 0, // optional - max = 100, // optional + min = 0.0, // optional + max = 100.0, // optional default = 10.5, // optional array = false // optional ) diff --git a/examples/2.3.x/server-kotlin/kotlin/tablesdb/create-index.md b/examples/2.3.x/server-kotlin/kotlin/tablesdb/create-index.md index 5364f58d1..d9b79605d 100644 --- a/examples/2.3.x/server-kotlin/kotlin/tablesdb/create-index.md +++ b/examples/2.3.x/server-kotlin/kotlin/tablesdb/create-index.md @@ -17,7 +17,7 @@ val response = tablesDB.createIndex( tableId = "<TABLE_ID>", key = "<KEY>", type = TablesDBIndexType.KEY, - columns = listOf(), + columns = listOf("username"), orders = listOf(OrderBy.ASC), // optional lengths = listOf() // optional ) diff --git a/examples/2.3.x/server-kotlin/kotlin/tablesdb/create-rows.md b/examples/2.3.x/server-kotlin/kotlin/tablesdb/create-rows.md index 5cb02b780..857e2f1c0 100644 --- a/examples/2.3.x/server-kotlin/kotlin/tablesdb/create-rows.md +++ b/examples/2.3.x/server-kotlin/kotlin/tablesdb/create-rows.md @@ -13,7 +13,14 @@ val tablesDB = TablesDB(client) val response = tablesDB.createRows( databaseId = "<DATABASE_ID>", tableId = "<TABLE_ID>", - rows = listOf(), + rows = listOf(mapOf( + "\$id" to "example1", + "username" to "walter.obrien", + "email" to "walter.obrien@example.com", + "fullName" to "Walter O'Brien", + "age" to 30, + "isAdmin" to false + )), transactionId = "<TRANSACTION_ID>" // optional ) ``` diff --git a/examples/2.3.x/server-kotlin/kotlin/tablesdb/decrement-row-column.md b/examples/2.3.x/server-kotlin/kotlin/tablesdb/decrement-row-column.md index bba950a9d..8591f02a4 100644 --- a/examples/2.3.x/server-kotlin/kotlin/tablesdb/decrement-row-column.md +++ b/examples/2.3.x/server-kotlin/kotlin/tablesdb/decrement-row-column.md @@ -15,8 +15,8 @@ val response = tablesDB.decrementRowColumn( tableId = "<TABLE_ID>", rowId = "<ROW_ID>", column = "<COLUMN>", - value = 1, // optional - min = 0, // optional + value = 1.0, // optional + min = 0.0, // optional transactionId = "<TRANSACTION_ID>" // optional ) ``` diff --git a/examples/2.3.x/server-kotlin/kotlin/tablesdb/delete-rows.md b/examples/2.3.x/server-kotlin/kotlin/tablesdb/delete-rows.md index 00cd5abe0..faee1ca15 100644 --- a/examples/2.3.x/server-kotlin/kotlin/tablesdb/delete-rows.md +++ b/examples/2.3.x/server-kotlin/kotlin/tablesdb/delete-rows.md @@ -13,7 +13,7 @@ val tablesDB = TablesDB(client) val response = tablesDB.deleteRows( databaseId = "<DATABASE_ID>", tableId = "<TABLE_ID>", - queries = listOf(), // optional + queries = listOf("{\"method\":\"equal\", \"attribute\":\"\$id\", \"values\":[\"<ROW_ID>\"]}"), // optional transactionId = "<TRANSACTION_ID>" // optional ) ``` diff --git a/examples/2.3.x/server-kotlin/kotlin/tablesdb/increment-row-column.md b/examples/2.3.x/server-kotlin/kotlin/tablesdb/increment-row-column.md index ad4056d4d..2cab28526 100644 --- a/examples/2.3.x/server-kotlin/kotlin/tablesdb/increment-row-column.md +++ b/examples/2.3.x/server-kotlin/kotlin/tablesdb/increment-row-column.md @@ -15,8 +15,8 @@ val response = tablesDB.incrementRowColumn( tableId = "<TABLE_ID>", rowId = "<ROW_ID>", column = "<COLUMN>", - value = 1, // optional - max = 100, // optional + value = 1.0, // optional + max = 100.0, // optional transactionId = "<TRANSACTION_ID>" // optional ) ``` diff --git a/examples/2.3.x/server-kotlin/kotlin/tablesdb/list-transactions.md b/examples/2.3.x/server-kotlin/kotlin/tablesdb/list-transactions.md index 52ebbefbb..e28a6e163 100644 --- a/examples/2.3.x/server-kotlin/kotlin/tablesdb/list-transactions.md +++ b/examples/2.3.x/server-kotlin/kotlin/tablesdb/list-transactions.md @@ -11,6 +11,7 @@ val client = Client() val tablesDB = TablesDB(client) val response = tablesDB.listTransactions( - queries = listOf() // optional + queries = listOf(), // optional + total = false // optional ) ``` diff --git a/examples/2.3.x/server-kotlin/kotlin/tablesdb/update-float-column.md b/examples/2.3.x/server-kotlin/kotlin/tablesdb/update-float-column.md index 4d156e060..56b836501 100644 --- a/examples/2.3.x/server-kotlin/kotlin/tablesdb/update-float-column.md +++ b/examples/2.3.x/server-kotlin/kotlin/tablesdb/update-float-column.md @@ -16,8 +16,8 @@ val response = tablesDB.updateFloatColumn( key = "<KEY>", required = false, default = 10.5, - min = 0, // optional - max = 100, // optional + min = 0.0, // optional + max = 100.0, // optional newKey = "<NEW_KEY>" // optional ) ``` diff --git a/examples/2.3.x/server-kotlin/kotlin/tablesdb/upsert-rows.md b/examples/2.3.x/server-kotlin/kotlin/tablesdb/upsert-rows.md index 5ee9beb6c..96a6b8b99 100644 --- a/examples/2.3.x/server-kotlin/kotlin/tablesdb/upsert-rows.md +++ b/examples/2.3.x/server-kotlin/kotlin/tablesdb/upsert-rows.md @@ -13,7 +13,14 @@ val tablesDB = TablesDB(client) val response = tablesDB.upsertRows( databaseId = "<DATABASE_ID>", tableId = "<TABLE_ID>", - rows = listOf(), + rows = listOf(mapOf( + "\$id" to "example1", + "username" to "walter.obrien", + "email" to "walter.obrien@example.com", + "fullName" to "Walter O'Brien", + "age" to 30, + "isAdmin" to false + )), transactionId = "<TRANSACTION_ID>" // optional ) ``` diff --git a/examples/2.3.x/server-kotlin/kotlin/teams/create-membership.md b/examples/2.3.x/server-kotlin/kotlin/teams/create-membership.md index 8a27e6ea2..23a5016d7 100644 --- a/examples/2.3.x/server-kotlin/kotlin/teams/create-membership.md +++ b/examples/2.3.x/server-kotlin/kotlin/teams/create-membership.md @@ -12,7 +12,7 @@ val teams = Teams(client) val response = teams.createMembership( teamId = "<TEAM_ID>", - roles = listOf(), + roles = listOf("editor"), email = "email@example.com", // optional userId = "<USER_ID>", // optional phone = "+12065550100", // optional diff --git a/examples/2.3.x/server-kotlin/kotlin/teams/update-membership.md b/examples/2.3.x/server-kotlin/kotlin/teams/update-membership.md index 51e01d69c..0de04daf7 100644 --- a/examples/2.3.x/server-kotlin/kotlin/teams/update-membership.md +++ b/examples/2.3.x/server-kotlin/kotlin/teams/update-membership.md @@ -13,6 +13,6 @@ val teams = Teams(client) val response = teams.updateMembership( teamId = "<TEAM_ID>", membershipId = "<MEMBERSHIP_ID>", - roles = listOf() + roles = listOf("editor") ) ``` diff --git a/examples/2.3.x/server-kotlin/kotlin/users/update-labels.md b/examples/2.3.x/server-kotlin/kotlin/users/update-labels.md index 3d88c7aff..04c0109a1 100644 --- a/examples/2.3.x/server-kotlin/kotlin/users/update-labels.md +++ b/examples/2.3.x/server-kotlin/kotlin/users/update-labels.md @@ -12,6 +12,6 @@ val users = Users(client) val response = users.updateLabels( userId = "<USER_ID>", - labels = listOf() + labels = listOf("subscriber") ) ``` diff --git a/examples/2.3.x/server-kotlin/kotlin/vectorsdb/create-collection.md b/examples/2.3.x/server-kotlin/kotlin/vectorsdb/create-collection.md index 0cd1e4a51..5173b280f 100644 --- a/examples/2.3.x/server-kotlin/kotlin/vectorsdb/create-collection.md +++ b/examples/2.3.x/server-kotlin/kotlin/vectorsdb/create-collection.md @@ -16,7 +16,7 @@ val response = vectorsDB.createCollection( databaseId = "<DATABASE_ID>", collectionId = "<COLLECTION_ID>", name = "<NAME>", - dimension = 1, + dimension = 4, permissions = listOf(Permission.read(Role.any())), // optional documentSecurity = false, // optional enabled = false // optional diff --git a/examples/2.3.x/server-kotlin/kotlin/vectorsdb/create-documents.md b/examples/2.3.x/server-kotlin/kotlin/vectorsdb/create-documents.md index 3a79fd2db..5329c97bc 100644 --- a/examples/2.3.x/server-kotlin/kotlin/vectorsdb/create-documents.md +++ b/examples/2.3.x/server-kotlin/kotlin/vectorsdb/create-documents.md @@ -13,7 +13,13 @@ val vectorsDB = VectorsDB(client) val response = vectorsDB.createDocuments( databaseId = "<DATABASE_ID>", collectionId = "<COLLECTION_ID>", - documents = listOf(), + documents = listOf(mapOf( + "\$id" to "example1", + "embeddings" to listOf(0.12, -0.55, 0.88, 1.02), + "metadata" to mapOf( + "name" to "First document" + ) + )), transactionId = "<TRANSACTION_ID>" // optional ) ``` diff --git a/examples/2.3.x/server-kotlin/kotlin/vectorsdb/create-index.md b/examples/2.3.x/server-kotlin/kotlin/vectorsdb/create-index.md index 76e691162..ff7b7d44c 100644 --- a/examples/2.3.x/server-kotlin/kotlin/vectorsdb/create-index.md +++ b/examples/2.3.x/server-kotlin/kotlin/vectorsdb/create-index.md @@ -17,7 +17,7 @@ val response = vectorsDB.createIndex( collectionId = "<COLLECTION_ID>", key = "<KEY>", type = VectorsDBIndexType.HNSW_EUCLIDEAN, - attributes = listOf(), + attributes = listOf("embeddings"), orders = listOf(OrderBy.ASC), // optional lengths = listOf() // optional ) diff --git a/examples/2.3.x/server-kotlin/kotlin/vectorsdb/create-operations.md b/examples/2.3.x/server-kotlin/kotlin/vectorsdb/create-operations.md index f6bc63626..b22911764 100644 --- a/examples/2.3.x/server-kotlin/kotlin/vectorsdb/create-operations.md +++ b/examples/2.3.x/server-kotlin/kotlin/vectorsdb/create-operations.md @@ -18,7 +18,10 @@ val response = vectorsDB.createOperations( "collectionId" to "<COLLECTION_ID>", "documentId" to "<DOCUMENT_ID>", "data" to mapOf( - "name" to "Walter O'Brien" + "embeddings" to listOf(0.12, -0.55, 0.88, 1.02), + "metadata" to mapOf( + "name" to "First document" + ) ) )) // optional ) diff --git a/examples/2.3.x/server-kotlin/kotlin/vectorsdb/delete-documents.md b/examples/2.3.x/server-kotlin/kotlin/vectorsdb/delete-documents.md index 53ecd505d..ca349daa5 100644 --- a/examples/2.3.x/server-kotlin/kotlin/vectorsdb/delete-documents.md +++ b/examples/2.3.x/server-kotlin/kotlin/vectorsdb/delete-documents.md @@ -13,7 +13,7 @@ val vectorsDB = VectorsDB(client) val response = vectorsDB.deleteDocuments( databaseId = "<DATABASE_ID>", collectionId = "<COLLECTION_ID>", - queries = listOf(), // optional + queries = listOf("{\"method\":\"equal\", \"attribute\":\"\$id\", \"values\":[\"<DOCUMENT_ID>\"]}"), // optional transactionId = "<TRANSACTION_ID>" // optional ) ``` diff --git a/examples/2.3.x/server-kotlin/kotlin/vectorsdb/list-transactions.md b/examples/2.3.x/server-kotlin/kotlin/vectorsdb/list-transactions.md index 3801d18e7..8d91507e3 100644 --- a/examples/2.3.x/server-kotlin/kotlin/vectorsdb/list-transactions.md +++ b/examples/2.3.x/server-kotlin/kotlin/vectorsdb/list-transactions.md @@ -11,6 +11,7 @@ val client = Client() val vectorsDB = VectorsDB(client) val response = vectorsDB.listTransactions( - queries = listOf() // optional + queries = listOf(), // optional + total = false // optional ) ``` diff --git a/examples/2.3.x/server-kotlin/kotlin/vectorsdb/update-collection.md b/examples/2.3.x/server-kotlin/kotlin/vectorsdb/update-collection.md index 331c85c27..bdfd380e0 100644 --- a/examples/2.3.x/server-kotlin/kotlin/vectorsdb/update-collection.md +++ b/examples/2.3.x/server-kotlin/kotlin/vectorsdb/update-collection.md @@ -16,7 +16,7 @@ val response = vectorsDB.updateCollection( databaseId = "<DATABASE_ID>", collectionId = "<COLLECTION_ID>", name = "<NAME>", - dimension = 1, // optional + dimension = 4, // optional permissions = listOf(Permission.read(Role.any())), // optional documentSecurity = false, // optional enabled = false // optional diff --git a/examples/2.3.x/server-kotlin/kotlin/vectorsdb/upsert-documents.md b/examples/2.3.x/server-kotlin/kotlin/vectorsdb/upsert-documents.md index 717222282..3b4f4af39 100644 --- a/examples/2.3.x/server-kotlin/kotlin/vectorsdb/upsert-documents.md +++ b/examples/2.3.x/server-kotlin/kotlin/vectorsdb/upsert-documents.md @@ -13,7 +13,13 @@ val vectorsDB = VectorsDB(client) val response = vectorsDB.upsertDocuments( databaseId = "<DATABASE_ID>", collectionId = "<COLLECTION_ID>", - documents = listOf(), + documents = listOf(mapOf( + "\$id" to "example1", + "embeddings" to listOf(0.12, -0.55, 0.88, 1.02), + "metadata" to mapOf( + "name" to "First document" + ) + )), transactionId = "<TRANSACTION_ID>" // optional ) ``` diff --git a/examples/2.3.x/server-kotlin/kotlin/webhooks/create.md b/examples/2.3.x/server-kotlin/kotlin/webhooks/create.md index 5de5b5593..470adc247 100644 --- a/examples/2.3.x/server-kotlin/kotlin/webhooks/create.md +++ b/examples/2.3.x/server-kotlin/kotlin/webhooks/create.md @@ -14,7 +14,7 @@ val response = webhooks.create( webhookId = "<WEBHOOK_ID>", url = "https://example.com/webhook", name = "<NAME>", - events = listOf(), + events = listOf("users.*.create"), enabled = false, // optional tls = false, // optional authUsername = "<AUTH_USERNAME>", // optional diff --git a/examples/2.3.x/server-kotlin/kotlin/webhooks/update.md b/examples/2.3.x/server-kotlin/kotlin/webhooks/update.md index daa1706a9..c2a704008 100644 --- a/examples/2.3.x/server-kotlin/kotlin/webhooks/update.md +++ b/examples/2.3.x/server-kotlin/kotlin/webhooks/update.md @@ -14,7 +14,7 @@ val response = webhooks.update( webhookId = "<WEBHOOK_ID>", name = "<NAME>", url = "https://example.com/webhook", - events = listOf(), + events = listOf("users.*.create"), enabled = false, // optional tls = false, // optional authUsername = "<AUTH_USERNAME>", // optional diff --git a/examples/2.3.x/server-nodejs/examples/account/create-email-password-session.md b/examples/2.3.x/server-nodejs/examples/account/create-email-password-session.md index fcc1ff183..f6ce44a12 100644 --- a/examples/2.3.x/server-nodejs/examples/account/create-email-password-session.md +++ b/examples/2.3.x/server-nodejs/examples/account/create-email-password-session.md @@ -11,5 +11,6 @@ const account = new sdk.Account(client); const result = await account.createEmailPasswordSession({ email: 'email@example.com', password: 'password', + duration: 60, // optional }); ``` diff --git a/examples/2.3.x/server-nodejs/examples/account/delete-sessions.md b/examples/2.3.x/server-nodejs/examples/account/delete-sessions.md index 912575cea..d65f323da 100644 --- a/examples/2.3.x/server-nodejs/examples/account/delete-sessions.md +++ b/examples/2.3.x/server-nodejs/examples/account/delete-sessions.md @@ -8,5 +8,7 @@ const client = new sdk.Client() const account = new sdk.Account(client); -const result = await account.deleteSessions(); +const result = await account.deleteSessions({ + current: false, // optional +}); ``` diff --git a/examples/2.3.x/server-nodejs/examples/account/list-sessions.md b/examples/2.3.x/server-nodejs/examples/account/list-sessions.md index 0bbd093e9..a2d096018 100644 --- a/examples/2.3.x/server-nodejs/examples/account/list-sessions.md +++ b/examples/2.3.x/server-nodejs/examples/account/list-sessions.md @@ -8,5 +8,7 @@ const client = new sdk.Client() const account = new sdk.Account(client); -const result = await account.listSessions(); +const result = await account.listSessions({ + total: false, // optional +}); ``` diff --git a/examples/2.3.x/server-nodejs/examples/analytics/create-event.md b/examples/2.3.x/server-nodejs/examples/analytics/create-event.md new file mode 100644 index 000000000..227ae6e29 --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/analytics/create-event.md @@ -0,0 +1,26 @@ +```javascript +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +const analytics = new sdk.Analytics(client); + +const result = await analytics.createEvent({ + propertyId: '<PROPERTY_ID>', + name: '<NAME>', + url: 'https://example.com', + domain: '<DOMAIN>', // optional + referrer: '<REFERRER>', // optional + screenWidth: null, // optional + sessionHash: '<SESSION_HASH>', // optional + scrollDepth: 0, // optional + engagementTime: null, // optional + props: [], // optional + userId: '<USER_ID>', // optional + ip: '<IP>', // optional + userAgent: '<USER_AGENT>', // optional +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/analytics/create-property.md b/examples/2.3.x/server-nodejs/examples/analytics/create-property.md new file mode 100644 index 000000000..d3a344287 --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/analytics/create-property.md @@ -0,0 +1,20 @@ +```javascript +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const analytics = new sdk.Analytics(client); + +const result = await analytics.createProperty({ + propertyId: '<PROPERTY_ID>', + name: '<NAME>', + domain: '<DOMAIN>', // optional + timezone: '<TIMEZONE>', // optional + enabled: false, // optional + xpublic: false, // optional + allowedOrigins: [], // optional +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/analytics/delete-property.md b/examples/2.3.x/server-nodejs/examples/analytics/delete-property.md new file mode 100644 index 000000000..a187eb9f7 --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/analytics/delete-property.md @@ -0,0 +1,14 @@ +```javascript +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const analytics = new sdk.Analytics(client); + +const result = await analytics.deleteProperty({ + propertyId: '<PROPERTY_ID>', +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/analytics/get-property.md b/examples/2.3.x/server-nodejs/examples/analytics/get-property.md new file mode 100644 index 000000000..acff67224 --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/analytics/get-property.md @@ -0,0 +1,14 @@ +```javascript +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const analytics = new sdk.Analytics(client); + +const result = await analytics.getProperty({ + propertyId: '<PROPERTY_ID>', +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/analytics/list-metrics.md b/examples/2.3.x/server-nodejs/examples/analytics/list-metrics.md new file mode 100644 index 000000000..b303d72c8 --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/analytics/list-metrics.md @@ -0,0 +1,21 @@ +```javascript +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const analytics = new sdk.Analytics(client); + +const result = await analytics.listMetrics({ + propertyId: '<PROPERTY_ID>', + queries: [], // optional + interval: sdk.AnalyticsInterval.OneHour, // optional + dimensions: [sdk.AnalyticsDimension.Country], // optional + dateRange: '<DATE_RANGE>', // optional + startAt: '2020-10-15T06:38:00.000+00:00', // optional + endAt: '2020-10-15T06:38:00.000+00:00', // optional + limit: 1, // optional +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/analytics/list-properties.md b/examples/2.3.x/server-nodejs/examples/analytics/list-properties.md new file mode 100644 index 000000000..ad91f6994 --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/analytics/list-properties.md @@ -0,0 +1,16 @@ +```javascript +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const analytics = new sdk.Analytics(client); + +const result = await analytics.listProperties({ + queries: [], // optional + search: '<SEARCH>', // optional + total: false, // optional +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/analytics/update-property.md b/examples/2.3.x/server-nodejs/examples/analytics/update-property.md new file mode 100644 index 000000000..6fd125fc4 --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/analytics/update-property.md @@ -0,0 +1,20 @@ +```javascript +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const analytics = new sdk.Analytics(client); + +const result = await analytics.updateProperty({ + propertyId: '<PROPERTY_ID>', + name: '<NAME>', // optional + domain: '<DOMAIN>', // optional + timezone: '<TIMEZONE>', // optional + enabled: false, // optional + xpublic: false, // optional + allowedOrigins: [], // optional +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/avatars/delete-photo.md b/examples/2.3.x/server-nodejs/examples/avatars/delete-photo.md new file mode 100644 index 000000000..7f36a1c33 --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/avatars/delete-photo.md @@ -0,0 +1,12 @@ +```javascript +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +const avatars = new sdk.Avatars(client); + +const result = await avatars.deletePhoto(); +``` diff --git a/examples/2.3.x/server-nodejs/examples/avatars/get-screenshot.md b/examples/2.3.x/server-nodejs/examples/avatars/get-screenshot.md index 708db1ca9..737bfcfc3 100644 --- a/examples/2.3.x/server-nodejs/examples/avatars/get-screenshot.md +++ b/examples/2.3.x/server-nodejs/examples/avatars/get-screenshot.md @@ -11,8 +11,7 @@ const avatars = new sdk.Avatars(client); const result = await avatars.getScreenshot({ url: 'https://example.com', headers: { - Authorization: 'Bearer token123', - 'X-Custom-Header': 'value', + 'Accept-Language': 'en-US,en;q=0.9', }, // optional viewportWidth: 1920, // optional viewportHeight: 1080, // optional diff --git a/examples/2.3.x/server-nodejs/examples/avatars/update-photo.md b/examples/2.3.x/server-nodejs/examples/avatars/update-photo.md new file mode 100644 index 000000000..5019adf7c --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/avatars/update-photo.md @@ -0,0 +1,15 @@ +```javascript +const sdk = require('node-appwrite'); +const fs = require('fs'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setSession(''); // The user session to authenticate with + +const avatars = new sdk.Avatars(client); + +const result = await avatars.updatePhoto({ + file: InputFile.fromPath('/path/to/file', 'filename'), +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/databases/create-documents.md b/examples/2.3.x/server-nodejs/examples/databases/create-documents.md index 29f12043a..71f797c92 100644 --- a/examples/2.3.x/server-nodejs/examples/databases/create-documents.md +++ b/examples/2.3.x/server-nodejs/examples/databases/create-documents.md @@ -11,7 +11,16 @@ const databases = new sdk.Databases(client); const result = await databases.createDocuments({ databaseId: '<DATABASE_ID>', collectionId: '<COLLECTION_ID>', - documents: [], + documents: [ + { + $id: 'example1', + username: 'walter.obrien', + email: 'walter.obrien@example.com', + fullName: "Walter O'Brien", + age: 30, + isAdmin: false, + }, + ], transactionId: '<TRANSACTION_ID>', // optional }); ``` diff --git a/examples/2.3.x/server-nodejs/examples/databases/create-index.md b/examples/2.3.x/server-nodejs/examples/databases/create-index.md index 095bd46a8..ae2437852 100644 --- a/examples/2.3.x/server-nodejs/examples/databases/create-index.md +++ b/examples/2.3.x/server-nodejs/examples/databases/create-index.md @@ -13,7 +13,7 @@ const result = await databases.createIndex({ collectionId: '<COLLECTION_ID>', key: '<KEY>', type: sdk.DatabasesIndexType.Key, - attributes: [], + attributes: ['username'], orders: [sdk.OrderBy.Asc], // optional lengths: [], // optional }); diff --git a/examples/2.3.x/server-nodejs/examples/databases/delete-documents.md b/examples/2.3.x/server-nodejs/examples/databases/delete-documents.md index 682c0e7bc..11e6437f2 100644 --- a/examples/2.3.x/server-nodejs/examples/databases/delete-documents.md +++ b/examples/2.3.x/server-nodejs/examples/databases/delete-documents.md @@ -11,7 +11,9 @@ const databases = new sdk.Databases(client); const result = await databases.deleteDocuments({ databaseId: '<DATABASE_ID>', collectionId: '<COLLECTION_ID>', - queries: [], // optional + queries: [ + '{"method":"equal", "attribute":"$id", "values":["<DOCUMENT_ID>"]}', + ], // optional transactionId: '<TRANSACTION_ID>', // optional }); ``` diff --git a/examples/2.3.x/server-nodejs/examples/databases/list-transactions.md b/examples/2.3.x/server-nodejs/examples/databases/list-transactions.md index c33568281..2accdeaf9 100644 --- a/examples/2.3.x/server-nodejs/examples/databases/list-transactions.md +++ b/examples/2.3.x/server-nodejs/examples/databases/list-transactions.md @@ -10,5 +10,6 @@ const databases = new sdk.Databases(client); const result = await databases.listTransactions({ queries: [], // optional + total: false, // optional }); ``` diff --git a/examples/2.3.x/server-nodejs/examples/databases/upsert-documents.md b/examples/2.3.x/server-nodejs/examples/databases/upsert-documents.md index aa2535473..b7054cbd4 100644 --- a/examples/2.3.x/server-nodejs/examples/databases/upsert-documents.md +++ b/examples/2.3.x/server-nodejs/examples/databases/upsert-documents.md @@ -11,7 +11,16 @@ const databases = new sdk.Databases(client); const result = await databases.upsertDocuments({ databaseId: '<DATABASE_ID>', collectionId: '<COLLECTION_ID>', - documents: [], + documents: [ + { + $id: 'example1', + username: 'walter.obrien', + email: 'walter.obrien@example.com', + fullName: "Walter O'Brien", + age: 30, + isAdmin: false, + }, + ], transactionId: '<TRANSACTION_ID>', // optional }); ``` diff --git a/examples/2.3.x/server-nodejs/examples/documentsdb/create-documents.md b/examples/2.3.x/server-nodejs/examples/documentsdb/create-documents.md index 298af8c6a..d3d645979 100644 --- a/examples/2.3.x/server-nodejs/examples/documentsdb/create-documents.md +++ b/examples/2.3.x/server-nodejs/examples/documentsdb/create-documents.md @@ -11,7 +11,16 @@ const documentsDB = new sdk.DocumentsDB(client); const result = await documentsDB.createDocuments({ databaseId: '<DATABASE_ID>', collectionId: '<COLLECTION_ID>', - documents: [], + documents: [ + { + $id: 'example1', + username: 'walter.obrien', + email: 'walter.obrien@example.com', + fullName: "Walter O'Brien", + age: 30, + isAdmin: false, + }, + ], transactionId: '<TRANSACTION_ID>', // optional }); ``` diff --git a/examples/2.3.x/server-nodejs/examples/documentsdb/create-index.md b/examples/2.3.x/server-nodejs/examples/documentsdb/create-index.md index 72e4669c1..40035eadf 100644 --- a/examples/2.3.x/server-nodejs/examples/documentsdb/create-index.md +++ b/examples/2.3.x/server-nodejs/examples/documentsdb/create-index.md @@ -13,7 +13,7 @@ const result = await documentsDB.createIndex({ collectionId: '<COLLECTION_ID>', key: '<KEY>', type: sdk.DocumentsDBIndexType.Key, - attributes: [], + attributes: ['username'], orders: [sdk.OrderBy.Asc], // optional lengths: [], // optional }); diff --git a/examples/2.3.x/server-nodejs/examples/documentsdb/delete-documents.md b/examples/2.3.x/server-nodejs/examples/documentsdb/delete-documents.md index 9bb214ee7..97415eb45 100644 --- a/examples/2.3.x/server-nodejs/examples/documentsdb/delete-documents.md +++ b/examples/2.3.x/server-nodejs/examples/documentsdb/delete-documents.md @@ -11,7 +11,9 @@ const documentsDB = new sdk.DocumentsDB(client); const result = await documentsDB.deleteDocuments({ databaseId: '<DATABASE_ID>', collectionId: '<COLLECTION_ID>', - queries: [], // optional + queries: [ + '{"method":"equal", "attribute":"$id", "values":["<DOCUMENT_ID>"]}', + ], // optional transactionId: '<TRANSACTION_ID>', // optional }); ``` diff --git a/examples/2.3.x/server-nodejs/examples/documentsdb/list-transactions.md b/examples/2.3.x/server-nodejs/examples/documentsdb/list-transactions.md index 8bc66d4b6..8ea781a1d 100644 --- a/examples/2.3.x/server-nodejs/examples/documentsdb/list-transactions.md +++ b/examples/2.3.x/server-nodejs/examples/documentsdb/list-transactions.md @@ -10,5 +10,6 @@ const documentsDB = new sdk.DocumentsDB(client); const result = await documentsDB.listTransactions({ queries: [], // optional + total: false, // optional }); ``` diff --git a/examples/2.3.x/server-nodejs/examples/documentsdb/upsert-documents.md b/examples/2.3.x/server-nodejs/examples/documentsdb/upsert-documents.md index 23b522008..ba03ebe66 100644 --- a/examples/2.3.x/server-nodejs/examples/documentsdb/upsert-documents.md +++ b/examples/2.3.x/server-nodejs/examples/documentsdb/upsert-documents.md @@ -11,7 +11,16 @@ const documentsDB = new sdk.DocumentsDB(client); const result = await documentsDB.upsertDocuments({ databaseId: '<DATABASE_ID>', collectionId: '<COLLECTION_ID>', - documents: [], + documents: [ + { + $id: 'example1', + username: 'walter.obrien', + email: 'walter.obrien@example.com', + fullName: "Walter O'Brien", + age: 30, + isAdmin: false, + }, + ], transactionId: '<TRANSACTION_ID>', // optional }); ``` diff --git a/examples/2.3.x/server-nodejs/examples/embeddings/create-text-embeddings.md b/examples/2.3.x/server-nodejs/examples/embeddings/create-text-embeddings.md index 537a44021..68fdb1d9e 100644 --- a/examples/2.3.x/server-nodejs/examples/embeddings/create-text-embeddings.md +++ b/examples/2.3.x/server-nodejs/examples/embeddings/create-text-embeddings.md @@ -9,7 +9,10 @@ const client = new sdk.Client() const embeddings = new sdk.Embeddings(client); const result = await embeddings.createTextEmbeddings({ - texts: [], + texts: [ + 'Appwrite helps developers build applications.', + 'Find documents with semantic search.', + ], model: sdk.EmbeddingModel.NomicEmbedText, // optional }); ``` diff --git a/examples/2.3.x/server-nodejs/examples/functions/list-runtimes.md b/examples/2.3.x/server-nodejs/examples/functions/list-runtimes.md index fdaefd3ae..4989aef05 100644 --- a/examples/2.3.x/server-nodejs/examples/functions/list-runtimes.md +++ b/examples/2.3.x/server-nodejs/examples/functions/list-runtimes.md @@ -8,5 +8,7 @@ const client = new sdk.Client() const functions = new sdk.Functions(client); -const result = await functions.listRuntimes(); +const result = await functions.listRuntimes({ + total: false, // optional +}); ``` diff --git a/examples/2.3.x/server-nodejs/examples/functions/list-specifications.md b/examples/2.3.x/server-nodejs/examples/functions/list-specifications.md index f779206d4..f2205c09a 100644 --- a/examples/2.3.x/server-nodejs/examples/functions/list-specifications.md +++ b/examples/2.3.x/server-nodejs/examples/functions/list-specifications.md @@ -10,5 +10,6 @@ const functions = new sdk.Functions(client); const result = await functions.listSpecifications({ type: 'runtimes', // optional + total: false, // optional }); ``` diff --git a/examples/2.3.x/server-nodejs/examples/graphql/mutation.md b/examples/2.3.x/server-nodejs/examples/graphql/mutation.md index cb60aa527..31f0b604a 100644 --- a/examples/2.3.x/server-nodejs/examples/graphql/mutation.md +++ b/examples/2.3.x/server-nodejs/examples/graphql/mutation.md @@ -9,6 +9,8 @@ const client = new sdk.Client() const graphql = new sdk.Graphql(client); const result = await graphql.mutation({ - query: {}, + query: { + query: 'mutation { accountUpdateName(name: "Walter") { name } }', + }, }); ``` diff --git a/examples/2.3.x/server-nodejs/examples/graphql/query.md b/examples/2.3.x/server-nodejs/examples/graphql/query.md index 86ba69626..c68610532 100644 --- a/examples/2.3.x/server-nodejs/examples/graphql/query.md +++ b/examples/2.3.x/server-nodejs/examples/graphql/query.md @@ -9,6 +9,8 @@ const client = new sdk.Client() const graphql = new sdk.Graphql(client); const result = await graphql.query({ - query: {}, + query: { + query: 'query { localeGet { ip } }', + }, }); ``` diff --git a/examples/2.3.x/server-nodejs/examples/locale/list-codes.md b/examples/2.3.x/server-nodejs/examples/locale/list-codes.md index 136992f40..0d173beb8 100644 --- a/examples/2.3.x/server-nodejs/examples/locale/list-codes.md +++ b/examples/2.3.x/server-nodejs/examples/locale/list-codes.md @@ -8,5 +8,7 @@ const client = new sdk.Client() const locale = new sdk.Locale(client); -const result = await locale.listCodes(); +const result = await locale.listCodes({ + total: false, // optional +}); ``` diff --git a/examples/2.3.x/server-nodejs/examples/locale/list-continents.md b/examples/2.3.x/server-nodejs/examples/locale/list-continents.md index aa58ec572..13a334544 100644 --- a/examples/2.3.x/server-nodejs/examples/locale/list-continents.md +++ b/examples/2.3.x/server-nodejs/examples/locale/list-continents.md @@ -8,5 +8,7 @@ const client = new sdk.Client() const locale = new sdk.Locale(client); -const result = await locale.listContinents(); +const result = await locale.listContinents({ + total: false, // optional +}); ``` diff --git a/examples/2.3.x/server-nodejs/examples/locale/list-countries-eu.md b/examples/2.3.x/server-nodejs/examples/locale/list-countries-eu.md index 538b49271..dbd873c43 100644 --- a/examples/2.3.x/server-nodejs/examples/locale/list-countries-eu.md +++ b/examples/2.3.x/server-nodejs/examples/locale/list-countries-eu.md @@ -8,5 +8,7 @@ const client = new sdk.Client() const locale = new sdk.Locale(client); -const result = await locale.listCountriesEU(); +const result = await locale.listCountriesEU({ + total: false, // optional +}); ``` diff --git a/examples/2.3.x/server-nodejs/examples/locale/list-countries-phones.md b/examples/2.3.x/server-nodejs/examples/locale/list-countries-phones.md index c27014185..dee00d082 100644 --- a/examples/2.3.x/server-nodejs/examples/locale/list-countries-phones.md +++ b/examples/2.3.x/server-nodejs/examples/locale/list-countries-phones.md @@ -8,5 +8,7 @@ const client = new sdk.Client() const locale = new sdk.Locale(client); -const result = await locale.listCountriesPhones(); +const result = await locale.listCountriesPhones({ + total: false, // optional +}); ``` diff --git a/examples/2.3.x/server-nodejs/examples/locale/list-countries.md b/examples/2.3.x/server-nodejs/examples/locale/list-countries.md index 99ee2d350..0b2bd5b85 100644 --- a/examples/2.3.x/server-nodejs/examples/locale/list-countries.md +++ b/examples/2.3.x/server-nodejs/examples/locale/list-countries.md @@ -8,5 +8,7 @@ const client = new sdk.Client() const locale = new sdk.Locale(client); -const result = await locale.listCountries(); +const result = await locale.listCountries({ + total: false, // optional +}); ``` diff --git a/examples/2.3.x/server-nodejs/examples/locale/list-currencies.md b/examples/2.3.x/server-nodejs/examples/locale/list-currencies.md index c381774d2..07ae165a4 100644 --- a/examples/2.3.x/server-nodejs/examples/locale/list-currencies.md +++ b/examples/2.3.x/server-nodejs/examples/locale/list-currencies.md @@ -8,5 +8,7 @@ const client = new sdk.Client() const locale = new sdk.Locale(client); -const result = await locale.listCurrencies(); +const result = await locale.listCurrencies({ + total: false, // optional +}); ``` diff --git a/examples/2.3.x/server-nodejs/examples/locale/list-languages.md b/examples/2.3.x/server-nodejs/examples/locale/list-languages.md index cfd522c6f..9f48ffb44 100644 --- a/examples/2.3.x/server-nodejs/examples/locale/list-languages.md +++ b/examples/2.3.x/server-nodejs/examples/locale/list-languages.md @@ -8,5 +8,7 @@ const client = new sdk.Client() const locale = new sdk.Locale(client); -const result = await locale.listLanguages(); +const result = await locale.listLanguages({ + total: false, // optional +}); ``` diff --git a/examples/2.3.x/server-nodejs/examples/messaging/create-push.md b/examples/2.3.x/server-nodejs/examples/messaging/create-push.md index 6e2fd1409..46436b33f 100644 --- a/examples/2.3.x/server-nodejs/examples/messaging/create-push.md +++ b/examples/2.3.x/server-nodejs/examples/messaging/create-push.md @@ -28,5 +28,6 @@ const result = await messaging.createPush({ contentAvailable: false, // optional critical: false, // optional priority: sdk.MessagePriority.Normal, // optional + channelId: '<CHANNEL_ID>', // optional }); ``` diff --git a/examples/2.3.x/server-nodejs/examples/messaging/update-email.md b/examples/2.3.x/server-nodejs/examples/messaging/update-email.md index 426641c78..04e86f769 100644 --- a/examples/2.3.x/server-nodejs/examples/messaging/update-email.md +++ b/examples/2.3.x/server-nodejs/examples/messaging/update-email.md @@ -10,18 +10,18 @@ const messaging = new sdk.Messaging(client); const result = await messaging.updateEmail({ messageId: '<MESSAGE_ID>', + subject: '<SUBJECT>', // optional + content: '<CONTENT>', // optional topics: [], // optional users: [], // optional targets: [], // optional - subject: '<SUBJECT>', // optional - content: '<CONTENT>', // optional - draft: false, // optional - html: false, // optional cc: [], // optional bcc: [], // optional + attachments: [], // optional replyToEmail: 'email@example.com', // optional replyToName: '<REPLY_TO_NAME>', // optional + draft: false, // optional + html: false, // optional scheduledAt: '2020-10-15T06:38:00.000+00:00', // optional - attachments: [], // optional }); ``` diff --git a/examples/2.3.x/server-nodejs/examples/messaging/update-push.md b/examples/2.3.x/server-nodejs/examples/messaging/update-push.md index cf8f6f1b5..d62e3468e 100644 --- a/examples/2.3.x/server-nodejs/examples/messaging/update-push.md +++ b/examples/2.3.x/server-nodejs/examples/messaging/update-push.md @@ -10,11 +10,11 @@ const messaging = new sdk.Messaging(client); const result = await messaging.updatePush({ messageId: '<MESSAGE_ID>', + title: '<TITLE>', // optional + body: '<BODY>', // optional topics: [], // optional users: [], // optional targets: [], // optional - title: '<TITLE>', // optional - body: '<BODY>', // optional data: {}, // optional action: '<ACTION>', // optional image: '<ID1:ID2>', // optional @@ -28,5 +28,6 @@ const result = await messaging.updatePush({ contentAvailable: false, // optional critical: false, // optional priority: sdk.MessagePriority.Normal, // optional + channelId: '<CHANNEL_ID>', // optional }); ``` diff --git a/examples/2.3.x/server-nodejs/examples/messaging/update-sms.md b/examples/2.3.x/server-nodejs/examples/messaging/update-sms.md index 940474a44..7c95f4fcf 100644 --- a/examples/2.3.x/server-nodejs/examples/messaging/update-sms.md +++ b/examples/2.3.x/server-nodejs/examples/messaging/update-sms.md @@ -10,10 +10,10 @@ const messaging = new sdk.Messaging(client); const result = await messaging.updateSMS({ messageId: '<MESSAGE_ID>', + content: '<CONTENT>', // optional topics: [], // optional users: [], // optional targets: [], // optional - content: '<CONTENT>', // optional draft: false, // optional scheduledAt: '2020-10-15T06:38:00.000+00:00', // optional }); diff --git a/examples/2.3.x/server-nodejs/examples/oauth2/introspect.md b/examples/2.3.x/server-nodejs/examples/oauth2/introspect.md new file mode 100644 index 000000000..5845699bc --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/oauth2/introspect.md @@ -0,0 +1,17 @@ +```javascript +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const oauth2 = new sdk.Oauth2(client); + +const result = await oauth2.introspect({ + token: '<TOKEN>', + tokenTypeHint: 'access_token', // optional + clientId: '<CLIENT_ID>', // optional + clientSecret: '<CLIENT_SECRET>', // optional +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/organization/create-ephemeral-project-key.md b/examples/2.3.x/server-nodejs/examples/organization/create-ephemeral-project-key.md index a2801e67a..cf080c776 100644 --- a/examples/2.3.x/server-nodejs/examples/organization/create-ephemeral-project-key.md +++ b/examples/2.3.x/server-nodejs/examples/organization/create-ephemeral-project-key.md @@ -10,7 +10,7 @@ const organization = new sdk.Organization(client); const result = await organization.createEphemeralProjectKey({ projectId: '<PROJECT_ID>', - scopes: [sdk.ProjectKeyScopes.ProjectRead], + scopes: [sdk.ProjectKeyScopes.UsersRead], duration: 600, }); ``` diff --git a/examples/2.3.x/server-nodejs/examples/organization/update-project-key.md b/examples/2.3.x/server-nodejs/examples/organization/update-project-key.md index 17d19c4f9..07440b6e5 100644 --- a/examples/2.3.x/server-nodejs/examples/organization/update-project-key.md +++ b/examples/2.3.x/server-nodejs/examples/organization/update-project-key.md @@ -12,7 +12,7 @@ const result = await organization.updateProjectKey({ projectId: '<PROJECT_ID>', keyId: '<KEY_ID>', name: '<NAME>', - scopes: [sdk.ProjectKeyScopes.ProjectRead], + scopes: [sdk.ProjectKeyScopes.UsersRead], expire: '2020-10-15T06:38:00.000+00:00', // optional }); ``` diff --git a/examples/2.3.x/server-nodejs/examples/project/create-ephemeral-key.md b/examples/2.3.x/server-nodejs/examples/project/create-ephemeral-key.md index 352c6316a..9b40232e4 100644 --- a/examples/2.3.x/server-nodejs/examples/project/create-ephemeral-key.md +++ b/examples/2.3.x/server-nodejs/examples/project/create-ephemeral-key.md @@ -9,7 +9,7 @@ const client = new sdk.Client() const project = new sdk.Project(client); const result = await project.createEphemeralKey({ - scopes: [sdk.ProjectKeyScopes.ProjectRead], + scopes: [sdk.ProjectKeyScopes.UsersRead], duration: 600, }); ``` diff --git a/examples/2.3.x/server-nodejs/examples/project/create-smtp-test.md b/examples/2.3.x/server-nodejs/examples/project/create-smtp-test.md index 0246650b0..162f1381b 100644 --- a/examples/2.3.x/server-nodejs/examples/project/create-smtp-test.md +++ b/examples/2.3.x/server-nodejs/examples/project/create-smtp-test.md @@ -9,6 +9,6 @@ const client = new sdk.Client() const project = new sdk.Project(client); const result = await project.createSMTPTest({ - emails: [], + emails: ['recipient@example.com'], }); ``` diff --git a/examples/2.3.x/server-nodejs/examples/project/update-key.md b/examples/2.3.x/server-nodejs/examples/project/update-key.md index 0505a54f9..81c77a730 100644 --- a/examples/2.3.x/server-nodejs/examples/project/update-key.md +++ b/examples/2.3.x/server-nodejs/examples/project/update-key.md @@ -11,7 +11,7 @@ const project = new sdk.Project(client); const result = await project.updateKey({ keyId: '<KEY_ID>', name: '<NAME>', - scopes: [sdk.ProjectKeyScopes.ProjectRead], + scopes: [sdk.ProjectKeyScopes.UsersRead], expire: '2020-10-15T06:38:00.000+00:00', // optional }); ``` diff --git a/examples/2.3.x/server-nodejs/examples/project/update-labels.md b/examples/2.3.x/server-nodejs/examples/project/update-labels.md index 1d58ef1c8..e594576de 100644 --- a/examples/2.3.x/server-nodejs/examples/project/update-labels.md +++ b/examples/2.3.x/server-nodejs/examples/project/update-labels.md @@ -9,6 +9,6 @@ const client = new sdk.Client() const project = new sdk.Project(client); const result = await project.updateLabels({ - labels: [], + labels: ['production'], }); ``` diff --git a/examples/2.3.x/server-nodejs/examples/project/update-o-auth-2-auth-0.md b/examples/2.3.x/server-nodejs/examples/project/update-o-auth-2-auth-0.md index d23fb2c5a..61fb73c04 100644 --- a/examples/2.3.x/server-nodejs/examples/project/update-o-auth-2-auth-0.md +++ b/examples/2.3.x/server-nodejs/examples/project/update-o-auth-2-auth-0.md @@ -12,6 +12,7 @@ const result = await project.updateOAuth2Auth0({ clientId: '<CLIENT_ID>', // optional clientSecret: '<CLIENT_SECRET>', // optional endpoint: '<ENDPOINT>', // optional + prompt: [sdk.ProjectOAuth2Auth0Prompt.None], // optional enabled: false, // optional }); ``` diff --git a/examples/2.3.x/server-nodejs/examples/project/update-o-auth-2-discord.md b/examples/2.3.x/server-nodejs/examples/project/update-o-auth-2-discord.md index 151b93c1a..d76ac95af 100644 --- a/examples/2.3.x/server-nodejs/examples/project/update-o-auth-2-discord.md +++ b/examples/2.3.x/server-nodejs/examples/project/update-o-auth-2-discord.md @@ -11,6 +11,7 @@ const project = new sdk.Project(client); const result = await project.updateOAuth2Discord({ clientId: '<CLIENT_ID>', // optional clientSecret: '<CLIENT_SECRET>', // optional + prompt: [sdk.ProjectOAuth2DiscordPrompt.None], // optional enabled: false, // optional }); ``` diff --git a/examples/2.3.x/server-nodejs/examples/project/update-o-auth-2-git-hub.md b/examples/2.3.x/server-nodejs/examples/project/update-o-auth-2-git-hub.md index 0a7a757d1..cb497dbe6 100644 --- a/examples/2.3.x/server-nodejs/examples/project/update-o-auth-2-git-hub.md +++ b/examples/2.3.x/server-nodejs/examples/project/update-o-auth-2-git-hub.md @@ -11,6 +11,7 @@ const project = new sdk.Project(client); const result = await project.updateOAuth2GitHub({ clientId: '<CLIENT_ID>', // optional clientSecret: '<CLIENT_SECRET>', // optional + prompt: [sdk.ProjectOAuth2GitHubPrompt.SelectAccount], // optional enabled: false, // optional }); ``` diff --git a/examples/2.3.x/server-nodejs/examples/project/update-o-auth-2-kakao.md b/examples/2.3.x/server-nodejs/examples/project/update-o-auth-2-kakao.md index 1a26ea6a7..cb310ae37 100644 --- a/examples/2.3.x/server-nodejs/examples/project/update-o-auth-2-kakao.md +++ b/examples/2.3.x/server-nodejs/examples/project/update-o-auth-2-kakao.md @@ -11,6 +11,7 @@ const project = new sdk.Project(client); const result = await project.updateOAuth2Kakao({ clientId: '<CLIENT_ID>', // optional clientSecret: '<CLIENT_SECRET>', // optional + prompt: [sdk.ProjectOAuth2KakaoPrompt.None], // optional enabled: false, // optional }); ``` diff --git a/examples/2.3.x/server-nodejs/examples/project/update-o-auth-2-microsoft.md b/examples/2.3.x/server-nodejs/examples/project/update-o-auth-2-microsoft.md index 29e186977..7a7edb203 100644 --- a/examples/2.3.x/server-nodejs/examples/project/update-o-auth-2-microsoft.md +++ b/examples/2.3.x/server-nodejs/examples/project/update-o-auth-2-microsoft.md @@ -12,6 +12,7 @@ const result = await project.updateOAuth2Microsoft({ applicationId: '<APPLICATION_ID>', // optional applicationSecret: '<APPLICATION_SECRET>', // optional tenant: '<TENANT>', // optional + prompt: [sdk.ProjectOAuth2MicrosoftPrompt.None], // optional enabled: false, // optional }); ``` diff --git a/examples/2.3.x/server-nodejs/examples/project/update-o-auth-2-okta.md b/examples/2.3.x/server-nodejs/examples/project/update-o-auth-2-okta.md index 519f02654..4b6deba14 100644 --- a/examples/2.3.x/server-nodejs/examples/project/update-o-auth-2-okta.md +++ b/examples/2.3.x/server-nodejs/examples/project/update-o-auth-2-okta.md @@ -13,6 +13,7 @@ const result = await project.updateOAuth2Okta({ clientSecret: '<CLIENT_SECRET>', // optional domain: 'example.com', // optional authorizationServerId: '<AUTHORIZATION_SERVER_ID>', // optional + prompt: [sdk.ProjectOAuth2OktaPrompt.None], // optional enabled: false, // optional }); ``` diff --git a/examples/2.3.x/server-nodejs/examples/project/update-o-auth-2-salesforce.md b/examples/2.3.x/server-nodejs/examples/project/update-o-auth-2-salesforce.md index 642249f1d..12698d043 100644 --- a/examples/2.3.x/server-nodejs/examples/project/update-o-auth-2-salesforce.md +++ b/examples/2.3.x/server-nodejs/examples/project/update-o-auth-2-salesforce.md @@ -11,6 +11,7 @@ const project = new sdk.Project(client); const result = await project.updateOAuth2Salesforce({ customerKey: '<CUSTOMER_KEY>', // optional customerSecret: '<CUSTOMER_SECRET>', // optional + prompt: [sdk.ProjectOAuth2SalesforcePrompt.Login], // optional enabled: false, // optional }); ``` diff --git a/examples/2.3.x/server-nodejs/examples/project/update-o-auth-2-webflow.md b/examples/2.3.x/server-nodejs/examples/project/update-o-auth-2-webflow.md new file mode 100644 index 000000000..daf2e3072 --- /dev/null +++ b/examples/2.3.x/server-nodejs/examples/project/update-o-auth-2-webflow.md @@ -0,0 +1,16 @@ +```javascript +const sdk = require('node-appwrite'); + +const client = new sdk.Client() + .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + .setProject('<YOUR_PROJECT_ID>') // Your project ID + .setKey('<YOUR_API_KEY>'); // Your secret API key + +const project = new sdk.Project(client); + +const result = await project.updateOAuth2Webflow({ + clientId: '<CLIENT_ID>', // optional + clientSecret: '<CLIENT_SECRET>', // optional + enabled: false, // optional +}); +``` diff --git a/examples/2.3.x/server-nodejs/examples/project/update-o-auth-2-zoho.md b/examples/2.3.x/server-nodejs/examples/project/update-o-auth-2-zoho.md index 8b623cd8e..baa7bc819 100644 --- a/examples/2.3.x/server-nodejs/examples/project/update-o-auth-2-zoho.md +++ b/examples/2.3.x/server-nodejs/examples/project/update-o-auth-2-zoho.md @@ -11,6 +11,7 @@ const project = new sdk.Project(client); const result = await project.updateOAuth2Zoho({ clientId: '<CLIENT_ID>', // optional clientSecret: '<CLIENT_SECRET>', // optional + prompt: [sdk.ProjectOAuth2ZohoPrompt.Consent], // optional enabled: false, // optional }); ``` diff --git a/examples/2.3.x/server-nodejs/examples/sites/list-frameworks.md b/examples/2.3.x/server-nodejs/examples/sites/list-frameworks.md index 9a417bfd0..774d280f8 100644 --- a/examples/2.3.x/server-nodejs/examples/sites/list-frameworks.md +++ b/examples/2.3.x/server-nodejs/examples/sites/list-frameworks.md @@ -8,5 +8,7 @@ const client = new sdk.Client() const sites = new sdk.Sites(client); -const result = await sites.listFrameworks(); +const result = await sites.listFrameworks({ + total: false, // optional +}); ``` diff --git a/examples/2.3.x/server-nodejs/examples/sites/list-specifications.md b/examples/2.3.x/server-nodejs/examples/sites/list-specifications.md index 85a1a84fb..87575708b 100644 --- a/examples/2.3.x/server-nodejs/examples/sites/list-specifications.md +++ b/examples/2.3.x/server-nodejs/examples/sites/list-specifications.md @@ -10,5 +10,6 @@ const sites = new sdk.Sites(client); const result = await sites.listSpecifications({ type: 'runtimes', // optional + total: false, // optional }); ``` diff --git a/examples/2.3.x/server-nodejs/examples/tablesdb/create-index.md b/examples/2.3.x/server-nodejs/examples/tablesdb/create-index.md index 2bd4818e2..5a9094380 100644 --- a/examples/2.3.x/server-nodejs/examples/tablesdb/create-index.md +++ b/examples/2.3.x/server-nodejs/examples/tablesdb/create-index.md @@ -13,7 +13,7 @@ const result = await tablesDB.createIndex({ tableId: '<TABLE_ID>', key: '<KEY>', type: sdk.TablesDBIndexType.Key, - columns: [], + columns: ['username'], orders: [sdk.OrderBy.Asc], // optional lengths: [], // optional }); diff --git a/examples/2.3.x/server-nodejs/examples/tablesdb/create-rows.md b/examples/2.3.x/server-nodejs/examples/tablesdb/create-rows.md index af17e879d..c7448b8da 100644 --- a/examples/2.3.x/server-nodejs/examples/tablesdb/create-rows.md +++ b/examples/2.3.x/server-nodejs/examples/tablesdb/create-rows.md @@ -11,7 +11,16 @@ const tablesDB = new sdk.TablesDB(client); const result = await tablesDB.createRows({ databaseId: '<DATABASE_ID>', tableId: '<TABLE_ID>', - rows: [], + rows: [ + { + $id: 'example1', + username: 'walter.obrien', + email: 'walter.obrien@example.com', + fullName: "Walter O'Brien", + age: 30, + isAdmin: false, + }, + ], transactionId: '<TRANSACTION_ID>', // optional }); ``` diff --git a/examples/2.3.x/server-nodejs/examples/tablesdb/delete-rows.md b/examples/2.3.x/server-nodejs/examples/tablesdb/delete-rows.md index ccc97155d..a79b78821 100644 --- a/examples/2.3.x/server-nodejs/examples/tablesdb/delete-rows.md +++ b/examples/2.3.x/server-nodejs/examples/tablesdb/delete-rows.md @@ -11,7 +11,7 @@ const tablesDB = new sdk.TablesDB(client); const result = await tablesDB.deleteRows({ databaseId: '<DATABASE_ID>', tableId: '<TABLE_ID>', - queries: [], // optional + queries: ['{"method":"equal", "attribute":"$id", "values":["<ROW_ID>"]}'], // optional transactionId: '<TRANSACTION_ID>', // optional }); ``` diff --git a/examples/2.3.x/server-nodejs/examples/tablesdb/list-transactions.md b/examples/2.3.x/server-nodejs/examples/tablesdb/list-transactions.md index 51a3fc45e..9a3778bdd 100644 --- a/examples/2.3.x/server-nodejs/examples/tablesdb/list-transactions.md +++ b/examples/2.3.x/server-nodejs/examples/tablesdb/list-transactions.md @@ -10,5 +10,6 @@ const tablesDB = new sdk.TablesDB(client); const result = await tablesDB.listTransactions({ queries: [], // optional + total: false, // optional }); ``` diff --git a/examples/2.3.x/server-nodejs/examples/tablesdb/upsert-rows.md b/examples/2.3.x/server-nodejs/examples/tablesdb/upsert-rows.md index fea4cbcbb..f04859fd8 100644 --- a/examples/2.3.x/server-nodejs/examples/tablesdb/upsert-rows.md +++ b/examples/2.3.x/server-nodejs/examples/tablesdb/upsert-rows.md @@ -11,7 +11,16 @@ const tablesDB = new sdk.TablesDB(client); const result = await tablesDB.upsertRows({ databaseId: '<DATABASE_ID>', tableId: '<TABLE_ID>', - rows: [], + rows: [ + { + $id: 'example1', + username: 'walter.obrien', + email: 'walter.obrien@example.com', + fullName: "Walter O'Brien", + age: 30, + isAdmin: false, + }, + ], transactionId: '<TRANSACTION_ID>', // optional }); ``` diff --git a/examples/2.3.x/server-nodejs/examples/teams/create-membership.md b/examples/2.3.x/server-nodejs/examples/teams/create-membership.md index 3aa45e3b1..47773fb5c 100644 --- a/examples/2.3.x/server-nodejs/examples/teams/create-membership.md +++ b/examples/2.3.x/server-nodejs/examples/teams/create-membership.md @@ -10,7 +10,7 @@ const teams = new sdk.Teams(client); const result = await teams.createMembership({ teamId: '<TEAM_ID>', - roles: [], + roles: ['editor'], email: 'email@example.com', // optional userId: '<USER_ID>', // optional phone: '+12065550100', // optional diff --git a/examples/2.3.x/server-nodejs/examples/teams/update-membership.md b/examples/2.3.x/server-nodejs/examples/teams/update-membership.md index 7b6fe57f7..07a3e2b3b 100644 --- a/examples/2.3.x/server-nodejs/examples/teams/update-membership.md +++ b/examples/2.3.x/server-nodejs/examples/teams/update-membership.md @@ -11,6 +11,6 @@ const teams = new sdk.Teams(client); const result = await teams.updateMembership({ teamId: '<TEAM_ID>', membershipId: '<MEMBERSHIP_ID>', - roles: [], + roles: ['editor'], }); ``` diff --git a/examples/2.3.x/server-nodejs/examples/users/update-labels.md b/examples/2.3.x/server-nodejs/examples/users/update-labels.md index e74ec102d..4dbc44d9c 100644 --- a/examples/2.3.x/server-nodejs/examples/users/update-labels.md +++ b/examples/2.3.x/server-nodejs/examples/users/update-labels.md @@ -10,6 +10,6 @@ const users = new sdk.Users(client); const result = await users.updateLabels({ userId: '<USER_ID>', - labels: [], + labels: ['subscriber'], }); ``` diff --git a/examples/2.3.x/server-nodejs/examples/vectorsdb/create-collection.md b/examples/2.3.x/server-nodejs/examples/vectorsdb/create-collection.md index d7ccf5359..fa1be7a7a 100644 --- a/examples/2.3.x/server-nodejs/examples/vectorsdb/create-collection.md +++ b/examples/2.3.x/server-nodejs/examples/vectorsdb/create-collection.md @@ -12,7 +12,7 @@ const result = await vectorsDB.createCollection({ databaseId: '<DATABASE_ID>', collectionId: '<COLLECTION_ID>', name: '<NAME>', - dimension: 1, + dimension: 4, permissions: [sdk.Permission.read(sdk.Role.any())], // optional documentSecurity: false, // optional enabled: false, // optional diff --git a/examples/2.3.x/server-nodejs/examples/vectorsdb/create-documents.md b/examples/2.3.x/server-nodejs/examples/vectorsdb/create-documents.md index bcaedd48c..3e764a3ee 100644 --- a/examples/2.3.x/server-nodejs/examples/vectorsdb/create-documents.md +++ b/examples/2.3.x/server-nodejs/examples/vectorsdb/create-documents.md @@ -11,7 +11,15 @@ const vectorsDB = new sdk.VectorsDB(client); const result = await vectorsDB.createDocuments({ databaseId: '<DATABASE_ID>', collectionId: '<COLLECTION_ID>', - documents: [], + documents: [ + { + $id: 'example1', + embeddings: [0.12, -0.55, 0.88, 1.02], + metadata: { + name: 'First document', + }, + }, + ], transactionId: '<TRANSACTION_ID>', // optional }); ``` diff --git a/examples/2.3.x/server-nodejs/examples/vectorsdb/create-index.md b/examples/2.3.x/server-nodejs/examples/vectorsdb/create-index.md index 4b092220a..583faeecf 100644 --- a/examples/2.3.x/server-nodejs/examples/vectorsdb/create-index.md +++ b/examples/2.3.x/server-nodejs/examples/vectorsdb/create-index.md @@ -13,7 +13,7 @@ const result = await vectorsDB.createIndex({ collectionId: '<COLLECTION_ID>', key: '<KEY>', type: sdk.VectorsDBIndexType.HnswEuclidean, - attributes: [], + attributes: ['embeddings'], orders: [sdk.OrderBy.Asc], // optional lengths: [], // optional }); diff --git a/examples/2.3.x/server-nodejs/examples/vectorsdb/create-operations.md b/examples/2.3.x/server-nodejs/examples/vectorsdb/create-operations.md index 3804aeed9..56f2ef2ee 100644 --- a/examples/2.3.x/server-nodejs/examples/vectorsdb/create-operations.md +++ b/examples/2.3.x/server-nodejs/examples/vectorsdb/create-operations.md @@ -17,7 +17,10 @@ const result = await vectorsDB.createOperations({ collectionId: '<COLLECTION_ID>', documentId: '<DOCUMENT_ID>', data: { - name: "Walter O'Brien", + embeddings: [0.12, -0.55, 0.88, 1.02], + metadata: { + name: 'First document', + }, }, }, ], // optional diff --git a/examples/2.3.x/server-nodejs/examples/vectorsdb/delete-documents.md b/examples/2.3.x/server-nodejs/examples/vectorsdb/delete-documents.md index a3905b374..2aae8cd56 100644 --- a/examples/2.3.x/server-nodejs/examples/vectorsdb/delete-documents.md +++ b/examples/2.3.x/server-nodejs/examples/vectorsdb/delete-documents.md @@ -11,7 +11,9 @@ const vectorsDB = new sdk.VectorsDB(client); const result = await vectorsDB.deleteDocuments({ databaseId: '<DATABASE_ID>', collectionId: '<COLLECTION_ID>', - queries: [], // optional + queries: [ + '{"method":"equal", "attribute":"$id", "values":["<DOCUMENT_ID>"]}', + ], // optional transactionId: '<TRANSACTION_ID>', // optional }); ``` diff --git a/examples/2.3.x/server-nodejs/examples/vectorsdb/list-transactions.md b/examples/2.3.x/server-nodejs/examples/vectorsdb/list-transactions.md index 3dfb27329..330f8eec2 100644 --- a/examples/2.3.x/server-nodejs/examples/vectorsdb/list-transactions.md +++ b/examples/2.3.x/server-nodejs/examples/vectorsdb/list-transactions.md @@ -10,5 +10,6 @@ const vectorsDB = new sdk.VectorsDB(client); const result = await vectorsDB.listTransactions({ queries: [], // optional + total: false, // optional }); ``` diff --git a/examples/2.3.x/server-nodejs/examples/vectorsdb/update-collection.md b/examples/2.3.x/server-nodejs/examples/vectorsdb/update-collection.md index 4f5465429..f1ca760b0 100644 --- a/examples/2.3.x/server-nodejs/examples/vectorsdb/update-collection.md +++ b/examples/2.3.x/server-nodejs/examples/vectorsdb/update-collection.md @@ -12,7 +12,7 @@ const result = await vectorsDB.updateCollection({ databaseId: '<DATABASE_ID>', collectionId: '<COLLECTION_ID>', name: '<NAME>', - dimension: 1, // optional + dimension: 4, // optional permissions: [sdk.Permission.read(sdk.Role.any())], // optional documentSecurity: false, // optional enabled: false, // optional diff --git a/examples/2.3.x/server-nodejs/examples/vectorsdb/upsert-documents.md b/examples/2.3.x/server-nodejs/examples/vectorsdb/upsert-documents.md index 38079b970..eafbe97ea 100644 --- a/examples/2.3.x/server-nodejs/examples/vectorsdb/upsert-documents.md +++ b/examples/2.3.x/server-nodejs/examples/vectorsdb/upsert-documents.md @@ -11,7 +11,15 @@ const vectorsDB = new sdk.VectorsDB(client); const result = await vectorsDB.upsertDocuments({ databaseId: '<DATABASE_ID>', collectionId: '<COLLECTION_ID>', - documents: [], + documents: [ + { + $id: 'example1', + embeddings: [0.12, -0.55, 0.88, 1.02], + metadata: { + name: 'First document', + }, + }, + ], transactionId: '<TRANSACTION_ID>', // optional }); ``` diff --git a/examples/2.3.x/server-nodejs/examples/webhooks/create.md b/examples/2.3.x/server-nodejs/examples/webhooks/create.md index 21ecaccc2..c56e892d2 100644 --- a/examples/2.3.x/server-nodejs/examples/webhooks/create.md +++ b/examples/2.3.x/server-nodejs/examples/webhooks/create.md @@ -12,7 +12,7 @@ const result = await webhooks.create({ webhookId: '<WEBHOOK_ID>', url: 'https://example.com/webhook', name: '<NAME>', - events: [], + events: ['users.*.create'], enabled: false, // optional tls: false, // optional authUsername: '<AUTH_USERNAME>', // optional diff --git a/examples/2.3.x/server-nodejs/examples/webhooks/update.md b/examples/2.3.x/server-nodejs/examples/webhooks/update.md index 25362bf14..283cf7880 100644 --- a/examples/2.3.x/server-nodejs/examples/webhooks/update.md +++ b/examples/2.3.x/server-nodejs/examples/webhooks/update.md @@ -12,7 +12,7 @@ const result = await webhooks.update({ webhookId: '<WEBHOOK_ID>', name: '<NAME>', url: 'https://example.com/webhook', - events: [], + events: ['users.*.create'], enabled: false, // optional tls: false, // optional authUsername: '<AUTH_USERNAME>', // optional diff --git a/examples/2.3.x/server-php/examples/account/create-email-password-session.md b/examples/2.3.x/server-php/examples/account/create-email-password-session.md index b462ef807..44770741b 100644 --- a/examples/2.3.x/server-php/examples/account/create-email-password-session.md +++ b/examples/2.3.x/server-php/examples/account/create-email-password-session.md @@ -13,6 +13,7 @@ $account = new Account($client); $result = $account->createEmailPasswordSession( email: 'email@example.com', - password: 'password' + password: 'password', + duration: 60 // optional ); ``` diff --git a/examples/2.3.x/server-php/examples/account/delete-sessions.md b/examples/2.3.x/server-php/examples/account/delete-sessions.md index 7886fabf7..e5ce7f239 100644 --- a/examples/2.3.x/server-php/examples/account/delete-sessions.md +++ b/examples/2.3.x/server-php/examples/account/delete-sessions.md @@ -11,5 +11,7 @@ $client = (new Client()) $account = new Account($client); -$result = $account->deleteSessions(); +$result = $account->deleteSessions( + current: false // optional +); ``` diff --git a/examples/2.3.x/server-php/examples/account/list-sessions.md b/examples/2.3.x/server-php/examples/account/list-sessions.md index 9c42f8ca8..a737fc742 100644 --- a/examples/2.3.x/server-php/examples/account/list-sessions.md +++ b/examples/2.3.x/server-php/examples/account/list-sessions.md @@ -11,5 +11,7 @@ $client = (new Client()) $account = new Account($client); -$result = $account->listSessions(); +$result = $account->listSessions( + total: false // optional +); ``` diff --git a/examples/2.3.x/server-php/examples/analytics/create-event.md b/examples/2.3.x/server-php/examples/analytics/create-event.md new file mode 100644 index 000000000..f22fea406 --- /dev/null +++ b/examples/2.3.x/server-php/examples/analytics/create-event.md @@ -0,0 +1,29 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\Analytics; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setSession(''); // The user session to authenticate with + +$analytics = new Analytics($client); + +$result = $analytics->createEvent( + propertyId: '<PROPERTY_ID>', + name: '<NAME>', + url: 'https://example.com', + domain: '<DOMAIN>', // optional + referrer: '<REFERRER>', // optional + screenWidth: null, // optional + sessionHash: '<SESSION_HASH>', // optional + scrollDepth: 0, // optional + engagementTime: null, // optional + props: [], // optional + userId: '<USER_ID>', // optional + ip: '<IP>', // optional + userAgent: '<USER_AGENT>' // optional +); +``` diff --git a/examples/2.3.x/server-php/examples/analytics/create-property.md b/examples/2.3.x/server-php/examples/analytics/create-property.md new file mode 100644 index 000000000..a27db5e17 --- /dev/null +++ b/examples/2.3.x/server-php/examples/analytics/create-property.md @@ -0,0 +1,23 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\Analytics; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$analytics = new Analytics($client); + +$result = $analytics->createProperty( + propertyId: '<PROPERTY_ID>', + name: '<NAME>', + domain: '<DOMAIN>', // optional + timezone: '<TIMEZONE>', // optional + enabled: false, // optional + public: false, // optional + allowedOrigins: [] // optional +); +``` diff --git a/examples/2.3.x/server-php/examples/analytics/delete-property.md b/examples/2.3.x/server-php/examples/analytics/delete-property.md new file mode 100644 index 000000000..3a507c747 --- /dev/null +++ b/examples/2.3.x/server-php/examples/analytics/delete-property.md @@ -0,0 +1,17 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\Analytics; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$analytics = new Analytics($client); + +$result = $analytics->deleteProperty( + propertyId: '<PROPERTY_ID>' +); +``` diff --git a/examples/2.3.x/server-php/examples/analytics/get-property.md b/examples/2.3.x/server-php/examples/analytics/get-property.md new file mode 100644 index 000000000..cc18a430b --- /dev/null +++ b/examples/2.3.x/server-php/examples/analytics/get-property.md @@ -0,0 +1,17 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\Analytics; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$analytics = new Analytics($client); + +$result = $analytics->getProperty( + propertyId: '<PROPERTY_ID>' +); +``` diff --git a/examples/2.3.x/server-php/examples/analytics/list-metrics.md b/examples/2.3.x/server-php/examples/analytics/list-metrics.md new file mode 100644 index 000000000..6f2d6a6f1 --- /dev/null +++ b/examples/2.3.x/server-php/examples/analytics/list-metrics.md @@ -0,0 +1,26 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\Analytics; +use Appwrite\Enums\AnalyticsInterval; +use Appwrite\Enums\AnalyticsDimension; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$analytics = new Analytics($client); + +$result = $analytics->listMetrics( + propertyId: '<PROPERTY_ID>', + queries: [], // optional + interval: AnalyticsInterval::ONEHOUR(), // optional + dimensions: [AnalyticsDimension::COUNTRY()], // optional + dateRange: '<DATE_RANGE>', // optional + startAt: '2020-10-15T06:38:00.000+00:00', // optional + endAt: '2020-10-15T06:38:00.000+00:00', // optional + limit: 1 // optional +); +``` diff --git a/examples/2.3.x/server-php/examples/analytics/list-properties.md b/examples/2.3.x/server-php/examples/analytics/list-properties.md new file mode 100644 index 000000000..a733bbfcd --- /dev/null +++ b/examples/2.3.x/server-php/examples/analytics/list-properties.md @@ -0,0 +1,19 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\Analytics; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$analytics = new Analytics($client); + +$result = $analytics->listProperties( + queries: [], // optional + search: '<SEARCH>', // optional + total: false // optional +); +``` diff --git a/examples/2.3.x/server-php/examples/analytics/update-property.md b/examples/2.3.x/server-php/examples/analytics/update-property.md new file mode 100644 index 000000000..0c2f7b4a1 --- /dev/null +++ b/examples/2.3.x/server-php/examples/analytics/update-property.md @@ -0,0 +1,23 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\Analytics; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$analytics = new Analytics($client); + +$result = $analytics->updateProperty( + propertyId: '<PROPERTY_ID>', + name: '<NAME>', // optional + domain: '<DOMAIN>', // optional + timezone: '<TIMEZONE>', // optional + enabled: false, // optional + public: false, // optional + allowedOrigins: [] // optional +); +``` diff --git a/examples/2.3.x/server-php/examples/avatars/delete-photo.md b/examples/2.3.x/server-php/examples/avatars/delete-photo.md new file mode 100644 index 000000000..f6e300b13 --- /dev/null +++ b/examples/2.3.x/server-php/examples/avatars/delete-photo.md @@ -0,0 +1,15 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\Avatars; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setSession(''); // The user session to authenticate with + +$avatars = new Avatars($client); + +$result = $avatars->deletePhoto(); +``` diff --git a/examples/2.3.x/server-php/examples/avatars/get-screenshot.md b/examples/2.3.x/server-php/examples/avatars/get-screenshot.md index 59fbd663d..a5eb5e995 100644 --- a/examples/2.3.x/server-php/examples/avatars/get-screenshot.md +++ b/examples/2.3.x/server-php/examples/avatars/get-screenshot.md @@ -18,8 +18,7 @@ $avatars = new Avatars($client); $result = $avatars->getScreenshot( url: 'https://example.com', headers: [ - 'Authorization' => 'Bearer token123', - 'X-Custom-Header' => 'value' + 'Accept-Language' => 'en-US,en;q=0.9' ], // optional viewportWidth: 1920, // optional viewportHeight: 1080, // optional diff --git a/examples/2.3.x/server-php/examples/avatars/update-photo.md b/examples/2.3.x/server-php/examples/avatars/update-photo.md new file mode 100644 index 000000000..c031ea7f0 --- /dev/null +++ b/examples/2.3.x/server-php/examples/avatars/update-photo.md @@ -0,0 +1,18 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\InputFile; +use Appwrite\Services\Avatars; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setSession(''); // The user session to authenticate with + +$avatars = new Avatars($client); + +$result = $avatars->updatePhoto( + file: InputFile::withPath('file.png') +); +``` diff --git a/examples/2.3.x/server-php/examples/databases/create-documents.md b/examples/2.3.x/server-php/examples/databases/create-documents.md index 1f64387b5..de0fae2b0 100644 --- a/examples/2.3.x/server-php/examples/databases/create-documents.md +++ b/examples/2.3.x/server-php/examples/databases/create-documents.md @@ -14,7 +14,16 @@ $databases = new Databases($client); $result = $databases->createDocuments( databaseId: '<DATABASE_ID>', collectionId: '<COLLECTION_ID>', - documents: [], + documents: [ + { + "$id": "example1", + "username": "walter.obrien", + "email": "walter.obrien@example.com", + "fullName": "Walter O'Brien", + "age": 30, + "isAdmin": false + } + ], transactionId: '<TRANSACTION_ID>' // optional ); ``` diff --git a/examples/2.3.x/server-php/examples/databases/create-index.md b/examples/2.3.x/server-php/examples/databases/create-index.md index 1005239ed..cd5e8c0c6 100644 --- a/examples/2.3.x/server-php/examples/databases/create-index.md +++ b/examples/2.3.x/server-php/examples/databases/create-index.md @@ -18,7 +18,7 @@ $result = $databases->createIndex( collectionId: '<COLLECTION_ID>', key: '<KEY>', type: DatabasesIndexType::KEY(), - attributes: [], + attributes: ["username"], orders: [OrderBy::ASC()], // optional lengths: [] // optional ); diff --git a/examples/2.3.x/server-php/examples/databases/delete-documents.md b/examples/2.3.x/server-php/examples/databases/delete-documents.md index f39cbfe0a..5d5860398 100644 --- a/examples/2.3.x/server-php/examples/databases/delete-documents.md +++ b/examples/2.3.x/server-php/examples/databases/delete-documents.md @@ -14,7 +14,7 @@ $databases = new Databases($client); $result = $databases->deleteDocuments( databaseId: '<DATABASE_ID>', collectionId: '<COLLECTION_ID>', - queries: [], // optional + queries: ["{\"method\":\"equal\", \"attribute\":\"$id\", \"values\":[\"<DOCUMENT_ID>\"]}"], // optional transactionId: '<TRANSACTION_ID>' // optional ); ``` diff --git a/examples/2.3.x/server-php/examples/databases/list-transactions.md b/examples/2.3.x/server-php/examples/databases/list-transactions.md index 97cb6abd9..1c2ec60a1 100644 --- a/examples/2.3.x/server-php/examples/databases/list-transactions.md +++ b/examples/2.3.x/server-php/examples/databases/list-transactions.md @@ -12,6 +12,7 @@ $client = (new Client()) $databases = new Databases($client); $result = $databases->listTransactions( - queries: [] // optional + queries: [], // optional + total: false // optional ); ``` diff --git a/examples/2.3.x/server-php/examples/databases/upsert-documents.md b/examples/2.3.x/server-php/examples/databases/upsert-documents.md index 0049fdc69..60877dc3c 100644 --- a/examples/2.3.x/server-php/examples/databases/upsert-documents.md +++ b/examples/2.3.x/server-php/examples/databases/upsert-documents.md @@ -14,7 +14,16 @@ $databases = new Databases($client); $result = $databases->upsertDocuments( databaseId: '<DATABASE_ID>', collectionId: '<COLLECTION_ID>', - documents: [], + documents: [ + { + "$id": "example1", + "username": "walter.obrien", + "email": "walter.obrien@example.com", + "fullName": "Walter O'Brien", + "age": 30, + "isAdmin": false + } + ], transactionId: '<TRANSACTION_ID>' // optional ); ``` diff --git a/examples/2.3.x/server-php/examples/documentsdb/create-documents.md b/examples/2.3.x/server-php/examples/documentsdb/create-documents.md index ec6a43552..ce85177cc 100644 --- a/examples/2.3.x/server-php/examples/documentsdb/create-documents.md +++ b/examples/2.3.x/server-php/examples/documentsdb/create-documents.md @@ -14,7 +14,16 @@ $documentsDB = new DocumentsDB($client); $result = $documentsDB->createDocuments( databaseId: '<DATABASE_ID>', collectionId: '<COLLECTION_ID>', - documents: [], + documents: [ + { + "$id": "example1", + "username": "walter.obrien", + "email": "walter.obrien@example.com", + "fullName": "Walter O'Brien", + "age": 30, + "isAdmin": false + } + ], transactionId: '<TRANSACTION_ID>' // optional ); ``` diff --git a/examples/2.3.x/server-php/examples/documentsdb/create-index.md b/examples/2.3.x/server-php/examples/documentsdb/create-index.md index b64d1f8af..68506db41 100644 --- a/examples/2.3.x/server-php/examples/documentsdb/create-index.md +++ b/examples/2.3.x/server-php/examples/documentsdb/create-index.md @@ -18,7 +18,7 @@ $result = $documentsDB->createIndex( collectionId: '<COLLECTION_ID>', key: '<KEY>', type: DocumentsDBIndexType::KEY(), - attributes: [], + attributes: ["username"], orders: [OrderBy::ASC()], // optional lengths: [] // optional ); diff --git a/examples/2.3.x/server-php/examples/documentsdb/delete-documents.md b/examples/2.3.x/server-php/examples/documentsdb/delete-documents.md index b77b3756f..f005fea38 100644 --- a/examples/2.3.x/server-php/examples/documentsdb/delete-documents.md +++ b/examples/2.3.x/server-php/examples/documentsdb/delete-documents.md @@ -14,7 +14,7 @@ $documentsDB = new DocumentsDB($client); $result = $documentsDB->deleteDocuments( databaseId: '<DATABASE_ID>', collectionId: '<COLLECTION_ID>', - queries: [], // optional + queries: ["{\"method\":\"equal\", \"attribute\":\"$id\", \"values\":[\"<DOCUMENT_ID>\"]}"], // optional transactionId: '<TRANSACTION_ID>' // optional ); ``` diff --git a/examples/2.3.x/server-php/examples/documentsdb/list-transactions.md b/examples/2.3.x/server-php/examples/documentsdb/list-transactions.md index f154df8e1..988d867ae 100644 --- a/examples/2.3.x/server-php/examples/documentsdb/list-transactions.md +++ b/examples/2.3.x/server-php/examples/documentsdb/list-transactions.md @@ -12,6 +12,7 @@ $client = (new Client()) $documentsDB = new DocumentsDB($client); $result = $documentsDB->listTransactions( - queries: [] // optional + queries: [], // optional + total: false // optional ); ``` diff --git a/examples/2.3.x/server-php/examples/documentsdb/upsert-documents.md b/examples/2.3.x/server-php/examples/documentsdb/upsert-documents.md index 09021e0af..95ed28a77 100644 --- a/examples/2.3.x/server-php/examples/documentsdb/upsert-documents.md +++ b/examples/2.3.x/server-php/examples/documentsdb/upsert-documents.md @@ -14,7 +14,16 @@ $documentsDB = new DocumentsDB($client); $result = $documentsDB->upsertDocuments( databaseId: '<DATABASE_ID>', collectionId: '<COLLECTION_ID>', - documents: [], + documents: [ + { + "$id": "example1", + "username": "walter.obrien", + "email": "walter.obrien@example.com", + "fullName": "Walter O'Brien", + "age": 30, + "isAdmin": false + } + ], transactionId: '<TRANSACTION_ID>' // optional ); ``` diff --git a/examples/2.3.x/server-php/examples/embeddings/create-text-embeddings.md b/examples/2.3.x/server-php/examples/embeddings/create-text-embeddings.md index 70f0f7e1d..476f97410 100644 --- a/examples/2.3.x/server-php/examples/embeddings/create-text-embeddings.md +++ b/examples/2.3.x/server-php/examples/embeddings/create-text-embeddings.md @@ -13,7 +13,7 @@ $client = (new Client()) $embeddings = new Embeddings($client); $result = $embeddings->createTextEmbeddings( - texts: [], + texts: ["Appwrite helps developers build applications.", "Find documents with semantic search."], model: EmbeddingModel::NOMICEMBEDTEXT() // optional ); ``` diff --git a/examples/2.3.x/server-php/examples/functions/list-runtimes.md b/examples/2.3.x/server-php/examples/functions/list-runtimes.md index 320a9dc6c..e2e5cbf4f 100644 --- a/examples/2.3.x/server-php/examples/functions/list-runtimes.md +++ b/examples/2.3.x/server-php/examples/functions/list-runtimes.md @@ -11,5 +11,7 @@ $client = (new Client()) $functions = new Functions($client); -$result = $functions->listRuntimes(); +$result = $functions->listRuntimes( + total: false // optional +); ``` diff --git a/examples/2.3.x/server-php/examples/functions/list-specifications.md b/examples/2.3.x/server-php/examples/functions/list-specifications.md index da2bec2e6..47406b02e 100644 --- a/examples/2.3.x/server-php/examples/functions/list-specifications.md +++ b/examples/2.3.x/server-php/examples/functions/list-specifications.md @@ -12,6 +12,7 @@ $client = (new Client()) $functions = new Functions($client); $result = $functions->listSpecifications( - type: 'runtimes' // optional + type: 'runtimes', // optional + total: false // optional ); ``` diff --git a/examples/2.3.x/server-php/examples/graphql/mutation.md b/examples/2.3.x/server-php/examples/graphql/mutation.md index c2f1b9890..267926818 100644 --- a/examples/2.3.x/server-php/examples/graphql/mutation.md +++ b/examples/2.3.x/server-php/examples/graphql/mutation.md @@ -12,6 +12,8 @@ $client = (new Client()) $graphql = new Graphql($client); $result = $graphql->mutation( - query: [] + query: [ + 'query' => 'mutation { accountUpdateName(name: "Walter") { name } }' + ] ); ``` diff --git a/examples/2.3.x/server-php/examples/graphql/query.md b/examples/2.3.x/server-php/examples/graphql/query.md index 9731e9988..f5e562c14 100644 --- a/examples/2.3.x/server-php/examples/graphql/query.md +++ b/examples/2.3.x/server-php/examples/graphql/query.md @@ -12,6 +12,8 @@ $client = (new Client()) $graphql = new Graphql($client); $result = $graphql->query( - query: [] + query: [ + 'query' => 'query { localeGet { ip } }' + ] ); ``` diff --git a/examples/2.3.x/server-php/examples/locale/list-codes.md b/examples/2.3.x/server-php/examples/locale/list-codes.md index 5c99bbf2d..af3d0aa61 100644 --- a/examples/2.3.x/server-php/examples/locale/list-codes.md +++ b/examples/2.3.x/server-php/examples/locale/list-codes.md @@ -11,5 +11,7 @@ $client = (new Client()) $locale = new Locale($client); -$result = $locale->listCodes(); +$result = $locale->listCodes( + total: false // optional +); ``` diff --git a/examples/2.3.x/server-php/examples/locale/list-continents.md b/examples/2.3.x/server-php/examples/locale/list-continents.md index 1245b2ecf..0c865bfb8 100644 --- a/examples/2.3.x/server-php/examples/locale/list-continents.md +++ b/examples/2.3.x/server-php/examples/locale/list-continents.md @@ -11,5 +11,7 @@ $client = (new Client()) $locale = new Locale($client); -$result = $locale->listContinents(); +$result = $locale->listContinents( + total: false // optional +); ``` diff --git a/examples/2.3.x/server-php/examples/locale/list-countries-eu.md b/examples/2.3.x/server-php/examples/locale/list-countries-eu.md index 9744c8ea6..afdce554a 100644 --- a/examples/2.3.x/server-php/examples/locale/list-countries-eu.md +++ b/examples/2.3.x/server-php/examples/locale/list-countries-eu.md @@ -11,5 +11,7 @@ $client = (new Client()) $locale = new Locale($client); -$result = $locale->listCountriesEU(); +$result = $locale->listCountriesEU( + total: false // optional +); ``` diff --git a/examples/2.3.x/server-php/examples/locale/list-countries-phones.md b/examples/2.3.x/server-php/examples/locale/list-countries-phones.md index df66061f6..d330d1ece 100644 --- a/examples/2.3.x/server-php/examples/locale/list-countries-phones.md +++ b/examples/2.3.x/server-php/examples/locale/list-countries-phones.md @@ -11,5 +11,7 @@ $client = (new Client()) $locale = new Locale($client); -$result = $locale->listCountriesPhones(); +$result = $locale->listCountriesPhones( + total: false // optional +); ``` diff --git a/examples/2.3.x/server-php/examples/locale/list-countries.md b/examples/2.3.x/server-php/examples/locale/list-countries.md index f4f962622..df1a58a77 100644 --- a/examples/2.3.x/server-php/examples/locale/list-countries.md +++ b/examples/2.3.x/server-php/examples/locale/list-countries.md @@ -11,5 +11,7 @@ $client = (new Client()) $locale = new Locale($client); -$result = $locale->listCountries(); +$result = $locale->listCountries( + total: false // optional +); ``` diff --git a/examples/2.3.x/server-php/examples/locale/list-currencies.md b/examples/2.3.x/server-php/examples/locale/list-currencies.md index f4f1125a9..641472565 100644 --- a/examples/2.3.x/server-php/examples/locale/list-currencies.md +++ b/examples/2.3.x/server-php/examples/locale/list-currencies.md @@ -11,5 +11,7 @@ $client = (new Client()) $locale = new Locale($client); -$result = $locale->listCurrencies(); +$result = $locale->listCurrencies( + total: false // optional +); ``` diff --git a/examples/2.3.x/server-php/examples/locale/list-languages.md b/examples/2.3.x/server-php/examples/locale/list-languages.md index b25fab642..2d5e0f861 100644 --- a/examples/2.3.x/server-php/examples/locale/list-languages.md +++ b/examples/2.3.x/server-php/examples/locale/list-languages.md @@ -11,5 +11,7 @@ $client = (new Client()) $locale = new Locale($client); -$result = $locale->listLanguages(); +$result = $locale->listLanguages( + total: false // optional +); ``` diff --git a/examples/2.3.x/server-php/examples/messaging/create-push.md b/examples/2.3.x/server-php/examples/messaging/create-push.md index 75734171e..701dc47d3 100644 --- a/examples/2.3.x/server-php/examples/messaging/create-push.md +++ b/examples/2.3.x/server-php/examples/messaging/create-push.md @@ -31,6 +31,7 @@ $result = $messaging->createPush( scheduledAt: '2020-10-15T06:38:00.000+00:00', // optional contentAvailable: false, // optional critical: false, // optional - priority: MessagePriority::NORMAL() // optional + priority: MessagePriority::NORMAL(), // optional + channelId: '<CHANNEL_ID>' // optional ); ``` diff --git a/examples/2.3.x/server-php/examples/messaging/update-email.md b/examples/2.3.x/server-php/examples/messaging/update-email.md index b5a2488b1..7194fc364 100644 --- a/examples/2.3.x/server-php/examples/messaging/update-email.md +++ b/examples/2.3.x/server-php/examples/messaging/update-email.md @@ -13,18 +13,18 @@ $messaging = new Messaging($client); $result = $messaging->updateEmail( messageId: '<MESSAGE_ID>', + subject: '<SUBJECT>', // optional + content: '<CONTENT>', // optional topics: [], // optional users: [], // optional targets: [], // optional - subject: '<SUBJECT>', // optional - content: '<CONTENT>', // optional - draft: false, // optional - html: false, // optional cc: [], // optional bcc: [], // optional + attachments: [], // optional replyToEmail: 'email@example.com', // optional replyToName: '<REPLY_TO_NAME>', // optional - scheduledAt: '2020-10-15T06:38:00.000+00:00', // optional - attachments: [] // optional + draft: false, // optional + html: false, // optional + scheduledAt: '2020-10-15T06:38:00.000+00:00' // optional ); ``` diff --git a/examples/2.3.x/server-php/examples/messaging/update-push.md b/examples/2.3.x/server-php/examples/messaging/update-push.md index a1b14b71b..f8cc97eea 100644 --- a/examples/2.3.x/server-php/examples/messaging/update-push.md +++ b/examples/2.3.x/server-php/examples/messaging/update-push.md @@ -14,11 +14,11 @@ $messaging = new Messaging($client); $result = $messaging->updatePush( messageId: '<MESSAGE_ID>', + title: '<TITLE>', // optional + body: '<BODY>', // optional topics: [], // optional users: [], // optional targets: [], // optional - title: '<TITLE>', // optional - body: '<BODY>', // optional data: [], // optional action: '<ACTION>', // optional image: '<ID1:ID2>', // optional @@ -31,6 +31,7 @@ $result = $messaging->updatePush( scheduledAt: '2020-10-15T06:38:00.000+00:00', // optional contentAvailable: false, // optional critical: false, // optional - priority: MessagePriority::NORMAL() // optional + priority: MessagePriority::NORMAL(), // optional + channelId: '<CHANNEL_ID>' // optional ); ``` diff --git a/examples/2.3.x/server-php/examples/messaging/update-sms.md b/examples/2.3.x/server-php/examples/messaging/update-sms.md index 3cfd25800..c6257dba0 100644 --- a/examples/2.3.x/server-php/examples/messaging/update-sms.md +++ b/examples/2.3.x/server-php/examples/messaging/update-sms.md @@ -13,10 +13,10 @@ $messaging = new Messaging($client); $result = $messaging->updateSMS( messageId: '<MESSAGE_ID>', + content: '<CONTENT>', // optional topics: [], // optional users: [], // optional targets: [], // optional - content: '<CONTENT>', // optional draft: false, // optional scheduledAt: '2020-10-15T06:38:00.000+00:00' // optional ); diff --git a/examples/2.3.x/server-php/examples/oauth2/introspect.md b/examples/2.3.x/server-php/examples/oauth2/introspect.md new file mode 100644 index 000000000..cdde0e1e1 --- /dev/null +++ b/examples/2.3.x/server-php/examples/oauth2/introspect.md @@ -0,0 +1,20 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\Oauth2; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$oauth2 = new Oauth2($client); + +$result = $oauth2->introspect( + token: '<TOKEN>', + tokenTypeHint: 'access_token', // optional + clientId: '<CLIENT_ID>', // optional + clientSecret: '<CLIENT_SECRET>' // optional +); +``` diff --git a/examples/2.3.x/server-php/examples/organization/create-ephemeral-project-key.md b/examples/2.3.x/server-php/examples/organization/create-ephemeral-project-key.md index 1272ccd19..445227fdf 100644 --- a/examples/2.3.x/server-php/examples/organization/create-ephemeral-project-key.md +++ b/examples/2.3.x/server-php/examples/organization/create-ephemeral-project-key.md @@ -14,7 +14,7 @@ $organization = new Organization($client); $result = $organization->createEphemeralProjectKey( projectId: '<PROJECT_ID>', - scopes: [ProjectKeyScopes::PROJECTREAD()], + scopes: [ProjectKeyScopes::USERSREAD()], duration: 600 ); ``` diff --git a/examples/2.3.x/server-php/examples/organization/update-project-key.md b/examples/2.3.x/server-php/examples/organization/update-project-key.md index 0781b1fb1..b40f14e17 100644 --- a/examples/2.3.x/server-php/examples/organization/update-project-key.md +++ b/examples/2.3.x/server-php/examples/organization/update-project-key.md @@ -16,7 +16,7 @@ $result = $organization->updateProjectKey( projectId: '<PROJECT_ID>', keyId: '<KEY_ID>', name: '<NAME>', - scopes: [ProjectKeyScopes::PROJECTREAD()], + scopes: [ProjectKeyScopes::USERSREAD()], expire: '2020-10-15T06:38:00.000+00:00' // optional ); ``` diff --git a/examples/2.3.x/server-php/examples/project/create-ephemeral-key.md b/examples/2.3.x/server-php/examples/project/create-ephemeral-key.md index 224dc841a..763800e6a 100644 --- a/examples/2.3.x/server-php/examples/project/create-ephemeral-key.md +++ b/examples/2.3.x/server-php/examples/project/create-ephemeral-key.md @@ -13,7 +13,7 @@ $client = (new Client()) $project = new Project($client); $result = $project->createEphemeralKey( - scopes: [ProjectKeyScopes::PROJECTREAD()], + scopes: [ProjectKeyScopes::USERSREAD()], duration: 600 ); ``` diff --git a/examples/2.3.x/server-php/examples/project/create-smtp-test.md b/examples/2.3.x/server-php/examples/project/create-smtp-test.md index a16026a82..e00457505 100644 --- a/examples/2.3.x/server-php/examples/project/create-smtp-test.md +++ b/examples/2.3.x/server-php/examples/project/create-smtp-test.md @@ -12,6 +12,6 @@ $client = (new Client()) $project = new Project($client); $result = $project->createSMTPTest( - emails: [] + emails: ["recipient@example.com"] ); ``` diff --git a/examples/2.3.x/server-php/examples/project/update-key.md b/examples/2.3.x/server-php/examples/project/update-key.md index db8839455..ae2996b71 100644 --- a/examples/2.3.x/server-php/examples/project/update-key.md +++ b/examples/2.3.x/server-php/examples/project/update-key.md @@ -15,7 +15,7 @@ $project = new Project($client); $result = $project->updateKey( keyId: '<KEY_ID>', name: '<NAME>', - scopes: [ProjectKeyScopes::PROJECTREAD()], + scopes: [ProjectKeyScopes::USERSREAD()], expire: '2020-10-15T06:38:00.000+00:00' // optional ); ``` diff --git a/examples/2.3.x/server-php/examples/project/update-labels.md b/examples/2.3.x/server-php/examples/project/update-labels.md index aace3165f..1aba54308 100644 --- a/examples/2.3.x/server-php/examples/project/update-labels.md +++ b/examples/2.3.x/server-php/examples/project/update-labels.md @@ -12,6 +12,6 @@ $client = (new Client()) $project = new Project($client); $result = $project->updateLabels( - labels: [] + labels: ["production"] ); ``` diff --git a/examples/2.3.x/server-php/examples/project/update-o-auth-2-auth-0.md b/examples/2.3.x/server-php/examples/project/update-o-auth-2-auth-0.md index b80b4b154..ea6c0143e 100644 --- a/examples/2.3.x/server-php/examples/project/update-o-auth-2-auth-0.md +++ b/examples/2.3.x/server-php/examples/project/update-o-auth-2-auth-0.md @@ -3,6 +3,7 @@ use Appwrite\Client; use Appwrite\Services\Project; +use Appwrite\Enums\ProjectOAuth2Auth0Prompt; $client = (new Client()) ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint @@ -15,6 +16,7 @@ $result = $project->updateOAuth2Auth0( clientId: '<CLIENT_ID>', // optional clientSecret: '<CLIENT_SECRET>', // optional endpoint: '<ENDPOINT>', // optional + prompt: [ProjectOAuth2Auth0Prompt::NONE()], // optional enabled: false // optional ); ``` diff --git a/examples/2.3.x/server-php/examples/project/update-o-auth-2-discord.md b/examples/2.3.x/server-php/examples/project/update-o-auth-2-discord.md index 9a0b16162..d512f8eba 100644 --- a/examples/2.3.x/server-php/examples/project/update-o-auth-2-discord.md +++ b/examples/2.3.x/server-php/examples/project/update-o-auth-2-discord.md @@ -3,6 +3,7 @@ use Appwrite\Client; use Appwrite\Services\Project; +use Appwrite\Enums\ProjectOAuth2DiscordPrompt; $client = (new Client()) ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint @@ -14,6 +15,7 @@ $project = new Project($client); $result = $project->updateOAuth2Discord( clientId: '<CLIENT_ID>', // optional clientSecret: '<CLIENT_SECRET>', // optional + prompt: [ProjectOAuth2DiscordPrompt::NONE()], // optional enabled: false // optional ); ``` diff --git a/examples/2.3.x/server-php/examples/project/update-o-auth-2-git-hub.md b/examples/2.3.x/server-php/examples/project/update-o-auth-2-git-hub.md index 92dc57265..16527ec89 100644 --- a/examples/2.3.x/server-php/examples/project/update-o-auth-2-git-hub.md +++ b/examples/2.3.x/server-php/examples/project/update-o-auth-2-git-hub.md @@ -3,6 +3,7 @@ use Appwrite\Client; use Appwrite\Services\Project; +use Appwrite\Enums\ProjectOAuth2GitHubPrompt; $client = (new Client()) ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint @@ -14,6 +15,7 @@ $project = new Project($client); $result = $project->updateOAuth2GitHub( clientId: '<CLIENT_ID>', // optional clientSecret: '<CLIENT_SECRET>', // optional + prompt: [ProjectOAuth2GitHubPrompt::SELECTACCOUNT()], // optional enabled: false // optional ); ``` diff --git a/examples/2.3.x/server-php/examples/project/update-o-auth-2-kakao.md b/examples/2.3.x/server-php/examples/project/update-o-auth-2-kakao.md index 6262f8694..78fe1cbdf 100644 --- a/examples/2.3.x/server-php/examples/project/update-o-auth-2-kakao.md +++ b/examples/2.3.x/server-php/examples/project/update-o-auth-2-kakao.md @@ -3,6 +3,7 @@ use Appwrite\Client; use Appwrite\Services\Project; +use Appwrite\Enums\ProjectOAuth2KakaoPrompt; $client = (new Client()) ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint @@ -14,6 +15,7 @@ $project = new Project($client); $result = $project->updateOAuth2Kakao( clientId: '<CLIENT_ID>', // optional clientSecret: '<CLIENT_SECRET>', // optional + prompt: [ProjectOAuth2KakaoPrompt::NONE()], // optional enabled: false // optional ); ``` diff --git a/examples/2.3.x/server-php/examples/project/update-o-auth-2-microsoft.md b/examples/2.3.x/server-php/examples/project/update-o-auth-2-microsoft.md index 349bf9329..e62b5ef95 100644 --- a/examples/2.3.x/server-php/examples/project/update-o-auth-2-microsoft.md +++ b/examples/2.3.x/server-php/examples/project/update-o-auth-2-microsoft.md @@ -3,6 +3,7 @@ use Appwrite\Client; use Appwrite\Services\Project; +use Appwrite\Enums\ProjectOAuth2MicrosoftPrompt; $client = (new Client()) ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint @@ -15,6 +16,7 @@ $result = $project->updateOAuth2Microsoft( applicationId: '<APPLICATION_ID>', // optional applicationSecret: '<APPLICATION_SECRET>', // optional tenant: '<TENANT>', // optional + prompt: [ProjectOAuth2MicrosoftPrompt::NONE()], // optional enabled: false // optional ); ``` diff --git a/examples/2.3.x/server-php/examples/project/update-o-auth-2-okta.md b/examples/2.3.x/server-php/examples/project/update-o-auth-2-okta.md index e03c9b833..ae8f1fe6f 100644 --- a/examples/2.3.x/server-php/examples/project/update-o-auth-2-okta.md +++ b/examples/2.3.x/server-php/examples/project/update-o-auth-2-okta.md @@ -3,6 +3,7 @@ use Appwrite\Client; use Appwrite\Services\Project; +use Appwrite\Enums\ProjectOAuth2OktaPrompt; $client = (new Client()) ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint @@ -16,6 +17,7 @@ $result = $project->updateOAuth2Okta( clientSecret: '<CLIENT_SECRET>', // optional domain: 'example.com', // optional authorizationServerId: '<AUTHORIZATION_SERVER_ID>', // optional + prompt: [ProjectOAuth2OktaPrompt::NONE()], // optional enabled: false // optional ); ``` diff --git a/examples/2.3.x/server-php/examples/project/update-o-auth-2-salesforce.md b/examples/2.3.x/server-php/examples/project/update-o-auth-2-salesforce.md index 1247627ca..713f08f95 100644 --- a/examples/2.3.x/server-php/examples/project/update-o-auth-2-salesforce.md +++ b/examples/2.3.x/server-php/examples/project/update-o-auth-2-salesforce.md @@ -3,6 +3,7 @@ use Appwrite\Client; use Appwrite\Services\Project; +use Appwrite\Enums\ProjectOAuth2SalesforcePrompt; $client = (new Client()) ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint @@ -14,6 +15,7 @@ $project = new Project($client); $result = $project->updateOAuth2Salesforce( customerKey: '<CUSTOMER_KEY>', // optional customerSecret: '<CUSTOMER_SECRET>', // optional + prompt: [ProjectOAuth2SalesforcePrompt::LOGIN()], // optional enabled: false // optional ); ``` diff --git a/examples/2.3.x/server-php/examples/project/update-o-auth-2-webflow.md b/examples/2.3.x/server-php/examples/project/update-o-auth-2-webflow.md new file mode 100644 index 000000000..50c90d7ec --- /dev/null +++ b/examples/2.3.x/server-php/examples/project/update-o-auth-2-webflow.md @@ -0,0 +1,19 @@ +```php +<?php + +use Appwrite\Client; +use Appwrite\Services\Project; + +$client = (new Client()) + ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint + ->setProject('<YOUR_PROJECT_ID>') // Your project ID + ->setKey('<YOUR_API_KEY>'); // Your secret API key + +$project = new Project($client); + +$result = $project->updateOAuth2Webflow( + clientId: '<CLIENT_ID>', // optional + clientSecret: '<CLIENT_SECRET>', // optional + enabled: false // optional +); +``` diff --git a/examples/2.3.x/server-php/examples/project/update-o-auth-2-zoho.md b/examples/2.3.x/server-php/examples/project/update-o-auth-2-zoho.md index 624b7f4fc..3c01fc1f2 100644 --- a/examples/2.3.x/server-php/examples/project/update-o-auth-2-zoho.md +++ b/examples/2.3.x/server-php/examples/project/update-o-auth-2-zoho.md @@ -3,6 +3,7 @@ use Appwrite\Client; use Appwrite\Services\Project; +use Appwrite\Enums\ProjectOAuth2ZohoPrompt; $client = (new Client()) ->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint @@ -14,6 +15,7 @@ $project = new Project($client); $result = $project->updateOAuth2Zoho( clientId: '<CLIENT_ID>', // optional clientSecret: '<CLIENT_SECRET>', // optional + prompt: [ProjectOAuth2ZohoPrompt::CONSENT()], // optional enabled: false // optional ); ``` diff --git a/examples/2.3.x/server-php/examples/sites/list-frameworks.md b/examples/2.3.x/server-php/examples/sites/list-frameworks.md index 74ea88215..511338ad0 100644 --- a/examples/2.3.x/server-php/examples/sites/list-frameworks.md +++ b/examples/2.3.x/server-php/examples/sites/list-frameworks.md @@ -11,5 +11,7 @@ $client = (new Client()) $sites = new Sites($client); -$result = $sites->listFrameworks(); +$result = $sites->listFrameworks( + total: false // optional +); ``` diff --git a/examples/2.3.x/server-php/examples/sites/list-specifications.md b/examples/2.3.x/server-php/examples/sites/list-specifications.md index 3a6826adc..10e98a4cb 100644 --- a/examples/2.3.x/server-php/examples/sites/list-specifications.md +++ b/examples/2.3.x/server-php/examples/sites/list-specifications.md @@ -12,6 +12,7 @@ $client = (new Client()) $sites = new Sites($client); $result = $sites->listSpecifications( - type: 'runtimes' // optional + type: 'runtimes', // optional + total: false // optional ); ``` diff --git a/examples/2.3.x/server-php/examples/tablesdb/create-index.md b/examples/2.3.x/server-php/examples/tablesdb/create-index.md index 2b840eb30..89e4650c5 100644 --- a/examples/2.3.x/server-php/examples/tablesdb/create-index.md +++ b/examples/2.3.x/server-php/examples/tablesdb/create-index.md @@ -18,7 +18,7 @@ $result = $tablesDB->createIndex( tableId: '<TABLE_ID>', key: '<KEY>', type: TablesDBIndexType::KEY(), - columns: [], + columns: ["username"], orders: [OrderBy::ASC()], // optional lengths: [] // optional ); diff --git a/examples/2.3.x/server-php/examples/tablesdb/create-rows.md b/examples/2.3.x/server-php/examples/tablesdb/create-rows.md index 6ae0f802c..240ddc086 100644 --- a/examples/2.3.x/server-php/examples/tablesdb/create-rows.md +++ b/examples/2.3.x/server-php/examples/tablesdb/create-rows.md @@ -14,7 +14,16 @@ $tablesDB = new TablesDB($client); $result = $tablesDB->createRows( databaseId: '<DATABASE_ID>', tableId: '<TABLE_ID>', - rows: [], + rows: [ + { + "$id": "example1", + "username": "walter.obrien", + "email": "walter.obrien@example.com", + "fullName": "Walter O'Brien", + "age": 30, + "isAdmin": false + } + ], transactionId: '<TRANSACTION_ID>' // optional ); ``` diff --git a/examples/2.3.x/server-php/examples/tablesdb/delete-rows.md b/examples/2.3.x/server-php/examples/tablesdb/delete-rows.md index 2b13b6c7b..192f52765 100644 --- a/examples/2.3.x/server-php/examples/tablesdb/delete-rows.md +++ b/examples/2.3.x/server-php/examples/tablesdb/delete-rows.md @@ -14,7 +14,7 @@ $tablesDB = new TablesDB($client); $result = $tablesDB->deleteRows( databaseId: '<DATABASE_ID>', tableId: '<TABLE_ID>', - queries: [], // optional + queries: ["{\"method\":\"equal\", \"attribute\":\"$id\", \"values\":[\"<ROW_ID>\"]}"], // optional transactionId: '<TRANSACTION_ID>' // optional ); ``` diff --git a/examples/2.3.x/server-php/examples/tablesdb/list-transactions.md b/examples/2.3.x/server-php/examples/tablesdb/list-transactions.md index 90b698c57..2cad3139d 100644 --- a/examples/2.3.x/server-php/examples/tablesdb/list-transactions.md +++ b/examples/2.3.x/server-php/examples/tablesdb/list-transactions.md @@ -12,6 +12,7 @@ $client = (new Client()) $tablesDB = new TablesDB($client); $result = $tablesDB->listTransactions( - queries: [] // optional + queries: [], // optional + total: false // optional ); ``` diff --git a/examples/2.3.x/server-php/examples/tablesdb/upsert-rows.md b/examples/2.3.x/server-php/examples/tablesdb/upsert-rows.md index 56aa2657f..6150f35e9 100644 --- a/examples/2.3.x/server-php/examples/tablesdb/upsert-rows.md +++ b/examples/2.3.x/server-php/examples/tablesdb/upsert-rows.md @@ -14,7 +14,16 @@ $tablesDB = new TablesDB($client); $result = $tablesDB->upsertRows( databaseId: '<DATABASE_ID>', tableId: '<TABLE_ID>', - rows: [], + rows: [ + { + "$id": "example1", + "username": "walter.obrien", + "email": "walter.obrien@example.com", + "fullName": "Walter O'Brien", + "age": 30, + "isAdmin": false + } + ], transactionId: '<TRANSACTION_ID>' // optional ); ``` diff --git a/examples/2.3.x/server-php/examples/teams/create-membership.md b/examples/2.3.x/server-php/examples/teams/create-membership.md index 4c09dc7ec..08670ae76 100644 --- a/examples/2.3.x/server-php/examples/teams/create-membership.md +++ b/examples/2.3.x/server-php/examples/teams/create-membership.md @@ -13,7 +13,7 @@ $teams = new Teams($client); $result = $teams->createMembership( teamId: '<TEAM_ID>', - roles: [], + roles: ["editor"], email: 'email@example.com', // optional userId: '<USER_ID>', // optional phone: '+12065550100', // optional diff --git a/examples/2.3.x/server-php/examples/teams/update-membership.md b/examples/2.3.x/server-php/examples/teams/update-membership.md index 87741774b..3cdab5a05 100644 --- a/examples/2.3.x/server-php/examples/teams/update-membership.md +++ b/examples/2.3.x/server-php/examples/teams/update-membership.md @@ -14,6 +14,6 @@ $teams = new Teams($client); $result = $teams->updateMembership( teamId: '<TEAM_ID>', membershipId: '<MEMBERSHIP_ID>', - roles: [] + roles: ["editor"] ); ``` diff --git a/examples/2.3.x/server-php/examples/users/update-labels.md b/examples/2.3.x/server-php/examples/users/update-labels.md index 7ac457f58..b8e573c11 100644 --- a/examples/2.3.x/server-php/examples/users/update-labels.md +++ b/examples/2.3.x/server-php/examples/users/update-labels.md @@ -13,6 +13,6 @@ $users = new Users($client); $result = $users->updateLabels( userId: '<USER_ID>', - labels: [] + labels: ["subscriber"] ); ``` diff --git a/examples/2.3.x/server-php/examples/vectorsdb/create-collection.md b/examples/2.3.x/server-php/examples/vectorsdb/create-collection.md index c3ed66282..3bbdb0763 100644 --- a/examples/2.3.x/server-php/examples/vectorsdb/create-collection.md +++ b/examples/2.3.x/server-php/examples/vectorsdb/create-collection.md @@ -17,7 +17,7 @@ $result = $vectorsDB->createCollection( databaseId: '<DATABASE_ID>', collectionId: '<COLLECTION_ID>', name: '<NAME>', - dimension: 1, + dimension: 4, permissions: [Permission::read(Role::any())], // optional documentSecurity: false, // optional enabled: false // optional diff --git a/examples/2.3.x/server-php/examples/vectorsdb/create-documents.md b/examples/2.3.x/server-php/examples/vectorsdb/create-documents.md index 2d1c9c2f8..054d3b35f 100644 --- a/examples/2.3.x/server-php/examples/vectorsdb/create-documents.md +++ b/examples/2.3.x/server-php/examples/vectorsdb/create-documents.md @@ -14,7 +14,20 @@ $vectorsDB = new VectorsDB($client); $result = $vectorsDB->createDocuments( databaseId: '<DATABASE_ID>', collectionId: '<COLLECTION_ID>', - documents: [], + documents: [ + { + "$id": "example1", + "embeddings": [ + 0.12, + -0.55, + 0.88, + 1.02 + ], + "metadata": { + "name": "First document" + } + } + ], transactionId: '<TRANSACTION_ID>' // optional ); ``` diff --git a/examples/2.3.x/server-php/examples/vectorsdb/create-index.md b/examples/2.3.x/server-php/examples/vectorsdb/create-index.md index d3e699cbd..369f018b3 100644 --- a/examples/2.3.x/server-php/examples/vectorsdb/create-index.md +++ b/examples/2.3.x/server-php/examples/vectorsdb/create-index.md @@ -18,7 +18,7 @@ $result = $vectorsDB->createIndex( collectionId: '<COLLECTION_ID>', key: '<KEY>', type: VectorsDBIndexType::HNSWEUCLIDEAN(), - attributes: [], + attributes: ["embeddings"], orders: [OrderBy::ASC()], // optional lengths: [] // optional ); diff --git a/examples/2.3.x/server-php/examples/vectorsdb/create-operations.md b/examples/2.3.x/server-php/examples/vectorsdb/create-operations.md index c311d5e41..fa3d9769d 100644 --- a/examples/2.3.x/server-php/examples/vectorsdb/create-operations.md +++ b/examples/2.3.x/server-php/examples/vectorsdb/create-operations.md @@ -20,7 +20,15 @@ $result = $vectorsDB->createOperations( "collectionId": "<COLLECTION_ID>", "documentId": "<DOCUMENT_ID>", "data": { - "name": "Walter O'Brien" + "embeddings": [ + 0.12, + -0.55, + 0.88, + 1.02 + ], + "metadata": { + "name": "First document" + } } } ] // optional diff --git a/examples/2.3.x/server-php/examples/vectorsdb/delete-documents.md b/examples/2.3.x/server-php/examples/vectorsdb/delete-documents.md index 17b0831d0..fbca7fd43 100644 --- a/examples/2.3.x/server-php/examples/vectorsdb/delete-documents.md +++ b/examples/2.3.x/server-php/examples/vectorsdb/delete-documents.md @@ -14,7 +14,7 @@ $vectorsDB = new VectorsDB($client); $result = $vectorsDB->deleteDocuments( databaseId: '<DATABASE_ID>', collectionId: '<COLLECTION_ID>', - queries: [], // optional + queries: ["{\"method\":\"equal\", \"attribute\":\"$id\", \"values\":[\"<DOCUMENT_ID>\"]}"], // optional transactionId: '<TRANSACTION_ID>' // optional ); ``` diff --git a/examples/2.3.x/server-php/examples/vectorsdb/list-transactions.md b/examples/2.3.x/server-php/examples/vectorsdb/list-transactions.md index 022bd60e1..6688e404b 100644 --- a/examples/2.3.x/server-php/examples/vectorsdb/list-transactions.md +++ b/examples/2.3.x/server-php/examples/vectorsdb/list-transactions.md @@ -12,6 +12,7 @@ $client = (new Client()) $vectorsDB = new VectorsDB($client); $result = $vectorsDB->listTransactions( - queries: [] // optional + queries: [], // optional + total: false // optional ); ``` diff --git a/examples/2.3.x/server-php/examples/vectorsdb/update-collection.md b/examples/2.3.x/server-php/examples/vectorsdb/update-collection.md index 7898ee038..d9815b610 100644 --- a/examples/2.3.x/server-php/examples/vectorsdb/update-collection.md +++ b/examples/2.3.x/server-php/examples/vectorsdb/update-collection.md @@ -17,7 +17,7 @@ $result = $vectorsDB->updateCollection( databaseId: '<DATABASE_ID>', collectionId: '<COLLECTION_ID>', name: '<NAME>', - dimension: 1, // optional + dimension: 4, // optional permissions: [Permission::read(Role::any())], // optional documentSecurity: false, // optional enabled: false // optional diff --git a/examples/2.3.x/server-php/examples/vectorsdb/upsert-documents.md b/examples/2.3.x/server-php/examples/vectorsdb/upsert-documents.md index 11e5d31fd..516b68789 100644 --- a/examples/2.3.x/server-php/examples/vectorsdb/upsert-documents.md +++ b/examples/2.3.x/server-php/examples/vectorsdb/upsert-documents.md @@ -14,7 +14,20 @@ $vectorsDB = new VectorsDB($client); $result = $vectorsDB->upsertDocuments( databaseId: '<DATABASE_ID>', collectionId: '<COLLECTION_ID>', - documents: [], + documents: [ + { + "$id": "example1", + "embeddings": [ + 0.12, + -0.55, + 0.88, + 1.02 + ], + "metadata": { + "name": "First document" + } + } + ], transactionId: '<TRANSACTION_ID>' // optional ); ``` diff --git a/examples/2.3.x/server-php/examples/webhooks/create.md b/examples/2.3.x/server-php/examples/webhooks/create.md index 2b437a54b..536657d06 100644 --- a/examples/2.3.x/server-php/examples/webhooks/create.md +++ b/examples/2.3.x/server-php/examples/webhooks/create.md @@ -15,7 +15,7 @@ $result = $webhooks->create( webhookId: '<WEBHOOK_ID>', url: 'https://example.com/webhook', name: '<NAME>', - events: [], + events: ["users.*.create"], enabled: false, // optional tls: false, // optional authUsername: '<AUTH_USERNAME>', // optional diff --git a/examples/2.3.x/server-php/examples/webhooks/update.md b/examples/2.3.x/server-php/examples/webhooks/update.md index 95dafcf0f..7ea370e93 100644 --- a/examples/2.3.x/server-php/examples/webhooks/update.md +++ b/examples/2.3.x/server-php/examples/webhooks/update.md @@ -15,7 +15,7 @@ $result = $webhooks->update( webhookId: '<WEBHOOK_ID>', name: '<NAME>', url: 'https://example.com/webhook', - events: [], + events: ["users.*.create"], enabled: false, // optional tls: false, // optional authUsername: '<AUTH_USERNAME>', // optional diff --git a/examples/2.3.x/server-python/examples/account/create-email-password-session.md b/examples/2.3.x/server-python/examples/account/create-email-password-session.md index 292074dba..7e016dab2 100644 --- a/examples/2.3.x/server-python/examples/account/create-email-password-session.md +++ b/examples/2.3.x/server-python/examples/account/create-email-password-session.md @@ -12,7 +12,8 @@ account = Account(client) result: Session = account.create_email_password_session( email = 'email@example.com', - password = 'password' + password = 'password', + duration = 60 # optional ) print(result.model_dump()) diff --git a/examples/2.3.x/server-python/examples/account/delete-sessions.md b/examples/2.3.x/server-python/examples/account/delete-sessions.md index 4db5c1ec6..ae380854b 100644 --- a/examples/2.3.x/server-python/examples/account/delete-sessions.md +++ b/examples/2.3.x/server-python/examples/account/delete-sessions.md @@ -9,5 +9,7 @@ client.set_session('') # The user session to authenticate with account = Account(client) -result = account.delete_sessions() +result = account.delete_sessions( + current = False # optional +) ``` diff --git a/examples/2.3.x/server-python/examples/account/list-sessions.md b/examples/2.3.x/server-python/examples/account/list-sessions.md index d9df7a714..828aad6fd 100644 --- a/examples/2.3.x/server-python/examples/account/list-sessions.md +++ b/examples/2.3.x/server-python/examples/account/list-sessions.md @@ -10,7 +10,9 @@ client.set_session('') # The user session to authenticate with account = Account(client) -result: SessionList = account.list_sessions() +result: SessionList = account.list_sessions( + total = False # optional +) print(result.model_dump()) ``` diff --git a/examples/2.3.x/server-python/examples/analytics/create-event.md b/examples/2.3.x/server-python/examples/analytics/create-event.md new file mode 100644 index 000000000..b57a48b1d --- /dev/null +++ b/examples/2.3.x/server-python/examples/analytics/create-event.md @@ -0,0 +1,27 @@ +```python +from appwrite.client import Client +from appwrite.services.analytics import Analytics + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_session('') # The user session to authenticate with + +analytics = Analytics(client) + +result = analytics.create_event( + property_id = '<PROPERTY_ID>', + name = '<NAME>', + url = 'https://example.com', + domain = '<DOMAIN>', # optional + referrer = '<REFERRER>', # optional + screen_width = None, # optional + session_hash = '<SESSION_HASH>', # optional + scroll_depth = 0, # optional + engagement_time = None, # optional + props = [], # optional + user_id = '<USER_ID>', # optional + ip = '<IP>', # optional + user_agent = '<USER_AGENT>' # optional +) +``` diff --git a/examples/2.3.x/server-python/examples/analytics/create-property.md b/examples/2.3.x/server-python/examples/analytics/create-property.md new file mode 100644 index 000000000..403301ca8 --- /dev/null +++ b/examples/2.3.x/server-python/examples/analytics/create-property.md @@ -0,0 +1,24 @@ +```python +from appwrite.client import Client +from appwrite.services.analytics import Analytics +from appwrite.models import AnalyticsProperty + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +analytics = Analytics(client) + +result: AnalyticsProperty = analytics.create_property( + property_id = '<PROPERTY_ID>', + name = '<NAME>', + domain = '<DOMAIN>', # optional + timezone = '<TIMEZONE>', # optional + enabled = False, # optional + public = False, # optional + allowed_origins = [] # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/analytics/delete-property.md b/examples/2.3.x/server-python/examples/analytics/delete-property.md new file mode 100644 index 000000000..caaf97b15 --- /dev/null +++ b/examples/2.3.x/server-python/examples/analytics/delete-property.md @@ -0,0 +1,15 @@ +```python +from appwrite.client import Client +from appwrite.services.analytics import Analytics + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +analytics = Analytics(client) + +result = analytics.delete_property( + property_id = '<PROPERTY_ID>' +) +``` diff --git a/examples/2.3.x/server-python/examples/analytics/get-property.md b/examples/2.3.x/server-python/examples/analytics/get-property.md new file mode 100644 index 000000000..d8ffc6b6d --- /dev/null +++ b/examples/2.3.x/server-python/examples/analytics/get-property.md @@ -0,0 +1,18 @@ +```python +from appwrite.client import Client +from appwrite.services.analytics import Analytics +from appwrite.models import AnalyticsProperty + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +analytics = Analytics(client) + +result: AnalyticsProperty = analytics.get_property( + property_id = '<PROPERTY_ID>' +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/analytics/list-metrics.md b/examples/2.3.x/server-python/examples/analytics/list-metrics.md new file mode 100644 index 000000000..1c3da39e7 --- /dev/null +++ b/examples/2.3.x/server-python/examples/analytics/list-metrics.md @@ -0,0 +1,27 @@ +```python +from appwrite.client import Client +from appwrite.services.analytics import Analytics +from appwrite.models import AnalyticsMetricList +from appwrite.enums import AnalyticsInterval +from appwrite.enums import AnalyticsDimension + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +analytics = Analytics(client) + +result: AnalyticsMetricList = analytics.list_metrics( + property_id = '<PROPERTY_ID>', + queries = [], # optional + interval = AnalyticsInterval.ONE_HOUR, # optional + dimensions = [AnalyticsDimension.COUNTRY], # optional + date_range = '<DATE_RANGE>', # optional + start_at = '2020-10-15T06:38:00.000+00:00', # optional + end_at = '2020-10-15T06:38:00.000+00:00', # optional + limit = 1 # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/analytics/list-properties.md b/examples/2.3.x/server-python/examples/analytics/list-properties.md new file mode 100644 index 000000000..c1fe9c15d --- /dev/null +++ b/examples/2.3.x/server-python/examples/analytics/list-properties.md @@ -0,0 +1,20 @@ +```python +from appwrite.client import Client +from appwrite.services.analytics import Analytics +from appwrite.models import AnalyticsPropertyList + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +analytics = Analytics(client) + +result: AnalyticsPropertyList = analytics.list_properties( + queries = [], # optional + search = '<SEARCH>', # optional + total = False # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/analytics/update-property.md b/examples/2.3.x/server-python/examples/analytics/update-property.md new file mode 100644 index 000000000..67b5b8a53 --- /dev/null +++ b/examples/2.3.x/server-python/examples/analytics/update-property.md @@ -0,0 +1,24 @@ +```python +from appwrite.client import Client +from appwrite.services.analytics import Analytics +from appwrite.models import AnalyticsProperty + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +analytics = Analytics(client) + +result: AnalyticsProperty = analytics.update_property( + property_id = '<PROPERTY_ID>', + name = '<NAME>', # optional + domain = '<DOMAIN>', # optional + timezone = '<TIMEZONE>', # optional + enabled = False, # optional + public = False, # optional + allowed_origins = [] # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/avatars/delete-photo.md b/examples/2.3.x/server-python/examples/avatars/delete-photo.md new file mode 100644 index 000000000..0851c0c5f --- /dev/null +++ b/examples/2.3.x/server-python/examples/avatars/delete-photo.md @@ -0,0 +1,13 @@ +```python +from appwrite.client import Client +from appwrite.services.avatars import Avatars + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_session('') # The user session to authenticate with + +avatars = Avatars(client) + +result = avatars.delete_photo() +``` diff --git a/examples/2.3.x/server-python/examples/avatars/get-screenshot.md b/examples/2.3.x/server-python/examples/avatars/get-screenshot.md index cf7f9a6b4..b837106a9 100644 --- a/examples/2.3.x/server-python/examples/avatars/get-screenshot.md +++ b/examples/2.3.x/server-python/examples/avatars/get-screenshot.md @@ -16,8 +16,7 @@ avatars = Avatars(client) result: bytes = avatars.get_screenshot( url = 'https://example.com', headers = { - "Authorization": "Bearer token123", - "X-Custom-Header": "value" + "Accept-Language": "en-US,en;q=0.9" }, # optional viewport_width = 1920, # optional viewport_height = 1080, # optional diff --git a/examples/2.3.x/server-python/examples/avatars/update-photo.md b/examples/2.3.x/server-python/examples/avatars/update-photo.md new file mode 100644 index 000000000..cdd605a09 --- /dev/null +++ b/examples/2.3.x/server-python/examples/avatars/update-photo.md @@ -0,0 +1,19 @@ +```python +from appwrite.client import Client +from appwrite.services.avatars import Avatars +from appwrite.input_file import InputFile +from appwrite.models import Account + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_session('') # The user session to authenticate with + +avatars = Avatars(client) + +result: Account = avatars.update_photo( + file = InputFile.from_path('file.png') +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/databases/create-documents.md b/examples/2.3.x/server-python/examples/databases/create-documents.md index a1df96a90..13e7b94f1 100644 --- a/examples/2.3.x/server-python/examples/databases/create-documents.md +++ b/examples/2.3.x/server-python/examples/databases/create-documents.md @@ -13,7 +13,16 @@ databases = Databases(client) result: DocumentList = databases.create_documents( database_id = '<DATABASE_ID>', collection_id = '<COLLECTION_ID>', - documents = [], + documents = [ + { + "$id": "example1", + "username": "walter.obrien", + "email": "walter.obrien@example.com", + "fullName": "Walter O'Brien", + "age": 30, + "isAdmin": false + } + ], transaction_id = '<TRANSACTION_ID>' # optional ) diff --git a/examples/2.3.x/server-python/examples/databases/create-index.md b/examples/2.3.x/server-python/examples/databases/create-index.md index 71c694f1f..1669f248e 100644 --- a/examples/2.3.x/server-python/examples/databases/create-index.md +++ b/examples/2.3.x/server-python/examples/databases/create-index.md @@ -17,7 +17,7 @@ result: Index = databases.create_index( collection_id = '<COLLECTION_ID>', key = '<KEY>', type = DatabasesIndexType.KEY, - attributes = [], + attributes = ["username"], orders = [OrderBy.ASC], # optional lengths = [] # optional ) diff --git a/examples/2.3.x/server-python/examples/databases/delete-documents.md b/examples/2.3.x/server-python/examples/databases/delete-documents.md index d410bdefe..21a2a2148 100644 --- a/examples/2.3.x/server-python/examples/databases/delete-documents.md +++ b/examples/2.3.x/server-python/examples/databases/delete-documents.md @@ -13,7 +13,7 @@ databases = Databases(client) result: DocumentList = databases.delete_documents( database_id = '<DATABASE_ID>', collection_id = '<COLLECTION_ID>', - queries = [], # optional + queries = ["{\"method\":\"equal\", \"attribute\":\"$id\", \"values\":[\"<DOCUMENT_ID>\"]}"], # optional transaction_id = '<TRANSACTION_ID>' # optional ) diff --git a/examples/2.3.x/server-python/examples/databases/get-attribute.md b/examples/2.3.x/server-python/examples/databases/get-attribute.md index 880a58727..fdcc23da5 100644 --- a/examples/2.3.x/server-python/examples/databases/get-attribute.md +++ b/examples/2.3.x/server-python/examples/databases/get-attribute.md @@ -2,6 +2,7 @@ from appwrite.client import Client from appwrite.services.databases import Databases from appwrite.models import AttributeBoolean +from appwrite.models import AttributeBigint from appwrite.models import AttributeInteger from appwrite.models import AttributeFloat from appwrite.models import AttributeEmail @@ -10,6 +11,13 @@ from appwrite.models import AttributeUrl from appwrite.models import AttributeIp from appwrite.models import AttributeDatetime from appwrite.models import AttributeRelationship +from appwrite.models import AttributePoint +from appwrite.models import AttributeLine +from appwrite.models import AttributePolygon +from appwrite.models import AttributeVarchar +from appwrite.models import AttributeText +from appwrite.models import AttributeMediumtext +from appwrite.models import AttributeLongtext from appwrite.models import AttributeString from typing import Union @@ -20,7 +28,7 @@ client.set_key('<YOUR_API_KEY>') # Your secret API key databases = Databases(client) -result: Union[AttributeBoolean, AttributeInteger, AttributeFloat, AttributeEmail, AttributeEnum, AttributeUrl, AttributeIp, AttributeDatetime, AttributeRelationship, AttributeString] = databases.get_attribute( +result: Union[AttributeBoolean, AttributeBigint, AttributeInteger, AttributeFloat, AttributeEmail, AttributeEnum, AttributeUrl, AttributeIp, AttributeDatetime, AttributeRelationship, AttributePoint, AttributeLine, AttributePolygon, AttributeVarchar, AttributeText, AttributeMediumtext, AttributeLongtext, AttributeString] = databases.get_attribute( database_id = '<DATABASE_ID>', collection_id = '<COLLECTION_ID>', key = '<KEY>' diff --git a/examples/2.3.x/server-python/examples/databases/list-transactions.md b/examples/2.3.x/server-python/examples/databases/list-transactions.md index bd0993144..d382cb93c 100644 --- a/examples/2.3.x/server-python/examples/databases/list-transactions.md +++ b/examples/2.3.x/server-python/examples/databases/list-transactions.md @@ -11,7 +11,8 @@ client.set_key('<YOUR_API_KEY>') # Your secret API key databases = Databases(client) result: TransactionList = databases.list_transactions( - queries = [] # optional + queries = [], # optional + total = False # optional ) print(result.model_dump()) diff --git a/examples/2.3.x/server-python/examples/databases/upsert-documents.md b/examples/2.3.x/server-python/examples/databases/upsert-documents.md index 5039ccb0a..ae28f031a 100644 --- a/examples/2.3.x/server-python/examples/databases/upsert-documents.md +++ b/examples/2.3.x/server-python/examples/databases/upsert-documents.md @@ -13,7 +13,16 @@ databases = Databases(client) result: DocumentList = databases.upsert_documents( database_id = '<DATABASE_ID>', collection_id = '<COLLECTION_ID>', - documents = [], + documents = [ + { + "$id": "example1", + "username": "walter.obrien", + "email": "walter.obrien@example.com", + "fullName": "Walter O'Brien", + "age": 30, + "isAdmin": false + } + ], transaction_id = '<TRANSACTION_ID>' # optional ) diff --git a/examples/2.3.x/server-python/examples/documentsdb/create-documents.md b/examples/2.3.x/server-python/examples/documentsdb/create-documents.md index 2b15e560a..7f470a36a 100644 --- a/examples/2.3.x/server-python/examples/documentsdb/create-documents.md +++ b/examples/2.3.x/server-python/examples/documentsdb/create-documents.md @@ -13,7 +13,16 @@ documents_db = DocumentsDB(client) result: DocumentList = documents_db.create_documents( database_id = '<DATABASE_ID>', collection_id = '<COLLECTION_ID>', - documents = [], + documents = [ + { + "$id": "example1", + "username": "walter.obrien", + "email": "walter.obrien@example.com", + "fullName": "Walter O'Brien", + "age": 30, + "isAdmin": false + } + ], transaction_id = '<TRANSACTION_ID>' # optional ) diff --git a/examples/2.3.x/server-python/examples/documentsdb/create-index.md b/examples/2.3.x/server-python/examples/documentsdb/create-index.md index 34a36dc83..c25950ded 100644 --- a/examples/2.3.x/server-python/examples/documentsdb/create-index.md +++ b/examples/2.3.x/server-python/examples/documentsdb/create-index.md @@ -17,7 +17,7 @@ result: Index = documents_db.create_index( collection_id = '<COLLECTION_ID>', key = '<KEY>', type = DocumentsDBIndexType.KEY, - attributes = [], + attributes = ["username"], orders = [OrderBy.ASC], # optional lengths = [] # optional ) diff --git a/examples/2.3.x/server-python/examples/documentsdb/delete-documents.md b/examples/2.3.x/server-python/examples/documentsdb/delete-documents.md index 8bc343de9..4b127c797 100644 --- a/examples/2.3.x/server-python/examples/documentsdb/delete-documents.md +++ b/examples/2.3.x/server-python/examples/documentsdb/delete-documents.md @@ -13,7 +13,7 @@ documents_db = DocumentsDB(client) result: DocumentList = documents_db.delete_documents( database_id = '<DATABASE_ID>', collection_id = '<COLLECTION_ID>', - queries = [], # optional + queries = ["{\"method\":\"equal\", \"attribute\":\"$id\", \"values\":[\"<DOCUMENT_ID>\"]}"], # optional transaction_id = '<TRANSACTION_ID>' # optional ) diff --git a/examples/2.3.x/server-python/examples/documentsdb/list-transactions.md b/examples/2.3.x/server-python/examples/documentsdb/list-transactions.md index 6dc7aae2f..7128d9b5c 100644 --- a/examples/2.3.x/server-python/examples/documentsdb/list-transactions.md +++ b/examples/2.3.x/server-python/examples/documentsdb/list-transactions.md @@ -11,7 +11,8 @@ client.set_key('<YOUR_API_KEY>') # Your secret API key documents_db = DocumentsDB(client) result: TransactionList = documents_db.list_transactions( - queries = [] # optional + queries = [], # optional + total = False # optional ) print(result.model_dump()) diff --git a/examples/2.3.x/server-python/examples/documentsdb/upsert-documents.md b/examples/2.3.x/server-python/examples/documentsdb/upsert-documents.md index d98b227c2..f1613df1f 100644 --- a/examples/2.3.x/server-python/examples/documentsdb/upsert-documents.md +++ b/examples/2.3.x/server-python/examples/documentsdb/upsert-documents.md @@ -13,7 +13,16 @@ documents_db = DocumentsDB(client) result: DocumentList = documents_db.upsert_documents( database_id = '<DATABASE_ID>', collection_id = '<COLLECTION_ID>', - documents = [], + documents = [ + { + "$id": "example1", + "username": "walter.obrien", + "email": "walter.obrien@example.com", + "fullName": "Walter O'Brien", + "age": 30, + "isAdmin": false + } + ], transaction_id = '<TRANSACTION_ID>' # optional ) diff --git a/examples/2.3.x/server-python/examples/embeddings/create-text-embeddings.md b/examples/2.3.x/server-python/examples/embeddings/create-text-embeddings.md index 49d3c258d..b91c34337 100644 --- a/examples/2.3.x/server-python/examples/embeddings/create-text-embeddings.md +++ b/examples/2.3.x/server-python/examples/embeddings/create-text-embeddings.md @@ -12,7 +12,7 @@ client.set_key('<YOUR_API_KEY>') # Your secret API key embeddings = Embeddings(client) result: EmbeddingList = embeddings.create_text_embeddings( - texts = [], + texts = ["Appwrite helps developers build applications.", "Find documents with semantic search."], model = EmbeddingModel.NOMIC_EMBED_TEXT # optional ) diff --git a/examples/2.3.x/server-python/examples/functions/list-runtimes.md b/examples/2.3.x/server-python/examples/functions/list-runtimes.md index ee75c80e6..a33db3ad4 100644 --- a/examples/2.3.x/server-python/examples/functions/list-runtimes.md +++ b/examples/2.3.x/server-python/examples/functions/list-runtimes.md @@ -10,7 +10,9 @@ client.set_key('<YOUR_API_KEY>') # Your secret API key functions = Functions(client) -result: RuntimeList = functions.list_runtimes() +result: RuntimeList = functions.list_runtimes( + total = False # optional +) print(result.model_dump()) ``` diff --git a/examples/2.3.x/server-python/examples/functions/list-specifications.md b/examples/2.3.x/server-python/examples/functions/list-specifications.md index 7cf529a93..ff71a1be0 100644 --- a/examples/2.3.x/server-python/examples/functions/list-specifications.md +++ b/examples/2.3.x/server-python/examples/functions/list-specifications.md @@ -11,7 +11,8 @@ client.set_key('<YOUR_API_KEY>') # Your secret API key functions = Functions(client) result: SpecificationList = functions.list_specifications( - type = 'runtimes' # optional + type = 'runtimes', # optional + total = False # optional ) print(result.model_dump()) diff --git a/examples/2.3.x/server-python/examples/graphql/mutation.md b/examples/2.3.x/server-python/examples/graphql/mutation.md index 26ed1cbed..a7609b1f4 100644 --- a/examples/2.3.x/server-python/examples/graphql/mutation.md +++ b/examples/2.3.x/server-python/examples/graphql/mutation.md @@ -10,6 +10,8 @@ client.set_key('<YOUR_API_KEY>') # Your secret API key graphql = Graphql(client) result = graphql.mutation( - query = {} + query = { + "query": "mutation { accountUpdateName(name: \"Walter\") { name } }" + } ) ``` diff --git a/examples/2.3.x/server-python/examples/graphql/query.md b/examples/2.3.x/server-python/examples/graphql/query.md index 94142f993..350c47ba3 100644 --- a/examples/2.3.x/server-python/examples/graphql/query.md +++ b/examples/2.3.x/server-python/examples/graphql/query.md @@ -10,6 +10,8 @@ client.set_key('<YOUR_API_KEY>') # Your secret API key graphql = Graphql(client) result = graphql.query( - query = {} + query = { + "query": "query { localeGet { ip } }" + } ) ``` diff --git a/examples/2.3.x/server-python/examples/locale/list-codes.md b/examples/2.3.x/server-python/examples/locale/list-codes.md index adc293961..660794111 100644 --- a/examples/2.3.x/server-python/examples/locale/list-codes.md +++ b/examples/2.3.x/server-python/examples/locale/list-codes.md @@ -10,7 +10,9 @@ client.set_session('') # The user session to authenticate with locale = Locale(client) -result: LocaleCodeList = locale.list_codes() +result: LocaleCodeList = locale.list_codes( + total = False # optional +) print(result.model_dump()) ``` diff --git a/examples/2.3.x/server-python/examples/locale/list-continents.md b/examples/2.3.x/server-python/examples/locale/list-continents.md index fcf05e6ef..cc7c3fd7e 100644 --- a/examples/2.3.x/server-python/examples/locale/list-continents.md +++ b/examples/2.3.x/server-python/examples/locale/list-continents.md @@ -10,7 +10,9 @@ client.set_session('') # The user session to authenticate with locale = Locale(client) -result: ContinentList = locale.list_continents() +result: ContinentList = locale.list_continents( + total = False # optional +) print(result.model_dump()) ``` diff --git a/examples/2.3.x/server-python/examples/locale/list-countries-eu.md b/examples/2.3.x/server-python/examples/locale/list-countries-eu.md index 374cc9a37..d7bebd5a3 100644 --- a/examples/2.3.x/server-python/examples/locale/list-countries-eu.md +++ b/examples/2.3.x/server-python/examples/locale/list-countries-eu.md @@ -10,7 +10,9 @@ client.set_session('') # The user session to authenticate with locale = Locale(client) -result: CountryList = locale.list_countries_eu() +result: CountryList = locale.list_countries_eu( + total = False # optional +) print(result.model_dump()) ``` diff --git a/examples/2.3.x/server-python/examples/locale/list-countries-phones.md b/examples/2.3.x/server-python/examples/locale/list-countries-phones.md index 8b36a1f91..cf23539ba 100644 --- a/examples/2.3.x/server-python/examples/locale/list-countries-phones.md +++ b/examples/2.3.x/server-python/examples/locale/list-countries-phones.md @@ -10,7 +10,9 @@ client.set_session('') # The user session to authenticate with locale = Locale(client) -result: PhoneList = locale.list_countries_phones() +result: PhoneList = locale.list_countries_phones( + total = False # optional +) print(result.model_dump()) ``` diff --git a/examples/2.3.x/server-python/examples/locale/list-countries.md b/examples/2.3.x/server-python/examples/locale/list-countries.md index 5c45a7668..73cb699fe 100644 --- a/examples/2.3.x/server-python/examples/locale/list-countries.md +++ b/examples/2.3.x/server-python/examples/locale/list-countries.md @@ -10,7 +10,9 @@ client.set_session('') # The user session to authenticate with locale = Locale(client) -result: CountryList = locale.list_countries() +result: CountryList = locale.list_countries( + total = False # optional +) print(result.model_dump()) ``` diff --git a/examples/2.3.x/server-python/examples/locale/list-currencies.md b/examples/2.3.x/server-python/examples/locale/list-currencies.md index 07f061c96..6d4d26288 100644 --- a/examples/2.3.x/server-python/examples/locale/list-currencies.md +++ b/examples/2.3.x/server-python/examples/locale/list-currencies.md @@ -10,7 +10,9 @@ client.set_session('') # The user session to authenticate with locale = Locale(client) -result: CurrencyList = locale.list_currencies() +result: CurrencyList = locale.list_currencies( + total = False # optional +) print(result.model_dump()) ``` diff --git a/examples/2.3.x/server-python/examples/locale/list-languages.md b/examples/2.3.x/server-python/examples/locale/list-languages.md index 3fb0c82cf..ea1f75f25 100644 --- a/examples/2.3.x/server-python/examples/locale/list-languages.md +++ b/examples/2.3.x/server-python/examples/locale/list-languages.md @@ -10,7 +10,9 @@ client.set_session('') # The user session to authenticate with locale = Locale(client) -result: LanguageList = locale.list_languages() +result: LanguageList = locale.list_languages( + total = False # optional +) print(result.model_dump()) ``` diff --git a/examples/2.3.x/server-python/examples/messaging/create-push.md b/examples/2.3.x/server-python/examples/messaging/create-push.md index 155128a02..0b169447c 100644 --- a/examples/2.3.x/server-python/examples/messaging/create-push.md +++ b/examples/2.3.x/server-python/examples/messaging/create-push.md @@ -30,7 +30,8 @@ result: Message = messaging.create_push( scheduled_at = '2020-10-15T06:38:00.000+00:00', # optional content_available = False, # optional critical = False, # optional - priority = MessagePriority.NORMAL # optional + priority = MessagePriority.NORMAL, # optional + channel_id = '<CHANNEL_ID>' # optional ) print(result.model_dump()) diff --git a/examples/2.3.x/server-python/examples/messaging/update-email.md b/examples/2.3.x/server-python/examples/messaging/update-email.md index fc0f9ccba..b8659ff0b 100644 --- a/examples/2.3.x/server-python/examples/messaging/update-email.md +++ b/examples/2.3.x/server-python/examples/messaging/update-email.md @@ -12,19 +12,19 @@ messaging = Messaging(client) result: Message = messaging.update_email( message_id = '<MESSAGE_ID>', + subject = '<SUBJECT>', # optional + content = '<CONTENT>', # optional topics = [], # optional users = [], # optional targets = [], # optional - subject = '<SUBJECT>', # optional - content = '<CONTENT>', # optional - draft = False, # optional - html = False, # optional cc = [], # optional bcc = [], # optional + attachments = [], # optional reply_to_email = 'email@example.com', # optional reply_to_name = '<REPLY_TO_NAME>', # optional - scheduled_at = '2020-10-15T06:38:00.000+00:00', # optional - attachments = [] # optional + draft = False, # optional + html = False, # optional + scheduled_at = '2020-10-15T06:38:00.000+00:00' # optional ) print(result.model_dump()) diff --git a/examples/2.3.x/server-python/examples/messaging/update-push.md b/examples/2.3.x/server-python/examples/messaging/update-push.md index 0c592d6c1..ed0649e00 100644 --- a/examples/2.3.x/server-python/examples/messaging/update-push.md +++ b/examples/2.3.x/server-python/examples/messaging/update-push.md @@ -13,11 +13,11 @@ messaging = Messaging(client) result: Message = messaging.update_push( message_id = '<MESSAGE_ID>', + title = '<TITLE>', # optional + body = '<BODY>', # optional topics = [], # optional users = [], # optional targets = [], # optional - title = '<TITLE>', # optional - body = '<BODY>', # optional data = {}, # optional action = '<ACTION>', # optional image = '<ID1:ID2>', # optional @@ -30,7 +30,8 @@ result: Message = messaging.update_push( scheduled_at = '2020-10-15T06:38:00.000+00:00', # optional content_available = False, # optional critical = False, # optional - priority = MessagePriority.NORMAL # optional + priority = MessagePriority.NORMAL, # optional + channel_id = '<CHANNEL_ID>' # optional ) print(result.model_dump()) diff --git a/examples/2.3.x/server-python/examples/messaging/update-sms.md b/examples/2.3.x/server-python/examples/messaging/update-sms.md index 32698978b..f499e6aef 100644 --- a/examples/2.3.x/server-python/examples/messaging/update-sms.md +++ b/examples/2.3.x/server-python/examples/messaging/update-sms.md @@ -12,10 +12,10 @@ messaging = Messaging(client) result: Message = messaging.update_sms( message_id = '<MESSAGE_ID>', + content = '<CONTENT>', # optional topics = [], # optional users = [], # optional targets = [], # optional - content = '<CONTENT>', # optional draft = False, # optional scheduled_at = '2020-10-15T06:38:00.000+00:00' # optional ) diff --git a/examples/2.3.x/server-python/examples/oauth2/introspect.md b/examples/2.3.x/server-python/examples/oauth2/introspect.md new file mode 100644 index 000000000..bde9da87e --- /dev/null +++ b/examples/2.3.x/server-python/examples/oauth2/introspect.md @@ -0,0 +1,21 @@ +```python +from appwrite.client import Client +from appwrite.services.oauth2 import Oauth2 +from appwrite.models import Oauth2Introspection + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +oauth2 = Oauth2(client) + +result: Oauth2Introspection = oauth2.introspect( + token = '<TOKEN>', + token_type_hint = 'access_token', # optional + client_id = '<CLIENT_ID>', # optional + client_secret = '<CLIENT_SECRET>' # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/organization/create-ephemeral-project-key.md b/examples/2.3.x/server-python/examples/organization/create-ephemeral-project-key.md index b807f2247..25bc89513 100644 --- a/examples/2.3.x/server-python/examples/organization/create-ephemeral-project-key.md +++ b/examples/2.3.x/server-python/examples/organization/create-ephemeral-project-key.md @@ -13,7 +13,7 @@ organization = Organization(client) result: EphemeralKey = organization.create_ephemeral_project_key( project_id = '<PROJECT_ID>', - scopes = [ProjectKeyScopes.PROJECT_READ], + scopes = [ProjectKeyScopes.USERS_READ], duration = 600 ) diff --git a/examples/2.3.x/server-python/examples/organization/update-project-key.md b/examples/2.3.x/server-python/examples/organization/update-project-key.md index 8f1269237..d3609e81f 100644 --- a/examples/2.3.x/server-python/examples/organization/update-project-key.md +++ b/examples/2.3.x/server-python/examples/organization/update-project-key.md @@ -15,7 +15,7 @@ result: Key = organization.update_project_key( project_id = '<PROJECT_ID>', key_id = '<KEY_ID>', name = '<NAME>', - scopes = [ProjectKeyScopes.PROJECT_READ], + scopes = [ProjectKeyScopes.USERS_READ], expire = '2020-10-15T06:38:00.000+00:00' # optional ) diff --git a/examples/2.3.x/server-python/examples/project/create-ephemeral-key.md b/examples/2.3.x/server-python/examples/project/create-ephemeral-key.md index 17a48da69..f60193c9e 100644 --- a/examples/2.3.x/server-python/examples/project/create-ephemeral-key.md +++ b/examples/2.3.x/server-python/examples/project/create-ephemeral-key.md @@ -12,7 +12,7 @@ client.set_key('<YOUR_API_KEY>') # Your secret API key project = Project(client) result: EphemeralKey = project.create_ephemeral_key( - scopes = [ProjectKeyScopes.PROJECT_READ], + scopes = [ProjectKeyScopes.USERS_READ], duration = 600 ) diff --git a/examples/2.3.x/server-python/examples/project/create-smtp-test.md b/examples/2.3.x/server-python/examples/project/create-smtp-test.md index 3b39979bb..e46cb13e3 100644 --- a/examples/2.3.x/server-python/examples/project/create-smtp-test.md +++ b/examples/2.3.x/server-python/examples/project/create-smtp-test.md @@ -10,6 +10,6 @@ client.set_key('<YOUR_API_KEY>') # Your secret API key project = Project(client) result = project.create_smtp_test( - emails = [] + emails = ["recipient@example.com"] ) ``` diff --git a/examples/2.3.x/server-python/examples/project/get-o-auth-2-provider.md b/examples/2.3.x/server-python/examples/project/get-o-auth-2-provider.md index 1bdc7e3c2..792ef7653 100644 --- a/examples/2.3.x/server-python/examples/project/get-o-auth-2-provider.md +++ b/examples/2.3.x/server-python/examples/project/get-o-auth-2-provider.md @@ -16,6 +16,7 @@ from appwrite.models import OAuth2Zoho from appwrite.models import OAuth2Yandex from appwrite.models import OAuth2X from appwrite.models import OAuth2WordPress +from appwrite.models import OAuth2Webflow from appwrite.models import OAuth2Twitch from appwrite.models import OAuth2Stripe from appwrite.models import OAuth2Spotify @@ -56,7 +57,7 @@ client.set_key('<YOUR_API_KEY>') # Your secret API key project = Project(client) -result: Union[OAuth2Github, OAuth2Discord, OAuth2Figma, OAuth2Dropbox, OAuth2Dailymotion, OAuth2Bitbucket, OAuth2Bitly, OAuth2Box, OAuth2Autodesk, OAuth2Google, OAuth2Zoom, OAuth2Zoho, OAuth2Yandex, OAuth2X, OAuth2WordPress, OAuth2Twitch, OAuth2Stripe, OAuth2Spotify, OAuth2Slack, OAuth2Podio, OAuth2Notion, OAuth2Salesforce, OAuth2Yahoo, OAuth2HuggingFace, OAuth2Resend, OAuth2Cloudflare, OAuth2Linkedin, OAuth2Disqus, OAuth2Amazon, OAuth2Etsy, OAuth2Facebook, OAuth2Tradeshift, OAuth2Paypal, OAuth2Gitlab, OAuth2Authentik, OAuth2Auth0, OAuth2FusionAuth, OAuth2Keycloak, OAuth2Oidc, OAuth2Apple, OAuth2Okta, OAuth2Kick, OAuth2Microsoft, OAuth2TikTok, OAuth2Kakao] = project.get_o_auth2_provider( +result: Union[OAuth2Github, OAuth2Discord, OAuth2Figma, OAuth2Dropbox, OAuth2Dailymotion, OAuth2Bitbucket, OAuth2Bitly, OAuth2Box, OAuth2Autodesk, OAuth2Google, OAuth2Zoom, OAuth2Zoho, OAuth2Yandex, OAuth2X, OAuth2WordPress, OAuth2Webflow, OAuth2Twitch, OAuth2Stripe, OAuth2Spotify, OAuth2Slack, OAuth2Podio, OAuth2Notion, OAuth2Salesforce, OAuth2Yahoo, OAuth2HuggingFace, OAuth2Resend, OAuth2Cloudflare, OAuth2Linkedin, OAuth2Disqus, OAuth2Amazon, OAuth2Etsy, OAuth2Facebook, OAuth2Tradeshift, OAuth2Paypal, OAuth2Gitlab, OAuth2Authentik, OAuth2Auth0, OAuth2FusionAuth, OAuth2Keycloak, OAuth2Oidc, OAuth2Apple, OAuth2Okta, OAuth2Kick, OAuth2Microsoft, OAuth2TikTok, OAuth2Kakao] = project.get_o_auth2_provider( provider_id = ProjectOAuthProviderId.AMAZON ) diff --git a/examples/2.3.x/server-python/examples/project/update-key.md b/examples/2.3.x/server-python/examples/project/update-key.md index e1ecc201a..ed45fb412 100644 --- a/examples/2.3.x/server-python/examples/project/update-key.md +++ b/examples/2.3.x/server-python/examples/project/update-key.md @@ -14,7 +14,7 @@ project = Project(client) result: Key = project.update_key( key_id = '<KEY_ID>', name = '<NAME>', - scopes = [ProjectKeyScopes.PROJECT_READ], + scopes = [ProjectKeyScopes.USERS_READ], expire = '2020-10-15T06:38:00.000+00:00' # optional ) diff --git a/examples/2.3.x/server-python/examples/project/update-labels.md b/examples/2.3.x/server-python/examples/project/update-labels.md index 4fedceb18..ed324cadc 100644 --- a/examples/2.3.x/server-python/examples/project/update-labels.md +++ b/examples/2.3.x/server-python/examples/project/update-labels.md @@ -11,7 +11,7 @@ client.set_key('<YOUR_API_KEY>') # Your secret API key project = Project(client) result: ProjectModel = project.update_labels( - labels = [] + labels = ["production"] ) print(result.model_dump()) diff --git a/examples/2.3.x/server-python/examples/project/update-o-auth-2-auth-0.md b/examples/2.3.x/server-python/examples/project/update-o-auth-2-auth-0.md index 568bb9bb4..56a4ee1e4 100644 --- a/examples/2.3.x/server-python/examples/project/update-o-auth-2-auth-0.md +++ b/examples/2.3.x/server-python/examples/project/update-o-auth-2-auth-0.md @@ -2,6 +2,7 @@ from appwrite.client import Client from appwrite.services.project import Project from appwrite.models import OAuth2Auth0 +from appwrite.enums import ProjectOAuth2Auth0Prompt client = Client() client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint @@ -14,6 +15,7 @@ result: OAuth2Auth0 = project.update_o_auth2_auth0( client_id = '<CLIENT_ID>', # optional client_secret = '<CLIENT_SECRET>', # optional endpoint = '<ENDPOINT>', # optional + prompt = [ProjectOAuth2Auth0Prompt.NONE], # optional enabled = False # optional ) diff --git a/examples/2.3.x/server-python/examples/project/update-o-auth-2-discord.md b/examples/2.3.x/server-python/examples/project/update-o-auth-2-discord.md index a95cc4961..ec0ea2cb5 100644 --- a/examples/2.3.x/server-python/examples/project/update-o-auth-2-discord.md +++ b/examples/2.3.x/server-python/examples/project/update-o-auth-2-discord.md @@ -2,6 +2,7 @@ from appwrite.client import Client from appwrite.services.project import Project from appwrite.models import OAuth2Discord +from appwrite.enums import ProjectOAuth2DiscordPrompt client = Client() client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint @@ -13,6 +14,7 @@ project = Project(client) result: OAuth2Discord = project.update_o_auth2_discord( client_id = '<CLIENT_ID>', # optional client_secret = '<CLIENT_SECRET>', # optional + prompt = [ProjectOAuth2DiscordPrompt.NONE], # optional enabled = False # optional ) diff --git a/examples/2.3.x/server-python/examples/project/update-o-auth-2-git-hub.md b/examples/2.3.x/server-python/examples/project/update-o-auth-2-git-hub.md index 36664b851..cad2e2bba 100644 --- a/examples/2.3.x/server-python/examples/project/update-o-auth-2-git-hub.md +++ b/examples/2.3.x/server-python/examples/project/update-o-auth-2-git-hub.md @@ -2,6 +2,7 @@ from appwrite.client import Client from appwrite.services.project import Project from appwrite.models import OAuth2Github +from appwrite.enums import ProjectOAuth2GitHubPrompt client = Client() client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint @@ -13,6 +14,7 @@ project = Project(client) result: OAuth2Github = project.update_o_auth2_git_hub( client_id = '<CLIENT_ID>', # optional client_secret = '<CLIENT_SECRET>', # optional + prompt = [ProjectOAuth2GitHubPrompt.SELECT_ACCOUNT], # optional enabled = False # optional ) diff --git a/examples/2.3.x/server-python/examples/project/update-o-auth-2-kakao.md b/examples/2.3.x/server-python/examples/project/update-o-auth-2-kakao.md index ce8e36a90..f6a7a2121 100644 --- a/examples/2.3.x/server-python/examples/project/update-o-auth-2-kakao.md +++ b/examples/2.3.x/server-python/examples/project/update-o-auth-2-kakao.md @@ -2,6 +2,7 @@ from appwrite.client import Client from appwrite.services.project import Project from appwrite.models import OAuth2Kakao +from appwrite.enums import ProjectOAuth2KakaoPrompt client = Client() client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint @@ -13,6 +14,7 @@ project = Project(client) result: OAuth2Kakao = project.update_o_auth2_kakao( client_id = '<CLIENT_ID>', # optional client_secret = '<CLIENT_SECRET>', # optional + prompt = [ProjectOAuth2KakaoPrompt.NONE], # optional enabled = False # optional ) diff --git a/examples/2.3.x/server-python/examples/project/update-o-auth-2-microsoft.md b/examples/2.3.x/server-python/examples/project/update-o-auth-2-microsoft.md index aeeefa9ec..809a70c4f 100644 --- a/examples/2.3.x/server-python/examples/project/update-o-auth-2-microsoft.md +++ b/examples/2.3.x/server-python/examples/project/update-o-auth-2-microsoft.md @@ -2,6 +2,7 @@ from appwrite.client import Client from appwrite.services.project import Project from appwrite.models import OAuth2Microsoft +from appwrite.enums import ProjectOAuth2MicrosoftPrompt client = Client() client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint @@ -14,6 +15,7 @@ result: OAuth2Microsoft = project.update_o_auth2_microsoft( application_id = '<APPLICATION_ID>', # optional application_secret = '<APPLICATION_SECRET>', # optional tenant = '<TENANT>', # optional + prompt = [ProjectOAuth2MicrosoftPrompt.NONE], # optional enabled = False # optional ) diff --git a/examples/2.3.x/server-python/examples/project/update-o-auth-2-okta.md b/examples/2.3.x/server-python/examples/project/update-o-auth-2-okta.md index 0b4fc5329..462d6f200 100644 --- a/examples/2.3.x/server-python/examples/project/update-o-auth-2-okta.md +++ b/examples/2.3.x/server-python/examples/project/update-o-auth-2-okta.md @@ -2,6 +2,7 @@ from appwrite.client import Client from appwrite.services.project import Project from appwrite.models import OAuth2Okta +from appwrite.enums import ProjectOAuth2OktaPrompt client = Client() client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint @@ -15,6 +16,7 @@ result: OAuth2Okta = project.update_o_auth2_okta( client_secret = '<CLIENT_SECRET>', # optional domain = 'example.com', # optional authorization_server_id = '<AUTHORIZATION_SERVER_ID>', # optional + prompt = [ProjectOAuth2OktaPrompt.NONE], # optional enabled = False # optional ) diff --git a/examples/2.3.x/server-python/examples/project/update-o-auth-2-salesforce.md b/examples/2.3.x/server-python/examples/project/update-o-auth-2-salesforce.md index a3cb63772..ec7a8ef44 100644 --- a/examples/2.3.x/server-python/examples/project/update-o-auth-2-salesforce.md +++ b/examples/2.3.x/server-python/examples/project/update-o-auth-2-salesforce.md @@ -2,6 +2,7 @@ from appwrite.client import Client from appwrite.services.project import Project from appwrite.models import OAuth2Salesforce +from appwrite.enums import ProjectOAuth2SalesforcePrompt client = Client() client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint @@ -13,6 +14,7 @@ project = Project(client) result: OAuth2Salesforce = project.update_o_auth2_salesforce( customer_key = '<CUSTOMER_KEY>', # optional customer_secret = '<CUSTOMER_SECRET>', # optional + prompt = [ProjectOAuth2SalesforcePrompt.LOGIN], # optional enabled = False # optional ) diff --git a/examples/2.3.x/server-python/examples/project/update-o-auth-2-webflow.md b/examples/2.3.x/server-python/examples/project/update-o-auth-2-webflow.md new file mode 100644 index 000000000..5edfea646 --- /dev/null +++ b/examples/2.3.x/server-python/examples/project/update-o-auth-2-webflow.md @@ -0,0 +1,20 @@ +```python +from appwrite.client import Client +from appwrite.services.project import Project +from appwrite.models import OAuth2Webflow + +client = Client() +client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('<YOUR_PROJECT_ID>') # Your project ID +client.set_key('<YOUR_API_KEY>') # Your secret API key + +project = Project(client) + +result: OAuth2Webflow = project.update_o_auth2_webflow( + client_id = '<CLIENT_ID>', # optional + client_secret = '<CLIENT_SECRET>', # optional + enabled = False # optional +) + +print(result.model_dump()) +``` diff --git a/examples/2.3.x/server-python/examples/project/update-o-auth-2-zoho.md b/examples/2.3.x/server-python/examples/project/update-o-auth-2-zoho.md index 069a9645b..edbd10233 100644 --- a/examples/2.3.x/server-python/examples/project/update-o-auth-2-zoho.md +++ b/examples/2.3.x/server-python/examples/project/update-o-auth-2-zoho.md @@ -2,6 +2,7 @@ from appwrite.client import Client from appwrite.services.project import Project from appwrite.models import OAuth2Zoho +from appwrite.enums import ProjectOAuth2ZohoPrompt client = Client() client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint @@ -13,6 +14,7 @@ project = Project(client) result: OAuth2Zoho = project.update_o_auth2_zoho( client_id = '<CLIENT_ID>', # optional client_secret = '<CLIENT_SECRET>', # optional + prompt = [ProjectOAuth2ZohoPrompt.CONSENT], # optional enabled = False # optional ) diff --git a/examples/2.3.x/server-python/examples/sites/list-frameworks.md b/examples/2.3.x/server-python/examples/sites/list-frameworks.md index 84996b3f7..2edd3b352 100644 --- a/examples/2.3.x/server-python/examples/sites/list-frameworks.md +++ b/examples/2.3.x/server-python/examples/sites/list-frameworks.md @@ -10,7 +10,9 @@ client.set_key('<YOUR_API_KEY>') # Your secret API key sites = Sites(client) -result: FrameworkList = sites.list_frameworks() +result: FrameworkList = sites.list_frameworks( + total = False # optional +) print(result.model_dump()) ``` diff --git a/examples/2.3.x/server-python/examples/sites/list-specifications.md b/examples/2.3.x/server-python/examples/sites/list-specifications.md index 2f04ddf48..88c3402bc 100644 --- a/examples/2.3.x/server-python/examples/sites/list-specifications.md +++ b/examples/2.3.x/server-python/examples/sites/list-specifications.md @@ -11,7 +11,8 @@ client.set_key('<YOUR_API_KEY>') # Your secret API key sites = Sites(client) result: SpecificationList = sites.list_specifications( - type = 'runtimes' # optional + type = 'runtimes', # optional + total = False # optional ) print(result.model_dump()) diff --git a/examples/2.3.x/server-python/examples/tablesdb/create-index.md b/examples/2.3.x/server-python/examples/tablesdb/create-index.md index 5de707fed..5a8652831 100644 --- a/examples/2.3.x/server-python/examples/tablesdb/create-index.md +++ b/examples/2.3.x/server-python/examples/tablesdb/create-index.md @@ -17,7 +17,7 @@ result: ColumnIndex = tables_db.create_index( table_id = '<TABLE_ID>', key = '<KEY>', type = TablesDBIndexType.KEY, - columns = [], + columns = ["username"], orders = [OrderBy.ASC], # optional lengths = [] # optional ) diff --git a/examples/2.3.x/server-python/examples/tablesdb/create-rows.md b/examples/2.3.x/server-python/examples/tablesdb/create-rows.md index 9e741fe4c..6dc956212 100644 --- a/examples/2.3.x/server-python/examples/tablesdb/create-rows.md +++ b/examples/2.3.x/server-python/examples/tablesdb/create-rows.md @@ -13,7 +13,16 @@ tables_db = TablesDB(client) result: RowList = tables_db.create_rows( database_id = '<DATABASE_ID>', table_id = '<TABLE_ID>', - rows = [], + rows = [ + { + "$id": "example1", + "username": "walter.obrien", + "email": "walter.obrien@example.com", + "fullName": "Walter O'Brien", + "age": 30, + "isAdmin": false + } + ], transaction_id = '<TRANSACTION_ID>' # optional ) diff --git a/examples/2.3.x/server-python/examples/tablesdb/delete-rows.md b/examples/2.3.x/server-python/examples/tablesdb/delete-rows.md index 2a3a89ca0..9ed0672d8 100644 --- a/examples/2.3.x/server-python/examples/tablesdb/delete-rows.md +++ b/examples/2.3.x/server-python/examples/tablesdb/delete-rows.md @@ -13,7 +13,7 @@ tables_db = TablesDB(client) result: RowList = tables_db.delete_rows( database_id = '<DATABASE_ID>', table_id = '<TABLE_ID>', - queries = [], # optional + queries = ["{\"method\":\"equal\", \"attribute\":\"$id\", \"values\":[\"<ROW_ID>\"]}"], # optional transaction_id = '<TRANSACTION_ID>' # optional ) diff --git a/examples/2.3.x/server-python/examples/tablesdb/get-column.md b/examples/2.3.x/server-python/examples/tablesdb/get-column.md index 6d2b82551..1a4dd142c 100644 --- a/examples/2.3.x/server-python/examples/tablesdb/get-column.md +++ b/examples/2.3.x/server-python/examples/tablesdb/get-column.md @@ -2,6 +2,7 @@ from appwrite.client import Client from appwrite.services.tables_db import TablesDB from appwrite.models import ColumnBoolean +from appwrite.models import ColumnBigint from appwrite.models import ColumnInteger from appwrite.models import ColumnFloat from appwrite.models import ColumnEmail @@ -10,6 +11,13 @@ from appwrite.models import ColumnUrl from appwrite.models import ColumnIp from appwrite.models import ColumnDatetime from appwrite.models import ColumnRelationship +from appwrite.models import ColumnPoint +from appwrite.models import ColumnLine +from appwrite.models import ColumnPolygon +from appwrite.models import ColumnVarchar +from appwrite.models import ColumnText +from appwrite.models import ColumnMediumtext +from appwrite.models import ColumnLongtext from appwrite.models import ColumnString from typing import Union @@ -20,7 +28,7 @@ client.set_key('<YOUR_API_KEY>') # Your secret API key tables_db = TablesDB(client) -result: Union[ColumnBoolean, ColumnInteger, ColumnFloat, ColumnEmail, ColumnEnum, ColumnUrl, ColumnIp, ColumnDatetime, ColumnRelationship, ColumnString] = tables_db.get_column( +result: Union[ColumnBoolean, ColumnBigint, ColumnInteger, ColumnFloat, ColumnEmail, ColumnEnum, ColumnUrl, ColumnIp, ColumnDatetime, ColumnRelationship, ColumnPoint, ColumnLine, ColumnPolygon, ColumnVarchar, ColumnText, ColumnMediumtext, ColumnLongtext, ColumnString] = tables_db.get_column( database_id = '<DATABASE_ID>', table_id = '<TABLE_ID>', key = '<KEY>' diff --git a/examples/2.3.x/server-python/examples/tablesdb/list-transactions.md b/examples/2.3.x/server-python/examples/tablesdb/list-transactions.md index b4384e67c..ded733606 100644 --- a/examples/2.3.x/server-python/examples/tablesdb/list-transactions.md +++ b/examples/2.3.x/server-python/examples/tablesdb/list-transactions.md @@ -11,7 +11,8 @@ client.set_key('<YOUR_API_KEY>') # Your secret API key tables_db = TablesDB(client) result: TransactionList = tables_db.list_transactions( - queries = [] # optional + queries = [], # optional + total = False # optional ) print(result.model_dump()) diff --git a/examples/2.3.x/server-python/examples/tablesdb/upsert-rows.md b/examples/2.3.x/server-python/examples/tablesdb/upsert-rows.md index 0b6a754e3..673b9a2b2 100644 --- a/examples/2.3.x/server-python/examples/tablesdb/upsert-rows.md +++ b/examples/2.3.x/server-python/examples/tablesdb/upsert-rows.md @@ -13,7 +13,16 @@ tables_db = TablesDB(client) result: RowList = tables_db.upsert_rows( database_id = '<DATABASE_ID>', table_id = '<TABLE_ID>', - rows = [], + rows = [ + { + "$id": "example1", + "username": "walter.obrien", + "email": "walter.obrien@example.com", + "fullName": "Walter O'Brien", + "age": 30, + "isAdmin": false + } + ], transaction_id = '<TRANSACTION_ID>' # optional ) diff --git a/examples/2.3.x/server-python/examples/teams/create-membership.md b/examples/2.3.x/server-python/examples/teams/create-membership.md index 313bf5f6a..8b1e3267d 100644 --- a/examples/2.3.x/server-python/examples/teams/create-membership.md +++ b/examples/2.3.x/server-python/examples/teams/create-membership.md @@ -12,7 +12,7 @@ teams = Teams(client) result: Membership = teams.create_membership( team_id = '<TEAM_ID>', - roles = [], + roles = ["editor"], email = 'email@example.com', # optional user_id = '<USER_ID>', # optional phone = '+12065550100', # optional diff --git a/examples/2.3.x/server-python/examples/teams/update-membership.md b/examples/2.3.x/server-python/examples/teams/update-membership.md index 4425ae58d..e6db1a041 100644 --- a/examples/2.3.x/server-python/examples/teams/update-membership.md +++ b/examples/2.3.x/server-python/examples/teams/update-membership.md @@ -13,7 +13,7 @@ teams = Teams(client) result: Membership = teams.update_membership( team_id = '<TEAM_ID>', membership_id = '<MEMBERSHIP_ID>', - roles = [] + roles = ["editor"] ) print(result.model_dump()) diff --git a/examples/2.3.x/server-python/examples/users/update-labels.md b/examples/2.3.x/server-python/examples/users/update-labels.md index bffba0c1e..7d75293f0 100644 --- a/examples/2.3.x/server-python/examples/users/update-labels.md +++ b/examples/2.3.x/server-python/examples/users/update-labels.md @@ -12,7 +12,7 @@ users = Users(client) result: User = users.update_labels( user_id = '<USER_ID>', - labels = [] + labels = ["subscriber"] ) print(result.model_dump()) diff --git a/examples/2.3.x/server-python/examples/vectorsdb/create-collection.md b/examples/2.3.x/server-python/examples/vectorsdb/create-collection.md index 793aa3f5d..6dcdeb24e 100644 --- a/examples/2.3.x/server-python/examples/vectorsdb/create-collection.md +++ b/examples/2.3.x/server-python/examples/vectorsdb/create-collection.md @@ -16,7 +16,7 @@ result: VectorsdbCollection = vectors_db.create_collection( database_id = '<DATABASE_ID>', collection_id = '<COLLECTION_ID>', name = '<NAME>', - dimension = 1, + dimension = 4, permissions = [Permission.read(Role.any())], # optional document_security = False, # optional enabled = False # optional diff --git a/examples/2.3.x/server-python/examples/vectorsdb/create-documents.md b/examples/2.3.x/server-python/examples/vectorsdb/create-documents.md index b84eea6d5..6191c41b0 100644 --- a/examples/2.3.x/server-python/examples/vectorsdb/create-documents.md +++ b/examples/2.3.x/server-python/examples/vectorsdb/create-documents.md @@ -13,7 +13,20 @@ vectors_db = VectorsDB(client) result: DocumentList = vectors_db.create_documents( database_id = '<DATABASE_ID>', collection_id = '<COLLECTION_ID>', - documents = [], + documents = [ + { + "$id": "example1", + "embeddings": [ + 0.12, + -0.55, + 0.88, + 1.02 + ], + "metadata": { + "name": "First document" + } + } + ], transaction_id = '<TRANSACTION_ID>' # optional ) diff --git a/examples/2.3.x/server-python/examples/vectorsdb/create-index.md b/examples/2.3.x/server-python/examples/vectorsdb/create-index.md index 2f5bf2564..2fbb5312e 100644 --- a/examples/2.3.x/server-python/examples/vectorsdb/create-index.md +++ b/examples/2.3.x/server-python/examples/vectorsdb/create-index.md @@ -17,7 +17,7 @@ result: Index = vectors_db.create_index( collection_id = '<COLLECTION_ID>', key = '<KEY>', type = VectorsDBIndexType.HNSW_EUCLIDEAN, - attributes = [], + attributes = ["embeddings"], orders = [OrderBy.ASC], # optional lengths = [] # optional ) diff --git a/examples/2.3.x/server-python/examples/vectorsdb/create-operations.md b/examples/2.3.x/server-python/examples/vectorsdb/create-operations.md index e19a89363..f4e1026dd 100644 --- a/examples/2.3.x/server-python/examples/vectorsdb/create-operations.md +++ b/examples/2.3.x/server-python/examples/vectorsdb/create-operations.md @@ -19,7 +19,15 @@ result: Transaction = vectors_db.create_operations( "collectionId": "<COLLECTION_ID>", "documentId": "<DOCUMENT_ID>", "data": { - "name": "Walter O'Brien" + "embeddings": [ + 0.12, + -0.55, + 0.88, + 1.02 + ], + "metadata": { + "name": "First document" + } } } ] # optional diff --git a/examples/2.3.x/server-python/examples/vectorsdb/delete-documents.md b/examples/2.3.x/server-python/examples/vectorsdb/delete-documents.md index f1bee6ee3..8a36e763d 100644 --- a/examples/2.3.x/server-python/examples/vectorsdb/delete-documents.md +++ b/examples/2.3.x/server-python/examples/vectorsdb/delete-documents.md @@ -13,7 +13,7 @@ vectors_db = VectorsDB(client) result: DocumentList = vectors_db.delete_documents( database_id = '<DATABASE_ID>', collection_id = '<COLLECTION_ID>', - queries = [], # optional + queries = ["{\"method\":\"equal\", \"attribute\":\"$id\", \"values\":[\"<DOCUMENT_ID>\"]}"], # optional transaction_id = '<TRANSACTION_ID>' # optional ) diff --git a/examples/2.3.x/server-python/examples/vectorsdb/list-transactions.md b/examples/2.3.x/server-python/examples/vectorsdb/list-transactions.md index d21db0122..6ff6cdaa0 100644 --- a/examples/2.3.x/server-python/examples/vectorsdb/list-transactions.md +++ b/examples/2.3.x/server-python/examples/vectorsdb/list-transactions.md @@ -11,7 +11,8 @@ client.set_key('<YOUR_API_KEY>') # Your secret API key vectors_db = VectorsDB(client) result: TransactionList = vectors_db.list_transactions( - queries = [] # optional + queries = [], # optional + total = False # optional ) print(result.model_dump()) diff --git a/examples/2.3.x/server-python/examples/vectorsdb/update-collection.md b/examples/2.3.x/server-python/examples/vectorsdb/update-collection.md index 3dcf8903e..7093c0b25 100644 --- a/examples/2.3.x/server-python/examples/vectorsdb/update-collection.md +++ b/examples/2.3.x/server-python/examples/vectorsdb/update-collection.md @@ -16,7 +16,7 @@ result: VectorsdbCollection = vectors_db.update_collection( database_id = '<DATABASE_ID>', collection_id = '<COLLECTION_ID>', name = '<NAME>', - dimension = 1, # optional + dimension = 4, # optional permissions = [Permission.read(Role.any())], # optional document_security = False, # optional enabled = False # optional diff --git a/examples/2.3.x/server-python/examples/vectorsdb/upsert-documents.md b/examples/2.3.x/server-python/examples/vectorsdb/upsert-documents.md index 5eb3d2d1a..c89ed2f3c 100644 --- a/examples/2.3.x/server-python/examples/vectorsdb/upsert-documents.md +++ b/examples/2.3.x/server-python/examples/vectorsdb/upsert-documents.md @@ -13,7 +13,20 @@ vectors_db = VectorsDB(client) result: DocumentList = vectors_db.upsert_documents( database_id = '<DATABASE_ID>', collection_id = '<COLLECTION_ID>', - documents = [], + documents = [ + { + "$id": "example1", + "embeddings": [ + 0.12, + -0.55, + 0.88, + 1.02 + ], + "metadata": { + "name": "First document" + } + } + ], transaction_id = '<TRANSACTION_ID>' # optional ) diff --git a/examples/2.3.x/server-python/examples/webhooks/create.md b/examples/2.3.x/server-python/examples/webhooks/create.md index ed957a41e..1585ef2b4 100644 --- a/examples/2.3.x/server-python/examples/webhooks/create.md +++ b/examples/2.3.x/server-python/examples/webhooks/create.md @@ -14,7 +14,7 @@ result: Webhook = webhooks.create( webhook_id = '<WEBHOOK_ID>', url = 'https://example.com/webhook', name = '<NAME>', - events = [], + events = ["users.*.create"], enabled = False, # optional tls = False, # optional auth_username = '<AUTH_USERNAME>', # optional diff --git a/examples/2.3.x/server-python/examples/webhooks/update.md b/examples/2.3.x/server-python/examples/webhooks/update.md index a6d3ac7b7..647e86180 100644 --- a/examples/2.3.x/server-python/examples/webhooks/update.md +++ b/examples/2.3.x/server-python/examples/webhooks/update.md @@ -14,7 +14,7 @@ result: Webhook = webhooks.update( webhook_id = '<WEBHOOK_ID>', name = '<NAME>', url = 'https://example.com/webhook', - events = [], + events = ["users.*.create"], enabled = False, # optional tls = False, # optional auth_username = '<AUTH_USERNAME>', # optional diff --git a/examples/2.3.x/server-rest/examples/account/create-email-password-session.md b/examples/2.3.x/server-rest/examples/account/create-email-password-session.md index bd8c32a48..57b9b36d8 100644 --- a/examples/2.3.x/server-rest/examples/account/create-email-password-session.md +++ b/examples/2.3.x/server-rest/examples/account/create-email-password-session.md @@ -8,6 +8,7 @@ X-Appwrite-Project: <YOUR_PROJECT_ID> { "email": "email@example.com", - "password": "password" + "password": "password", + "duration": 60 } ``` diff --git a/examples/2.3.x/server-rest/examples/analytics/create-event.md b/examples/2.3.x/server-rest/examples/analytics/create-event.md new file mode 100644 index 000000000..51f37423a --- /dev/null +++ b/examples/2.3.x/server-rest/examples/analytics/create-event.md @@ -0,0 +1,23 @@ +```http +POST /v1/analytics/properties/{propertyId}/events HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +Accept: application/json +X-Appwrite-Response-Format: 2.3.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> + +{ + "name": "<NAME>", + "url": "https://example.com", + "domain": "<DOMAIN>", + "referrer": "<REFERRER>", + "screenWidth": 0, + "sessionHash": "<SESSION_HASH>", + "scrollDepth": 0, + "engagementTime": 0, + "props": [], + "userId": "<USER_ID>", + "ip": "<IP>", + "userAgent": "<USER_AGENT>" +} +``` diff --git a/examples/2.3.x/server-rest/examples/analytics/create-property.md b/examples/2.3.x/server-rest/examples/analytics/create-property.md new file mode 100644 index 000000000..8d8fc421e --- /dev/null +++ b/examples/2.3.x/server-rest/examples/analytics/create-property.md @@ -0,0 +1,18 @@ +```http +POST /v1/analytics/properties HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +Accept: application/json +X-Appwrite-Response-Format: 2.3.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> + +{ + "propertyId": "<PROPERTY_ID>", + "name": "<NAME>", + "domain": "<DOMAIN>", + "timezone": "<TIMEZONE>", + "enabled": false, + "public": false, + "allowedOrigins": [] +} +``` diff --git a/examples/2.3.x/server-rest/examples/analytics/delete-property.md b/examples/2.3.x/server-rest/examples/analytics/delete-property.md new file mode 100644 index 000000000..ea693fed7 --- /dev/null +++ b/examples/2.3.x/server-rest/examples/analytics/delete-property.md @@ -0,0 +1,9 @@ +```http +DELETE /v1/analytics/properties/{propertyId} HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +Accept: application/json +X-Appwrite-Response-Format: 2.3.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> + +``` diff --git a/examples/2.3.x/server-rest/examples/analytics/get-property.md b/examples/2.3.x/server-rest/examples/analytics/get-property.md new file mode 100644 index 000000000..b6f7c607c --- /dev/null +++ b/examples/2.3.x/server-rest/examples/analytics/get-property.md @@ -0,0 +1,7 @@ +```http +GET /v1/analytics/properties/{propertyId} HTTP/1.1 +Host: cloud.appwrite.io +Accept: application/json +X-Appwrite-Response-Format: 2.3.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +``` diff --git a/examples/2.3.x/server-rest/examples/analytics/list-metrics.md b/examples/2.3.x/server-rest/examples/analytics/list-metrics.md new file mode 100644 index 000000000..f619636cc --- /dev/null +++ b/examples/2.3.x/server-rest/examples/analytics/list-metrics.md @@ -0,0 +1,7 @@ +```http +GET /v1/analytics/properties/{propertyId}/metrics HTTP/1.1 +Host: cloud.appwrite.io +Accept: application/json +X-Appwrite-Response-Format: 2.3.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +``` diff --git a/examples/2.3.x/server-rest/examples/analytics/list-properties.md b/examples/2.3.x/server-rest/examples/analytics/list-properties.md new file mode 100644 index 000000000..a3e90d5c2 --- /dev/null +++ b/examples/2.3.x/server-rest/examples/analytics/list-properties.md @@ -0,0 +1,7 @@ +```http +GET /v1/analytics/properties HTTP/1.1 +Host: cloud.appwrite.io +Accept: application/json +X-Appwrite-Response-Format: 2.3.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +``` diff --git a/examples/2.3.x/server-rest/examples/analytics/update-property.md b/examples/2.3.x/server-rest/examples/analytics/update-property.md new file mode 100644 index 000000000..b3969bfe6 --- /dev/null +++ b/examples/2.3.x/server-rest/examples/analytics/update-property.md @@ -0,0 +1,17 @@ +```http +PATCH /v1/analytics/properties/{propertyId} HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +Accept: application/json +X-Appwrite-Response-Format: 2.3.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> + +{ + "name": "<NAME>", + "domain": "<DOMAIN>", + "timezone": "<TIMEZONE>", + "enabled": false, + "public": false, + "allowedOrigins": [] +} +``` diff --git a/examples/2.3.x/server-rest/examples/avatars/delete-photo.md b/examples/2.3.x/server-rest/examples/avatars/delete-photo.md new file mode 100644 index 000000000..f892a9467 --- /dev/null +++ b/examples/2.3.x/server-rest/examples/avatars/delete-photo.md @@ -0,0 +1,9 @@ +```http +DELETE /v1/avatars/photo HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +Accept: application/json +X-Appwrite-Response-Format: 2.3.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> + +``` diff --git a/examples/2.3.x/server-rest/examples/avatars/update-photo.md b/examples/2.3.x/server-rest/examples/avatars/update-photo.md new file mode 100644 index 000000000..121562d9f --- /dev/null +++ b/examples/2.3.x/server-rest/examples/avatars/update-photo.md @@ -0,0 +1,16 @@ +```http +PUT /v1/avatars/photo HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: multipart/form-data; boundary="cec8e8123c05ba25" +Accept: application/json +X-Appwrite-Response-Format: 2.3.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> +Content-Length: *Length of your entity body in bytes* + +--cec8e8123c05ba25 +Content-Disposition: form-data; name="file" + +cf 94 84 24 8d c4 91 10 0f dc 54 26 6c 8e 4b bc e8 ee 55 94 29 e7 94 89 19 26 28 01 26 29 3f 16... + +--cec8e8123c05ba25-- +``` diff --git a/examples/2.3.x/server-rest/examples/databases/create-documents.md b/examples/2.3.x/server-rest/examples/databases/create-documents.md index e367fe405..807652f12 100644 --- a/examples/2.3.x/server-rest/examples/databases/create-documents.md +++ b/examples/2.3.x/server-rest/examples/databases/create-documents.md @@ -7,7 +7,16 @@ X-Appwrite-Response-Format: 2.3.0 X-Appwrite-Project: <YOUR_PROJECT_ID> { - "documents": [], + "documents": [ + { + "$id": "example1", + "username": "walter.obrien", + "email": "walter.obrien@example.com", + "fullName": "Walter O'Brien", + "age": 30, + "isAdmin": false + } + ], "transactionId": "<TRANSACTION_ID>" } ``` diff --git a/examples/2.3.x/server-rest/examples/databases/create-index.md b/examples/2.3.x/server-rest/examples/databases/create-index.md index d74b95b1b..fdb2d9559 100644 --- a/examples/2.3.x/server-rest/examples/databases/create-index.md +++ b/examples/2.3.x/server-rest/examples/databases/create-index.md @@ -9,7 +9,7 @@ X-Appwrite-Project: <YOUR_PROJECT_ID> { "key": "<KEY>", "type": "key", - "attributes": [], + "attributes": ["username"], "orders": [], "lengths": [] } diff --git a/examples/2.3.x/server-rest/examples/databases/upsert-documents.md b/examples/2.3.x/server-rest/examples/databases/upsert-documents.md index df6c8f7c3..7519b3629 100644 --- a/examples/2.3.x/server-rest/examples/databases/upsert-documents.md +++ b/examples/2.3.x/server-rest/examples/databases/upsert-documents.md @@ -7,7 +7,16 @@ X-Appwrite-Response-Format: 2.3.0 X-Appwrite-Project: <YOUR_PROJECT_ID> { - "documents": [], + "documents": [ + { + "$id": "example1", + "username": "walter.obrien", + "email": "walter.obrien@example.com", + "fullName": "Walter O'Brien", + "age": 30, + "isAdmin": false + } + ], "transactionId": "<TRANSACTION_ID>" } ``` diff --git a/examples/2.3.x/server-rest/examples/documentsdb/create-documents.md b/examples/2.3.x/server-rest/examples/documentsdb/create-documents.md index 8ab99545a..53673b5c4 100644 --- a/examples/2.3.x/server-rest/examples/documentsdb/create-documents.md +++ b/examples/2.3.x/server-rest/examples/documentsdb/create-documents.md @@ -7,7 +7,16 @@ X-Appwrite-Response-Format: 2.3.0 X-Appwrite-Project: <YOUR_PROJECT_ID> { - "documents": [], + "documents": [ + { + "$id": "example1", + "username": "walter.obrien", + "email": "walter.obrien@example.com", + "fullName": "Walter O'Brien", + "age": 30, + "isAdmin": false + } + ], "transactionId": "<TRANSACTION_ID>" } ``` diff --git a/examples/2.3.x/server-rest/examples/documentsdb/create-index.md b/examples/2.3.x/server-rest/examples/documentsdb/create-index.md index 36d448ffe..5c1bb9c58 100644 --- a/examples/2.3.x/server-rest/examples/documentsdb/create-index.md +++ b/examples/2.3.x/server-rest/examples/documentsdb/create-index.md @@ -9,7 +9,7 @@ X-Appwrite-Project: <YOUR_PROJECT_ID> { "key": "<KEY>", "type": "key", - "attributes": [], + "attributes": ["username"], "orders": [], "lengths": [] } diff --git a/examples/2.3.x/server-rest/examples/documentsdb/upsert-documents.md b/examples/2.3.x/server-rest/examples/documentsdb/upsert-documents.md index ca8043608..9d075e2f0 100644 --- a/examples/2.3.x/server-rest/examples/documentsdb/upsert-documents.md +++ b/examples/2.3.x/server-rest/examples/documentsdb/upsert-documents.md @@ -7,7 +7,16 @@ X-Appwrite-Response-Format: 2.3.0 X-Appwrite-Project: <YOUR_PROJECT_ID> { - "documents": [], + "documents": [ + { + "$id": "example1", + "username": "walter.obrien", + "email": "walter.obrien@example.com", + "fullName": "Walter O'Brien", + "age": 30, + "isAdmin": false + } + ], "transactionId": "<TRANSACTION_ID>" } ``` diff --git a/examples/2.3.x/server-rest/examples/embeddings/create-text-embeddings.md b/examples/2.3.x/server-rest/examples/embeddings/create-text-embeddings.md index 2634ba7ee..f2a5b14bc 100644 --- a/examples/2.3.x/server-rest/examples/embeddings/create-text-embeddings.md +++ b/examples/2.3.x/server-rest/examples/embeddings/create-text-embeddings.md @@ -7,7 +7,7 @@ X-Appwrite-Response-Format: 2.3.0 X-Appwrite-Project: <YOUR_PROJECT_ID> { - "texts": [], + "texts": ["Appwrite helps developers build applications.", "Find documents with semantic search."], "model": "nomic-embed-text" } ``` diff --git a/examples/2.3.x/server-rest/examples/graphql/mutation.md b/examples/2.3.x/server-rest/examples/graphql/mutation.md index 2ad4b0d6d..845b6d3f3 100644 --- a/examples/2.3.x/server-rest/examples/graphql/mutation.md +++ b/examples/2.3.x/server-rest/examples/graphql/mutation.md @@ -8,6 +8,8 @@ X-Appwrite-Response-Format: 2.3.0 X-Appwrite-Project: <YOUR_PROJECT_ID> { - "query": {} + "query": { + "query": "mutation { accountUpdateName(name: \"Walter\") { name } }" + } } ``` diff --git a/examples/2.3.x/server-rest/examples/graphql/query.md b/examples/2.3.x/server-rest/examples/graphql/query.md index 98a401e63..6776fac98 100644 --- a/examples/2.3.x/server-rest/examples/graphql/query.md +++ b/examples/2.3.x/server-rest/examples/graphql/query.md @@ -8,6 +8,8 @@ X-Appwrite-Response-Format: 2.3.0 X-Appwrite-Project: <YOUR_PROJECT_ID> { - "query": {} + "query": { + "query": "query { localeGet { ip } }" + } } ``` diff --git a/examples/2.3.x/server-rest/examples/messaging/create-push.md b/examples/2.3.x/server-rest/examples/messaging/create-push.md index 8152d8a6e..fd207c4fb 100644 --- a/examples/2.3.x/server-rest/examples/messaging/create-push.md +++ b/examples/2.3.x/server-rest/examples/messaging/create-push.md @@ -25,6 +25,7 @@ X-Appwrite-Project: <YOUR_PROJECT_ID> "scheduledAt": "2020-10-15T06:38:00.000+00:00", "contentAvailable": false, "critical": false, - "priority": "normal" + "priority": "normal", + "channelId": "<CHANNEL_ID>" } ``` diff --git a/examples/2.3.x/server-rest/examples/messaging/update-email.md b/examples/2.3.x/server-rest/examples/messaging/update-email.md index c6759d8da..15bc76e46 100644 --- a/examples/2.3.x/server-rest/examples/messaging/update-email.md +++ b/examples/2.3.x/server-rest/examples/messaging/update-email.md @@ -7,18 +7,18 @@ X-Appwrite-Response-Format: 2.3.0 X-Appwrite-Project: <YOUR_PROJECT_ID> { + "subject": "<SUBJECT>", + "content": "<CONTENT>", "topics": [], "users": [], "targets": [], - "subject": "<SUBJECT>", - "content": "<CONTENT>", - "draft": false, - "html": false, "cc": [], "bcc": [], + "attachments": [], "replyToEmail": "email@example.com", "replyToName": "<REPLY_TO_NAME>", - "scheduledAt": "2020-10-15T06:38:00.000+00:00", - "attachments": [] + "draft": false, + "html": false, + "scheduledAt": "2020-10-15T06:38:00.000+00:00" } ``` diff --git a/examples/2.3.x/server-rest/examples/messaging/update-push.md b/examples/2.3.x/server-rest/examples/messaging/update-push.md index 5515827b8..55172892d 100644 --- a/examples/2.3.x/server-rest/examples/messaging/update-push.md +++ b/examples/2.3.x/server-rest/examples/messaging/update-push.md @@ -7,11 +7,11 @@ X-Appwrite-Response-Format: 2.3.0 X-Appwrite-Project: <YOUR_PROJECT_ID> { + "title": "<TITLE>", + "body": "<BODY>", "topics": [], "users": [], "targets": [], - "title": "<TITLE>", - "body": "<BODY>", "data": {}, "action": "<ACTION>", "image": "<ID1:ID2>", @@ -24,6 +24,7 @@ X-Appwrite-Project: <YOUR_PROJECT_ID> "scheduledAt": "2020-10-15T06:38:00.000+00:00", "contentAvailable": false, "critical": false, - "priority": "normal" + "priority": "normal", + "channelId": "<CHANNEL_ID>" } ``` diff --git a/examples/2.3.x/server-rest/examples/messaging/update-sms.md b/examples/2.3.x/server-rest/examples/messaging/update-sms.md index 589235626..bd5f093ee 100644 --- a/examples/2.3.x/server-rest/examples/messaging/update-sms.md +++ b/examples/2.3.x/server-rest/examples/messaging/update-sms.md @@ -7,10 +7,10 @@ X-Appwrite-Response-Format: 2.3.0 X-Appwrite-Project: <YOUR_PROJECT_ID> { + "content": "<CONTENT>", "topics": [], "users": [], "targets": [], - "content": "<CONTENT>", "draft": false, "scheduledAt": "2020-10-15T06:38:00.000+00:00" } diff --git a/examples/2.3.x/server-rest/examples/oauth2/introspect.md b/examples/2.3.x/server-rest/examples/oauth2/introspect.md new file mode 100644 index 000000000..60ea8f70a --- /dev/null +++ b/examples/2.3.x/server-rest/examples/oauth2/introspect.md @@ -0,0 +1,14 @@ +```http +POST /v1/oauth2/{project_id}/introspect HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +Accept: application/json +X-Appwrite-Response-Format: 2.3.0 + +{ + "token": "<TOKEN>", + "token_type_hint": "access_token", + "client_id": "<CLIENT_ID>", + "client_secret": "<CLIENT_SECRET>" +} +``` diff --git a/examples/2.3.x/server-rest/examples/organization/create-ephemeral-project-key.md b/examples/2.3.x/server-rest/examples/organization/create-ephemeral-project-key.md index b3775e56a..6a72c4047 100644 --- a/examples/2.3.x/server-rest/examples/organization/create-ephemeral-project-key.md +++ b/examples/2.3.x/server-rest/examples/organization/create-ephemeral-project-key.md @@ -7,7 +7,7 @@ X-Appwrite-Response-Format: 2.3.0 X-Appwrite-Project: <YOUR_PROJECT_ID> { - "scopes": [], + "scopes": ["users.read"], "duration": 600 } ``` diff --git a/examples/2.3.x/server-rest/examples/organization/update-project-key.md b/examples/2.3.x/server-rest/examples/organization/update-project-key.md index 949db8a5e..b65071310 100644 --- a/examples/2.3.x/server-rest/examples/organization/update-project-key.md +++ b/examples/2.3.x/server-rest/examples/organization/update-project-key.md @@ -8,7 +8,7 @@ X-Appwrite-Project: <YOUR_PROJECT_ID> { "name": "<NAME>", - "scopes": [], + "scopes": ["users.read"], "expire": "2020-10-15T06:38:00.000+00:00" } ``` diff --git a/examples/2.3.x/server-rest/examples/project/create-ephemeral-key.md b/examples/2.3.x/server-rest/examples/project/create-ephemeral-key.md index 453eafbfb..e3fbfa32c 100644 --- a/examples/2.3.x/server-rest/examples/project/create-ephemeral-key.md +++ b/examples/2.3.x/server-rest/examples/project/create-ephemeral-key.md @@ -7,7 +7,7 @@ X-Appwrite-Response-Format: 2.3.0 X-Appwrite-Project: <YOUR_PROJECT_ID> { - "scopes": [], + "scopes": ["users.read"], "duration": 600 } ``` diff --git a/examples/2.3.x/server-rest/examples/project/create-smtp-test.md b/examples/2.3.x/server-rest/examples/project/create-smtp-test.md index 96a0765dd..2c2cba162 100644 --- a/examples/2.3.x/server-rest/examples/project/create-smtp-test.md +++ b/examples/2.3.x/server-rest/examples/project/create-smtp-test.md @@ -7,6 +7,6 @@ X-Appwrite-Response-Format: 2.3.0 X-Appwrite-Project: <YOUR_PROJECT_ID> { - "emails": [] + "emails": ["recipient@example.com"] } ``` diff --git a/examples/2.3.x/server-rest/examples/project/update-key.md b/examples/2.3.x/server-rest/examples/project/update-key.md index c32ba4f2f..7ce7f4153 100644 --- a/examples/2.3.x/server-rest/examples/project/update-key.md +++ b/examples/2.3.x/server-rest/examples/project/update-key.md @@ -8,7 +8,7 @@ X-Appwrite-Project: <YOUR_PROJECT_ID> { "name": "<NAME>", - "scopes": [], + "scopes": ["users.read"], "expire": "2020-10-15T06:38:00.000+00:00" } ``` diff --git a/examples/2.3.x/server-rest/examples/project/update-labels.md b/examples/2.3.x/server-rest/examples/project/update-labels.md index 07a8dd86f..f5c773228 100644 --- a/examples/2.3.x/server-rest/examples/project/update-labels.md +++ b/examples/2.3.x/server-rest/examples/project/update-labels.md @@ -7,6 +7,6 @@ X-Appwrite-Response-Format: 2.3.0 X-Appwrite-Project: <YOUR_PROJECT_ID> { - "labels": [] + "labels": ["production"] } ``` diff --git a/examples/2.3.x/server-rest/examples/project/update-o-auth-2-auth-0.md b/examples/2.3.x/server-rest/examples/project/update-o-auth-2-auth-0.md index 0d143e5e4..e86e15ef6 100644 --- a/examples/2.3.x/server-rest/examples/project/update-o-auth-2-auth-0.md +++ b/examples/2.3.x/server-rest/examples/project/update-o-auth-2-auth-0.md @@ -10,6 +10,7 @@ X-Appwrite-Project: <YOUR_PROJECT_ID> "clientId": "<CLIENT_ID>", "clientSecret": "<CLIENT_SECRET>", "endpoint": "<ENDPOINT>", + "prompt": [], "enabled": false } ``` diff --git a/examples/2.3.x/server-rest/examples/project/update-o-auth-2-discord.md b/examples/2.3.x/server-rest/examples/project/update-o-auth-2-discord.md index 02746ab74..e0a63baa7 100644 --- a/examples/2.3.x/server-rest/examples/project/update-o-auth-2-discord.md +++ b/examples/2.3.x/server-rest/examples/project/update-o-auth-2-discord.md @@ -9,6 +9,7 @@ X-Appwrite-Project: <YOUR_PROJECT_ID> { "clientId": "<CLIENT_ID>", "clientSecret": "<CLIENT_SECRET>", + "prompt": [], "enabled": false } ``` diff --git a/examples/2.3.x/server-rest/examples/project/update-o-auth-2-git-hub.md b/examples/2.3.x/server-rest/examples/project/update-o-auth-2-git-hub.md index 453a25386..78a830069 100644 --- a/examples/2.3.x/server-rest/examples/project/update-o-auth-2-git-hub.md +++ b/examples/2.3.x/server-rest/examples/project/update-o-auth-2-git-hub.md @@ -9,6 +9,7 @@ X-Appwrite-Project: <YOUR_PROJECT_ID> { "clientId": "<CLIENT_ID>", "clientSecret": "<CLIENT_SECRET>", + "prompt": [], "enabled": false } ``` diff --git a/examples/2.3.x/server-rest/examples/project/update-o-auth-2-kakao.md b/examples/2.3.x/server-rest/examples/project/update-o-auth-2-kakao.md index 306581b18..3be3b5ed5 100644 --- a/examples/2.3.x/server-rest/examples/project/update-o-auth-2-kakao.md +++ b/examples/2.3.x/server-rest/examples/project/update-o-auth-2-kakao.md @@ -9,6 +9,7 @@ X-Appwrite-Project: <YOUR_PROJECT_ID> { "clientId": "<CLIENT_ID>", "clientSecret": "<CLIENT_SECRET>", + "prompt": [], "enabled": false } ``` diff --git a/examples/2.3.x/server-rest/examples/project/update-o-auth-2-microsoft.md b/examples/2.3.x/server-rest/examples/project/update-o-auth-2-microsoft.md index 36284b066..69ae6ca6a 100644 --- a/examples/2.3.x/server-rest/examples/project/update-o-auth-2-microsoft.md +++ b/examples/2.3.x/server-rest/examples/project/update-o-auth-2-microsoft.md @@ -10,6 +10,7 @@ X-Appwrite-Project: <YOUR_PROJECT_ID> "applicationId": "<APPLICATION_ID>", "applicationSecret": "<APPLICATION_SECRET>", "tenant": "<TENANT>", + "prompt": [], "enabled": false } ``` diff --git a/examples/2.3.x/server-rest/examples/project/update-o-auth-2-okta.md b/examples/2.3.x/server-rest/examples/project/update-o-auth-2-okta.md index 3fa0c6d8f..c743ea642 100644 --- a/examples/2.3.x/server-rest/examples/project/update-o-auth-2-okta.md +++ b/examples/2.3.x/server-rest/examples/project/update-o-auth-2-okta.md @@ -11,6 +11,7 @@ X-Appwrite-Project: <YOUR_PROJECT_ID> "clientSecret": "<CLIENT_SECRET>", "domain": "example.com", "authorizationServerId": "<AUTHORIZATION_SERVER_ID>", + "prompt": [], "enabled": false } ``` diff --git a/examples/2.3.x/server-rest/examples/project/update-o-auth-2-salesforce.md b/examples/2.3.x/server-rest/examples/project/update-o-auth-2-salesforce.md index a39520834..0411b9035 100644 --- a/examples/2.3.x/server-rest/examples/project/update-o-auth-2-salesforce.md +++ b/examples/2.3.x/server-rest/examples/project/update-o-auth-2-salesforce.md @@ -9,6 +9,7 @@ X-Appwrite-Project: <YOUR_PROJECT_ID> { "customerKey": "<CUSTOMER_KEY>", "customerSecret": "<CUSTOMER_SECRET>", + "prompt": [], "enabled": false } ``` diff --git a/examples/2.3.x/server-rest/examples/project/update-o-auth-2-webflow.md b/examples/2.3.x/server-rest/examples/project/update-o-auth-2-webflow.md new file mode 100644 index 000000000..53bfb9647 --- /dev/null +++ b/examples/2.3.x/server-rest/examples/project/update-o-auth-2-webflow.md @@ -0,0 +1,14 @@ +```http +PATCH /v1/project/oauth2/webflow HTTP/1.1 +Host: cloud.appwrite.io +Content-Type: application/json +Accept: application/json +X-Appwrite-Response-Format: 2.3.0 +X-Appwrite-Project: <YOUR_PROJECT_ID> + +{ + "clientId": "<CLIENT_ID>", + "clientSecret": "<CLIENT_SECRET>", + "enabled": false +} +``` diff --git a/examples/2.3.x/server-rest/examples/project/update-o-auth-2-zoho.md b/examples/2.3.x/server-rest/examples/project/update-o-auth-2-zoho.md index 5df4ec3ca..60341ed81 100644 --- a/examples/2.3.x/server-rest/examples/project/update-o-auth-2-zoho.md +++ b/examples/2.3.x/server-rest/examples/project/update-o-auth-2-zoho.md @@ -9,6 +9,7 @@ X-Appwrite-Project: <YOUR_PROJECT_ID> { "clientId": "<CLIENT_ID>", "clientSecret": "<CLIENT_SECRET>", + "prompt": [], "enabled": false } ``` diff --git a/examples/2.3.x/server-rest/examples/tablesdb/create-index.md b/examples/2.3.x/server-rest/examples/tablesdb/create-index.md index 2c51ed6db..15db863c3 100644 --- a/examples/2.3.x/server-rest/examples/tablesdb/create-index.md +++ b/examples/2.3.x/server-rest/examples/tablesdb/create-index.md @@ -9,7 +9,7 @@ X-Appwrite-Project: <YOUR_PROJECT_ID> { "key": "<KEY>", "type": "key", - "columns": [], + "columns": ["username"], "orders": [], "lengths": [] } diff --git a/examples/2.3.x/server-rest/examples/tablesdb/create-rows.md b/examples/2.3.x/server-rest/examples/tablesdb/create-rows.md index f8e2a3478..5b3b8bb29 100644 --- a/examples/2.3.x/server-rest/examples/tablesdb/create-rows.md +++ b/examples/2.3.x/server-rest/examples/tablesdb/create-rows.md @@ -7,7 +7,16 @@ X-Appwrite-Response-Format: 2.3.0 X-Appwrite-Project: <YOUR_PROJECT_ID> { - "rows": [], + "rows": [ + { + "$id": "example1", + "username": "walter.obrien", + "email": "walter.obrien@example.com", + "fullName": "Walter O'Brien", + "age": 30, + "isAdmin": false + } + ], "transactionId": "<TRANSACTION_ID>" } ``` diff --git a/examples/2.3.x/server-rest/examples/tablesdb/upsert-rows.md b/examples/2.3.x/server-rest/examples/tablesdb/upsert-rows.md index 2c43a30df..f12f3216b 100644 --- a/examples/2.3.x/server-rest/examples/tablesdb/upsert-rows.md +++ b/examples/2.3.x/server-rest/examples/tablesdb/upsert-rows.md @@ -7,7 +7,16 @@ X-Appwrite-Response-Format: 2.3.0 X-Appwrite-Project: <YOUR_PROJECT_ID> { - "rows": [], + "rows": [ + { + "$id": "example1", + "username": "walter.obrien", + "email": "walter.obrien@example.com", + "fullName": "Walter O'Brien", + "age": 30, + "isAdmin": false + } + ], "transactionId": "<TRANSACTION_ID>" } ``` diff --git a/examples/2.3.x/server-rest/examples/teams/create-membership.md b/examples/2.3.x/server-rest/examples/teams/create-membership.md index c4840217f..4f855fb2f 100644 --- a/examples/2.3.x/server-rest/examples/teams/create-membership.md +++ b/examples/2.3.x/server-rest/examples/teams/create-membership.md @@ -10,7 +10,7 @@ X-Appwrite-Project: <YOUR_PROJECT_ID> "email": "email@example.com", "userId": "<USER_ID>", "phone": "+12065550100", - "roles": [], + "roles": ["editor"], "url": "https://example.com", "name": "<NAME>" } diff --git a/examples/2.3.x/server-rest/examples/teams/update-membership.md b/examples/2.3.x/server-rest/examples/teams/update-membership.md index 22358a94d..b451422c0 100644 --- a/examples/2.3.x/server-rest/examples/teams/update-membership.md +++ b/examples/2.3.x/server-rest/examples/teams/update-membership.md @@ -7,6 +7,6 @@ X-Appwrite-Response-Format: 2.3.0 X-Appwrite-Project: <YOUR_PROJECT_ID> { - "roles": [] + "roles": ["editor"] } ``` diff --git a/examples/2.3.x/server-rest/examples/users/update-labels.md b/examples/2.3.x/server-rest/examples/users/update-labels.md index 64a6805f4..5e3f455ea 100644 --- a/examples/2.3.x/server-rest/examples/users/update-labels.md +++ b/examples/2.3.x/server-rest/examples/users/update-labels.md @@ -7,6 +7,6 @@ X-Appwrite-Response-Format: 2.3.0 X-Appwrite-Project: <YOUR_PROJECT_ID> { - "labels": [] + "labels": ["subscriber"] } ``` diff --git a/examples/2.3.x/server-rest/examples/vectorsdb/create-collection.md b/examples/2.3.x/server-rest/examples/vectorsdb/create-collection.md index 229c76ec0..aad0390f1 100644 --- a/examples/2.3.x/server-rest/examples/vectorsdb/create-collection.md +++ b/examples/2.3.x/server-rest/examples/vectorsdb/create-collection.md @@ -9,7 +9,7 @@ X-Appwrite-Project: <YOUR_PROJECT_ID> { "collectionId": "<COLLECTION_ID>", "name": "<NAME>", - "dimension": 1, + "dimension": 4, "permissions": ["read(\"any\")"], "documentSecurity": false, "enabled": false diff --git a/examples/2.3.x/server-rest/examples/vectorsdb/create-documents.md b/examples/2.3.x/server-rest/examples/vectorsdb/create-documents.md index 5d7d25329..c300eb5a3 100644 --- a/examples/2.3.x/server-rest/examples/vectorsdb/create-documents.md +++ b/examples/2.3.x/server-rest/examples/vectorsdb/create-documents.md @@ -7,7 +7,20 @@ X-Appwrite-Response-Format: 2.3.0 X-Appwrite-Project: <YOUR_PROJECT_ID> { - "documents": [], + "documents": [ + { + "$id": "example1", + "embeddings": [ + 0.12, + -0.55, + 0.88, + 1.02 + ], + "metadata": { + "name": "First document" + } + } + ], "transactionId": "<TRANSACTION_ID>" } ``` diff --git a/examples/2.3.x/server-rest/examples/vectorsdb/create-index.md b/examples/2.3.x/server-rest/examples/vectorsdb/create-index.md index 9bed79bbd..158d22764 100644 --- a/examples/2.3.x/server-rest/examples/vectorsdb/create-index.md +++ b/examples/2.3.x/server-rest/examples/vectorsdb/create-index.md @@ -9,7 +9,7 @@ X-Appwrite-Project: <YOUR_PROJECT_ID> { "key": "<KEY>", "type": "hnsw_euclidean", - "attributes": [], + "attributes": ["embeddings"], "orders": [], "lengths": [] } diff --git a/examples/2.3.x/server-rest/examples/vectorsdb/create-operations.md b/examples/2.3.x/server-rest/examples/vectorsdb/create-operations.md index 9f34f5b34..fa894e4ce 100644 --- a/examples/2.3.x/server-rest/examples/vectorsdb/create-operations.md +++ b/examples/2.3.x/server-rest/examples/vectorsdb/create-operations.md @@ -14,7 +14,15 @@ X-Appwrite-Project: <YOUR_PROJECT_ID> "collectionId": "<COLLECTION_ID>", "documentId": "<DOCUMENT_ID>", "data": { - "name": "Walter O'Brien" + "embeddings": [ + 0.12, + -0.55, + 0.88, + 1.02 + ], + "metadata": { + "name": "First document" + } } } ] diff --git a/examples/2.3.x/server-rest/examples/vectorsdb/update-collection.md b/examples/2.3.x/server-rest/examples/vectorsdb/update-collection.md index 2ab3dc84f..720765d28 100644 --- a/examples/2.3.x/server-rest/examples/vectorsdb/update-collection.md +++ b/examples/2.3.x/server-rest/examples/vectorsdb/update-collection.md @@ -8,7 +8,7 @@ X-Appwrite-Project: <YOUR_PROJECT_ID> { "name": "<NAME>", - "dimension": 1, + "dimension": 4, "permissions": ["read(\"any\")"], "documentSecurity": false, "enabled": false diff --git a/examples/2.3.x/server-rest/examples/vectorsdb/upsert-documents.md b/examples/2.3.x/server-rest/examples/vectorsdb/upsert-documents.md index 102c69e97..98e1740c9 100644 --- a/examples/2.3.x/server-rest/examples/vectorsdb/upsert-documents.md +++ b/examples/2.3.x/server-rest/examples/vectorsdb/upsert-documents.md @@ -7,7 +7,20 @@ X-Appwrite-Response-Format: 2.3.0 X-Appwrite-Project: <YOUR_PROJECT_ID> { - "documents": [], + "documents": [ + { + "$id": "example1", + "embeddings": [ + 0.12, + -0.55, + 0.88, + 1.02 + ], + "metadata": { + "name": "First document" + } + } + ], "transactionId": "<TRANSACTION_ID>" } ``` diff --git a/examples/2.3.x/server-rest/examples/webhooks/create.md b/examples/2.3.x/server-rest/examples/webhooks/create.md index 3515358f8..4e95411f6 100644 --- a/examples/2.3.x/server-rest/examples/webhooks/create.md +++ b/examples/2.3.x/server-rest/examples/webhooks/create.md @@ -10,7 +10,7 @@ X-Appwrite-Project: <YOUR_PROJECT_ID> "webhookId": "<WEBHOOK_ID>", "url": "https://example.com/webhook", "name": "<NAME>", - "events": [], + "events": ["users.*.create"], "enabled": false, "tls": false, "authUsername": "<AUTH_USERNAME>", diff --git a/examples/2.3.x/server-rest/examples/webhooks/update.md b/examples/2.3.x/server-rest/examples/webhooks/update.md index a29585a49..37ec92d88 100644 --- a/examples/2.3.x/server-rest/examples/webhooks/update.md +++ b/examples/2.3.x/server-rest/examples/webhooks/update.md @@ -9,7 +9,7 @@ X-Appwrite-Project: <YOUR_PROJECT_ID> { "name": "<NAME>", "url": "https://example.com/webhook", - "events": [], + "events": ["users.*.create"], "enabled": false, "tls": false, "authUsername": "<AUTH_USERNAME>", diff --git a/examples/2.3.x/server-ruby/examples/account/create-email-password-session.md b/examples/2.3.x/server-ruby/examples/account/create-email-password-session.md index 57ab742da..2db01b746 100644 --- a/examples/2.3.x/server-ruby/examples/account/create-email-password-session.md +++ b/examples/2.3.x/server-ruby/examples/account/create-email-password-session.md @@ -12,6 +12,7 @@ account = Account.new(client) result = account.create_email_password_session( email: 'email@example.com', - password: 'password' + password: 'password', + duration: 60 # optional ) ``` diff --git a/examples/2.3.x/server-ruby/examples/account/delete-sessions.md b/examples/2.3.x/server-ruby/examples/account/delete-sessions.md index 3008032f0..b7143c0cc 100644 --- a/examples/2.3.x/server-ruby/examples/account/delete-sessions.md +++ b/examples/2.3.x/server-ruby/examples/account/delete-sessions.md @@ -10,5 +10,7 @@ client = Client.new account = Account.new(client) -result = account.delete_sessions() +result = account.delete_sessions( + current: false # optional +) ``` diff --git a/examples/2.3.x/server-ruby/examples/account/list-sessions.md b/examples/2.3.x/server-ruby/examples/account/list-sessions.md index 47d2c033c..5b810eb99 100644 --- a/examples/2.3.x/server-ruby/examples/account/list-sessions.md +++ b/examples/2.3.x/server-ruby/examples/account/list-sessions.md @@ -10,5 +10,7 @@ client = Client.new account = Account.new(client) -result = account.list_sessions() +result = account.list_sessions( + total: false # optional +) ``` diff --git a/examples/2.3.x/server-ruby/examples/analytics/create-event.md b/examples/2.3.x/server-ruby/examples/analytics/create-event.md new file mode 100644 index 000000000..9a9019861 --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/analytics/create-event.md @@ -0,0 +1,28 @@ +```ruby +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_session('') # The user session to authenticate with + +analytics = Analytics.new(client) + +result = analytics.create_event( + property_id: '<PROPERTY_ID>', + name: '<NAME>', + url: 'https://example.com', + domain: '<DOMAIN>', # optional + referrer: '<REFERRER>', # optional + screen_width: null, # optional + session_hash: '<SESSION_HASH>', # optional + scroll_depth: 0, # optional + engagement_time: null, # optional + props: [], # optional + user_id: '<USER_ID>', # optional + ip: '<IP>', # optional + user_agent: '<USER_AGENT>' # optional +) +``` diff --git a/examples/2.3.x/server-ruby/examples/analytics/create-property.md b/examples/2.3.x/server-ruby/examples/analytics/create-property.md new file mode 100644 index 000000000..61b09d565 --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/analytics/create-property.md @@ -0,0 +1,22 @@ +```ruby +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +analytics = Analytics.new(client) + +result = analytics.create_property( + property_id: '<PROPERTY_ID>', + name: '<NAME>', + domain: '<DOMAIN>', # optional + timezone: '<TIMEZONE>', # optional + enabled: false, # optional + public: false, # optional + allowed_origins: [] # optional +) +``` diff --git a/examples/2.3.x/server-ruby/examples/analytics/delete-property.md b/examples/2.3.x/server-ruby/examples/analytics/delete-property.md new file mode 100644 index 000000000..9664122d2 --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/analytics/delete-property.md @@ -0,0 +1,16 @@ +```ruby +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +analytics = Analytics.new(client) + +result = analytics.delete_property( + property_id: '<PROPERTY_ID>' +) +``` diff --git a/examples/2.3.x/server-ruby/examples/analytics/get-property.md b/examples/2.3.x/server-ruby/examples/analytics/get-property.md new file mode 100644 index 000000000..ce0251251 --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/analytics/get-property.md @@ -0,0 +1,16 @@ +```ruby +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +analytics = Analytics.new(client) + +result = analytics.get_property( + property_id: '<PROPERTY_ID>' +) +``` diff --git a/examples/2.3.x/server-ruby/examples/analytics/list-metrics.md b/examples/2.3.x/server-ruby/examples/analytics/list-metrics.md new file mode 100644 index 000000000..9415c67c6 --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/analytics/list-metrics.md @@ -0,0 +1,24 @@ +```ruby +require 'appwrite' + +include Appwrite +include Appwrite::Enums + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +analytics = Analytics.new(client) + +result = analytics.list_metrics( + property_id: '<PROPERTY_ID>', + queries: [], # optional + interval: AnalyticsInterval::ONE_HOUR, # optional + dimensions: [AnalyticsDimension::COUNTRY], # optional + date_range: '<DATE_RANGE>', # optional + start_at: '2020-10-15T06:38:00.000+00:00', # optional + end_at: '2020-10-15T06:38:00.000+00:00', # optional + limit: 1 # optional +) +``` diff --git a/examples/2.3.x/server-ruby/examples/analytics/list-properties.md b/examples/2.3.x/server-ruby/examples/analytics/list-properties.md new file mode 100644 index 000000000..403cdcc43 --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/analytics/list-properties.md @@ -0,0 +1,18 @@ +```ruby +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +analytics = Analytics.new(client) + +result = analytics.list_properties( + queries: [], # optional + search: '<SEARCH>', # optional + total: false # optional +) +``` diff --git a/examples/2.3.x/server-ruby/examples/analytics/update-property.md b/examples/2.3.x/server-ruby/examples/analytics/update-property.md new file mode 100644 index 000000000..7d32787bd --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/analytics/update-property.md @@ -0,0 +1,22 @@ +```ruby +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +analytics = Analytics.new(client) + +result = analytics.update_property( + property_id: '<PROPERTY_ID>', + name: '<NAME>', # optional + domain: '<DOMAIN>', # optional + timezone: '<TIMEZONE>', # optional + enabled: false, # optional + public: false, # optional + allowed_origins: [] # optional +) +``` diff --git a/examples/2.3.x/server-ruby/examples/avatars/delete-photo.md b/examples/2.3.x/server-ruby/examples/avatars/delete-photo.md new file mode 100644 index 000000000..87dadb8bf --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/avatars/delete-photo.md @@ -0,0 +1,14 @@ +```ruby +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_session('') # The user session to authenticate with + +avatars = Avatars.new(client) + +result = avatars.delete_photo() +``` diff --git a/examples/2.3.x/server-ruby/examples/avatars/get-screenshot.md b/examples/2.3.x/server-ruby/examples/avatars/get-screenshot.md index 742c87fd9..331e4292f 100644 --- a/examples/2.3.x/server-ruby/examples/avatars/get-screenshot.md +++ b/examples/2.3.x/server-ruby/examples/avatars/get-screenshot.md @@ -14,8 +14,7 @@ avatars = Avatars.new(client) result = avatars.get_screenshot( url: 'https://example.com', headers: { - "Authorization" => "Bearer token123", - "X-Custom-Header" => "value" + "Accept-Language" => "en-US,en;q=0.9" }, # optional viewport_width: 1920, # optional viewport_height: 1080, # optional diff --git a/examples/2.3.x/server-ruby/examples/avatars/update-photo.md b/examples/2.3.x/server-ruby/examples/avatars/update-photo.md new file mode 100644 index 000000000..221de4064 --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/avatars/update-photo.md @@ -0,0 +1,16 @@ +```ruby +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_session('') # The user session to authenticate with + +avatars = Avatars.new(client) + +result = avatars.update_photo( + file: InputFile.from_path('dir/file.png') +) +``` diff --git a/examples/2.3.x/server-ruby/examples/databases/create-documents.md b/examples/2.3.x/server-ruby/examples/databases/create-documents.md index 60acd19f7..25b4cbd93 100644 --- a/examples/2.3.x/server-ruby/examples/databases/create-documents.md +++ b/examples/2.3.x/server-ruby/examples/databases/create-documents.md @@ -13,7 +13,16 @@ databases = Databases.new(client) result = databases.create_documents( database_id: '<DATABASE_ID>', collection_id: '<COLLECTION_ID>', - documents: [], + documents: [ + { + "$id": "example1", + "username": "walter.obrien", + "email": "walter.obrien@example.com", + "fullName": "Walter O'Brien", + "age": 30, + "isAdmin": false + } + ], transaction_id: '<TRANSACTION_ID>' # optional ) ``` diff --git a/examples/2.3.x/server-ruby/examples/databases/create-index.md b/examples/2.3.x/server-ruby/examples/databases/create-index.md index e3e9238a9..924f512f8 100644 --- a/examples/2.3.x/server-ruby/examples/databases/create-index.md +++ b/examples/2.3.x/server-ruby/examples/databases/create-index.md @@ -16,7 +16,7 @@ result = databases.create_index( collection_id: '<COLLECTION_ID>', key: '<KEY>', type: DatabasesIndexType::KEY, - attributes: [], + attributes: ["username"], orders: [OrderBy::ASC], # optional lengths: [] # optional ) diff --git a/examples/2.3.x/server-ruby/examples/databases/delete-documents.md b/examples/2.3.x/server-ruby/examples/databases/delete-documents.md index c9309bd9d..29ea35832 100644 --- a/examples/2.3.x/server-ruby/examples/databases/delete-documents.md +++ b/examples/2.3.x/server-ruby/examples/databases/delete-documents.md @@ -13,7 +13,7 @@ databases = Databases.new(client) result = databases.delete_documents( database_id: '<DATABASE_ID>', collection_id: '<COLLECTION_ID>', - queries: [], # optional + queries: ["{\"method\":\"equal\", \"attribute\":\"$id\", \"values\":[\"<DOCUMENT_ID>\"]}"], # optional transaction_id: '<TRANSACTION_ID>' # optional ) ``` diff --git a/examples/2.3.x/server-ruby/examples/databases/list-transactions.md b/examples/2.3.x/server-ruby/examples/databases/list-transactions.md index 9071982e7..12daa7a1d 100644 --- a/examples/2.3.x/server-ruby/examples/databases/list-transactions.md +++ b/examples/2.3.x/server-ruby/examples/databases/list-transactions.md @@ -11,6 +11,7 @@ client = Client.new databases = Databases.new(client) result = databases.list_transactions( - queries: [] # optional + queries: [], # optional + total: false # optional ) ``` diff --git a/examples/2.3.x/server-ruby/examples/databases/upsert-documents.md b/examples/2.3.x/server-ruby/examples/databases/upsert-documents.md index 49432e01b..6cf394c58 100644 --- a/examples/2.3.x/server-ruby/examples/databases/upsert-documents.md +++ b/examples/2.3.x/server-ruby/examples/databases/upsert-documents.md @@ -13,7 +13,16 @@ databases = Databases.new(client) result = databases.upsert_documents( database_id: '<DATABASE_ID>', collection_id: '<COLLECTION_ID>', - documents: [], + documents: [ + { + "$id": "example1", + "username": "walter.obrien", + "email": "walter.obrien@example.com", + "fullName": "Walter O'Brien", + "age": 30, + "isAdmin": false + } + ], transaction_id: '<TRANSACTION_ID>' # optional ) ``` diff --git a/examples/2.3.x/server-ruby/examples/documentsdb/create-documents.md b/examples/2.3.x/server-ruby/examples/documentsdb/create-documents.md index 1277f4aca..b895f1c55 100644 --- a/examples/2.3.x/server-ruby/examples/documentsdb/create-documents.md +++ b/examples/2.3.x/server-ruby/examples/documentsdb/create-documents.md @@ -13,7 +13,16 @@ documents_db = DocumentsDB.new(client) result = documents_db.create_documents( database_id: '<DATABASE_ID>', collection_id: '<COLLECTION_ID>', - documents: [], + documents: [ + { + "$id": "example1", + "username": "walter.obrien", + "email": "walter.obrien@example.com", + "fullName": "Walter O'Brien", + "age": 30, + "isAdmin": false + } + ], transaction_id: '<TRANSACTION_ID>' # optional ) ``` diff --git a/examples/2.3.x/server-ruby/examples/documentsdb/create-index.md b/examples/2.3.x/server-ruby/examples/documentsdb/create-index.md index d1891f9ae..a8c4e35ff 100644 --- a/examples/2.3.x/server-ruby/examples/documentsdb/create-index.md +++ b/examples/2.3.x/server-ruby/examples/documentsdb/create-index.md @@ -16,7 +16,7 @@ result = documents_db.create_index( collection_id: '<COLLECTION_ID>', key: '<KEY>', type: DocumentsDBIndexType::KEY, - attributes: [], + attributes: ["username"], orders: [OrderBy::ASC], # optional lengths: [] # optional ) diff --git a/examples/2.3.x/server-ruby/examples/documentsdb/delete-documents.md b/examples/2.3.x/server-ruby/examples/documentsdb/delete-documents.md index cd628c75f..b1ea20320 100644 --- a/examples/2.3.x/server-ruby/examples/documentsdb/delete-documents.md +++ b/examples/2.3.x/server-ruby/examples/documentsdb/delete-documents.md @@ -13,7 +13,7 @@ documents_db = DocumentsDB.new(client) result = documents_db.delete_documents( database_id: '<DATABASE_ID>', collection_id: '<COLLECTION_ID>', - queries: [], # optional + queries: ["{\"method\":\"equal\", \"attribute\":\"$id\", \"values\":[\"<DOCUMENT_ID>\"]}"], # optional transaction_id: '<TRANSACTION_ID>' # optional ) ``` diff --git a/examples/2.3.x/server-ruby/examples/documentsdb/list-transactions.md b/examples/2.3.x/server-ruby/examples/documentsdb/list-transactions.md index 82d368e17..2128e4f8e 100644 --- a/examples/2.3.x/server-ruby/examples/documentsdb/list-transactions.md +++ b/examples/2.3.x/server-ruby/examples/documentsdb/list-transactions.md @@ -11,6 +11,7 @@ client = Client.new documents_db = DocumentsDB.new(client) result = documents_db.list_transactions( - queries: [] # optional + queries: [], # optional + total: false # optional ) ``` diff --git a/examples/2.3.x/server-ruby/examples/documentsdb/upsert-documents.md b/examples/2.3.x/server-ruby/examples/documentsdb/upsert-documents.md index f7f05970e..0876756c3 100644 --- a/examples/2.3.x/server-ruby/examples/documentsdb/upsert-documents.md +++ b/examples/2.3.x/server-ruby/examples/documentsdb/upsert-documents.md @@ -13,7 +13,16 @@ documents_db = DocumentsDB.new(client) result = documents_db.upsert_documents( database_id: '<DATABASE_ID>', collection_id: '<COLLECTION_ID>', - documents: [], + documents: [ + { + "$id": "example1", + "username": "walter.obrien", + "email": "walter.obrien@example.com", + "fullName": "Walter O'Brien", + "age": 30, + "isAdmin": false + } + ], transaction_id: '<TRANSACTION_ID>' # optional ) ``` diff --git a/examples/2.3.x/server-ruby/examples/embeddings/create-text-embeddings.md b/examples/2.3.x/server-ruby/examples/embeddings/create-text-embeddings.md index facbe573f..fecbe2812 100644 --- a/examples/2.3.x/server-ruby/examples/embeddings/create-text-embeddings.md +++ b/examples/2.3.x/server-ruby/examples/embeddings/create-text-embeddings.md @@ -12,7 +12,7 @@ client = Client.new embeddings = Embeddings.new(client) result = embeddings.create_text_embeddings( - texts: [], + texts: ["Appwrite helps developers build applications.", "Find documents with semantic search."], model: EmbeddingModel::NOMIC_EMBED_TEXT # optional ) ``` diff --git a/examples/2.3.x/server-ruby/examples/functions/list-runtimes.md b/examples/2.3.x/server-ruby/examples/functions/list-runtimes.md index 98a754662..99eecff49 100644 --- a/examples/2.3.x/server-ruby/examples/functions/list-runtimes.md +++ b/examples/2.3.x/server-ruby/examples/functions/list-runtimes.md @@ -10,5 +10,7 @@ client = Client.new functions = Functions.new(client) -result = functions.list_runtimes() +result = functions.list_runtimes( + total: false # optional +) ``` diff --git a/examples/2.3.x/server-ruby/examples/functions/list-specifications.md b/examples/2.3.x/server-ruby/examples/functions/list-specifications.md index 635f73a5c..34f12bb0f 100644 --- a/examples/2.3.x/server-ruby/examples/functions/list-specifications.md +++ b/examples/2.3.x/server-ruby/examples/functions/list-specifications.md @@ -11,6 +11,7 @@ client = Client.new functions = Functions.new(client) result = functions.list_specifications( - type: 'runtimes' # optional + type: 'runtimes', # optional + total: false # optional ) ``` diff --git a/examples/2.3.x/server-ruby/examples/graphql/mutation.md b/examples/2.3.x/server-ruby/examples/graphql/mutation.md index a71a8bd61..3493178eb 100644 --- a/examples/2.3.x/server-ruby/examples/graphql/mutation.md +++ b/examples/2.3.x/server-ruby/examples/graphql/mutation.md @@ -11,6 +11,8 @@ client = Client.new graphql = Graphql.new(client) result = graphql.mutation( - query: {} + query: { + "query" => "mutation { accountUpdateName(name: "Walter") { name } }" + } ) ``` diff --git a/examples/2.3.x/server-ruby/examples/graphql/query.md b/examples/2.3.x/server-ruby/examples/graphql/query.md index 49561b158..2432fd818 100644 --- a/examples/2.3.x/server-ruby/examples/graphql/query.md +++ b/examples/2.3.x/server-ruby/examples/graphql/query.md @@ -11,6 +11,8 @@ client = Client.new graphql = Graphql.new(client) result = graphql.query( - query: {} + query: { + "query" => "query { localeGet { ip } }" + } ) ``` diff --git a/examples/2.3.x/server-ruby/examples/locale/list-codes.md b/examples/2.3.x/server-ruby/examples/locale/list-codes.md index cf31d3af0..6935229ad 100644 --- a/examples/2.3.x/server-ruby/examples/locale/list-codes.md +++ b/examples/2.3.x/server-ruby/examples/locale/list-codes.md @@ -10,5 +10,7 @@ client = Client.new locale = Locale.new(client) -result = locale.list_codes() +result = locale.list_codes( + total: false # optional +) ``` diff --git a/examples/2.3.x/server-ruby/examples/locale/list-continents.md b/examples/2.3.x/server-ruby/examples/locale/list-continents.md index 1470c7d16..2e97e0b34 100644 --- a/examples/2.3.x/server-ruby/examples/locale/list-continents.md +++ b/examples/2.3.x/server-ruby/examples/locale/list-continents.md @@ -10,5 +10,7 @@ client = Client.new locale = Locale.new(client) -result = locale.list_continents() +result = locale.list_continents( + total: false # optional +) ``` diff --git a/examples/2.3.x/server-ruby/examples/locale/list-countries-eu.md b/examples/2.3.x/server-ruby/examples/locale/list-countries-eu.md index 7ca1e985d..b54270b74 100644 --- a/examples/2.3.x/server-ruby/examples/locale/list-countries-eu.md +++ b/examples/2.3.x/server-ruby/examples/locale/list-countries-eu.md @@ -10,5 +10,7 @@ client = Client.new locale = Locale.new(client) -result = locale.list_countries_eu() +result = locale.list_countries_eu( + total: false # optional +) ``` diff --git a/examples/2.3.x/server-ruby/examples/locale/list-countries-phones.md b/examples/2.3.x/server-ruby/examples/locale/list-countries-phones.md index 43c80c6ac..de45f6b65 100644 --- a/examples/2.3.x/server-ruby/examples/locale/list-countries-phones.md +++ b/examples/2.3.x/server-ruby/examples/locale/list-countries-phones.md @@ -10,5 +10,7 @@ client = Client.new locale = Locale.new(client) -result = locale.list_countries_phones() +result = locale.list_countries_phones( + total: false # optional +) ``` diff --git a/examples/2.3.x/server-ruby/examples/locale/list-countries.md b/examples/2.3.x/server-ruby/examples/locale/list-countries.md index a5a81c7ba..a985d20b8 100644 --- a/examples/2.3.x/server-ruby/examples/locale/list-countries.md +++ b/examples/2.3.x/server-ruby/examples/locale/list-countries.md @@ -10,5 +10,7 @@ client = Client.new locale = Locale.new(client) -result = locale.list_countries() +result = locale.list_countries( + total: false # optional +) ``` diff --git a/examples/2.3.x/server-ruby/examples/locale/list-currencies.md b/examples/2.3.x/server-ruby/examples/locale/list-currencies.md index a5316f2bf..2b698f1ea 100644 --- a/examples/2.3.x/server-ruby/examples/locale/list-currencies.md +++ b/examples/2.3.x/server-ruby/examples/locale/list-currencies.md @@ -10,5 +10,7 @@ client = Client.new locale = Locale.new(client) -result = locale.list_currencies() +result = locale.list_currencies( + total: false # optional +) ``` diff --git a/examples/2.3.x/server-ruby/examples/locale/list-languages.md b/examples/2.3.x/server-ruby/examples/locale/list-languages.md index 9c8655f4e..8c0f1ae18 100644 --- a/examples/2.3.x/server-ruby/examples/locale/list-languages.md +++ b/examples/2.3.x/server-ruby/examples/locale/list-languages.md @@ -10,5 +10,7 @@ client = Client.new locale = Locale.new(client) -result = locale.list_languages() +result = locale.list_languages( + total: false # optional +) ``` diff --git a/examples/2.3.x/server-ruby/examples/messaging/create-push.md b/examples/2.3.x/server-ruby/examples/messaging/create-push.md index e94015e60..c1488a49a 100644 --- a/examples/2.3.x/server-ruby/examples/messaging/create-push.md +++ b/examples/2.3.x/server-ruby/examples/messaging/create-push.md @@ -30,6 +30,7 @@ result = messaging.create_push( scheduled_at: '2020-10-15T06:38:00.000+00:00', # optional content_available: false, # optional critical: false, # optional - priority: MessagePriority::NORMAL # optional + priority: MessagePriority::NORMAL, # optional + channel_id: '<CHANNEL_ID>' # optional ) ``` diff --git a/examples/2.3.x/server-ruby/examples/messaging/update-email.md b/examples/2.3.x/server-ruby/examples/messaging/update-email.md index dcdd413ea..0d918ba44 100644 --- a/examples/2.3.x/server-ruby/examples/messaging/update-email.md +++ b/examples/2.3.x/server-ruby/examples/messaging/update-email.md @@ -12,18 +12,18 @@ messaging = Messaging.new(client) result = messaging.update_email( message_id: '<MESSAGE_ID>', + subject: '<SUBJECT>', # optional + content: '<CONTENT>', # optional topics: [], # optional users: [], # optional targets: [], # optional - subject: '<SUBJECT>', # optional - content: '<CONTENT>', # optional - draft: false, # optional - html: false, # optional cc: [], # optional bcc: [], # optional + attachments: [], # optional reply_to_email: 'email@example.com', # optional reply_to_name: '<REPLY_TO_NAME>', # optional - scheduled_at: '2020-10-15T06:38:00.000+00:00', # optional - attachments: [] # optional + draft: false, # optional + html: false, # optional + scheduled_at: '2020-10-15T06:38:00.000+00:00' # optional ) ``` diff --git a/examples/2.3.x/server-ruby/examples/messaging/update-push.md b/examples/2.3.x/server-ruby/examples/messaging/update-push.md index 9aa0e8ba9..41323dbc7 100644 --- a/examples/2.3.x/server-ruby/examples/messaging/update-push.md +++ b/examples/2.3.x/server-ruby/examples/messaging/update-push.md @@ -13,11 +13,11 @@ messaging = Messaging.new(client) result = messaging.update_push( message_id: '<MESSAGE_ID>', + title: '<TITLE>', # optional + body: '<BODY>', # optional topics: [], # optional users: [], # optional targets: [], # optional - title: '<TITLE>', # optional - body: '<BODY>', # optional data: {}, # optional action: '<ACTION>', # optional image: '<ID1:ID2>', # optional @@ -30,6 +30,7 @@ result = messaging.update_push( scheduled_at: '2020-10-15T06:38:00.000+00:00', # optional content_available: false, # optional critical: false, # optional - priority: MessagePriority::NORMAL # optional + priority: MessagePriority::NORMAL, # optional + channel_id: '<CHANNEL_ID>' # optional ) ``` diff --git a/examples/2.3.x/server-ruby/examples/messaging/update-sms.md b/examples/2.3.x/server-ruby/examples/messaging/update-sms.md index 233ffb819..41e9827e4 100644 --- a/examples/2.3.x/server-ruby/examples/messaging/update-sms.md +++ b/examples/2.3.x/server-ruby/examples/messaging/update-sms.md @@ -12,10 +12,10 @@ messaging = Messaging.new(client) result = messaging.update_sms( message_id: '<MESSAGE_ID>', + content: '<CONTENT>', # optional topics: [], # optional users: [], # optional targets: [], # optional - content: '<CONTENT>', # optional draft: false, # optional scheduled_at: '2020-10-15T06:38:00.000+00:00' # optional ) diff --git a/examples/2.3.x/server-ruby/examples/oauth2/introspect.md b/examples/2.3.x/server-ruby/examples/oauth2/introspect.md new file mode 100644 index 000000000..1ff233709 --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/oauth2/introspect.md @@ -0,0 +1,19 @@ +```ruby +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +oauth2 = Oauth2.new(client) + +result = oauth2.introspect( + token: '<TOKEN>', + token_type_hint: 'access_token', # optional + client_id: '<CLIENT_ID>', # optional + client_secret: '<CLIENT_SECRET>' # optional +) +``` diff --git a/examples/2.3.x/server-ruby/examples/organization/create-ephemeral-project-key.md b/examples/2.3.x/server-ruby/examples/organization/create-ephemeral-project-key.md index b37d17ba5..62814ac1d 100644 --- a/examples/2.3.x/server-ruby/examples/organization/create-ephemeral-project-key.md +++ b/examples/2.3.x/server-ruby/examples/organization/create-ephemeral-project-key.md @@ -13,7 +13,7 @@ organization = Organization.new(client) result = organization.create_ephemeral_project_key( project_id: '<PROJECT_ID>', - scopes: [ProjectKeyScopes::PROJECT_READ], + scopes: [ProjectKeyScopes::USERS_READ], duration: 600 ) ``` diff --git a/examples/2.3.x/server-ruby/examples/organization/update-project-key.md b/examples/2.3.x/server-ruby/examples/organization/update-project-key.md index ee44ade53..2908cae52 100644 --- a/examples/2.3.x/server-ruby/examples/organization/update-project-key.md +++ b/examples/2.3.x/server-ruby/examples/organization/update-project-key.md @@ -15,7 +15,7 @@ result = organization.update_project_key( project_id: '<PROJECT_ID>', key_id: '<KEY_ID>', name: '<NAME>', - scopes: [ProjectKeyScopes::PROJECT_READ], + scopes: [ProjectKeyScopes::USERS_READ], expire: '2020-10-15T06:38:00.000+00:00' # optional ) ``` diff --git a/examples/2.3.x/server-ruby/examples/project/create-ephemeral-key.md b/examples/2.3.x/server-ruby/examples/project/create-ephemeral-key.md index 6f0d9b660..d7928fa5c 100644 --- a/examples/2.3.x/server-ruby/examples/project/create-ephemeral-key.md +++ b/examples/2.3.x/server-ruby/examples/project/create-ephemeral-key.md @@ -12,7 +12,7 @@ client = Client.new project = Project.new(client) result = project.create_ephemeral_key( - scopes: [ProjectKeyScopes::PROJECT_READ], + scopes: [ProjectKeyScopes::USERS_READ], duration: 600 ) ``` diff --git a/examples/2.3.x/server-ruby/examples/project/create-smtp-test.md b/examples/2.3.x/server-ruby/examples/project/create-smtp-test.md index 1e1d1eae0..348536387 100644 --- a/examples/2.3.x/server-ruby/examples/project/create-smtp-test.md +++ b/examples/2.3.x/server-ruby/examples/project/create-smtp-test.md @@ -11,6 +11,6 @@ client = Client.new project = Project.new(client) result = project.create_smtp_test( - emails: [] + emails: ["recipient@example.com"] ) ``` diff --git a/examples/2.3.x/server-ruby/examples/project/update-key.md b/examples/2.3.x/server-ruby/examples/project/update-key.md index b192315d7..992775bbf 100644 --- a/examples/2.3.x/server-ruby/examples/project/update-key.md +++ b/examples/2.3.x/server-ruby/examples/project/update-key.md @@ -14,7 +14,7 @@ project = Project.new(client) result = project.update_key( key_id: '<KEY_ID>', name: '<NAME>', - scopes: [ProjectKeyScopes::PROJECT_READ], + scopes: [ProjectKeyScopes::USERS_READ], expire: '2020-10-15T06:38:00.000+00:00' # optional ) ``` diff --git a/examples/2.3.x/server-ruby/examples/project/update-labels.md b/examples/2.3.x/server-ruby/examples/project/update-labels.md index f57cec70e..a01667b9b 100644 --- a/examples/2.3.x/server-ruby/examples/project/update-labels.md +++ b/examples/2.3.x/server-ruby/examples/project/update-labels.md @@ -11,6 +11,6 @@ client = Client.new project = Project.new(client) result = project.update_labels( - labels: [] + labels: ["production"] ) ``` diff --git a/examples/2.3.x/server-ruby/examples/project/update-o-auth-2-auth-0.md b/examples/2.3.x/server-ruby/examples/project/update-o-auth-2-auth-0.md index e8d11dbf3..6af0dc832 100644 --- a/examples/2.3.x/server-ruby/examples/project/update-o-auth-2-auth-0.md +++ b/examples/2.3.x/server-ruby/examples/project/update-o-auth-2-auth-0.md @@ -2,6 +2,7 @@ require 'appwrite' include Appwrite +include Appwrite::Enums client = Client.new .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint @@ -14,6 +15,7 @@ result = project.update_o_auth2_auth0( client_id: '<CLIENT_ID>', # optional client_secret: '<CLIENT_SECRET>', # optional endpoint: '<ENDPOINT>', # optional + prompt: [ProjectOAuth2Auth0Prompt::NONE], # optional enabled: false # optional ) ``` diff --git a/examples/2.3.x/server-ruby/examples/project/update-o-auth-2-discord.md b/examples/2.3.x/server-ruby/examples/project/update-o-auth-2-discord.md index 01bacd7cb..1e8409f5e 100644 --- a/examples/2.3.x/server-ruby/examples/project/update-o-auth-2-discord.md +++ b/examples/2.3.x/server-ruby/examples/project/update-o-auth-2-discord.md @@ -2,6 +2,7 @@ require 'appwrite' include Appwrite +include Appwrite::Enums client = Client.new .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint @@ -13,6 +14,7 @@ project = Project.new(client) result = project.update_o_auth2_discord( client_id: '<CLIENT_ID>', # optional client_secret: '<CLIENT_SECRET>', # optional + prompt: [ProjectOAuth2DiscordPrompt::NONE], # optional enabled: false # optional ) ``` diff --git a/examples/2.3.x/server-ruby/examples/project/update-o-auth-2-git-hub.md b/examples/2.3.x/server-ruby/examples/project/update-o-auth-2-git-hub.md index e63370f78..d209a7b9e 100644 --- a/examples/2.3.x/server-ruby/examples/project/update-o-auth-2-git-hub.md +++ b/examples/2.3.x/server-ruby/examples/project/update-o-auth-2-git-hub.md @@ -2,6 +2,7 @@ require 'appwrite' include Appwrite +include Appwrite::Enums client = Client.new .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint @@ -13,6 +14,7 @@ project = Project.new(client) result = project.update_o_auth2_git_hub( client_id: '<CLIENT_ID>', # optional client_secret: '<CLIENT_SECRET>', # optional + prompt: [ProjectOAuth2GitHubPrompt::SELECT_ACCOUNT], # optional enabled: false # optional ) ``` diff --git a/examples/2.3.x/server-ruby/examples/project/update-o-auth-2-kakao.md b/examples/2.3.x/server-ruby/examples/project/update-o-auth-2-kakao.md index 53b6a10af..035810f71 100644 --- a/examples/2.3.x/server-ruby/examples/project/update-o-auth-2-kakao.md +++ b/examples/2.3.x/server-ruby/examples/project/update-o-auth-2-kakao.md @@ -2,6 +2,7 @@ require 'appwrite' include Appwrite +include Appwrite::Enums client = Client.new .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint @@ -13,6 +14,7 @@ project = Project.new(client) result = project.update_o_auth2_kakao( client_id: '<CLIENT_ID>', # optional client_secret: '<CLIENT_SECRET>', # optional + prompt: [ProjectOAuth2KakaoPrompt::NONE], # optional enabled: false # optional ) ``` diff --git a/examples/2.3.x/server-ruby/examples/project/update-o-auth-2-microsoft.md b/examples/2.3.x/server-ruby/examples/project/update-o-auth-2-microsoft.md index 0a5563f7a..b5aead55a 100644 --- a/examples/2.3.x/server-ruby/examples/project/update-o-auth-2-microsoft.md +++ b/examples/2.3.x/server-ruby/examples/project/update-o-auth-2-microsoft.md @@ -2,6 +2,7 @@ require 'appwrite' include Appwrite +include Appwrite::Enums client = Client.new .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint @@ -14,6 +15,7 @@ result = project.update_o_auth2_microsoft( application_id: '<APPLICATION_ID>', # optional application_secret: '<APPLICATION_SECRET>', # optional tenant: '<TENANT>', # optional + prompt: [ProjectOAuth2MicrosoftPrompt::NONE], # optional enabled: false # optional ) ``` diff --git a/examples/2.3.x/server-ruby/examples/project/update-o-auth-2-okta.md b/examples/2.3.x/server-ruby/examples/project/update-o-auth-2-okta.md index 44716551f..87b6da358 100644 --- a/examples/2.3.x/server-ruby/examples/project/update-o-auth-2-okta.md +++ b/examples/2.3.x/server-ruby/examples/project/update-o-auth-2-okta.md @@ -2,6 +2,7 @@ require 'appwrite' include Appwrite +include Appwrite::Enums client = Client.new .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint @@ -15,6 +16,7 @@ result = project.update_o_auth2_okta( client_secret: '<CLIENT_SECRET>', # optional domain: 'example.com', # optional authorization_server_id: '<AUTHORIZATION_SERVER_ID>', # optional + prompt: [ProjectOAuth2OktaPrompt::NONE], # optional enabled: false # optional ) ``` diff --git a/examples/2.3.x/server-ruby/examples/project/update-o-auth-2-salesforce.md b/examples/2.3.x/server-ruby/examples/project/update-o-auth-2-salesforce.md index f573693fb..b569cfa45 100644 --- a/examples/2.3.x/server-ruby/examples/project/update-o-auth-2-salesforce.md +++ b/examples/2.3.x/server-ruby/examples/project/update-o-auth-2-salesforce.md @@ -2,6 +2,7 @@ require 'appwrite' include Appwrite +include Appwrite::Enums client = Client.new .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint @@ -13,6 +14,7 @@ project = Project.new(client) result = project.update_o_auth2_salesforce( customer_key: '<CUSTOMER_KEY>', # optional customer_secret: '<CUSTOMER_SECRET>', # optional + prompt: [ProjectOAuth2SalesforcePrompt::LOGIN], # optional enabled: false # optional ) ``` diff --git a/examples/2.3.x/server-ruby/examples/project/update-o-auth-2-webflow.md b/examples/2.3.x/server-ruby/examples/project/update-o-auth-2-webflow.md new file mode 100644 index 000000000..22b17c710 --- /dev/null +++ b/examples/2.3.x/server-ruby/examples/project/update-o-auth-2-webflow.md @@ -0,0 +1,18 @@ +```ruby +require 'appwrite' + +include Appwrite + +client = Client.new + .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint + .set_project('<YOUR_PROJECT_ID>') # Your project ID + .set_key('<YOUR_API_KEY>') # Your secret API key + +project = Project.new(client) + +result = project.update_o_auth2_webflow( + client_id: '<CLIENT_ID>', # optional + client_secret: '<CLIENT_SECRET>', # optional + enabled: false # optional +) +``` diff --git a/examples/2.3.x/server-ruby/examples/project/update-o-auth-2-zoho.md b/examples/2.3.x/server-ruby/examples/project/update-o-auth-2-zoho.md index 2fbd5fed3..7c7c190d9 100644 --- a/examples/2.3.x/server-ruby/examples/project/update-o-auth-2-zoho.md +++ b/examples/2.3.x/server-ruby/examples/project/update-o-auth-2-zoho.md @@ -2,6 +2,7 @@ require 'appwrite' include Appwrite +include Appwrite::Enums client = Client.new .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint @@ -13,6 +14,7 @@ project = Project.new(client) result = project.update_o_auth2_zoho( client_id: '<CLIENT_ID>', # optional client_secret: '<CLIENT_SECRET>', # optional + prompt: [ProjectOAuth2ZohoPrompt::CONSENT], # optional enabled: false # optional ) ``` diff --git a/examples/2.3.x/server-ruby/examples/sites/list-frameworks.md b/examples/2.3.x/server-ruby/examples/sites/list-frameworks.md index a33303a27..7b8b8f56e 100644 --- a/examples/2.3.x/server-ruby/examples/sites/list-frameworks.md +++ b/examples/2.3.x/server-ruby/examples/sites/list-frameworks.md @@ -10,5 +10,7 @@ client = Client.new sites = Sites.new(client) -result = sites.list_frameworks() +result = sites.list_frameworks( + total: false # optional +) ``` diff --git a/examples/2.3.x/server-ruby/examples/sites/list-specifications.md b/examples/2.3.x/server-ruby/examples/sites/list-specifications.md index 9ed8d0018..1f816b906 100644 --- a/examples/2.3.x/server-ruby/examples/sites/list-specifications.md +++ b/examples/2.3.x/server-ruby/examples/sites/list-specifications.md @@ -11,6 +11,7 @@ client = Client.new sites = Sites.new(client) result = sites.list_specifications( - type: 'runtimes' # optional + type: 'runtimes', # optional + total: false # optional ) ``` diff --git a/examples/2.3.x/server-ruby/examples/tablesdb/create-index.md b/examples/2.3.x/server-ruby/examples/tablesdb/create-index.md index a0453818c..d1e2dba79 100644 --- a/examples/2.3.x/server-ruby/examples/tablesdb/create-index.md +++ b/examples/2.3.x/server-ruby/examples/tablesdb/create-index.md @@ -16,7 +16,7 @@ result = tables_db.create_index( table_id: '<TABLE_ID>', key: '<KEY>', type: TablesDBIndexType::KEY, - columns: [], + columns: ["username"], orders: [OrderBy::ASC], # optional lengths: [] # optional ) diff --git a/examples/2.3.x/server-ruby/examples/tablesdb/create-rows.md b/examples/2.3.x/server-ruby/examples/tablesdb/create-rows.md index 2fc8a2b16..9ff8dd788 100644 --- a/examples/2.3.x/server-ruby/examples/tablesdb/create-rows.md +++ b/examples/2.3.x/server-ruby/examples/tablesdb/create-rows.md @@ -13,7 +13,16 @@ tables_db = TablesDB.new(client) result = tables_db.create_rows( database_id: '<DATABASE_ID>', table_id: '<TABLE_ID>', - rows: [], + rows: [ + { + "$id": "example1", + "username": "walter.obrien", + "email": "walter.obrien@example.com", + "fullName": "Walter O'Brien", + "age": 30, + "isAdmin": false + } + ], transaction_id: '<TRANSACTION_ID>' # optional ) ``` diff --git a/examples/2.3.x/server-ruby/examples/tablesdb/delete-rows.md b/examples/2.3.x/server-ruby/examples/tablesdb/delete-rows.md index 69ab29e8a..41d6acdbb 100644 --- a/examples/2.3.x/server-ruby/examples/tablesdb/delete-rows.md +++ b/examples/2.3.x/server-ruby/examples/tablesdb/delete-rows.md @@ -13,7 +13,7 @@ tables_db = TablesDB.new(client) result = tables_db.delete_rows( database_id: '<DATABASE_ID>', table_id: '<TABLE_ID>', - queries: [], # optional + queries: ["{\"method\":\"equal\", \"attribute\":\"$id\", \"values\":[\"<ROW_ID>\"]}"], # optional transaction_id: '<TRANSACTION_ID>' # optional ) ``` diff --git a/examples/2.3.x/server-ruby/examples/tablesdb/list-transactions.md b/examples/2.3.x/server-ruby/examples/tablesdb/list-transactions.md index f8800dd78..de6a23899 100644 --- a/examples/2.3.x/server-ruby/examples/tablesdb/list-transactions.md +++ b/examples/2.3.x/server-ruby/examples/tablesdb/list-transactions.md @@ -11,6 +11,7 @@ client = Client.new tables_db = TablesDB.new(client) result = tables_db.list_transactions( - queries: [] # optional + queries: [], # optional + total: false # optional ) ``` diff --git a/examples/2.3.x/server-ruby/examples/tablesdb/upsert-rows.md b/examples/2.3.x/server-ruby/examples/tablesdb/upsert-rows.md index d450971f9..9d5cce807 100644 --- a/examples/2.3.x/server-ruby/examples/tablesdb/upsert-rows.md +++ b/examples/2.3.x/server-ruby/examples/tablesdb/upsert-rows.md @@ -13,7 +13,16 @@ tables_db = TablesDB.new(client) result = tables_db.upsert_rows( database_id: '<DATABASE_ID>', table_id: '<TABLE_ID>', - rows: [], + rows: [ + { + "$id": "example1", + "username": "walter.obrien", + "email": "walter.obrien@example.com", + "fullName": "Walter O'Brien", + "age": 30, + "isAdmin": false + } + ], transaction_id: '<TRANSACTION_ID>' # optional ) ``` diff --git a/examples/2.3.x/server-ruby/examples/teams/create-membership.md b/examples/2.3.x/server-ruby/examples/teams/create-membership.md index 7df704e71..b3fe386d0 100644 --- a/examples/2.3.x/server-ruby/examples/teams/create-membership.md +++ b/examples/2.3.x/server-ruby/examples/teams/create-membership.md @@ -12,7 +12,7 @@ teams = Teams.new(client) result = teams.create_membership( team_id: '<TEAM_ID>', - roles: [], + roles: ["editor"], email: 'email@example.com', # optional user_id: '<USER_ID>', # optional phone: '+12065550100', # optional diff --git a/examples/2.3.x/server-ruby/examples/teams/update-membership.md b/examples/2.3.x/server-ruby/examples/teams/update-membership.md index f94e3879e..898f7eae3 100644 --- a/examples/2.3.x/server-ruby/examples/teams/update-membership.md +++ b/examples/2.3.x/server-ruby/examples/teams/update-membership.md @@ -13,6 +13,6 @@ teams = Teams.new(client) result = teams.update_membership( team_id: '<TEAM_ID>', membership_id: '<MEMBERSHIP_ID>', - roles: [] + roles: ["editor"] ) ``` diff --git a/examples/2.3.x/server-ruby/examples/users/update-labels.md b/examples/2.3.x/server-ruby/examples/users/update-labels.md index 0110cb9e5..bdad6d049 100644 --- a/examples/2.3.x/server-ruby/examples/users/update-labels.md +++ b/examples/2.3.x/server-ruby/examples/users/update-labels.md @@ -12,6 +12,6 @@ users = Users.new(client) result = users.update_labels( user_id: '<USER_ID>', - labels: [] + labels: ["subscriber"] ) ``` diff --git a/examples/2.3.x/server-ruby/examples/vectorsdb/create-collection.md b/examples/2.3.x/server-ruby/examples/vectorsdb/create-collection.md index b449f541e..4b16940b1 100644 --- a/examples/2.3.x/server-ruby/examples/vectorsdb/create-collection.md +++ b/examples/2.3.x/server-ruby/examples/vectorsdb/create-collection.md @@ -16,7 +16,7 @@ result = vectors_db.create_collection( database_id: '<DATABASE_ID>', collection_id: '<COLLECTION_ID>', name: '<NAME>', - dimension: 1, + dimension: 4, permissions: [Permission.read(Role.any())], # optional document_security: false, # optional enabled: false # optional diff --git a/examples/2.3.x/server-ruby/examples/vectorsdb/create-documents.md b/examples/2.3.x/server-ruby/examples/vectorsdb/create-documents.md index 9f3a4d4d9..3a89c1ee9 100644 --- a/examples/2.3.x/server-ruby/examples/vectorsdb/create-documents.md +++ b/examples/2.3.x/server-ruby/examples/vectorsdb/create-documents.md @@ -13,7 +13,20 @@ vectors_db = VectorsDB.new(client) result = vectors_db.create_documents( database_id: '<DATABASE_ID>', collection_id: '<COLLECTION_ID>', - documents: [], + documents: [ + { + "$id": "example1", + "embeddings": [ + 0.12, + -0.55, + 0.88, + 1.02 + ], + "metadata": { + "name": "First document" + } + } + ], transaction_id: '<TRANSACTION_ID>' # optional ) ``` diff --git a/examples/2.3.x/server-ruby/examples/vectorsdb/create-index.md b/examples/2.3.x/server-ruby/examples/vectorsdb/create-index.md index d7880ab2c..60d2624a8 100644 --- a/examples/2.3.x/server-ruby/examples/vectorsdb/create-index.md +++ b/examples/2.3.x/server-ruby/examples/vectorsdb/create-index.md @@ -16,7 +16,7 @@ result = vectors_db.create_index( collection_id: '<COLLECTION_ID>', key: '<KEY>', type: VectorsDBIndexType::HNSW_EUCLIDEAN, - attributes: [], + attributes: ["embeddings"], orders: [OrderBy::ASC], # optional lengths: [] # optional ) diff --git a/examples/2.3.x/server-ruby/examples/vectorsdb/create-operations.md b/examples/2.3.x/server-ruby/examples/vectorsdb/create-operations.md index 6817930bb..23e14d1ce 100644 --- a/examples/2.3.x/server-ruby/examples/vectorsdb/create-operations.md +++ b/examples/2.3.x/server-ruby/examples/vectorsdb/create-operations.md @@ -19,7 +19,15 @@ result = vectors_db.create_operations( "collectionId": "<COLLECTION_ID>", "documentId": "<DOCUMENT_ID>", "data": { - "name": "Walter O'Brien" + "embeddings": [ + 0.12, + -0.55, + 0.88, + 1.02 + ], + "metadata": { + "name": "First document" + } } } ] # optional diff --git a/examples/2.3.x/server-ruby/examples/vectorsdb/delete-documents.md b/examples/2.3.x/server-ruby/examples/vectorsdb/delete-documents.md index bb1173a38..a050c8c37 100644 --- a/examples/2.3.x/server-ruby/examples/vectorsdb/delete-documents.md +++ b/examples/2.3.x/server-ruby/examples/vectorsdb/delete-documents.md @@ -13,7 +13,7 @@ vectors_db = VectorsDB.new(client) result = vectors_db.delete_documents( database_id: '<DATABASE_ID>', collection_id: '<COLLECTION_ID>', - queries: [], # optional + queries: ["{\"method\":\"equal\", \"attribute\":\"$id\", \"values\":[\"<DOCUMENT_ID>\"]}"], # optional transaction_id: '<TRANSACTION_ID>' # optional ) ``` diff --git a/examples/2.3.x/server-ruby/examples/vectorsdb/list-transactions.md b/examples/2.3.x/server-ruby/examples/vectorsdb/list-transactions.md index 9c2182da6..2db8f34b4 100644 --- a/examples/2.3.x/server-ruby/examples/vectorsdb/list-transactions.md +++ b/examples/2.3.x/server-ruby/examples/vectorsdb/list-transactions.md @@ -11,6 +11,7 @@ client = Client.new vectors_db = VectorsDB.new(client) result = vectors_db.list_transactions( - queries: [] # optional + queries: [], # optional + total: false # optional ) ``` diff --git a/examples/2.3.x/server-ruby/examples/vectorsdb/update-collection.md b/examples/2.3.x/server-ruby/examples/vectorsdb/update-collection.md index 0dfdac139..eee8c9753 100644 --- a/examples/2.3.x/server-ruby/examples/vectorsdb/update-collection.md +++ b/examples/2.3.x/server-ruby/examples/vectorsdb/update-collection.md @@ -16,7 +16,7 @@ result = vectors_db.update_collection( database_id: '<DATABASE_ID>', collection_id: '<COLLECTION_ID>', name: '<NAME>', - dimension: 1, # optional + dimension: 4, # optional permissions: [Permission.read(Role.any())], # optional document_security: false, # optional enabled: false # optional diff --git a/examples/2.3.x/server-ruby/examples/vectorsdb/upsert-documents.md b/examples/2.3.x/server-ruby/examples/vectorsdb/upsert-documents.md index d737f1072..e1fea6cc6 100644 --- a/examples/2.3.x/server-ruby/examples/vectorsdb/upsert-documents.md +++ b/examples/2.3.x/server-ruby/examples/vectorsdb/upsert-documents.md @@ -13,7 +13,20 @@ vectors_db = VectorsDB.new(client) result = vectors_db.upsert_documents( database_id: '<DATABASE_ID>', collection_id: '<COLLECTION_ID>', - documents: [], + documents: [ + { + "$id": "example1", + "embeddings": [ + 0.12, + -0.55, + 0.88, + 1.02 + ], + "metadata": { + "name": "First document" + } + } + ], transaction_id: '<TRANSACTION_ID>' # optional ) ``` diff --git a/examples/2.3.x/server-ruby/examples/webhooks/create.md b/examples/2.3.x/server-ruby/examples/webhooks/create.md index 9f231f7b1..6d7544242 100644 --- a/examples/2.3.x/server-ruby/examples/webhooks/create.md +++ b/examples/2.3.x/server-ruby/examples/webhooks/create.md @@ -14,7 +14,7 @@ result = webhooks.create( webhook_id: '<WEBHOOK_ID>', url: 'https://example.com/webhook', name: '<NAME>', - events: [], + events: ["users.*.create"], enabled: false, # optional tls: false, # optional auth_username: '<AUTH_USERNAME>', # optional diff --git a/examples/2.3.x/server-ruby/examples/webhooks/update.md b/examples/2.3.x/server-ruby/examples/webhooks/update.md index ad3fa894d..859d15f22 100644 --- a/examples/2.3.x/server-ruby/examples/webhooks/update.md +++ b/examples/2.3.x/server-ruby/examples/webhooks/update.md @@ -14,7 +14,7 @@ result = webhooks.update( webhook_id: '<WEBHOOK_ID>', name: '<NAME>', url: 'https://example.com/webhook', - events: [], + events: ["users.*.create"], enabled: false, # optional tls: false, # optional auth_username: '<AUTH_USERNAME>', # optional diff --git a/examples/2.3.x/server-rust/examples/account/create-email-password-session.md b/examples/2.3.x/server-rust/examples/account/create-email-password-session.md index ac72db12b..644ba25b0 100644 --- a/examples/2.3.x/server-rust/examples/account/create-email-password-session.md +++ b/examples/2.3.x/server-rust/examples/account/create-email-password-session.md @@ -13,7 +13,8 @@ async fn main() -> Result<(), Box<dyn std::error::Error>> { let result = account.create_email_password_session( "email@example.com", - "password" + "password", + Some(60) // optional ).await?; let _ = result; diff --git a/examples/2.3.x/server-rust/examples/account/delete-sessions.md b/examples/2.3.x/server-rust/examples/account/delete-sessions.md index ee557af60..cc496e452 100644 --- a/examples/2.3.x/server-rust/examples/account/delete-sessions.md +++ b/examples/2.3.x/server-rust/examples/account/delete-sessions.md @@ -11,7 +11,9 @@ async fn main() -> Result<(), Box<dyn std::error::Error>> { let account = Account::new(&client); - account.delete_sessions().await?; + account.delete_sessions( + Some(false) // optional + ).await?; Ok(()) } diff --git a/examples/2.3.x/server-rust/examples/account/list-sessions.md b/examples/2.3.x/server-rust/examples/account/list-sessions.md index 5a2af5974..bd2ac05c4 100644 --- a/examples/2.3.x/server-rust/examples/account/list-sessions.md +++ b/examples/2.3.x/server-rust/examples/account/list-sessions.md @@ -11,7 +11,9 @@ async fn main() -> Result<(), Box<dyn std::error::Error>> { let account = Account::new(&client); - let result = account.list_sessions().await?; + let result = account.list_sessions( + Some(false) // optional + ).await?; let _ = result; diff --git a/examples/2.3.x/server-rust/examples/analytics/create-event.md b/examples/2.3.x/server-rust/examples/analytics/create-event.md new file mode 100644 index 000000000..44eaf4687 --- /dev/null +++ b/examples/2.3.x/server-rust/examples/analytics/create-event.md @@ -0,0 +1,34 @@ +```rust +use appwrite::Client; +use appwrite::services::Analytics; + +#[tokio::main] +async fn main() -> Result<(), Box<dyn std::error::Error>> { + let client = Client::new(); + client.set_endpoint("https://<REGION>.cloud.appwrite.io/v1"); // Your API Endpoint + client.set_project("<YOUR_PROJECT_ID>"); // Your project ID + client.set_session(""); // The user session to authenticate with + + let analytics = Analytics::new(&client); + + let result = analytics.create_event( + "<PROPERTY_ID>", + "<NAME>", + "https://example.com", + Some("<DOMAIN>"), // optional + Some("<REFERRER>"), // optional + Some(0), // optional + Some("<SESSION_HASH>"), // optional + Some(0), // optional + Some(0), // optional + Some(vec![]), // optional + Some("<USER_ID>"), // optional + Some("<IP>"), // optional + Some("<USER_AGENT>") // optional + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/analytics/create-property.md b/examples/2.3.x/server-rust/examples/analytics/create-property.md new file mode 100644 index 000000000..edee022df --- /dev/null +++ b/examples/2.3.x/server-rust/examples/analytics/create-property.md @@ -0,0 +1,28 @@ +```rust +use appwrite::Client; +use appwrite::services::Analytics; + +#[tokio::main] +async fn main() -> Result<(), Box<dyn std::error::Error>> { + let client = Client::new(); + client.set_endpoint("https://<REGION>.cloud.appwrite.io/v1"); // Your API Endpoint + client.set_project("<YOUR_PROJECT_ID>"); // Your project ID + client.set_key("<YOUR_API_KEY>"); // Your secret API key + + let analytics = Analytics::new(&client); + + let result = analytics.create_property( + "<PROPERTY_ID>", + "<NAME>", + Some("<DOMAIN>"), // optional + Some("<TIMEZONE>"), // optional + Some(false), // optional + Some(false), // optional + Some(vec![]) // optional + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/analytics/delete-property.md b/examples/2.3.x/server-rust/examples/analytics/delete-property.md new file mode 100644 index 000000000..74c8625cf --- /dev/null +++ b/examples/2.3.x/server-rust/examples/analytics/delete-property.md @@ -0,0 +1,20 @@ +```rust +use appwrite::Client; +use appwrite::services::Analytics; + +#[tokio::main] +async fn main() -> Result<(), Box<dyn std::error::Error>> { + let client = Client::new(); + client.set_endpoint("https://<REGION>.cloud.appwrite.io/v1"); // Your API Endpoint + client.set_project("<YOUR_PROJECT_ID>"); // Your project ID + client.set_key("<YOUR_API_KEY>"); // Your secret API key + + let analytics = Analytics::new(&client); + + analytics.delete_property( + "<PROPERTY_ID>" + ).await?; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/analytics/get-property.md b/examples/2.3.x/server-rust/examples/analytics/get-property.md new file mode 100644 index 000000000..31a33abf6 --- /dev/null +++ b/examples/2.3.x/server-rust/examples/analytics/get-property.md @@ -0,0 +1,22 @@ +```rust +use appwrite::Client; +use appwrite::services::Analytics; + +#[tokio::main] +async fn main() -> Result<(), Box<dyn std::error::Error>> { + let client = Client::new(); + client.set_endpoint("https://<REGION>.cloud.appwrite.io/v1"); // Your API Endpoint + client.set_project("<YOUR_PROJECT_ID>"); // Your project ID + client.set_key("<YOUR_API_KEY>"); // Your secret API key + + let analytics = Analytics::new(&client); + + let result = analytics.get_property( + "<PROPERTY_ID>" + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/analytics/list-metrics.md b/examples/2.3.x/server-rust/examples/analytics/list-metrics.md new file mode 100644 index 000000000..856c0eae1 --- /dev/null +++ b/examples/2.3.x/server-rust/examples/analytics/list-metrics.md @@ -0,0 +1,29 @@ +```rust +use appwrite::Client; +use appwrite::services::Analytics; + +#[tokio::main] +async fn main() -> Result<(), Box<dyn std::error::Error>> { + let client = Client::new(); + client.set_endpoint("https://<REGION>.cloud.appwrite.io/v1"); // Your API Endpoint + client.set_project("<YOUR_PROJECT_ID>"); // Your project ID + client.set_key("<YOUR_API_KEY>"); // Your secret API key + + let analytics = Analytics::new(&client); + + let result = analytics.list_metrics( + "<PROPERTY_ID>", + Some(vec![]), // optional + Some(appwrite::enums::AnalyticsInterval::OneHour), // optional + Some(vec![appwrite::enums::AnalyticsDimension::Country]), // optional + Some("<DATE_RANGE>"), // optional + Some("2020-10-15T06:38:00.000+00:00"), // optional + Some("2020-10-15T06:38:00.000+00:00"), // optional + Some(1) // optional + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/analytics/list-properties.md b/examples/2.3.x/server-rust/examples/analytics/list-properties.md new file mode 100644 index 000000000..aba3d66db --- /dev/null +++ b/examples/2.3.x/server-rust/examples/analytics/list-properties.md @@ -0,0 +1,24 @@ +```rust +use appwrite::Client; +use appwrite::services::Analytics; + +#[tokio::main] +async fn main() -> Result<(), Box<dyn std::error::Error>> { + let client = Client::new(); + client.set_endpoint("https://<REGION>.cloud.appwrite.io/v1"); // Your API Endpoint + client.set_project("<YOUR_PROJECT_ID>"); // Your project ID + client.set_key("<YOUR_API_KEY>"); // Your secret API key + + let analytics = Analytics::new(&client); + + let result = analytics.list_properties( + Some(vec![]), // optional + Some("<SEARCH>"), // optional + Some(false) // optional + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/analytics/update-property.md b/examples/2.3.x/server-rust/examples/analytics/update-property.md new file mode 100644 index 000000000..8bf52a751 --- /dev/null +++ b/examples/2.3.x/server-rust/examples/analytics/update-property.md @@ -0,0 +1,28 @@ +```rust +use appwrite::Client; +use appwrite::services::Analytics; + +#[tokio::main] +async fn main() -> Result<(), Box<dyn std::error::Error>> { + let client = Client::new(); + client.set_endpoint("https://<REGION>.cloud.appwrite.io/v1"); // Your API Endpoint + client.set_project("<YOUR_PROJECT_ID>"); // Your project ID + client.set_key("<YOUR_API_KEY>"); // Your secret API key + + let analytics = Analytics::new(&client); + + let result = analytics.update_property( + "<PROPERTY_ID>", + Some("<NAME>"), // optional + Some("<DOMAIN>"), // optional + Some("<TIMEZONE>"), // optional + Some(false), // optional + Some(false), // optional + Some(vec![]) // optional + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/avatars/delete-photo.md b/examples/2.3.x/server-rust/examples/avatars/delete-photo.md new file mode 100644 index 000000000..899ed00c5 --- /dev/null +++ b/examples/2.3.x/server-rust/examples/avatars/delete-photo.md @@ -0,0 +1,18 @@ +```rust +use appwrite::Client; +use appwrite::services::Avatars; + +#[tokio::main] +async fn main() -> Result<(), Box<dyn std::error::Error>> { + let client = Client::new(); + client.set_endpoint("https://<REGION>.cloud.appwrite.io/v1"); // Your API Endpoint + client.set_project("<YOUR_PROJECT_ID>"); // Your project ID + client.set_session(""); // The user session to authenticate with + + let avatars = Avatars::new(&client); + + avatars.delete_photo().await?; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/avatars/update-photo.md b/examples/2.3.x/server-rust/examples/avatars/update-photo.md new file mode 100644 index 000000000..f5c13e67f --- /dev/null +++ b/examples/2.3.x/server-rust/examples/avatars/update-photo.md @@ -0,0 +1,25 @@ +```rust +use appwrite::Client; +use appwrite::services::Avatars; +use appwrite::InputFile; + +#[tokio::main] +async fn main() -> Result<(), Box<dyn std::error::Error>> { + let client = Client::new(); + client.set_endpoint("https://<REGION>.cloud.appwrite.io/v1"); // Your API Endpoint + client.set_project("<YOUR_PROJECT_ID>"); // Your project ID + client.set_session(""); // The user session to authenticate with + + let avatars = Avatars::new(&client); + + let file = InputFile::from_path("path/to/file.png", None).await?; + + let result = avatars.update_photo( + file + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/databases/create-documents.md b/examples/2.3.x/server-rust/examples/databases/create-documents.md index f46917840..249a02f48 100644 --- a/examples/2.3.x/server-rust/examples/databases/create-documents.md +++ b/examples/2.3.x/server-rust/examples/databases/create-documents.md @@ -14,7 +14,7 @@ async fn main() -> Result<(), Box<dyn std::error::Error>> { let result = databases.create_documents( "<DATABASE_ID>", "<COLLECTION_ID>", - vec![], + vec![serde_json::json!({"$id":"example1","username":"walter.obrien","email":"walter.obrien@example.com","fullName":"Walter O'Brien","age":30,"isAdmin":false})], Some("<TRANSACTION_ID>") // optional ).await?; diff --git a/examples/2.3.x/server-rust/examples/databases/create-index.md b/examples/2.3.x/server-rust/examples/databases/create-index.md index b7389d9a5..8e7aeef5c 100644 --- a/examples/2.3.x/server-rust/examples/databases/create-index.md +++ b/examples/2.3.x/server-rust/examples/databases/create-index.md @@ -16,7 +16,7 @@ async fn main() -> Result<(), Box<dyn std::error::Error>> { "<COLLECTION_ID>", "<KEY>", appwrite::enums::DatabasesIndexType::Key, - vec![], + vec!["username".into()], Some(vec![appwrite::enums::OrderBy::Asc]), // optional Some(vec![]) // optional ).await?; diff --git a/examples/2.3.x/server-rust/examples/databases/delete-documents.md b/examples/2.3.x/server-rust/examples/databases/delete-documents.md index 2d75876c5..7642b783f 100644 --- a/examples/2.3.x/server-rust/examples/databases/delete-documents.md +++ b/examples/2.3.x/server-rust/examples/databases/delete-documents.md @@ -14,7 +14,7 @@ async fn main() -> Result<(), Box<dyn std::error::Error>> { let result = databases.delete_documents( "<DATABASE_ID>", "<COLLECTION_ID>", - Some(vec![]), // optional + Some(vec!["{\"method\":\"equal\", \"attribute\":\"$id\", \"values\":[\"<DOCUMENT_ID>\"]}".into()]), // optional Some("<TRANSACTION_ID>") // optional ).await?; diff --git a/examples/2.3.x/server-rust/examples/databases/list-transactions.md b/examples/2.3.x/server-rust/examples/databases/list-transactions.md index 6570a83a7..94147a644 100644 --- a/examples/2.3.x/server-rust/examples/databases/list-transactions.md +++ b/examples/2.3.x/server-rust/examples/databases/list-transactions.md @@ -12,7 +12,8 @@ async fn main() -> Result<(), Box<dyn std::error::Error>> { let databases = Databases::new(&client); let result = databases.list_transactions( - Some(vec![]) // optional + Some(vec![]), // optional + Some(false) // optional ).await?; let _ = result; diff --git a/examples/2.3.x/server-rust/examples/databases/upsert-documents.md b/examples/2.3.x/server-rust/examples/databases/upsert-documents.md index 6ef035f6e..e37391af8 100644 --- a/examples/2.3.x/server-rust/examples/databases/upsert-documents.md +++ b/examples/2.3.x/server-rust/examples/databases/upsert-documents.md @@ -14,7 +14,7 @@ async fn main() -> Result<(), Box<dyn std::error::Error>> { let result = databases.upsert_documents( "<DATABASE_ID>", "<COLLECTION_ID>", - vec![], + vec![serde_json::json!({"$id":"example1","username":"walter.obrien","email":"walter.obrien@example.com","fullName":"Walter O'Brien","age":30,"isAdmin":false})], Some("<TRANSACTION_ID>") // optional ).await?; diff --git a/examples/2.3.x/server-rust/examples/documentsdb/create-documents.md b/examples/2.3.x/server-rust/examples/documentsdb/create-documents.md index 1c60d5cd5..5154b92e4 100644 --- a/examples/2.3.x/server-rust/examples/documentsdb/create-documents.md +++ b/examples/2.3.x/server-rust/examples/documentsdb/create-documents.md @@ -14,7 +14,7 @@ async fn main() -> Result<(), Box<dyn std::error::Error>> { let result = documents_db.create_documents( "<DATABASE_ID>", "<COLLECTION_ID>", - vec![], + vec![serde_json::json!({"$id":"example1","username":"walter.obrien","email":"walter.obrien@example.com","fullName":"Walter O'Brien","age":30,"isAdmin":false})], Some("<TRANSACTION_ID>") // optional ).await?; diff --git a/examples/2.3.x/server-rust/examples/documentsdb/create-index.md b/examples/2.3.x/server-rust/examples/documentsdb/create-index.md index 2b7534c5b..3ace2953a 100644 --- a/examples/2.3.x/server-rust/examples/documentsdb/create-index.md +++ b/examples/2.3.x/server-rust/examples/documentsdb/create-index.md @@ -16,7 +16,7 @@ async fn main() -> Result<(), Box<dyn std::error::Error>> { "<COLLECTION_ID>", "<KEY>", appwrite::enums::DocumentsDBIndexType::Key, - vec![], + vec!["username".into()], Some(vec![appwrite::enums::OrderBy::Asc]), // optional Some(vec![]) // optional ).await?; diff --git a/examples/2.3.x/server-rust/examples/documentsdb/delete-documents.md b/examples/2.3.x/server-rust/examples/documentsdb/delete-documents.md index be2ad02d6..f2807ca55 100644 --- a/examples/2.3.x/server-rust/examples/documentsdb/delete-documents.md +++ b/examples/2.3.x/server-rust/examples/documentsdb/delete-documents.md @@ -14,7 +14,7 @@ async fn main() -> Result<(), Box<dyn std::error::Error>> { let result = documents_db.delete_documents( "<DATABASE_ID>", "<COLLECTION_ID>", - Some(vec![]), // optional + Some(vec!["{\"method\":\"equal\", \"attribute\":\"$id\", \"values\":[\"<DOCUMENT_ID>\"]}".into()]), // optional Some("<TRANSACTION_ID>") // optional ).await?; diff --git a/examples/2.3.x/server-rust/examples/documentsdb/list-transactions.md b/examples/2.3.x/server-rust/examples/documentsdb/list-transactions.md index 9f387f633..2029d4ce3 100644 --- a/examples/2.3.x/server-rust/examples/documentsdb/list-transactions.md +++ b/examples/2.3.x/server-rust/examples/documentsdb/list-transactions.md @@ -12,7 +12,8 @@ async fn main() -> Result<(), Box<dyn std::error::Error>> { let documents_db = DocumentsDB::new(&client); let result = documents_db.list_transactions( - Some(vec![]) // optional + Some(vec![]), // optional + Some(false) // optional ).await?; let _ = result; diff --git a/examples/2.3.x/server-rust/examples/documentsdb/upsert-documents.md b/examples/2.3.x/server-rust/examples/documentsdb/upsert-documents.md index d6ba16543..40e58ed42 100644 --- a/examples/2.3.x/server-rust/examples/documentsdb/upsert-documents.md +++ b/examples/2.3.x/server-rust/examples/documentsdb/upsert-documents.md @@ -14,7 +14,7 @@ async fn main() -> Result<(), Box<dyn std::error::Error>> { let result = documents_db.upsert_documents( "<DATABASE_ID>", "<COLLECTION_ID>", - vec![], + vec![serde_json::json!({"$id":"example1","username":"walter.obrien","email":"walter.obrien@example.com","fullName":"Walter O'Brien","age":30,"isAdmin":false})], Some("<TRANSACTION_ID>") // optional ).await?; diff --git a/examples/2.3.x/server-rust/examples/embeddings/create-text-embeddings.md b/examples/2.3.x/server-rust/examples/embeddings/create-text-embeddings.md index 8f945bb4c..de4f2e508 100644 --- a/examples/2.3.x/server-rust/examples/embeddings/create-text-embeddings.md +++ b/examples/2.3.x/server-rust/examples/embeddings/create-text-embeddings.md @@ -12,7 +12,7 @@ async fn main() -> Result<(), Box<dyn std::error::Error>> { let embeddings = Embeddings::new(&client); let result = embeddings.create_text_embeddings( - vec![], + vec!["Appwrite helps developers build applications.".into(), "Find documents with semantic search.".into()], Some(appwrite::enums::EmbeddingModel::NomicEmbedText) // optional ).await?; diff --git a/examples/2.3.x/server-rust/examples/functions/list-runtimes.md b/examples/2.3.x/server-rust/examples/functions/list-runtimes.md index abeffc758..01b5e11ca 100644 --- a/examples/2.3.x/server-rust/examples/functions/list-runtimes.md +++ b/examples/2.3.x/server-rust/examples/functions/list-runtimes.md @@ -11,7 +11,9 @@ async fn main() -> Result<(), Box<dyn std::error::Error>> { let functions = Functions::new(&client); - let result = functions.list_runtimes().await?; + let result = functions.list_runtimes( + Some(false) // optional + ).await?; let _ = result; diff --git a/examples/2.3.x/server-rust/examples/functions/list-specifications.md b/examples/2.3.x/server-rust/examples/functions/list-specifications.md index 57245ba6d..cbce65062 100644 --- a/examples/2.3.x/server-rust/examples/functions/list-specifications.md +++ b/examples/2.3.x/server-rust/examples/functions/list-specifications.md @@ -12,7 +12,8 @@ async fn main() -> Result<(), Box<dyn std::error::Error>> { let functions = Functions::new(&client); let result = functions.list_specifications( - Some("runtimes") // optional + Some("runtimes"), // optional + Some(false) // optional ).await?; let _ = result; diff --git a/examples/2.3.x/server-rust/examples/locale/list-codes.md b/examples/2.3.x/server-rust/examples/locale/list-codes.md index f920bf615..6073c9d4d 100644 --- a/examples/2.3.x/server-rust/examples/locale/list-codes.md +++ b/examples/2.3.x/server-rust/examples/locale/list-codes.md @@ -11,7 +11,9 @@ async fn main() -> Result<(), Box<dyn std::error::Error>> { let locale = Locale::new(&client); - let result = locale.list_codes().await?; + let result = locale.list_codes( + Some(false) // optional + ).await?; let _ = result; diff --git a/examples/2.3.x/server-rust/examples/locale/list-continents.md b/examples/2.3.x/server-rust/examples/locale/list-continents.md index b4f8d46ba..a995768a7 100644 --- a/examples/2.3.x/server-rust/examples/locale/list-continents.md +++ b/examples/2.3.x/server-rust/examples/locale/list-continents.md @@ -11,7 +11,9 @@ async fn main() -> Result<(), Box<dyn std::error::Error>> { let locale = Locale::new(&client); - let result = locale.list_continents().await?; + let result = locale.list_continents( + Some(false) // optional + ).await?; let _ = result; diff --git a/examples/2.3.x/server-rust/examples/locale/list-countries-eu.md b/examples/2.3.x/server-rust/examples/locale/list-countries-eu.md index c959aa1ca..0f6bdd78f 100644 --- a/examples/2.3.x/server-rust/examples/locale/list-countries-eu.md +++ b/examples/2.3.x/server-rust/examples/locale/list-countries-eu.md @@ -11,7 +11,9 @@ async fn main() -> Result<(), Box<dyn std::error::Error>> { let locale = Locale::new(&client); - let result = locale.list_countries_eu().await?; + let result = locale.list_countries_eu( + Some(false) // optional + ).await?; let _ = result; diff --git a/examples/2.3.x/server-rust/examples/locale/list-countries-phones.md b/examples/2.3.x/server-rust/examples/locale/list-countries-phones.md index 6c0238bfc..9a94928df 100644 --- a/examples/2.3.x/server-rust/examples/locale/list-countries-phones.md +++ b/examples/2.3.x/server-rust/examples/locale/list-countries-phones.md @@ -11,7 +11,9 @@ async fn main() -> Result<(), Box<dyn std::error::Error>> { let locale = Locale::new(&client); - let result = locale.list_countries_phones().await?; + let result = locale.list_countries_phones( + Some(false) // optional + ).await?; let _ = result; diff --git a/examples/2.3.x/server-rust/examples/locale/list-countries.md b/examples/2.3.x/server-rust/examples/locale/list-countries.md index bd8f795e0..980168fe7 100644 --- a/examples/2.3.x/server-rust/examples/locale/list-countries.md +++ b/examples/2.3.x/server-rust/examples/locale/list-countries.md @@ -11,7 +11,9 @@ async fn main() -> Result<(), Box<dyn std::error::Error>> { let locale = Locale::new(&client); - let result = locale.list_countries().await?; + let result = locale.list_countries( + Some(false) // optional + ).await?; let _ = result; diff --git a/examples/2.3.x/server-rust/examples/locale/list-currencies.md b/examples/2.3.x/server-rust/examples/locale/list-currencies.md index b382da677..c9d241480 100644 --- a/examples/2.3.x/server-rust/examples/locale/list-currencies.md +++ b/examples/2.3.x/server-rust/examples/locale/list-currencies.md @@ -11,7 +11,9 @@ async fn main() -> Result<(), Box<dyn std::error::Error>> { let locale = Locale::new(&client); - let result = locale.list_currencies().await?; + let result = locale.list_currencies( + Some(false) // optional + ).await?; let _ = result; diff --git a/examples/2.3.x/server-rust/examples/locale/list-languages.md b/examples/2.3.x/server-rust/examples/locale/list-languages.md index fb7c78a53..2fad70d21 100644 --- a/examples/2.3.x/server-rust/examples/locale/list-languages.md +++ b/examples/2.3.x/server-rust/examples/locale/list-languages.md @@ -11,7 +11,9 @@ async fn main() -> Result<(), Box<dyn std::error::Error>> { let locale = Locale::new(&client); - let result = locale.list_languages().await?; + let result = locale.list_languages( + Some(false) // optional + ).await?; let _ = result; diff --git a/examples/2.3.x/server-rust/examples/messaging/create-push.md b/examples/2.3.x/server-rust/examples/messaging/create-push.md index 7f93d6bff..ea3c679e0 100644 --- a/examples/2.3.x/server-rust/examples/messaging/create-push.md +++ b/examples/2.3.x/server-rust/examples/messaging/create-push.md @@ -30,7 +30,8 @@ async fn main() -> Result<(), Box<dyn std::error::Error>> { Some("2020-10-15T06:38:00.000+00:00"), // optional Some(false), // optional Some(false), // optional - Some(appwrite::enums::MessagePriority::Normal) // optional + Some(appwrite::enums::MessagePriority::Normal), // optional + Some("<CHANNEL_ID>") // optional ).await?; let _ = result; diff --git a/examples/2.3.x/server-rust/examples/messaging/update-email.md b/examples/2.3.x/server-rust/examples/messaging/update-email.md index a7644b293..efb041152 100644 --- a/examples/2.3.x/server-rust/examples/messaging/update-email.md +++ b/examples/2.3.x/server-rust/examples/messaging/update-email.md @@ -13,19 +13,19 @@ async fn main() -> Result<(), Box<dyn std::error::Error>> { let result = messaging.update_email( "<MESSAGE_ID>", + Some("<SUBJECT>"), // optional + Some("<CONTENT>"), // optional + Some(vec![]), // optional Some(vec![]), // optional Some(vec![]), // optional Some(vec![]), // optional - Some("<SUBJECT>"), // optional - Some("<CONTENT>"), // optional - Some(false), // optional - Some(false), // optional Some(vec![]), // optional Some(vec![]), // optional Some("email@example.com"), // optional Some("<REPLY_TO_NAME>"), // optional - Some("2020-10-15T06:38:00.000+00:00"), // optional - Some(vec![]) // optional + Some(false), // optional + Some(false), // optional + Some("2020-10-15T06:38:00.000+00:00") // optional ).await?; let _ = result; diff --git a/examples/2.3.x/server-rust/examples/messaging/update-push.md b/examples/2.3.x/server-rust/examples/messaging/update-push.md index 00fdc77c0..84aef56e9 100644 --- a/examples/2.3.x/server-rust/examples/messaging/update-push.md +++ b/examples/2.3.x/server-rust/examples/messaging/update-push.md @@ -13,11 +13,11 @@ async fn main() -> Result<(), Box<dyn std::error::Error>> { let result = messaging.update_push( "<MESSAGE_ID>", + Some("<TITLE>"), // optional + Some("<BODY>"), // optional Some(vec![]), // optional Some(vec![]), // optional Some(vec![]), // optional - Some("<TITLE>"), // optional - Some("<BODY>"), // optional Some(serde_json::json!({})), // optional Some("<ACTION>"), // optional Some("<ID1:ID2>"), // optional @@ -30,7 +30,8 @@ async fn main() -> Result<(), Box<dyn std::error::Error>> { Some("2020-10-15T06:38:00.000+00:00"), // optional Some(false), // optional Some(false), // optional - Some(appwrite::enums::MessagePriority::Normal) // optional + Some(appwrite::enums::MessagePriority::Normal), // optional + Some("<CHANNEL_ID>") // optional ).await?; let _ = result; diff --git a/examples/2.3.x/server-rust/examples/messaging/update-sms.md b/examples/2.3.x/server-rust/examples/messaging/update-sms.md index ede80793e..a38cf6564 100644 --- a/examples/2.3.x/server-rust/examples/messaging/update-sms.md +++ b/examples/2.3.x/server-rust/examples/messaging/update-sms.md @@ -13,10 +13,10 @@ async fn main() -> Result<(), Box<dyn std::error::Error>> { let result = messaging.update_sms( "<MESSAGE_ID>", + Some("<CONTENT>"), // optional Some(vec![]), // optional Some(vec![]), // optional Some(vec![]), // optional - Some("<CONTENT>"), // optional Some(false), // optional Some("2020-10-15T06:38:00.000+00:00") // optional ).await?; diff --git a/examples/2.3.x/server-rust/examples/oauth2/introspect.md b/examples/2.3.x/server-rust/examples/oauth2/introspect.md new file mode 100644 index 000000000..e43d646f5 --- /dev/null +++ b/examples/2.3.x/server-rust/examples/oauth2/introspect.md @@ -0,0 +1,25 @@ +```rust +use appwrite::Client; +use appwrite::services::Oauth2; + +#[tokio::main] +async fn main() -> Result<(), Box<dyn std::error::Error>> { + let client = Client::new(); + client.set_endpoint("https://<REGION>.cloud.appwrite.io/v1"); // Your API Endpoint + client.set_project("<YOUR_PROJECT_ID>"); // Your project ID + client.set_key("<YOUR_API_KEY>"); // Your secret API key + + let oauth2 = Oauth2::new(&client); + + let result = oauth2.introspect( + "<TOKEN>", + Some("access_token"), // optional + Some("<CLIENT_ID>"), // optional + Some("<CLIENT_SECRET>") // optional + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/organization/create-ephemeral-project-key.md b/examples/2.3.x/server-rust/examples/organization/create-ephemeral-project-key.md index b96765ba5..b7655a9f1 100644 --- a/examples/2.3.x/server-rust/examples/organization/create-ephemeral-project-key.md +++ b/examples/2.3.x/server-rust/examples/organization/create-ephemeral-project-key.md @@ -13,7 +13,7 @@ async fn main() -> Result<(), Box<dyn std::error::Error>> { let result = organization.create_ephemeral_project_key( "<PROJECT_ID>", - vec![appwrite::enums::ProjectKeyScopes::ProjectRead], + vec![appwrite::enums::ProjectKeyScopes::UsersRead], 600 ).await?; diff --git a/examples/2.3.x/server-rust/examples/organization/update-project-key.md b/examples/2.3.x/server-rust/examples/organization/update-project-key.md index 9da5f619e..963624702 100644 --- a/examples/2.3.x/server-rust/examples/organization/update-project-key.md +++ b/examples/2.3.x/server-rust/examples/organization/update-project-key.md @@ -15,7 +15,7 @@ async fn main() -> Result<(), Box<dyn std::error::Error>> { "<PROJECT_ID>", "<KEY_ID>", "<NAME>", - vec![appwrite::enums::ProjectKeyScopes::ProjectRead], + vec![appwrite::enums::ProjectKeyScopes::UsersRead], Some("2020-10-15T06:38:00.000+00:00") // optional ).await?; diff --git a/examples/2.3.x/server-rust/examples/project/create-ephemeral-key.md b/examples/2.3.x/server-rust/examples/project/create-ephemeral-key.md index 93d1dc4a1..357e4d6f7 100644 --- a/examples/2.3.x/server-rust/examples/project/create-ephemeral-key.md +++ b/examples/2.3.x/server-rust/examples/project/create-ephemeral-key.md @@ -12,7 +12,7 @@ async fn main() -> Result<(), Box<dyn std::error::Error>> { let project = Project::new(&client); let result = project.create_ephemeral_key( - vec![appwrite::enums::ProjectKeyScopes::ProjectRead], + vec![appwrite::enums::ProjectKeyScopes::UsersRead], 600 ).await?; diff --git a/examples/2.3.x/server-rust/examples/project/create-smtp-test.md b/examples/2.3.x/server-rust/examples/project/create-smtp-test.md index cb5f2ceda..a62073f55 100644 --- a/examples/2.3.x/server-rust/examples/project/create-smtp-test.md +++ b/examples/2.3.x/server-rust/examples/project/create-smtp-test.md @@ -12,7 +12,7 @@ async fn main() -> Result<(), Box<dyn std::error::Error>> { let project = Project::new(&client); project.create_smtp_test( - vec![] + vec!["recipient@example.com".into()] ).await?; Ok(()) diff --git a/examples/2.3.x/server-rust/examples/project/update-key.md b/examples/2.3.x/server-rust/examples/project/update-key.md index 12b0282ab..1c6148a60 100644 --- a/examples/2.3.x/server-rust/examples/project/update-key.md +++ b/examples/2.3.x/server-rust/examples/project/update-key.md @@ -14,7 +14,7 @@ async fn main() -> Result<(), Box<dyn std::error::Error>> { let result = project.update_key( "<KEY_ID>", "<NAME>", - vec![appwrite::enums::ProjectKeyScopes::ProjectRead], + vec![appwrite::enums::ProjectKeyScopes::UsersRead], Some("2020-10-15T06:38:00.000+00:00") // optional ).await?; diff --git a/examples/2.3.x/server-rust/examples/project/update-labels.md b/examples/2.3.x/server-rust/examples/project/update-labels.md index 541993e9a..e9b0ea4e1 100644 --- a/examples/2.3.x/server-rust/examples/project/update-labels.md +++ b/examples/2.3.x/server-rust/examples/project/update-labels.md @@ -12,7 +12,7 @@ async fn main() -> Result<(), Box<dyn std::error::Error>> { let project = Project::new(&client); let result = project.update_labels( - vec![] + vec!["production".into()] ).await?; let _ = result; diff --git a/examples/2.3.x/server-rust/examples/project/update-o-auth-2-auth-0.md b/examples/2.3.x/server-rust/examples/project/update-o-auth-2-auth-0.md index 811a8c8fc..4c97b6b7f 100644 --- a/examples/2.3.x/server-rust/examples/project/update-o-auth-2-auth-0.md +++ b/examples/2.3.x/server-rust/examples/project/update-o-auth-2-auth-0.md @@ -15,6 +15,7 @@ async fn main() -> Result<(), Box<dyn std::error::Error>> { Some("<CLIENT_ID>"), // optional Some("<CLIENT_SECRET>"), // optional Some("<ENDPOINT>"), // optional + Some(vec![appwrite::enums::ProjectOAuth2Auth0Prompt::None]), // optional Some(false) // optional ).await?; diff --git a/examples/2.3.x/server-rust/examples/project/update-o-auth-2-discord.md b/examples/2.3.x/server-rust/examples/project/update-o-auth-2-discord.md index 783c9b8ab..bdbb5dbf5 100644 --- a/examples/2.3.x/server-rust/examples/project/update-o-auth-2-discord.md +++ b/examples/2.3.x/server-rust/examples/project/update-o-auth-2-discord.md @@ -14,6 +14,7 @@ async fn main() -> Result<(), Box<dyn std::error::Error>> { let result = project.update_o_auth2_discord( Some("<CLIENT_ID>"), // optional Some("<CLIENT_SECRET>"), // optional + Some(vec![appwrite::enums::ProjectOAuth2DiscordPrompt::None]), // optional Some(false) // optional ).await?; diff --git a/examples/2.3.x/server-rust/examples/project/update-o-auth-2-git-hub.md b/examples/2.3.x/server-rust/examples/project/update-o-auth-2-git-hub.md index be26e71dd..08fc31ac9 100644 --- a/examples/2.3.x/server-rust/examples/project/update-o-auth-2-git-hub.md +++ b/examples/2.3.x/server-rust/examples/project/update-o-auth-2-git-hub.md @@ -14,6 +14,7 @@ async fn main() -> Result<(), Box<dyn std::error::Error>> { let result = project.update_o_auth2_git_hub( Some("<CLIENT_ID>"), // optional Some("<CLIENT_SECRET>"), // optional + Some(vec![appwrite::enums::ProjectOAuth2GitHubPrompt::SelectAccount]), // optional Some(false) // optional ).await?; diff --git a/examples/2.3.x/server-rust/examples/project/update-o-auth-2-kakao.md b/examples/2.3.x/server-rust/examples/project/update-o-auth-2-kakao.md index a4f075cc9..f96eb6e9d 100644 --- a/examples/2.3.x/server-rust/examples/project/update-o-auth-2-kakao.md +++ b/examples/2.3.x/server-rust/examples/project/update-o-auth-2-kakao.md @@ -14,6 +14,7 @@ async fn main() -> Result<(), Box<dyn std::error::Error>> { let result = project.update_o_auth2_kakao( Some("<CLIENT_ID>"), // optional Some("<CLIENT_SECRET>"), // optional + Some(vec![appwrite::enums::ProjectOAuth2KakaoPrompt::None]), // optional Some(false) // optional ).await?; diff --git a/examples/2.3.x/server-rust/examples/project/update-o-auth-2-microsoft.md b/examples/2.3.x/server-rust/examples/project/update-o-auth-2-microsoft.md index f32216e4b..aa7026781 100644 --- a/examples/2.3.x/server-rust/examples/project/update-o-auth-2-microsoft.md +++ b/examples/2.3.x/server-rust/examples/project/update-o-auth-2-microsoft.md @@ -15,6 +15,7 @@ async fn main() -> Result<(), Box<dyn std::error::Error>> { Some("<APPLICATION_ID>"), // optional Some("<APPLICATION_SECRET>"), // optional Some("<TENANT>"), // optional + Some(vec![appwrite::enums::ProjectOAuth2MicrosoftPrompt::None]), // optional Some(false) // optional ).await?; diff --git a/examples/2.3.x/server-rust/examples/project/update-o-auth-2-okta.md b/examples/2.3.x/server-rust/examples/project/update-o-auth-2-okta.md index 527310412..086eeaab0 100644 --- a/examples/2.3.x/server-rust/examples/project/update-o-auth-2-okta.md +++ b/examples/2.3.x/server-rust/examples/project/update-o-auth-2-okta.md @@ -16,6 +16,7 @@ async fn main() -> Result<(), Box<dyn std::error::Error>> { Some("<CLIENT_SECRET>"), // optional Some("example.com"), // optional Some("<AUTHORIZATION_SERVER_ID>"), // optional + Some(vec![appwrite::enums::ProjectOAuth2OktaPrompt::None]), // optional Some(false) // optional ).await?; diff --git a/examples/2.3.x/server-rust/examples/project/update-o-auth-2-salesforce.md b/examples/2.3.x/server-rust/examples/project/update-o-auth-2-salesforce.md index dd41c0a9b..9e21c9c6b 100644 --- a/examples/2.3.x/server-rust/examples/project/update-o-auth-2-salesforce.md +++ b/examples/2.3.x/server-rust/examples/project/update-o-auth-2-salesforce.md @@ -14,6 +14,7 @@ async fn main() -> Result<(), Box<dyn std::error::Error>> { let result = project.update_o_auth2_salesforce( Some("<CUSTOMER_KEY>"), // optional Some("<CUSTOMER_SECRET>"), // optional + Some(vec![appwrite::enums::ProjectOAuth2SalesforcePrompt::Login]), // optional Some(false) // optional ).await?; diff --git a/examples/2.3.x/server-rust/examples/project/update-o-auth-2-webflow.md b/examples/2.3.x/server-rust/examples/project/update-o-auth-2-webflow.md new file mode 100644 index 000000000..d0df8eaea --- /dev/null +++ b/examples/2.3.x/server-rust/examples/project/update-o-auth-2-webflow.md @@ -0,0 +1,24 @@ +```rust +use appwrite::Client; +use appwrite::services::Project; + +#[tokio::main] +async fn main() -> Result<(), Box<dyn std::error::Error>> { + let client = Client::new(); + client.set_endpoint("https://<REGION>.cloud.appwrite.io/v1"); // Your API Endpoint + client.set_project("<YOUR_PROJECT_ID>"); // Your project ID + client.set_key("<YOUR_API_KEY>"); // Your secret API key + + let project = Project::new(&client); + + let result = project.update_o_auth2_webflow( + Some("<CLIENT_ID>"), // optional + Some("<CLIENT_SECRET>"), // optional + Some(false) // optional + ).await?; + + let _ = result; + + Ok(()) +} +``` diff --git a/examples/2.3.x/server-rust/examples/project/update-o-auth-2-zoho.md b/examples/2.3.x/server-rust/examples/project/update-o-auth-2-zoho.md index 62ac858e2..34e919748 100644 --- a/examples/2.3.x/server-rust/examples/project/update-o-auth-2-zoho.md +++ b/examples/2.3.x/server-rust/examples/project/update-o-auth-2-zoho.md @@ -14,6 +14,7 @@ async fn main() -> Result<(), Box<dyn std::error::Error>> { let result = project.update_o_auth2_zoho( Some("<CLIENT_ID>"), // optional Some("<CLIENT_SECRET>"), // optional + Some(vec![appwrite::enums::ProjectOAuth2ZohoPrompt::Consent]), // optional Some(false) // optional ).await?; diff --git a/examples/2.3.x/server-rust/examples/sites/list-frameworks.md b/examples/2.3.x/server-rust/examples/sites/list-frameworks.md index 1252124c9..4dce7eafe 100644 --- a/examples/2.3.x/server-rust/examples/sites/list-frameworks.md +++ b/examples/2.3.x/server-rust/examples/sites/list-frameworks.md @@ -11,7 +11,9 @@ async fn main() -> Result<(), Box<dyn std::error::Error>> { let sites = Sites::new(&client); - let result = sites.list_frameworks().await?; + let result = sites.list_frameworks( + Some(false) // optional + ).await?; let _ = result; diff --git a/examples/2.3.x/server-rust/examples/sites/list-specifications.md b/examples/2.3.x/server-rust/examples/sites/list-specifications.md index 4736fb7ca..4addba63c 100644 --- a/examples/2.3.x/server-rust/examples/sites/list-specifications.md +++ b/examples/2.3.x/server-rust/examples/sites/list-specifications.md @@ -12,7 +12,8 @@ async fn main() -> Result<(), Box<dyn std::error::Error>> { let sites = Sites::new(&client); let result = sites.list_specifications( - Some("runtimes") // optional + Some("runtimes"), // optional + Some(false) // optional ).await?; let _ = result; diff --git a/examples/2.3.x/server-rust/examples/tablesdb/create-index.md b/examples/2.3.x/server-rust/examples/tablesdb/create-index.md index 409d88ddf..725a77162 100644 --- a/examples/2.3.x/server-rust/examples/tablesdb/create-index.md +++ b/examples/2.3.x/server-rust/examples/tablesdb/create-index.md @@ -16,7 +16,7 @@ async fn main() -> Result<(), Box<dyn std::error::Error>> { "<TABLE_ID>", "<KEY>", appwrite::enums::TablesDBIndexType::Key, - vec![], + vec!["username".into()], Some(vec![appwrite::enums::OrderBy::Asc]), // optional Some(vec![]) // optional ).await?; diff --git a/examples/2.3.x/server-rust/examples/tablesdb/create-rows.md b/examples/2.3.x/server-rust/examples/tablesdb/create-rows.md index b5722c489..86e0b5c4e 100644 --- a/examples/2.3.x/server-rust/examples/tablesdb/create-rows.md +++ b/examples/2.3.x/server-rust/examples/tablesdb/create-rows.md @@ -14,7 +14,7 @@ async fn main() -> Result<(), Box<dyn std::error::Error>> { let result = tables_db.create_rows( "<DATABASE_ID>", "<TABLE_ID>", - vec![], + vec![serde_json::json!({"$id":"example1","username":"walter.obrien","email":"walter.obrien@example.com","fullName":"Walter O'Brien","age":30,"isAdmin":false})], Some("<TRANSACTION_ID>") // optional ).await?; diff --git a/examples/2.3.x/server-rust/examples/tablesdb/delete-rows.md b/examples/2.3.x/server-rust/examples/tablesdb/delete-rows.md index 92520ae1c..e1fe9bcf8 100644 --- a/examples/2.3.x/server-rust/examples/tablesdb/delete-rows.md +++ b/examples/2.3.x/server-rust/examples/tablesdb/delete-rows.md @@ -14,7 +14,7 @@ async fn main() -> Result<(), Box<dyn std::error::Error>> { let result = tables_db.delete_rows( "<DATABASE_ID>", "<TABLE_ID>", - Some(vec![]), // optional + Some(vec!["{\"method\":\"equal\", \"attribute\":\"$id\", \"values\":[\"<ROW_ID>\"]}".into()]), // optional Some("<TRANSACTION_ID>") // optional ).await?; diff --git a/examples/2.3.x/server-rust/examples/tablesdb/list-transactions.md b/examples/2.3.x/server-rust/examples/tablesdb/list-transactions.md index 047974237..914494116 100644 --- a/examples/2.3.x/server-rust/examples/tablesdb/list-transactions.md +++ b/examples/2.3.x/server-rust/examples/tablesdb/list-transactions.md @@ -12,7 +12,8 @@ async fn main() -> Result<(), Box<dyn std::error::Error>> { let tables_db = TablesDB::new(&client); let result = tables_db.list_transactions( - Some(vec![]) // optional + Some(vec![]), // optional + Some(false) // optional ).await?; let _ = result; diff --git a/examples/2.3.x/server-rust/examples/tablesdb/upsert-rows.md b/examples/2.3.x/server-rust/examples/tablesdb/upsert-rows.md index ba84a600a..94e26a96d 100644 --- a/examples/2.3.x/server-rust/examples/tablesdb/upsert-rows.md +++ b/examples/2.3.x/server-rust/examples/tablesdb/upsert-rows.md @@ -14,7 +14,7 @@ async fn main() -> Result<(), Box<dyn std::error::Error>> { let result = tables_db.upsert_rows( "<DATABASE_ID>", "<TABLE_ID>", - vec![], + vec![serde_json::json!({"$id":"example1","username":"walter.obrien","email":"walter.obrien@example.com","fullName":"Walter O'Brien","age":30,"isAdmin":false})], Some("<TRANSACTION_ID>") // optional ).await?; diff --git a/examples/2.3.x/server-rust/examples/teams/create-membership.md b/examples/2.3.x/server-rust/examples/teams/create-membership.md index 5366d5e28..e1dffea03 100644 --- a/examples/2.3.x/server-rust/examples/teams/create-membership.md +++ b/examples/2.3.x/server-rust/examples/teams/create-membership.md @@ -13,7 +13,7 @@ async fn main() -> Result<(), Box<dyn std::error::Error>> { let result = teams.create_membership( "<TEAM_ID>", - vec![], + vec!["editor".into()], Some("email@example.com"), // optional Some("<USER_ID>"), // optional Some("+12065550100"), // optional diff --git a/examples/2.3.x/server-rust/examples/teams/update-membership.md b/examples/2.3.x/server-rust/examples/teams/update-membership.md index 6c6d0d792..512671a40 100644 --- a/examples/2.3.x/server-rust/examples/teams/update-membership.md +++ b/examples/2.3.x/server-rust/examples/teams/update-membership.md @@ -14,7 +14,7 @@ async fn main() -> Result<(), Box<dyn std::error::Error>> { let result = teams.update_membership( "<TEAM_ID>", "<MEMBERSHIP_ID>", - vec![] + vec!["editor".into()] ).await?; let _ = result; diff --git a/examples/2.3.x/server-rust/examples/users/update-labels.md b/examples/2.3.x/server-rust/examples/users/update-labels.md index 00922e3c2..9305ebbcf 100644 --- a/examples/2.3.x/server-rust/examples/users/update-labels.md +++ b/examples/2.3.x/server-rust/examples/users/update-labels.md @@ -13,7 +13,7 @@ async fn main() -> Result<(), Box<dyn std::error::Error>> { let result = users.update_labels( "<USER_ID>", - vec![] + vec!["subscriber".into()] ).await?; let _ = result; diff --git a/examples/2.3.x/server-rust/examples/vectorsdb/create-collection.md b/examples/2.3.x/server-rust/examples/vectorsdb/create-collection.md index 101028800..f539c408b 100644 --- a/examples/2.3.x/server-rust/examples/vectorsdb/create-collection.md +++ b/examples/2.3.x/server-rust/examples/vectorsdb/create-collection.md @@ -17,7 +17,7 @@ async fn main() -> Result<(), Box<dyn std::error::Error>> { "<DATABASE_ID>", "<COLLECTION_ID>", "<NAME>", - 1, + 4, Some(vec![Permission::read(Role::any()).to_string()]), // optional Some(false), // optional Some(false) // optional diff --git a/examples/2.3.x/server-rust/examples/vectorsdb/create-documents.md b/examples/2.3.x/server-rust/examples/vectorsdb/create-documents.md index d2aff1f09..b8c30b63e 100644 --- a/examples/2.3.x/server-rust/examples/vectorsdb/create-documents.md +++ b/examples/2.3.x/server-rust/examples/vectorsdb/create-documents.md @@ -14,7 +14,7 @@ async fn main() -> Result<(), Box<dyn std::error::Error>> { let result = vectors_db.create_documents( "<DATABASE_ID>", "<COLLECTION_ID>", - vec![], + vec![serde_json::json!({"$id":"example1","embeddings":[0.12,-0.55,0.88,1.02],"metadata":{"name":"First document"}})], Some("<TRANSACTION_ID>") // optional ).await?; diff --git a/examples/2.3.x/server-rust/examples/vectorsdb/create-index.md b/examples/2.3.x/server-rust/examples/vectorsdb/create-index.md index 02d30e230..f686c4e3a 100644 --- a/examples/2.3.x/server-rust/examples/vectorsdb/create-index.md +++ b/examples/2.3.x/server-rust/examples/vectorsdb/create-index.md @@ -16,7 +16,7 @@ async fn main() -> Result<(), Box<dyn std::error::Error>> { "<COLLECTION_ID>", "<KEY>", appwrite::enums::VectorsDBIndexType::HnswEuclidean, - vec![], + vec!["embeddings".into()], Some(vec![appwrite::enums::OrderBy::Asc]), // optional Some(vec![]) // optional ).await?; diff --git a/examples/2.3.x/server-rust/examples/vectorsdb/create-operations.md b/examples/2.3.x/server-rust/examples/vectorsdb/create-operations.md index cc1aaca69..bc8db2b1a 100644 --- a/examples/2.3.x/server-rust/examples/vectorsdb/create-operations.md +++ b/examples/2.3.x/server-rust/examples/vectorsdb/create-operations.md @@ -13,7 +13,7 @@ async fn main() -> Result<(), Box<dyn std::error::Error>> { let result = vectors_db.create_operations( "<TRANSACTION_ID>", - Some(vec![serde_json::json!({"action":"create","databaseId":"<DATABASE_ID>","collectionId":"<COLLECTION_ID>","documentId":"<DOCUMENT_ID>","data":{"name":"Walter O'Brien"}})]) // optional + Some(vec![serde_json::json!({"action":"create","databaseId":"<DATABASE_ID>","collectionId":"<COLLECTION_ID>","documentId":"<DOCUMENT_ID>","data":{"embeddings":[0.12,-0.55,0.88,1.02],"metadata":{"name":"First document"}}})]) // optional ).await?; let _ = result; diff --git a/examples/2.3.x/server-rust/examples/vectorsdb/delete-documents.md b/examples/2.3.x/server-rust/examples/vectorsdb/delete-documents.md index a69a6a7eb..fc8081965 100644 --- a/examples/2.3.x/server-rust/examples/vectorsdb/delete-documents.md +++ b/examples/2.3.x/server-rust/examples/vectorsdb/delete-documents.md @@ -14,7 +14,7 @@ async fn main() -> Result<(), Box<dyn std::error::Error>> { let result = vectors_db.delete_documents( "<DATABASE_ID>", "<COLLECTION_ID>", - Some(vec![]), // optional + Some(vec!["{\"method\":\"equal\", \"attribute\":\"$id\", \"values\":[\"<DOCUMENT_ID>\"]}".into()]), // optional Some("<TRANSACTION_ID>") // optional ).await?; diff --git a/examples/2.3.x/server-rust/examples/vectorsdb/list-transactions.md b/examples/2.3.x/server-rust/examples/vectorsdb/list-transactions.md index 214670d44..b8eb22eec 100644 --- a/examples/2.3.x/server-rust/examples/vectorsdb/list-transactions.md +++ b/examples/2.3.x/server-rust/examples/vectorsdb/list-transactions.md @@ -12,7 +12,8 @@ async fn main() -> Result<(), Box<dyn std::error::Error>> { let vectors_db = VectorsDB::new(&client); let result = vectors_db.list_transactions( - Some(vec![]) // optional + Some(vec![]), // optional + Some(false) // optional ).await?; let _ = result; diff --git a/examples/2.3.x/server-rust/examples/vectorsdb/update-collection.md b/examples/2.3.x/server-rust/examples/vectorsdb/update-collection.md index 86309ba68..4256276ef 100644 --- a/examples/2.3.x/server-rust/examples/vectorsdb/update-collection.md +++ b/examples/2.3.x/server-rust/examples/vectorsdb/update-collection.md @@ -17,7 +17,7 @@ async fn main() -> Result<(), Box<dyn std::error::Error>> { "<DATABASE_ID>", "<COLLECTION_ID>", "<NAME>", - Some(1), // optional + Some(4), // optional Some(vec![Permission::read(Role::any()).to_string()]), // optional Some(false), // optional Some(false) // optional diff --git a/examples/2.3.x/server-rust/examples/vectorsdb/upsert-documents.md b/examples/2.3.x/server-rust/examples/vectorsdb/upsert-documents.md index c55611852..5f120e91d 100644 --- a/examples/2.3.x/server-rust/examples/vectorsdb/upsert-documents.md +++ b/examples/2.3.x/server-rust/examples/vectorsdb/upsert-documents.md @@ -14,7 +14,7 @@ async fn main() -> Result<(), Box<dyn std::error::Error>> { let result = vectors_db.upsert_documents( "<DATABASE_ID>", "<COLLECTION_ID>", - vec![], + vec![serde_json::json!({"$id":"example1","embeddings":[0.12,-0.55,0.88,1.02],"metadata":{"name":"First document"}})], Some("<TRANSACTION_ID>") // optional ).await?; diff --git a/examples/2.3.x/server-rust/examples/webhooks/create.md b/examples/2.3.x/server-rust/examples/webhooks/create.md index a14a6c1a5..2862ee9c5 100644 --- a/examples/2.3.x/server-rust/examples/webhooks/create.md +++ b/examples/2.3.x/server-rust/examples/webhooks/create.md @@ -15,7 +15,7 @@ async fn main() -> Result<(), Box<dyn std::error::Error>> { "<WEBHOOK_ID>", "https://example.com/webhook", "<NAME>", - vec![], + vec!["users.*.create".into()], Some(false), // optional Some(false), // optional Some("<AUTH_USERNAME>"), // optional diff --git a/examples/2.3.x/server-rust/examples/webhooks/update.md b/examples/2.3.x/server-rust/examples/webhooks/update.md index 73d636ded..407ea251b 100644 --- a/examples/2.3.x/server-rust/examples/webhooks/update.md +++ b/examples/2.3.x/server-rust/examples/webhooks/update.md @@ -15,7 +15,7 @@ async fn main() -> Result<(), Box<dyn std::error::Error>> { "<WEBHOOK_ID>", "<NAME>", "https://example.com/webhook", - vec![], + vec!["users.*.create".into()], Some(false), // optional Some(false), // optional Some("<AUTH_USERNAME>"), // optional diff --git a/examples/2.3.x/server-swift/examples/account/create-email-password-session.md b/examples/2.3.x/server-swift/examples/account/create-email-password-session.md index d3a5acf12..494e8204d 100644 --- a/examples/2.3.x/server-swift/examples/account/create-email-password-session.md +++ b/examples/2.3.x/server-swift/examples/account/create-email-password-session.md @@ -10,7 +10,8 @@ let account = Account(client) let session = try await account.createEmailPasswordSession( email: "email@example.com", - password: "password" + password: "password", + duration: 60 // optional ) ``` diff --git a/examples/2.3.x/server-swift/examples/account/delete-sessions.md b/examples/2.3.x/server-swift/examples/account/delete-sessions.md index 23d87c694..b23f5cbd3 100644 --- a/examples/2.3.x/server-swift/examples/account/delete-sessions.md +++ b/examples/2.3.x/server-swift/examples/account/delete-sessions.md @@ -8,6 +8,8 @@ let client = Client() let account = Account(client) -let result = try await account.deleteSessions() +let result = try await account.deleteSessions( + current: false // optional +) ``` diff --git a/examples/2.3.x/server-swift/examples/account/list-sessions.md b/examples/2.3.x/server-swift/examples/account/list-sessions.md index 7e263e7d2..36c789ae9 100644 --- a/examples/2.3.x/server-swift/examples/account/list-sessions.md +++ b/examples/2.3.x/server-swift/examples/account/list-sessions.md @@ -8,6 +8,8 @@ let client = Client() let account = Account(client) -let sessionList = try await account.listSessions() +let sessionList = try await account.listSessions( + total: false // optional +) ``` diff --git a/examples/2.3.x/server-swift/examples/analytics/create-event.md b/examples/2.3.x/server-swift/examples/analytics/create-event.md new file mode 100644 index 000000000..8036cb8fe --- /dev/null +++ b/examples/2.3.x/server-swift/examples/analytics/create-event.md @@ -0,0 +1,27 @@ +```swift +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +let analytics = Analytics(client) + +let result = try await analytics.createEvent( + propertyId: "<PROPERTY_ID>", + name: "<NAME>", + url: "https://example.com", + domain: "<DOMAIN>", // optional + referrer: "<REFERRER>", // optional + screenWidth: 0, // optional + sessionHash: "<SESSION_HASH>", // optional + scrollDepth: 0, // optional + engagementTime: 0, // optional + props: [], // optional + userId: "<USER_ID>", // optional + ip: "<IP>", // optional + userAgent: "<USER_AGENT>" // optional +) + +``` diff --git a/examples/2.3.x/server-swift/examples/analytics/create-property.md b/examples/2.3.x/server-swift/examples/analytics/create-property.md new file mode 100644 index 000000000..6739f8e78 --- /dev/null +++ b/examples/2.3.x/server-swift/examples/analytics/create-property.md @@ -0,0 +1,21 @@ +```swift +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let analytics = Analytics(client) + +let analyticsProperty = try await analytics.createProperty( + propertyId: "<PROPERTY_ID>", + name: "<NAME>", + domain: "<DOMAIN>", // optional + timezone: "<TIMEZONE>", // optional + enabled: false, // optional + public: false, // optional + allowedOrigins: [] // optional +) + +``` diff --git a/examples/2.3.x/server-swift/examples/analytics/delete-property.md b/examples/2.3.x/server-swift/examples/analytics/delete-property.md new file mode 100644 index 000000000..62784f9ef --- /dev/null +++ b/examples/2.3.x/server-swift/examples/analytics/delete-property.md @@ -0,0 +1,15 @@ +```swift +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let analytics = Analytics(client) + +let result = try await analytics.deleteProperty( + propertyId: "<PROPERTY_ID>" +) + +``` diff --git a/examples/2.3.x/server-swift/examples/analytics/get-property.md b/examples/2.3.x/server-swift/examples/analytics/get-property.md new file mode 100644 index 000000000..7d290ea6e --- /dev/null +++ b/examples/2.3.x/server-swift/examples/analytics/get-property.md @@ -0,0 +1,15 @@ +```swift +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let analytics = Analytics(client) + +let analyticsProperty = try await analytics.getProperty( + propertyId: "<PROPERTY_ID>" +) + +``` diff --git a/examples/2.3.x/server-swift/examples/analytics/list-metrics.md b/examples/2.3.x/server-swift/examples/analytics/list-metrics.md new file mode 100644 index 000000000..558a72da3 --- /dev/null +++ b/examples/2.3.x/server-swift/examples/analytics/list-metrics.md @@ -0,0 +1,23 @@ +```swift +import Appwrite +import AppwriteEnums + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let analytics = Analytics(client) + +let analyticsMetricList = try await analytics.listMetrics( + propertyId: "<PROPERTY_ID>", + queries: [], // optional + interval: .oneHour, // optional + dimensions: [.country], // optional + dateRange: "<DATE_RANGE>", // optional + startAt: "2020-10-15T06:38:00.000+00:00", // optional + endAt: "2020-10-15T06:38:00.000+00:00", // optional + limit: 1 // optional +) + +``` diff --git a/examples/2.3.x/server-swift/examples/analytics/list-properties.md b/examples/2.3.x/server-swift/examples/analytics/list-properties.md new file mode 100644 index 000000000..f178f8db9 --- /dev/null +++ b/examples/2.3.x/server-swift/examples/analytics/list-properties.md @@ -0,0 +1,17 @@ +```swift +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let analytics = Analytics(client) + +let analyticsPropertyList = try await analytics.listProperties( + queries: [], // optional + search: "<SEARCH>", // optional + total: false // optional +) + +``` diff --git a/examples/2.3.x/server-swift/examples/analytics/update-property.md b/examples/2.3.x/server-swift/examples/analytics/update-property.md new file mode 100644 index 000000000..9a892b8c2 --- /dev/null +++ b/examples/2.3.x/server-swift/examples/analytics/update-property.md @@ -0,0 +1,21 @@ +```swift +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let analytics = Analytics(client) + +let analyticsProperty = try await analytics.updateProperty( + propertyId: "<PROPERTY_ID>", + name: "<NAME>", // optional + domain: "<DOMAIN>", // optional + timezone: "<TIMEZONE>", // optional + enabled: false, // optional + public: false, // optional + allowedOrigins: [] // optional +) + +``` diff --git a/examples/2.3.x/server-swift/examples/avatars/delete-photo.md b/examples/2.3.x/server-swift/examples/avatars/delete-photo.md new file mode 100644 index 000000000..8780acbb2 --- /dev/null +++ b/examples/2.3.x/server-swift/examples/avatars/delete-photo.md @@ -0,0 +1,13 @@ +```swift +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +let avatars = Avatars(client) + +let result = try await avatars.deletePhoto() + +``` diff --git a/examples/2.3.x/server-swift/examples/avatars/get-screenshot.md b/examples/2.3.x/server-swift/examples/avatars/get-screenshot.md index 482905ea9..dfbc37398 100644 --- a/examples/2.3.x/server-swift/examples/avatars/get-screenshot.md +++ b/examples/2.3.x/server-swift/examples/avatars/get-screenshot.md @@ -12,8 +12,7 @@ let avatars = Avatars(client) let bytes = try await avatars.getScreenshot( url: "https://example.com", headers: [ - "Authorization": "Bearer token123", - "X-Custom-Header": "value" + "Accept-Language": "en-US,en;q=0.9" ], // optional viewportWidth: 1920, // optional viewportHeight: 1080, // optional diff --git a/examples/2.3.x/server-swift/examples/avatars/update-photo.md b/examples/2.3.x/server-swift/examples/avatars/update-photo.md new file mode 100644 index 000000000..f7643791d --- /dev/null +++ b/examples/2.3.x/server-swift/examples/avatars/update-photo.md @@ -0,0 +1,15 @@ +```swift +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setSession("") // The user session to authenticate with + +let avatars = Avatars(client) + +let account = try await avatars.updatePhoto( + file: InputFile.fromPath("file.png") +) + +``` diff --git a/examples/2.3.x/server-swift/examples/databases/create-documents.md b/examples/2.3.x/server-swift/examples/databases/create-documents.md index 1763ab133..e602e1de1 100644 --- a/examples/2.3.x/server-swift/examples/databases/create-documents.md +++ b/examples/2.3.x/server-swift/examples/databases/create-documents.md @@ -11,7 +11,16 @@ let databases = Databases(client) let documentList = try await databases.createDocuments( databaseId: "<DATABASE_ID>", collectionId: "<COLLECTION_ID>", - documents: [], + documents: [ + [ + "$id": "example1", + "username": "walter.obrien", + "email": "walter.obrien@example.com", + "fullName": "Walter O'Brien", + "age": 30, + "isAdmin": false + ] + ], transactionId: "<TRANSACTION_ID>" // optional ) diff --git a/examples/2.3.x/server-swift/examples/databases/create-index.md b/examples/2.3.x/server-swift/examples/databases/create-index.md index ad4459aad..8c71527cf 100644 --- a/examples/2.3.x/server-swift/examples/databases/create-index.md +++ b/examples/2.3.x/server-swift/examples/databases/create-index.md @@ -14,7 +14,9 @@ let index = try await databases.createIndex( collectionId: "<COLLECTION_ID>", key: "<KEY>", type: .key, - attributes: [], + attributes: [ + "username" + ], orders: [.asc], // optional lengths: [] // optional ) diff --git a/examples/2.3.x/server-swift/examples/databases/delete-documents.md b/examples/2.3.x/server-swift/examples/databases/delete-documents.md index 81a24778d..8e5eef8f3 100644 --- a/examples/2.3.x/server-swift/examples/databases/delete-documents.md +++ b/examples/2.3.x/server-swift/examples/databases/delete-documents.md @@ -11,7 +11,9 @@ let databases = Databases(client) let documentList = try await databases.deleteDocuments( databaseId: "<DATABASE_ID>", collectionId: "<COLLECTION_ID>", - queries: [], // optional + queries: [ + "{\"method\":\"equal\", \"attribute\":\"$id\", \"values\":[\"<DOCUMENT_ID>\"]}" + ], // optional transactionId: "<TRANSACTION_ID>" // optional ) diff --git a/examples/2.3.x/server-swift/examples/databases/list-transactions.md b/examples/2.3.x/server-swift/examples/databases/list-transactions.md index 4059ddbf3..410aedf5c 100644 --- a/examples/2.3.x/server-swift/examples/databases/list-transactions.md +++ b/examples/2.3.x/server-swift/examples/databases/list-transactions.md @@ -9,7 +9,8 @@ let client = Client() let databases = Databases(client) let transactionList = try await databases.listTransactions( - queries: [] // optional + queries: [], // optional + total: false // optional ) ``` diff --git a/examples/2.3.x/server-swift/examples/databases/upsert-documents.md b/examples/2.3.x/server-swift/examples/databases/upsert-documents.md index dbcc58e5e..a1d6238a2 100644 --- a/examples/2.3.x/server-swift/examples/databases/upsert-documents.md +++ b/examples/2.3.x/server-swift/examples/databases/upsert-documents.md @@ -11,7 +11,16 @@ let databases = Databases(client) let documentList = try await databases.upsertDocuments( databaseId: "<DATABASE_ID>", collectionId: "<COLLECTION_ID>", - documents: [], + documents: [ + [ + "$id": "example1", + "username": "walter.obrien", + "email": "walter.obrien@example.com", + "fullName": "Walter O'Brien", + "age": 30, + "isAdmin": false + ] + ], transactionId: "<TRANSACTION_ID>" // optional ) diff --git a/examples/2.3.x/server-swift/examples/documentsdb/create-documents.md b/examples/2.3.x/server-swift/examples/documentsdb/create-documents.md index 9b61a9eb4..62d6d2171 100644 --- a/examples/2.3.x/server-swift/examples/documentsdb/create-documents.md +++ b/examples/2.3.x/server-swift/examples/documentsdb/create-documents.md @@ -11,7 +11,16 @@ let documentsDB = DocumentsDB(client) let documentList = try await documentsDB.createDocuments( databaseId: "<DATABASE_ID>", collectionId: "<COLLECTION_ID>", - documents: [], + documents: [ + [ + "$id": "example1", + "username": "walter.obrien", + "email": "walter.obrien@example.com", + "fullName": "Walter O'Brien", + "age": 30, + "isAdmin": false + ] + ], transactionId: "<TRANSACTION_ID>" // optional ) diff --git a/examples/2.3.x/server-swift/examples/documentsdb/create-index.md b/examples/2.3.x/server-swift/examples/documentsdb/create-index.md index fae314f85..95f1dd29a 100644 --- a/examples/2.3.x/server-swift/examples/documentsdb/create-index.md +++ b/examples/2.3.x/server-swift/examples/documentsdb/create-index.md @@ -14,7 +14,9 @@ let index = try await documentsDB.createIndex( collectionId: "<COLLECTION_ID>", key: "<KEY>", type: .key, - attributes: [], + attributes: [ + "username" + ], orders: [.asc], // optional lengths: [] // optional ) diff --git a/examples/2.3.x/server-swift/examples/documentsdb/delete-documents.md b/examples/2.3.x/server-swift/examples/documentsdb/delete-documents.md index 9c6e9c6ff..ad7146594 100644 --- a/examples/2.3.x/server-swift/examples/documentsdb/delete-documents.md +++ b/examples/2.3.x/server-swift/examples/documentsdb/delete-documents.md @@ -11,7 +11,9 @@ let documentsDB = DocumentsDB(client) let documentList = try await documentsDB.deleteDocuments( databaseId: "<DATABASE_ID>", collectionId: "<COLLECTION_ID>", - queries: [], // optional + queries: [ + "{\"method\":\"equal\", \"attribute\":\"$id\", \"values\":[\"<DOCUMENT_ID>\"]}" + ], // optional transactionId: "<TRANSACTION_ID>" // optional ) diff --git a/examples/2.3.x/server-swift/examples/documentsdb/list-transactions.md b/examples/2.3.x/server-swift/examples/documentsdb/list-transactions.md index f6eec7146..8e59ccbca 100644 --- a/examples/2.3.x/server-swift/examples/documentsdb/list-transactions.md +++ b/examples/2.3.x/server-swift/examples/documentsdb/list-transactions.md @@ -9,7 +9,8 @@ let client = Client() let documentsDB = DocumentsDB(client) let transactionList = try await documentsDB.listTransactions( - queries: [] // optional + queries: [], // optional + total: false // optional ) ``` diff --git a/examples/2.3.x/server-swift/examples/documentsdb/upsert-documents.md b/examples/2.3.x/server-swift/examples/documentsdb/upsert-documents.md index 6e6ad9ea9..76e0e2517 100644 --- a/examples/2.3.x/server-swift/examples/documentsdb/upsert-documents.md +++ b/examples/2.3.x/server-swift/examples/documentsdb/upsert-documents.md @@ -11,7 +11,16 @@ let documentsDB = DocumentsDB(client) let documentList = try await documentsDB.upsertDocuments( databaseId: "<DATABASE_ID>", collectionId: "<COLLECTION_ID>", - documents: [], + documents: [ + [ + "$id": "example1", + "username": "walter.obrien", + "email": "walter.obrien@example.com", + "fullName": "Walter O'Brien", + "age": 30, + "isAdmin": false + ] + ], transactionId: "<TRANSACTION_ID>" // optional ) diff --git a/examples/2.3.x/server-swift/examples/embeddings/create-text-embeddings.md b/examples/2.3.x/server-swift/examples/embeddings/create-text-embeddings.md index 85afbc743..453d6d883 100644 --- a/examples/2.3.x/server-swift/examples/embeddings/create-text-embeddings.md +++ b/examples/2.3.x/server-swift/examples/embeddings/create-text-embeddings.md @@ -10,7 +10,10 @@ let client = Client() let embeddings = Embeddings(client) let embeddingList = try await embeddings.createTextEmbeddings( - texts: [], + texts: [ + "Appwrite helps developers build applications.", + "Find documents with semantic search." + ], model: .nomicEmbedText // optional ) diff --git a/examples/2.3.x/server-swift/examples/functions/list-runtimes.md b/examples/2.3.x/server-swift/examples/functions/list-runtimes.md index 447e11eb3..e2d52a624 100644 --- a/examples/2.3.x/server-swift/examples/functions/list-runtimes.md +++ b/examples/2.3.x/server-swift/examples/functions/list-runtimes.md @@ -8,6 +8,8 @@ let client = Client() let functions = Functions(client) -let runtimeList = try await functions.listRuntimes() +let runtimeList = try await functions.listRuntimes( + total: false // optional +) ``` diff --git a/examples/2.3.x/server-swift/examples/functions/list-specifications.md b/examples/2.3.x/server-swift/examples/functions/list-specifications.md index f351a57b1..454f8d72a 100644 --- a/examples/2.3.x/server-swift/examples/functions/list-specifications.md +++ b/examples/2.3.x/server-swift/examples/functions/list-specifications.md @@ -9,7 +9,8 @@ let client = Client() let functions = Functions(client) let specificationList = try await functions.listSpecifications( - type: "runtimes" // optional + type: "runtimes", // optional + total: false // optional ) ``` diff --git a/examples/2.3.x/server-swift/examples/graphql/mutation.md b/examples/2.3.x/server-swift/examples/graphql/mutation.md index 9c3cf1168..9ce9f48e0 100644 --- a/examples/2.3.x/server-swift/examples/graphql/mutation.md +++ b/examples/2.3.x/server-swift/examples/graphql/mutation.md @@ -9,7 +9,9 @@ let client = Client() let graphql = Graphql(client) let any = try await graphql.mutation( - query: [:] + query: [ + "query": "mutation { accountUpdateName(name: \"Walter\") { name } }" + ] ) ``` diff --git a/examples/2.3.x/server-swift/examples/graphql/query.md b/examples/2.3.x/server-swift/examples/graphql/query.md index 9ce16dcc7..ac9ee5fe2 100644 --- a/examples/2.3.x/server-swift/examples/graphql/query.md +++ b/examples/2.3.x/server-swift/examples/graphql/query.md @@ -9,7 +9,9 @@ let client = Client() let graphql = Graphql(client) let any = try await graphql.query( - query: [:] + query: [ + "query": "query { localeGet { ip } }" + ] ) ``` diff --git a/examples/2.3.x/server-swift/examples/locale/list-codes.md b/examples/2.3.x/server-swift/examples/locale/list-codes.md index dd0f9fb63..982471f2e 100644 --- a/examples/2.3.x/server-swift/examples/locale/list-codes.md +++ b/examples/2.3.x/server-swift/examples/locale/list-codes.md @@ -8,6 +8,8 @@ let client = Client() let locale = Locale(client) -let localeCodeList = try await locale.listCodes() +let localeCodeList = try await locale.listCodes( + total: false // optional +) ``` diff --git a/examples/2.3.x/server-swift/examples/locale/list-continents.md b/examples/2.3.x/server-swift/examples/locale/list-continents.md index f37daceff..45e920ad5 100644 --- a/examples/2.3.x/server-swift/examples/locale/list-continents.md +++ b/examples/2.3.x/server-swift/examples/locale/list-continents.md @@ -8,6 +8,8 @@ let client = Client() let locale = Locale(client) -let continentList = try await locale.listContinents() +let continentList = try await locale.listContinents( + total: false // optional +) ``` diff --git a/examples/2.3.x/server-swift/examples/locale/list-countries-eu.md b/examples/2.3.x/server-swift/examples/locale/list-countries-eu.md index b858b31d9..ad8023bc1 100644 --- a/examples/2.3.x/server-swift/examples/locale/list-countries-eu.md +++ b/examples/2.3.x/server-swift/examples/locale/list-countries-eu.md @@ -8,6 +8,8 @@ let client = Client() let locale = Locale(client) -let countryList = try await locale.listCountriesEU() +let countryList = try await locale.listCountriesEU( + total: false // optional +) ``` diff --git a/examples/2.3.x/server-swift/examples/locale/list-countries-phones.md b/examples/2.3.x/server-swift/examples/locale/list-countries-phones.md index 739c490ba..2d356d304 100644 --- a/examples/2.3.x/server-swift/examples/locale/list-countries-phones.md +++ b/examples/2.3.x/server-swift/examples/locale/list-countries-phones.md @@ -8,6 +8,8 @@ let client = Client() let locale = Locale(client) -let phoneList = try await locale.listCountriesPhones() +let phoneList = try await locale.listCountriesPhones( + total: false // optional +) ``` diff --git a/examples/2.3.x/server-swift/examples/locale/list-countries.md b/examples/2.3.x/server-swift/examples/locale/list-countries.md index 8aa3bcf75..d975c703b 100644 --- a/examples/2.3.x/server-swift/examples/locale/list-countries.md +++ b/examples/2.3.x/server-swift/examples/locale/list-countries.md @@ -8,6 +8,8 @@ let client = Client() let locale = Locale(client) -let countryList = try await locale.listCountries() +let countryList = try await locale.listCountries( + total: false // optional +) ``` diff --git a/examples/2.3.x/server-swift/examples/locale/list-currencies.md b/examples/2.3.x/server-swift/examples/locale/list-currencies.md index d1ce956b6..5930a9ab5 100644 --- a/examples/2.3.x/server-swift/examples/locale/list-currencies.md +++ b/examples/2.3.x/server-swift/examples/locale/list-currencies.md @@ -8,6 +8,8 @@ let client = Client() let locale = Locale(client) -let currencyList = try await locale.listCurrencies() +let currencyList = try await locale.listCurrencies( + total: false // optional +) ``` diff --git a/examples/2.3.x/server-swift/examples/locale/list-languages.md b/examples/2.3.x/server-swift/examples/locale/list-languages.md index ed444bf58..9a1187cda 100644 --- a/examples/2.3.x/server-swift/examples/locale/list-languages.md +++ b/examples/2.3.x/server-swift/examples/locale/list-languages.md @@ -8,6 +8,8 @@ let client = Client() let locale = Locale(client) -let languageList = try await locale.listLanguages() +let languageList = try await locale.listLanguages( + total: false // optional +) ``` diff --git a/examples/2.3.x/server-swift/examples/messaging/create-push.md b/examples/2.3.x/server-swift/examples/messaging/create-push.md index e2db2e6de..4e51dbf96 100644 --- a/examples/2.3.x/server-swift/examples/messaging/create-push.md +++ b/examples/2.3.x/server-swift/examples/messaging/create-push.md @@ -28,7 +28,8 @@ let message = try await messaging.createPush( scheduledAt: "2020-10-15T06:38:00.000+00:00", // optional contentAvailable: false, // optional critical: false, // optional - priority: .normal // optional + priority: .normal, // optional + channelId: "<CHANNEL_ID>" // optional ) ``` diff --git a/examples/2.3.x/server-swift/examples/messaging/update-email.md b/examples/2.3.x/server-swift/examples/messaging/update-email.md index 287807776..81b4edd56 100644 --- a/examples/2.3.x/server-swift/examples/messaging/update-email.md +++ b/examples/2.3.x/server-swift/examples/messaging/update-email.md @@ -10,19 +10,19 @@ let messaging = Messaging(client) let message = try await messaging.updateEmail( messageId: "<MESSAGE_ID>", + subject: "<SUBJECT>", // optional + content: "<CONTENT>", // optional topics: [], // optional users: [], // optional targets: [], // optional - subject: "<SUBJECT>", // optional - content: "<CONTENT>", // optional - draft: false, // optional - html: false, // optional cc: [], // optional bcc: [], // optional + attachments: [], // optional replyToEmail: "email@example.com", // optional replyToName: "<REPLY_TO_NAME>", // optional - scheduledAt: "2020-10-15T06:38:00.000+00:00", // optional - attachments: [] // optional + draft: false, // optional + html: false, // optional + scheduledAt: "2020-10-15T06:38:00.000+00:00" // optional ) ``` diff --git a/examples/2.3.x/server-swift/examples/messaging/update-push.md b/examples/2.3.x/server-swift/examples/messaging/update-push.md index 3266d4af4..0ffaf6d48 100644 --- a/examples/2.3.x/server-swift/examples/messaging/update-push.md +++ b/examples/2.3.x/server-swift/examples/messaging/update-push.md @@ -11,11 +11,11 @@ let messaging = Messaging(client) let message = try await messaging.updatePush( messageId: "<MESSAGE_ID>", + title: "<TITLE>", // optional + body: "<BODY>", // optional topics: [], // optional users: [], // optional targets: [], // optional - title: "<TITLE>", // optional - body: "<BODY>", // optional data: [:], // optional action: "<ACTION>", // optional image: "<ID1:ID2>", // optional @@ -28,7 +28,8 @@ let message = try await messaging.updatePush( scheduledAt: "2020-10-15T06:38:00.000+00:00", // optional contentAvailable: false, // optional critical: false, // optional - priority: .normal // optional + priority: .normal, // optional + channelId: "<CHANNEL_ID>" // optional ) ``` diff --git a/examples/2.3.x/server-swift/examples/messaging/update-sms.md b/examples/2.3.x/server-swift/examples/messaging/update-sms.md index 668625ffe..f50fc1051 100644 --- a/examples/2.3.x/server-swift/examples/messaging/update-sms.md +++ b/examples/2.3.x/server-swift/examples/messaging/update-sms.md @@ -10,10 +10,10 @@ let messaging = Messaging(client) let message = try await messaging.updateSMS( messageId: "<MESSAGE_ID>", + content: "<CONTENT>", // optional topics: [], // optional users: [], // optional targets: [], // optional - content: "<CONTENT>", // optional draft: false, // optional scheduledAt: "2020-10-15T06:38:00.000+00:00" // optional ) diff --git a/examples/2.3.x/server-swift/examples/oauth2/introspect.md b/examples/2.3.x/server-swift/examples/oauth2/introspect.md new file mode 100644 index 000000000..9b5c30f64 --- /dev/null +++ b/examples/2.3.x/server-swift/examples/oauth2/introspect.md @@ -0,0 +1,18 @@ +```swift +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let oauth2 = Oauth2(client) + +let oauth2Introspection = try await oauth2.introspect( + token: "<TOKEN>", + token_type_hint: "access_token", // optional + client_id: "<CLIENT_ID>", // optional + client_secret: "<CLIENT_SECRET>" // optional +) + +``` diff --git a/examples/2.3.x/server-swift/examples/organization/create-ephemeral-project-key.md b/examples/2.3.x/server-swift/examples/organization/create-ephemeral-project-key.md index b5678349b..6b0a2b8c2 100644 --- a/examples/2.3.x/server-swift/examples/organization/create-ephemeral-project-key.md +++ b/examples/2.3.x/server-swift/examples/organization/create-ephemeral-project-key.md @@ -11,7 +11,7 @@ let organization = Organization(client) let ephemeralKey = try await organization.createEphemeralProjectKey( projectId: "<PROJECT_ID>", - scopes: [.projectRead], + scopes: [.usersRead], duration: 600 ) diff --git a/examples/2.3.x/server-swift/examples/organization/update-project-key.md b/examples/2.3.x/server-swift/examples/organization/update-project-key.md index b90e8a377..f276bd127 100644 --- a/examples/2.3.x/server-swift/examples/organization/update-project-key.md +++ b/examples/2.3.x/server-swift/examples/organization/update-project-key.md @@ -13,7 +13,7 @@ let key = try await organization.updateProjectKey( projectId: "<PROJECT_ID>", keyId: "<KEY_ID>", name: "<NAME>", - scopes: [.projectRead], + scopes: [.usersRead], expire: "2020-10-15T06:38:00.000+00:00" // optional ) diff --git a/examples/2.3.x/server-swift/examples/project/create-ephemeral-key.md b/examples/2.3.x/server-swift/examples/project/create-ephemeral-key.md index c4310ecf7..f601a2e93 100644 --- a/examples/2.3.x/server-swift/examples/project/create-ephemeral-key.md +++ b/examples/2.3.x/server-swift/examples/project/create-ephemeral-key.md @@ -10,7 +10,7 @@ let client = Client() let project = Project(client) let ephemeralKey = try await project.createEphemeralKey( - scopes: [.projectRead], + scopes: [.usersRead], duration: 600 ) diff --git a/examples/2.3.x/server-swift/examples/project/create-smtp-test.md b/examples/2.3.x/server-swift/examples/project/create-smtp-test.md index 7f58a2797..a54419f86 100644 --- a/examples/2.3.x/server-swift/examples/project/create-smtp-test.md +++ b/examples/2.3.x/server-swift/examples/project/create-smtp-test.md @@ -9,7 +9,9 @@ let client = Client() let project = Project(client) let result = try await project.createSMTPTest( - emails: [] + emails: [ + "recipient@example.com" + ] ) ``` diff --git a/examples/2.3.x/server-swift/examples/project/update-key.md b/examples/2.3.x/server-swift/examples/project/update-key.md index b94b74f13..94c248790 100644 --- a/examples/2.3.x/server-swift/examples/project/update-key.md +++ b/examples/2.3.x/server-swift/examples/project/update-key.md @@ -12,7 +12,7 @@ let project = Project(client) let key = try await project.updateKey( keyId: "<KEY_ID>", name: "<NAME>", - scopes: [.projectRead], + scopes: [.usersRead], expire: "2020-10-15T06:38:00.000+00:00" // optional ) diff --git a/examples/2.3.x/server-swift/examples/project/update-labels.md b/examples/2.3.x/server-swift/examples/project/update-labels.md index fe290de25..197094b30 100644 --- a/examples/2.3.x/server-swift/examples/project/update-labels.md +++ b/examples/2.3.x/server-swift/examples/project/update-labels.md @@ -9,7 +9,9 @@ let client = Client() let project = Project(client) let project = try await project.updateLabels( - labels: [] + labels: [ + "production" + ] ) ``` diff --git a/examples/2.3.x/server-swift/examples/project/update-o-auth-2-auth-0.md b/examples/2.3.x/server-swift/examples/project/update-o-auth-2-auth-0.md index 32fa12df4..3ae1b5159 100644 --- a/examples/2.3.x/server-swift/examples/project/update-o-auth-2-auth-0.md +++ b/examples/2.3.x/server-swift/examples/project/update-o-auth-2-auth-0.md @@ -1,5 +1,6 @@ ```swift import Appwrite +import AppwriteEnums let client = Client() .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint @@ -12,6 +13,7 @@ let oAuth2Auth0 = try await project.updateOAuth2Auth0( clientId: "<CLIENT_ID>", // optional clientSecret: "<CLIENT_SECRET>", // optional endpoint: "<ENDPOINT>", // optional + prompt: [.none], // optional enabled: false // optional ) diff --git a/examples/2.3.x/server-swift/examples/project/update-o-auth-2-discord.md b/examples/2.3.x/server-swift/examples/project/update-o-auth-2-discord.md index bdab08003..91556ea5e 100644 --- a/examples/2.3.x/server-swift/examples/project/update-o-auth-2-discord.md +++ b/examples/2.3.x/server-swift/examples/project/update-o-auth-2-discord.md @@ -1,5 +1,6 @@ ```swift import Appwrite +import AppwriteEnums let client = Client() .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint @@ -11,6 +12,7 @@ let project = Project(client) let oAuth2Discord = try await project.updateOAuth2Discord( clientId: "<CLIENT_ID>", // optional clientSecret: "<CLIENT_SECRET>", // optional + prompt: [.none], // optional enabled: false // optional ) diff --git a/examples/2.3.x/server-swift/examples/project/update-o-auth-2-git-hub.md b/examples/2.3.x/server-swift/examples/project/update-o-auth-2-git-hub.md index 3a31b270c..a3aa43fbe 100644 --- a/examples/2.3.x/server-swift/examples/project/update-o-auth-2-git-hub.md +++ b/examples/2.3.x/server-swift/examples/project/update-o-auth-2-git-hub.md @@ -1,5 +1,6 @@ ```swift import Appwrite +import AppwriteEnums let client = Client() .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint @@ -11,6 +12,7 @@ let project = Project(client) let oAuth2Github = try await project.updateOAuth2GitHub( clientId: "<CLIENT_ID>", // optional clientSecret: "<CLIENT_SECRET>", // optional + prompt: [.selectAccount], // optional enabled: false // optional ) diff --git a/examples/2.3.x/server-swift/examples/project/update-o-auth-2-kakao.md b/examples/2.3.x/server-swift/examples/project/update-o-auth-2-kakao.md index d28b0dbe7..3d0cbdf94 100644 --- a/examples/2.3.x/server-swift/examples/project/update-o-auth-2-kakao.md +++ b/examples/2.3.x/server-swift/examples/project/update-o-auth-2-kakao.md @@ -1,5 +1,6 @@ ```swift import Appwrite +import AppwriteEnums let client = Client() .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint @@ -11,6 +12,7 @@ let project = Project(client) let oAuth2Kakao = try await project.updateOAuth2Kakao( clientId: "<CLIENT_ID>", // optional clientSecret: "<CLIENT_SECRET>", // optional + prompt: [.none], // optional enabled: false // optional ) diff --git a/examples/2.3.x/server-swift/examples/project/update-o-auth-2-microsoft.md b/examples/2.3.x/server-swift/examples/project/update-o-auth-2-microsoft.md index 1ec4428ba..06301c622 100644 --- a/examples/2.3.x/server-swift/examples/project/update-o-auth-2-microsoft.md +++ b/examples/2.3.x/server-swift/examples/project/update-o-auth-2-microsoft.md @@ -1,5 +1,6 @@ ```swift import Appwrite +import AppwriteEnums let client = Client() .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint @@ -12,6 +13,7 @@ let oAuth2Microsoft = try await project.updateOAuth2Microsoft( applicationId: "<APPLICATION_ID>", // optional applicationSecret: "<APPLICATION_SECRET>", // optional tenant: "<TENANT>", // optional + prompt: [.none], // optional enabled: false // optional ) diff --git a/examples/2.3.x/server-swift/examples/project/update-o-auth-2-okta.md b/examples/2.3.x/server-swift/examples/project/update-o-auth-2-okta.md index 51331bee7..7071bfcc9 100644 --- a/examples/2.3.x/server-swift/examples/project/update-o-auth-2-okta.md +++ b/examples/2.3.x/server-swift/examples/project/update-o-auth-2-okta.md @@ -1,5 +1,6 @@ ```swift import Appwrite +import AppwriteEnums let client = Client() .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint @@ -13,6 +14,7 @@ let oAuth2Okta = try await project.updateOAuth2Okta( clientSecret: "<CLIENT_SECRET>", // optional domain: "example.com", // optional authorizationServerId: "<AUTHORIZATION_SERVER_ID>", // optional + prompt: [.none], // optional enabled: false // optional ) diff --git a/examples/2.3.x/server-swift/examples/project/update-o-auth-2-salesforce.md b/examples/2.3.x/server-swift/examples/project/update-o-auth-2-salesforce.md index 65eb7468b..7ab1f1ccd 100644 --- a/examples/2.3.x/server-swift/examples/project/update-o-auth-2-salesforce.md +++ b/examples/2.3.x/server-swift/examples/project/update-o-auth-2-salesforce.md @@ -1,5 +1,6 @@ ```swift import Appwrite +import AppwriteEnums let client = Client() .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint @@ -11,6 +12,7 @@ let project = Project(client) let oAuth2Salesforce = try await project.updateOAuth2Salesforce( customerKey: "<CUSTOMER_KEY>", // optional customerSecret: "<CUSTOMER_SECRET>", // optional + prompt: [.login], // optional enabled: false // optional ) diff --git a/examples/2.3.x/server-swift/examples/project/update-o-auth-2-webflow.md b/examples/2.3.x/server-swift/examples/project/update-o-auth-2-webflow.md new file mode 100644 index 000000000..57f5f4ecc --- /dev/null +++ b/examples/2.3.x/server-swift/examples/project/update-o-auth-2-webflow.md @@ -0,0 +1,17 @@ +```swift +import Appwrite + +let client = Client() + .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint + .setProject("<YOUR_PROJECT_ID>") // Your project ID + .setKey("<YOUR_API_KEY>") // Your secret API key + +let project = Project(client) + +let oAuth2Webflow = try await project.updateOAuth2Webflow( + clientId: "<CLIENT_ID>", // optional + clientSecret: "<CLIENT_SECRET>", // optional + enabled: false // optional +) + +``` diff --git a/examples/2.3.x/server-swift/examples/project/update-o-auth-2-zoho.md b/examples/2.3.x/server-swift/examples/project/update-o-auth-2-zoho.md index db4f04043..2556018c4 100644 --- a/examples/2.3.x/server-swift/examples/project/update-o-auth-2-zoho.md +++ b/examples/2.3.x/server-swift/examples/project/update-o-auth-2-zoho.md @@ -1,5 +1,6 @@ ```swift import Appwrite +import AppwriteEnums let client = Client() .setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint @@ -11,6 +12,7 @@ let project = Project(client) let oAuth2Zoho = try await project.updateOAuth2Zoho( clientId: "<CLIENT_ID>", // optional clientSecret: "<CLIENT_SECRET>", // optional + prompt: [.consent], // optional enabled: false // optional ) diff --git a/examples/2.3.x/server-swift/examples/sites/list-frameworks.md b/examples/2.3.x/server-swift/examples/sites/list-frameworks.md index f4fe3a699..a7a460eed 100644 --- a/examples/2.3.x/server-swift/examples/sites/list-frameworks.md +++ b/examples/2.3.x/server-swift/examples/sites/list-frameworks.md @@ -8,6 +8,8 @@ let client = Client() let sites = Sites(client) -let frameworkList = try await sites.listFrameworks() +let frameworkList = try await sites.listFrameworks( + total: false // optional +) ``` diff --git a/examples/2.3.x/server-swift/examples/sites/list-specifications.md b/examples/2.3.x/server-swift/examples/sites/list-specifications.md index a75edd555..8aadb3cf4 100644 --- a/examples/2.3.x/server-swift/examples/sites/list-specifications.md +++ b/examples/2.3.x/server-swift/examples/sites/list-specifications.md @@ -9,7 +9,8 @@ let client = Client() let sites = Sites(client) let specificationList = try await sites.listSpecifications( - type: "runtimes" // optional + type: "runtimes", // optional + total: false // optional ) ``` diff --git a/examples/2.3.x/server-swift/examples/tablesdb/create-index.md b/examples/2.3.x/server-swift/examples/tablesdb/create-index.md index ae3723efc..882d87b3b 100644 --- a/examples/2.3.x/server-swift/examples/tablesdb/create-index.md +++ b/examples/2.3.x/server-swift/examples/tablesdb/create-index.md @@ -14,7 +14,9 @@ let columnIndex = try await tablesDB.createIndex( tableId: "<TABLE_ID>", key: "<KEY>", type: .key, - columns: [], + columns: [ + "username" + ], orders: [.asc], // optional lengths: [] // optional ) diff --git a/examples/2.3.x/server-swift/examples/tablesdb/create-rows.md b/examples/2.3.x/server-swift/examples/tablesdb/create-rows.md index 0a8380717..b9c4e3011 100644 --- a/examples/2.3.x/server-swift/examples/tablesdb/create-rows.md +++ b/examples/2.3.x/server-swift/examples/tablesdb/create-rows.md @@ -11,7 +11,16 @@ let tablesDB = TablesDB(client) let rowList = try await tablesDB.createRows( databaseId: "<DATABASE_ID>", tableId: "<TABLE_ID>", - rows: [], + rows: [ + [ + "$id": "example1", + "username": "walter.obrien", + "email": "walter.obrien@example.com", + "fullName": "Walter O'Brien", + "age": 30, + "isAdmin": false + ] + ], transactionId: "<TRANSACTION_ID>" // optional ) diff --git a/examples/2.3.x/server-swift/examples/tablesdb/delete-rows.md b/examples/2.3.x/server-swift/examples/tablesdb/delete-rows.md index 0ab77ec63..49a5162b2 100644 --- a/examples/2.3.x/server-swift/examples/tablesdb/delete-rows.md +++ b/examples/2.3.x/server-swift/examples/tablesdb/delete-rows.md @@ -11,7 +11,9 @@ let tablesDB = TablesDB(client) let rowList = try await tablesDB.deleteRows( databaseId: "<DATABASE_ID>", tableId: "<TABLE_ID>", - queries: [], // optional + queries: [ + "{\"method\":\"equal\", \"attribute\":\"$id\", \"values\":[\"<ROW_ID>\"]}" + ], // optional transactionId: "<TRANSACTION_ID>" // optional ) diff --git a/examples/2.3.x/server-swift/examples/tablesdb/list-transactions.md b/examples/2.3.x/server-swift/examples/tablesdb/list-transactions.md index bf51907bd..b83f3684e 100644 --- a/examples/2.3.x/server-swift/examples/tablesdb/list-transactions.md +++ b/examples/2.3.x/server-swift/examples/tablesdb/list-transactions.md @@ -9,7 +9,8 @@ let client = Client() let tablesDB = TablesDB(client) let transactionList = try await tablesDB.listTransactions( - queries: [] // optional + queries: [], // optional + total: false // optional ) ``` diff --git a/examples/2.3.x/server-swift/examples/tablesdb/upsert-rows.md b/examples/2.3.x/server-swift/examples/tablesdb/upsert-rows.md index 457ea5c58..cf4410835 100644 --- a/examples/2.3.x/server-swift/examples/tablesdb/upsert-rows.md +++ b/examples/2.3.x/server-swift/examples/tablesdb/upsert-rows.md @@ -11,7 +11,16 @@ let tablesDB = TablesDB(client) let rowList = try await tablesDB.upsertRows( databaseId: "<DATABASE_ID>", tableId: "<TABLE_ID>", - rows: [], + rows: [ + [ + "$id": "example1", + "username": "walter.obrien", + "email": "walter.obrien@example.com", + "fullName": "Walter O'Brien", + "age": 30, + "isAdmin": false + ] + ], transactionId: "<TRANSACTION_ID>" // optional ) diff --git a/examples/2.3.x/server-swift/examples/teams/create-membership.md b/examples/2.3.x/server-swift/examples/teams/create-membership.md index bed0624bc..0cc8dcb04 100644 --- a/examples/2.3.x/server-swift/examples/teams/create-membership.md +++ b/examples/2.3.x/server-swift/examples/teams/create-membership.md @@ -10,7 +10,9 @@ let teams = Teams(client) let membership = try await teams.createMembership( teamId: "<TEAM_ID>", - roles: [], + roles: [ + "editor" + ], email: "email@example.com", // optional userId: "<USER_ID>", // optional phone: "+12065550100", // optional diff --git a/examples/2.3.x/server-swift/examples/teams/update-membership.md b/examples/2.3.x/server-swift/examples/teams/update-membership.md index b2cce9df7..0b77c14f6 100644 --- a/examples/2.3.x/server-swift/examples/teams/update-membership.md +++ b/examples/2.3.x/server-swift/examples/teams/update-membership.md @@ -11,7 +11,9 @@ let teams = Teams(client) let membership = try await teams.updateMembership( teamId: "<TEAM_ID>", membershipId: "<MEMBERSHIP_ID>", - roles: [] + roles: [ + "editor" + ] ) ``` diff --git a/examples/2.3.x/server-swift/examples/users/update-labels.md b/examples/2.3.x/server-swift/examples/users/update-labels.md index 67d4b95dd..8afd9032e 100644 --- a/examples/2.3.x/server-swift/examples/users/update-labels.md +++ b/examples/2.3.x/server-swift/examples/users/update-labels.md @@ -10,7 +10,9 @@ let users = Users(client) let user = try await users.updateLabels( userId: "<USER_ID>", - labels: [] + labels: [ + "subscriber" + ] ) ``` diff --git a/examples/2.3.x/server-swift/examples/vectorsdb/create-collection.md b/examples/2.3.x/server-swift/examples/vectorsdb/create-collection.md index 27682380d..4a1db08c5 100644 --- a/examples/2.3.x/server-swift/examples/vectorsdb/create-collection.md +++ b/examples/2.3.x/server-swift/examples/vectorsdb/create-collection.md @@ -12,7 +12,7 @@ let vectorsdbCollection = try await vectorsDB.createCollection( databaseId: "<DATABASE_ID>", collectionId: "<COLLECTION_ID>", name: "<NAME>", - dimension: 1, + dimension: 4, permissions: [Permission.read(Role.any())], // optional documentSecurity: false, // optional enabled: false // optional diff --git a/examples/2.3.x/server-swift/examples/vectorsdb/create-documents.md b/examples/2.3.x/server-swift/examples/vectorsdb/create-documents.md index c25ee2bc3..7ad763b65 100644 --- a/examples/2.3.x/server-swift/examples/vectorsdb/create-documents.md +++ b/examples/2.3.x/server-swift/examples/vectorsdb/create-documents.md @@ -11,7 +11,20 @@ let vectorsDB = VectorsDB(client) let documentList = try await vectorsDB.createDocuments( databaseId: "<DATABASE_ID>", collectionId: "<COLLECTION_ID>", - documents: [], + documents: [ + [ + "$id": "example1", + "embeddings": [ + 0.12, + -0.55, + 0.88, + 1.02 + ], + "metadata": [ + "name": "First document" + ] + ] + ], transactionId: "<TRANSACTION_ID>" // optional ) diff --git a/examples/2.3.x/server-swift/examples/vectorsdb/create-index.md b/examples/2.3.x/server-swift/examples/vectorsdb/create-index.md index 9aca64180..e78c21894 100644 --- a/examples/2.3.x/server-swift/examples/vectorsdb/create-index.md +++ b/examples/2.3.x/server-swift/examples/vectorsdb/create-index.md @@ -14,7 +14,9 @@ let index = try await vectorsDB.createIndex( collectionId: "<COLLECTION_ID>", key: "<KEY>", type: .hnswEuclidean, - attributes: [], + attributes: [ + "embeddings" + ], orders: [.asc], // optional lengths: [] // optional ) diff --git a/examples/2.3.x/server-swift/examples/vectorsdb/create-operations.md b/examples/2.3.x/server-swift/examples/vectorsdb/create-operations.md index 7e3c4be10..ee5cc9260 100644 --- a/examples/2.3.x/server-swift/examples/vectorsdb/create-operations.md +++ b/examples/2.3.x/server-swift/examples/vectorsdb/create-operations.md @@ -17,7 +17,15 @@ let transaction = try await vectorsDB.createOperations( "collectionId": "<COLLECTION_ID>", "documentId": "<DOCUMENT_ID>", "data": [ - "name": "Walter O'Brien" + "embeddings": [ + 0.12, + -0.55, + 0.88, + 1.02 + ], + "metadata": [ + "name": "First document" + ] ] ] ] // optional diff --git a/examples/2.3.x/server-swift/examples/vectorsdb/delete-documents.md b/examples/2.3.x/server-swift/examples/vectorsdb/delete-documents.md index 54211abdc..48a3a09d4 100644 --- a/examples/2.3.x/server-swift/examples/vectorsdb/delete-documents.md +++ b/examples/2.3.x/server-swift/examples/vectorsdb/delete-documents.md @@ -11,7 +11,9 @@ let vectorsDB = VectorsDB(client) let documentList = try await vectorsDB.deleteDocuments( databaseId: "<DATABASE_ID>", collectionId: "<COLLECTION_ID>", - queries: [], // optional + queries: [ + "{\"method\":\"equal\", \"attribute\":\"$id\", \"values\":[\"<DOCUMENT_ID>\"]}" + ], // optional transactionId: "<TRANSACTION_ID>" // optional ) diff --git a/examples/2.3.x/server-swift/examples/vectorsdb/list-transactions.md b/examples/2.3.x/server-swift/examples/vectorsdb/list-transactions.md index 5a4f5e63d..565fa43ae 100644 --- a/examples/2.3.x/server-swift/examples/vectorsdb/list-transactions.md +++ b/examples/2.3.x/server-swift/examples/vectorsdb/list-transactions.md @@ -9,7 +9,8 @@ let client = Client() let vectorsDB = VectorsDB(client) let transactionList = try await vectorsDB.listTransactions( - queries: [] // optional + queries: [], // optional + total: false // optional ) ``` diff --git a/examples/2.3.x/server-swift/examples/vectorsdb/update-collection.md b/examples/2.3.x/server-swift/examples/vectorsdb/update-collection.md index 0abc0fc0b..ac1b2ea4a 100644 --- a/examples/2.3.x/server-swift/examples/vectorsdb/update-collection.md +++ b/examples/2.3.x/server-swift/examples/vectorsdb/update-collection.md @@ -12,7 +12,7 @@ let vectorsdbCollection = try await vectorsDB.updateCollection( databaseId: "<DATABASE_ID>", collectionId: "<COLLECTION_ID>", name: "<NAME>", - dimension: 1, // optional + dimension: 4, // optional permissions: [Permission.read(Role.any())], // optional documentSecurity: false, // optional enabled: false // optional diff --git a/examples/2.3.x/server-swift/examples/vectorsdb/upsert-documents.md b/examples/2.3.x/server-swift/examples/vectorsdb/upsert-documents.md index 32d773bce..565c38bbb 100644 --- a/examples/2.3.x/server-swift/examples/vectorsdb/upsert-documents.md +++ b/examples/2.3.x/server-swift/examples/vectorsdb/upsert-documents.md @@ -11,7 +11,20 @@ let vectorsDB = VectorsDB(client) let documentList = try await vectorsDB.upsertDocuments( databaseId: "<DATABASE_ID>", collectionId: "<COLLECTION_ID>", - documents: [], + documents: [ + [ + "$id": "example1", + "embeddings": [ + 0.12, + -0.55, + 0.88, + 1.02 + ], + "metadata": [ + "name": "First document" + ] + ] + ], transactionId: "<TRANSACTION_ID>" // optional ) diff --git a/examples/2.3.x/server-swift/examples/webhooks/create.md b/examples/2.3.x/server-swift/examples/webhooks/create.md index b9ff80bf5..d1709025c 100644 --- a/examples/2.3.x/server-swift/examples/webhooks/create.md +++ b/examples/2.3.x/server-swift/examples/webhooks/create.md @@ -12,7 +12,9 @@ let webhook = try await webhooks.create( webhookId: "<WEBHOOK_ID>", url: "https://example.com/webhook", name: "<NAME>", - events: [], + events: [ + "users.*.create" + ], enabled: false, // optional tls: false, // optional authUsername: "<AUTH_USERNAME>", // optional diff --git a/examples/2.3.x/server-swift/examples/webhooks/update.md b/examples/2.3.x/server-swift/examples/webhooks/update.md index 063639128..4145c891d 100644 --- a/examples/2.3.x/server-swift/examples/webhooks/update.md +++ b/examples/2.3.x/server-swift/examples/webhooks/update.md @@ -12,7 +12,9 @@ let webhook = try await webhooks.update( webhookId: "<WEBHOOK_ID>", name: "<NAME>", url: "https://example.com/webhook", - events: [], + events: [ + "users.*.create" + ], enabled: false, // optional tls: false, // optional authUsername: "<AUTH_USERNAME>", // optional diff --git a/specs/2.3.x/open-api3-2.3.x.json b/specs/2.3.x/open-api3-2.3.x.json index 2e5f66239..ab2c57252 100644 --- a/specs/2.3.x/open-api3-2.3.x.json +++ b/specs/2.3.x/open-api3-2.3.x.json @@ -4542,6 +4542,19 @@ "Session": [], "JWT": [] } + ], + "parameters": [ + { + "name": "total", + "description": "When set to false, the total count returned will be 0 and will not be calculated.", + "required": false, + "schema": { + "type": "boolean", + "example": false, + "default": true + }, + "in": "query" + } ] }, "delete": { @@ -4550,7 +4563,7 @@ "tags": [ "account" ], - "description": "Delete all sessions from the user account and remove any sessions cookies from the end client.", + "description": "Delete all sessions from the user account and remove any sessions cookies from the end client. Pass `current` as false to keep the session making the request and sign out of every other session.", "responses": { "204": { "description": "No content" @@ -4590,6 +4603,19 @@ "Session": [], "JWT": [] } + ], + "parameters": [ + { + "name": "current", + "description": "Delete the current session too. Use false to sign out of every other session while staying signed in on this one.", + "required": false, + "schema": { + "type": "boolean", + "example": false, + "default": true + }, + "in": "query" + } ] } }, @@ -4657,7 +4683,7 @@ "tags": [ "account" ], - "description": "Allow the user to login into their account by providing a valid email and password combination. This route will create a new session for the user.\n\nA user is limited to 10 active sessions at a time by default. [Learn more about session limits](https:\/\/appwrite.io\/docs\/authentication-security#limits).", + "description": "Allow the user to login into their account by providing a valid email and password combination. This route will create a new session for the user. Use the optional `duration` parameter to create a shorter session, for example when the user doesn't choose \"remember me\". It must be at least 60 seconds and cannot exceed the project maximum session length.\n\nA user is limited to 10 active sessions at a time by default. [Learn more about session limits](https:\/\/appwrite.io\/docs\/authentication-security#limits).", "responses": { "201": { "description": "Session", @@ -4722,6 +4748,13 @@ "type": "string", "example": "password", "format": "password" + }, + "duration": { + "description": "Session length in seconds. Minimum is 60 seconds, and it cannot exceed the project maximum session length. Defaults to the project maximum session length.", + "type": "integer", + "example": 60, + "format": "int32", + "nullable": true } }, "required": [ @@ -4998,7 +5031,7 @@ "parameters": [ { "name": "provider", - "description": "OAuth2 Provider. Currently, supported providers are: amazon, apple, appwrite, auth0, authentik, autodesk, bitbucket, bitly, box, cloudflare, dailymotion, discord, disqus, dropbox, etsy, facebook, figma, fusionauth, github, gitlab, google, huggingface, kakao, keycloak, kick, linkedin, microsoft, notion, oidc, okta, paypal, paypalSandbox, podio, resend, salesforce, slack, spotify, stripe, tiktok, tradeshift, tradeshiftBox, twitch, wordpress, x, yahoo, yammer, yandex, zoho, zoom.", + "description": "OAuth2 Provider. Currently, supported providers are: amazon, apple, appwrite, auth0, authentik, autodesk, bitbucket, bitly, box, cloudflare, dailymotion, discord, disqus, dropbox, etsy, facebook, figma, fusionauth, github, gitlab, google, huggingface, kakao, keycloak, kick, linkedin, microsoft, notion, oidc, okta, paypal, paypalSandbox, podio, resend, salesforce, slack, spotify, stripe, tiktok, tradeshift, tradeshiftBox, twitch, webflow, wordpress, x, yahoo, yammer, yandex, zoho, zoom.", "required": true, "schema": { "type": "string", @@ -5299,6 +5332,13 @@ ], "title": "twitch" }, + { + "type": "string", + "enum": [ + "webflow" + ], + "title": "webflow" + }, { "type": "string", "enum": [ @@ -6284,7 +6324,7 @@ "parameters": [ { "name": "provider", - "description": "OAuth2 Provider. Currently, supported providers are: amazon, apple, appwrite, auth0, authentik, autodesk, bitbucket, bitly, box, cloudflare, dailymotion, discord, disqus, dropbox, etsy, facebook, figma, fusionauth, github, gitlab, google, huggingface, kakao, keycloak, kick, linkedin, microsoft, notion, oidc, okta, paypal, paypalSandbox, podio, resend, salesforce, slack, spotify, stripe, tiktok, tradeshift, tradeshiftBox, twitch, wordpress, x, yahoo, yammer, yandex, zoho, zoom.", + "description": "OAuth2 Provider. Currently, supported providers are: amazon, apple, appwrite, auth0, authentik, autodesk, bitbucket, bitly, box, cloudflare, dailymotion, discord, disqus, dropbox, etsy, facebook, figma, fusionauth, github, gitlab, google, huggingface, kakao, keycloak, kick, linkedin, microsoft, notion, oidc, okta, paypal, paypalSandbox, podio, resend, salesforce, slack, spotify, stripe, tiktok, tradeshift, tradeshiftBox, twitch, webflow, wordpress, x, yahoo, yammer, yandex, zoho, zoom.", "required": true, "schema": { "type": "string", @@ -6585,6 +6625,13 @@ ], "title": "twitch" }, + { + "type": "string", + "enum": [ + "webflow" + ], + "title": "webflow" + }, { "type": "string", "enum": [ @@ -7952,6 +7999,931 @@ } } }, + "\/analytics\/properties": { + "get": { + "summary": "List analytics properties", + "operationId": "analyticsListProperties", + "tags": [ + "analytics" + ], + "description": "List analytics properties for the current project.", + "responses": { + "200": { + "description": "Analytics properties list", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/analyticsPropertyList" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "properties", + "demo": "analytics\/list-properties.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "analytics.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + }, + "server": { + "Project": [], + "Key": [] + } + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "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. You may filter on the following attributes: name, domain, timezone, enabled, public, snippetId", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + }, + "default": [] + }, + "in": "query" + }, + { + "name": "search", + "description": "Search term to filter your list results. Matches the property ID, name and domain. Max length: 256 chars.", + "required": false, + "schema": { + "type": "string", + "example": "<SEARCH>", + "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", + "example": false, + "default": true + }, + "in": "query" + } + ] + }, + "post": { + "summary": "Create analytics property", + "operationId": "analyticsCreateProperty", + "tags": [ + "analytics" + ], + "description": "Create a new analytics property to track a website or application.", + "responses": { + "201": { + "description": "AnalyticsProperty", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/analyticsProperty" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "properties", + "demo": "analytics\/create-property.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "analytics.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + }, + "server": { + "Project": [], + "Key": [] + } + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "propertyId": { + "description": "Unique ID. Choose a custom ID or generate a random ID with `ID.unique()`. Max length is 36 chars.", + "type": "string", + "example": "<PROPERTY_ID>" + }, + "name": { + "description": "Human-readable name for this property.", + "type": "string", + "example": "<NAME>" + }, + "domain": { + "description": "Primary domain to track (e.g. example.com). Optional for native apps.", + "type": "string", + "default": "", + "example": "<DOMAIN>" + }, + "timezone": { + "description": "IANA timezone used for daily boundaries.", + "type": "string", + "default": "UTC", + "example": "<TIMEZONE>" + }, + "enabled": { + "description": "Whether tracking is enabled.", + "type": "boolean", + "default": true, + "example": false + }, + "public": { + "description": "Whether stats are publicly viewable.", + "type": "boolean", + "default": false, + "example": false + }, + "allowedOrigins": { + "description": "Allowed origins for tracking. Use [\"*\"] to allow all.", + "type": "array", + "default": [ + "*" + ], + "items": { + "type": "string" + } + } + }, + "required": [ + "propertyId", + "name" + ] + } + } + } + } + } + }, + "\/analytics\/properties\/{propertyId}": { + "get": { + "summary": "Get analytics property", + "operationId": "analyticsGetProperty", + "tags": [ + "analytics" + ], + "description": "Get an analytics property by ID.", + "responses": { + "200": { + "description": "AnalyticsProperty", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/analyticsProperty" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "properties", + "demo": "analytics\/get-property.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "analytics.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + }, + "server": { + "Project": [], + "Key": [] + } + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "propertyId", + "description": "Analytics property unique ID.", + "required": true, + "schema": { + "type": "string", + "example": "<PROPERTY_ID>" + }, + "in": "path" + } + ] + }, + "patch": { + "summary": "Update analytics property", + "operationId": "analyticsUpdateProperty", + "tags": [ + "analytics" + ], + "description": "Update an analytics property. Only the attributes you pass are changed; omitted attributes keep their current value.", + "responses": { + "200": { + "description": "AnalyticsProperty", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/analyticsProperty" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "properties", + "demo": "analytics\/update-property.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "analytics.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + }, + "server": { + "Project": [], + "Key": [] + } + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "propertyId", + "description": "Analytics property unique ID.", + "required": true, + "schema": { + "type": "string", + "example": "<PROPERTY_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "name": { + "description": "Human-readable name for this property.", + "type": "string", + "example": "<NAME>", + "nullable": true + }, + "domain": { + "description": "Primary domain to track (e.g. example.com). Pass an empty string to clear it.", + "type": "string", + "example": "<DOMAIN>", + "nullable": true + }, + "timezone": { + "description": "IANA timezone used for daily boundaries.", + "type": "string", + "example": "<TIMEZONE>", + "nullable": true + }, + "enabled": { + "description": "Whether tracking is enabled.", + "type": "boolean", + "example": false, + "nullable": true + }, + "public": { + "description": "Whether stats are publicly viewable.", + "type": "boolean", + "example": false, + "nullable": true + }, + "allowedOrigins": { + "description": "Allowed origins for tracking. Use [\"*\"] to allow all.", + "type": "array", + "items": { + "type": "string" + }, + "nullable": true + } + } + } + } + } + } + }, + "delete": { + "summary": "Delete analytics property", + "operationId": "analyticsDeleteProperty", + "tags": [ + "analytics" + ], + "description": "Delete an analytics property along with every event and session collected for it. This cannot be undone.", + "responses": { + "204": { + "description": "No content" + } + }, + "deprecated": false, + "x-appwrite": { + "group": "properties", + "demo": "analytics\/delete-property.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "analytics.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + }, + "server": { + "Project": [], + "Key": [] + } + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "propertyId", + "description": "Analytics property unique ID.", + "required": true, + "schema": { + "type": "string", + "example": "<PROPERTY_ID>" + }, + "in": "path" + } + ] + } + }, + "\/analytics\/properties\/{propertyId}\/events": { + "post": { + "summary": "Track analytics event", + "operationId": "analyticsCreateEvent", + "tags": [ + "analytics" + ], + "description": "Send a tracking event from a browser, native app, or server-side SDK.", + "responses": { + "202": { + "description": "File", + "content": { + "application\/json": { + "schema": { + "type": "string", + "format": "binary" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "events", + "demo": "analytics\/create-event.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": [ + "public", + "global" + ], + "platforms": [ + "client", + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "client": { + "Project": [] + }, + "console": { + "Project": [] + }, + "server": { + "Project": [], + "Session": [] + } + } + }, + "security": [ + { + "Project": [], + "Session": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "propertyId", + "description": "Analytics property ID or snippet ID identifying the property.", + "required": true, + "schema": { + "type": "string", + "example": "<PROPERTY_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "name": { + "description": "Event name. \"pageview\" is just a conventional event name; events are not modeled specially.", + "type": "string", + "example": "<NAME>" + }, + "url": { + "description": "Full page URL or screen identifier.", + "type": "string", + "example": "https:\/\/example.com", + "format": "url" + }, + "domain": { + "description": "Hostname (e.g. example.com).", + "type": "string", + "default": "", + "example": "<DOMAIN>" + }, + "referrer": { + "description": "Referrer URL.", + "type": "string", + "default": "", + "example": "<REFERRER>" + }, + "screenWidth": { + "description": "Viewport width in CSS pixels.", + "type": "integer", + "default": 0, + "format": "int32" + }, + "sessionHash": { + "description": "Optional session hash (provided by SDK).", + "type": "string", + "default": "", + "example": "<SESSION_HASH>" + }, + "scrollDepth": { + "description": "Scroll depth percentage 0-100.", + "type": "integer", + "default": 0, + "example": 0, + "format": "int32" + }, + "engagementTime": { + "description": "Engagement time in seconds.", + "type": "integer", + "default": 0, + "format": "int32" + }, + "props": { + "description": "Custom string properties as a flat key=value list (max 32 entries, alternating key,value).", + "type": "array", + "default": [], + "items": { + "type": "string" + } + }, + "userId": { + "description": "Override user ID. Requires API-key auth with analytics.write scope.", + "type": "string", + "default": "", + "example": "<USER_ID>" + }, + "ip": { + "description": "Override IP address. Requires API-key auth with analytics.write scope.", + "type": "string", + "default": "", + "example": "<IP>" + }, + "userAgent": { + "description": "Override user agent. Requires API-key auth with analytics.write scope.", + "type": "string", + "default": "", + "example": "<USER_AGENT>" + } + }, + "required": [ + "name", + "url" + ] + } + } + } + } + } + }, + "\/analytics\/properties\/{propertyId}\/metrics": { + "get": { + "summary": "List analytics metrics for a property", + "operationId": "analyticsListMetrics", + "tags": [ + "analytics" + ], + "description": "Read analytics metrics (visitors, sessions, pageviews, events, bounceRate, \u2026) for a property over a date range.\n\n**Three response shapes**, chosen by `dimensions[]` and `interval`:\n- Neither: one row aggregating the whole window, with `value` and `date` null. Only this shape carries `pageviews`, `visits`, `bounceRate`, `visitDuration`, `viewsPerVisit`, `scrollDepth` and `engagementTime`.\n- `dimensions[]`: one row per dimension value, ranked by visitors, with `value` set and `date` null.\n- `interval`: one row per time bucket in chronological order, with `date` set and `value` null.\n\nCombining `dimensions[]` with `interval` is not supported yet. `queries[]` filters the underlying events using standard Utopia query syntax.", + "responses": { + "200": { + "description": "AnalyticsMetricList", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/analyticsMetricList" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "metrics", + "demo": "analytics\/list-metrics.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "analytics.read", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + }, + "server": { + "Project": [], + "Key": [] + } + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "propertyId", + "description": "Analytics property unique ID.", + "required": true, + "schema": { + "type": "string", + "example": "<PROPERTY_ID>" + }, + "in": "path" + }, + { + "name": "queries", + "description": "Up to 10 filter queries in Utopia syntax. Allowed attributes: country, region, city, browser, operatingSystem, device, screenSize, referrerSource, channel, utmSource, utmMedium, utmCampaign, utmContent, utmTerm, page, hostname, botName, botCategory, eventName. page, eventName are only accepted alongside `interval`, or with a breakdown on a dimension other than entryPage, exitPage. Allowed methods: equal, notEqual, contains, startsWith, endsWith. Example: `queries[]=equal(\"country\", [\"US\"])`.", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + }, + "default": [] + }, + "in": "query" + }, + { + "name": "interval", + "description": "Time bucket size. Omit (null) for a flat aggregate over the whole window. Allowed: 1h, 1d, 1w, 1m.", + "required": false, + "schema": { + "type": "string", + "example": "1h", + "title": "AnalyticsInterval", + "oneOf": [ + { + "type": "string", + "enum": [ + "1h" + ], + "title": "One Hour" + }, + { + "type": "string", + "enum": [ + "1d" + ], + "title": "One Day" + }, + { + "type": "string", + "enum": [ + "1w" + ], + "title": "One Week" + }, + { + "type": "string", + "enum": [ + "1m" + ], + "title": "One Month" + } + ] + }, + "in": "query" + }, + { + "name": "dimensions", + "description": "Dimension to break the metrics down by. One at most for now; the parameter is a list so that cap can be raised without a breaking change. Allowed: country, region, city, browser, operatingSystem, device, screenSize, referrerSource, channel, utmSource, utmMedium, utmCampaign, utmContent, utmTerm, page, hostname, entryPage, exitPage, trafficType, botName, botCategory, eventName.", + "required": false, + "schema": { + "type": "array", + "items": { + "title": "AnalyticsDimension", + "type": "string", + "oneOf": [ + { + "type": "string", + "enum": [ + "country" + ], + "title": "country" + }, + { + "type": "string", + "enum": [ + "region" + ], + "title": "region" + }, + { + "type": "string", + "enum": [ + "city" + ], + "title": "city" + }, + { + "type": "string", + "enum": [ + "browser" + ], + "title": "browser" + }, + { + "type": "string", + "enum": [ + "operatingSystem" + ], + "title": "operatingSystem" + }, + { + "type": "string", + "enum": [ + "device" + ], + "title": "device" + }, + { + "type": "string", + "enum": [ + "screenSize" + ], + "title": "screenSize" + }, + { + "type": "string", + "enum": [ + "referrerSource" + ], + "title": "referrerSource" + }, + { + "type": "string", + "enum": [ + "channel" + ], + "title": "channel" + }, + { + "type": "string", + "enum": [ + "utmSource" + ], + "title": "utmSource" + }, + { + "type": "string", + "enum": [ + "utmMedium" + ], + "title": "utmMedium" + }, + { + "type": "string", + "enum": [ + "utmCampaign" + ], + "title": "utmCampaign" + }, + { + "type": "string", + "enum": [ + "utmContent" + ], + "title": "utmContent" + }, + { + "type": "string", + "enum": [ + "utmTerm" + ], + "title": "utmTerm" + }, + { + "type": "string", + "enum": [ + "page" + ], + "title": "page" + }, + { + "type": "string", + "enum": [ + "hostname" + ], + "title": "hostname" + }, + { + "type": "string", + "enum": [ + "entryPage" + ], + "title": "entryPage" + }, + { + "type": "string", + "enum": [ + "exitPage" + ], + "title": "exitPage" + }, + { + "type": "string", + "enum": [ + "trafficType" + ], + "title": "trafficType" + }, + { + "type": "string", + "enum": [ + "botName" + ], + "title": "botName" + }, + { + "type": "string", + "enum": [ + "botCategory" + ], + "title": "botCategory" + }, + { + "type": "string", + "enum": [ + "eventName" + ], + "title": "eventName" + } + ] + }, + "default": [] + }, + "in": "query" + }, + { + "name": "dateRange", + "description": "Date range shorthand (e.g. 7d, 30d). Ignored for any bound you supply explicitly via startAt\/endAt.", + "required": false, + "schema": { + "type": "string", + "example": "<DATE_RANGE>", + "default": "30d" + }, + "in": "query" + }, + { + "name": "startAt", + "description": "Explicit window start in ISO 8601. Defaults to endAt minus dateRange.", + "required": false, + "schema": { + "type": "string", + "format": "datetime", + "example": "2020-10-15T06:38:00.000+00:00", + "default": "" + }, + "in": "query" + }, + { + "name": "endAt", + "description": "Explicit window end in ISO 8601. Defaults to the current time.", + "required": false, + "schema": { + "type": "string", + "format": "datetime", + "example": "2020-10-15T06:38:00.000+00:00", + "default": "" + }, + "in": "query" + }, + { + "name": "limit", + "description": "Maximum number of ranked values to return.", + "required": false, + "schema": { + "type": "integer", + "format": "int32", + "example": 1, + "default": 100 + }, + "in": "query" + } + ] + } + }, "\/apps": { "get": { "summary": "List Applications", @@ -12147,7 +13119,7 @@ "tags": [ "avatars" ], - "description": "Returns the best available profile photo for a user. The endpoint tries each source in priority order and returns the first successful result: OAuth2 identity photo, Gravatar, Libravatar, Appwrite Initials, built-in static fallback.\n\nPassing `userId` \u2014 `current()` for the authenticated user \u2014 resolves the photo from everything known about that user: identity photos, email, and name. An explicit `emailHash` or `name` then overrides just that value, and the user's remaining sources stay in the chain. Without `userId`, passing `emailHash` and\/or `name` resolves the avatar from those values alone: the hash is looked up on Gravatar and Libravatar, the name is rendered as initials, and the session user stays out of the chain so their own photo never shadows the avatar being asked for. When nothing is passed, the photo resolves for the currently authenticated user. Emails are only ever accepted pre-hashed, so no address ends up in a URL.", + "description": "Returns the best available profile photo for a user. The endpoint tries each source in priority order and returns the first successful result: a custom uploaded photo (see avatars.updatePhoto), OAuth2 identity photo, Gravatar, Libravatar, Appwrite Initials, built-in static fallback.\n\nPassing `userId` \u2014 `current()` for the authenticated user \u2014 resolves the photo from everything known about that user: identity photos, email, and name. An explicit `emailHash` or `name` then overrides just that value, and the user's remaining sources stay in the chain. Without `userId`, passing `emailHash` and\/or `name` resolves the avatar from those values alone: the hash is looked up on Gravatar and Libravatar, the name is rendered as initials, and the session user stays out of the chain so their own photo never shadows the avatar being asked for. When nothing is passed, the photo resolves for the currently authenticated user. Emails are only ever accepted pre-hashed, so no address ends up in a URL.", "responses": { "200": { "description": "Image", @@ -12300,6 +13272,128 @@ "in": "query" } ] + }, + "put": { + "summary": "Update photo", + "operationId": "avatarsUpdatePhoto", + "tags": [ + "avatars" + ], + "description": "Update the profile photo of the currently authenticated user. The uploaded image takes priority over every other photo source, including OAuth2 identity photos, Gravatar, and Libravatar. Updating an already customized photo replaces it. The image must be at most 5MB and is sent in a single request.", + "responses": { + "200": { + "description": "Account", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/account" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": null, + "demo": "avatars\/update-photo.md", + "rate-limit": 60, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": "avatars.write", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + }, + "client": { + "Project": [] + }, + "server": { + "Project": [], + "Session": [] + } + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ], + "requestBody": { + "content": { + "multipart\/form-data": { + "schema": { + "type": "object", + "properties": { + "file": { + "description": "Binary image file of at most 5MB. Allowed file types are png, jpg, jpeg, and webp.", + "type": "string", + "format": "binary" + } + }, + "required": [ + "file" + ] + } + } + } + } + }, + "delete": { + "summary": "Delete photo", + "operationId": "avatarsDeletePhoto", + "tags": [ + "avatars" + ], + "description": "Delete the profile photo of the currently authenticated user and store the built-in static placeholder in its place. The placeholder is the user's photo from then on, so it takes priority over every other photo source \u2014 OAuth2 identity photos, Gravatar, Libravatar, and initials \u2014 until a new photo is uploaded with avatars.updatePhoto.", + "responses": { + "204": { + "description": "No content" + } + }, + "deprecated": false, + "x-appwrite": { + "group": null, + "demo": "avatars\/delete-photo.md", + "rate-limit": 60, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": "avatars.write", + "platforms": [ + "console", + "client", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + }, + "client": { + "Project": [] + }, + "server": { + "Project": [], + "Session": [] + } + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ] } }, "\/avatars\/qr": { @@ -12499,14 +13593,13 @@ }, { "name": "headers", - "description": "HTTP headers to send with the browser request. Defaults to empty.", + "description": "HTTP headers to send with the browser request. Only Accept and Accept-Language are allowed. Defaults to empty.", "required": false, "schema": { "type": "object", "default": {}, "example": { - "Authorization": "Bearer token123", - "X-Custom-Header": "value" + "Accept-Language": "en-US,en;q=0.9" } }, "in": "query" @@ -17226,6 +18319,19 @@ { "Project": [] } + ], + "parameters": [ + { + "name": "total", + "description": "When set to false, the total count returned will be 0 and will not be calculated.", + "required": false, + "schema": { + "type": "boolean", + "example": false, + "default": true + }, + "in": "query" + } ] } }, @@ -17685,6 +18791,19 @@ { "Project": [] } + ], + "parameters": [ + { + "name": "total", + "description": "When set to false, the total count returned will be 0 and will not be calculated.", + "required": false, + "schema": { + "type": "boolean", + "example": false, + "default": true + }, + "in": "query" + } ] } }, @@ -17731,6 +18850,19 @@ { "Project": [] } + ], + "parameters": [ + { + "name": "total", + "description": "When set to false, the total count returned will be 0 and will not be calculated.", + "required": false, + "schema": { + "type": "boolean", + "example": false, + "default": true + }, + "in": "query" + } ] } }, @@ -18693,6 +19825,13 @@ ], "title": "transaction_logs" }, + { + "type": "string", + "enum": [ + "analyticsproperties" + ], + "title": "analytics_properties" + }, { "type": "string", "enum": [ @@ -20211,6 +21350,17 @@ "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", + "example": false, + "default": true + }, + "in": "query" } ] }, @@ -20456,6 +21606,20 @@ "example": false } } + }, + "examples": { + "commit": { + "summary": "Commit the transaction", + "value": { + "commit": true + } + }, + "rollback": { + "summary": "Roll back the transaction", + "value": { + "rollback": true + } + } } } } @@ -20625,6 +21789,24 @@ } } } + }, + "examples": { + "createDocument": { + "summary": "Stage a document creation", + "value": { + "operations": [ + { + "action": "create", + "databaseId": "<DATABASE_ID>", + "collectionId": "<COLLECTION_ID>", + "documentId": "<DOCUMENT_ID>", + "data": { + "username": "walter.obrien" + } + } + ] + } + } } } } @@ -27040,6 +28222,16 @@ "description": "Array of documents data as JSON objects.", "type": "array", "default": [], + "example": [ + { + "$id": "example1", + "username": "walter.obrien", + "email": "walter.obrien@example.com", + "fullName": "Walter O'Brien", + "age": 30, + "isAdmin": false + } + ], "items": { "type": "object" } @@ -27188,6 +28380,16 @@ "documents": { "description": "Array of document data as JSON objects. May contain partial documents.", "type": "array", + "example": [ + { + "$id": "example1", + "username": "walter.obrien", + "email": "walter.obrien@example.com", + "fullName": "Walter O'Brien", + "age": 30, + "isAdmin": false + } + ], "items": { "type": "object" } @@ -27315,6 +28517,19 @@ "nullable": true } } + }, + "examples": { + "updateSelected": { + "summary": "Update explicitly selected documents", + "value": { + "data": { + "username": "walter.obrien" + }, + "queries": [ + "{\"method\":\"equal\",\"attribute\":\"$id\",\"values\":[\"<DOCUMENT_ID>\"]}" + ] + } + } } } } @@ -27403,6 +28618,9 @@ "items": { "type": "string" }, + "example": [ + "{\"method\":\"equal\",\"attribute\":\"$id\",\"values\":[\"<DOCUMENT_ID>\"]}" + ], "default": [] }, "in": "query" @@ -27713,6 +28931,20 @@ "nullable": true } } + }, + "examples": { + "upsert": { + "summary": "Create or update document data", + "value": { + "data": { + "username": "walter.obrien", + "email": "walter.obrien@example.com", + "fullName": "Walter O'Brien", + "age": 30, + "isAdmin": false + } + } + } } } } @@ -27845,6 +29077,16 @@ "nullable": true } } + }, + "examples": { + "update": { + "summary": "Update document data", + "value": { + "data": { + "username": "walter.obrien" + } + } + } } } } @@ -28442,6 +29684,9 @@ "attributes": { "description": "Array of attributes to index. Maximum of 100 attributes are allowed, each 32 characters long.", "type": "array", + "example": [ + "username" + ], "items": { "type": "string" } @@ -28957,6 +30202,17 @@ "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", + "example": false, + "default": true + }, + "in": "query" } ] }, @@ -29190,6 +30446,20 @@ "example": false } } + }, + "examples": { + "commit": { + "summary": "Commit the transaction", + "value": { + "commit": true + } + }, + "rollback": { + "summary": "Roll back the transaction", + "value": { + "rollback": true + } + } } } } @@ -29347,6 +30617,24 @@ } } } + }, + "examples": { + "createDocument": { + "summary": "Stage a document creation", + "value": { + "operations": [ + { + "action": "create", + "databaseId": "<DATABASE_ID>", + "collectionId": "<COLLECTION_ID>", + "documentId": "<DOCUMENT_ID>", + "data": { + "username": "walter.obrien" + } + } + ] + } + } } } } @@ -30389,6 +31677,16 @@ "description": "Array of documents data as JSON objects.", "type": "array", "default": [], + "example": [ + { + "$id": "example1", + "username": "walter.obrien", + "email": "walter.obrien@example.com", + "fullName": "Walter O'Brien", + "age": 30, + "isAdmin": false + } + ], "items": { "type": "object" } @@ -30528,6 +31826,16 @@ "documents": { "description": "Array of document data as JSON objects. May contain partial documents.", "type": "array", + "example": [ + { + "$id": "example1", + "username": "walter.obrien", + "email": "walter.obrien@example.com", + "fullName": "Walter O'Brien", + "age": 30, + "isAdmin": false + } + ], "items": { "type": "object" } @@ -30643,6 +31951,19 @@ "example": "<TRANSACTION_ID>" } } + }, + "examples": { + "updateSelected": { + "summary": "Update explicitly selected documents", + "value": { + "data": { + "username": "walter.obrien" + }, + "queries": [ + "{\"method\":\"equal\",\"attribute\":\"$id\",\"values\":[\"<DOCUMENT_ID>\"]}" + ] + } + } } } } @@ -30727,6 +32048,9 @@ "items": { "type": "string" }, + "example": [ + "{\"method\":\"equal\",\"attribute\":\"$id\",\"values\":[\"<DOCUMENT_ID>\"]}" + ], "default": [] }, "in": "query" @@ -31017,6 +32341,16 @@ "example": "<TRANSACTION_ID>" } } + }, + "examples": { + "upsert": { + "summary": "Create or update document data", + "value": { + "data": { + "username": "walter.obrien" + } + } + } } } } @@ -31137,6 +32471,16 @@ "example": "<TRANSACTION_ID>" } } + }, + "examples": { + "update": { + "summary": "Update document data", + "value": { + "data": { + "username": "walter.obrien" + } + } + } } } } @@ -31703,6 +33047,9 @@ "attributes": { "description": "Array of attributes to index. Maximum of 100 attributes are allowed, each 32 characters long.", "type": "array", + "example": [ + "username" + ], "items": { "type": "string" } @@ -37107,6 +38454,10 @@ "texts": { "description": "Array of text to generate embeddings.", "type": "array", + "example": [ + "Appwrite helps developers build applications.", + "Find documents with semantic search." + ], "items": { "type": "string" } @@ -38664,6 +40015,13 @@ ], "title": "avatars.read" }, + { + "type": "string", + "enum": [ + "avatars.write" + ], + "title": "avatars.write" + }, { "type": "string", "enum": [ @@ -38887,6 +40245,20 @@ "oauth2.introspect" ], "title": "oauth2.introspect" + }, + { + "type": "string", + "enum": [ + "analytics.read" + ], + "title": "analytics.read" + }, + { + "type": "string", + "enum": [ + "analytics.write" + ], + "title": "analytics.write" } ] } @@ -39017,6 +40389,19 @@ "Project": [], "Key": [] } + ], + "parameters": [ + { + "name": "total", + "description": "When set to false, the total count returned will be 0 and will not be calculated.", + "required": false, + "schema": { + "type": "boolean", + "example": false, + "default": true + }, + "in": "query" + } ] } }, @@ -39081,6 +40466,17 @@ "default": "runtimes" }, "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", + "example": false, + "default": true + }, + "in": "query" } ] } @@ -41474,6 +42870,13 @@ ], "title": "avatars.read" }, + { + "type": "string", + "enum": [ + "avatars.write" + ], + "title": "avatars.write" + }, { "type": "string", "enum": [ @@ -41697,6 +43100,20 @@ "oauth2.introspect" ], "title": "oauth2.introspect" + }, + { + "type": "string", + "enum": [ + "analytics.read" + ], + "title": "analytics.read" + }, + { + "type": "string", + "enum": [ + "analytics.write" + ], + "title": "analytics.write" } ] } @@ -43700,7 +45117,9 @@ "description": "The query or queries to execute.", "type": "object", "default": {}, - "example": {} + "example": { + "query": "query { localeGet { ip } }" + } } }, "required": [ @@ -43778,7 +45197,9 @@ "description": "The query or queries to execute.", "type": "object", "default": {}, - "example": {} + "example": { + "query": "mutation { accountUpdateName(name: \"Walter\") { name } }" + } } }, "required": [ @@ -43790,6 +45211,261 @@ } } }, + "\/growth\/conversations": { + "post": { + "summary": "Create a conversation", + "operationId": "growthCreateConversation", + "tags": [ + "growth" + ], + "description": "Create a conversation with the Appwrite team: support requests, product and docs feedback, enterprise, startup and partner applications, and event sponsorship requests. Signed in console users are identified by their session or JWT; everyone else must pass an email. Attach a file of up to 5MB to support and feedback conversations.", + "responses": { + "201": { + "description": "Growth Conversation", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/growthConversation" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": null, + "demo": "growth\/create-conversation.md", + "rate-limit": 10, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip},type:{param-type}", + "scope": "public", + "platforms": [ + "console" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + } + } + }, + "security": [ + { + "Project": [] + } + ], + "requestBody": { + "content": { + "multipart\/form-data": { + "schema": { + "type": "object", + "properties": { + "type": { + "description": "Conversation type.", + "type": "string", + "example": "support", + "title": "ConversationType", + "oneOf": [ + { + "type": "string", + "enum": [ + "support" + ], + "title": "support" + }, + { + "type": "string", + "enum": [ + "feedback" + ], + "title": "feedback" + }, + { + "type": "string", + "enum": [ + "docs" + ], + "title": "docs" + }, + { + "type": "string", + "enum": [ + "enterprise" + ], + "title": "enterprise" + }, + { + "type": "string", + "enum": [ + "startup" + ], + "title": "startup" + }, + { + "type": "string", + "enum": [ + "partner" + ], + "title": "partner" + }, + { + "type": "string", + "enum": [ + "sponsorship" + ], + "title": "sponsorship" + } + ] + }, + "email": { + "description": "Email address to reply to. Required without a console session, ignored with one.", + "type": "string", + "default": "", + "example": "email@example.com", + "format": "email" + }, + "name": { + "description": "Name of the person filing the conversation. Required for enterprise, startup, partner and sponsorship.", + "type": "string", + "default": "", + "example": "<NAME>" + }, + "subject": { + "description": "Conversation subject.", + "type": "string", + "default": "", + "example": "<SUBJECT>" + }, + "message": { + "description": "Conversation message. Required for support, feedback, enterprise and partner.", + "type": "string", + "default": "", + "example": "<MESSAGE>" + }, + "organizationId": { + "description": "Organization ID the conversation is about. Kept only when the session user is a member.", + "type": "string", + "default": "", + "example": "<ORGANIZATION_ID>" + }, + "projectId": { + "description": "Project ID the conversation is about. Kept only when it belongs to the kept organization.", + "type": "string", + "default": "", + "example": "<PROJECT_ID>" + }, + "attributes": { + "description": "Additional attributes for the conversation type, as an object or a JSON string.", + "type": "object", + "default": {}, + "example": {} + }, + "attachment": { + "description": "File attachment, support and feedback only, max 5MB.", + "type": "string", + "default": [], + "format": "binary" + } + }, + "required": [ + "type" + ] + }, + "examples": { + "support": { + "summary": "Ask for support", + "value": { + "type": "support", + "email": "walter.obrien@example.com", + "subject": "Custom domain stuck on verifying", + "message": "The domain has been verifying for two hours.", + "projectId": "<PROJECT_ID>" + } + }, + "feedback": { + "summary": "Share product feedback", + "value": { + "type": "feedback", + "email": "walter.obrien@example.com", + "message": "The usage page would help more with a daily breakdown.", + "attributes": { + "npsScore": 9 + } + } + }, + "docs": { + "summary": "Rate a docs page", + "value": { + "type": "docs", + "email": "walter.obrien@example.com", + "attributes": { + "rating": "positive", + "route": "\/docs\/products\/auth" + } + } + }, + "enterprise": { + "summary": "Contact sales about Enterprise", + "value": { + "type": "enterprise", + "email": "walter.obrien@example.com", + "name": "Walter O'Brien", + "message": "We need SSO and a dedicated region.", + "attributes": { + "companyName": "Acme", + "companySize": "500-1000", + "companyWebsite": "https:\/\/acme.example" + } + } + }, + "startup": { + "summary": "Apply to the startups program", + "value": { + "type": "startup", + "email": "walter.obrien@example.com", + "name": "Walter O'Brien", + "attributes": { + "companyName": "Acme", + "companyUrl": "https:\/\/acme.example" + } + } + }, + "partner": { + "summary": "Apply to become a partner", + "value": { + "type": "partner", + "email": "walter.obrien@example.com", + "name": "Walter O'Brien", + "message": "We build Appwrite projects for agencies.", + "attributes": { + "companyName": "Acme", + "companyUrl": "https:\/\/acme.example" + } + } + }, + "sponsorship": { + "summary": "Request an event sponsorship", + "value": { + "type": "sponsorship", + "email": "walter.obrien@example.com", + "name": "Walter O'Brien", + "attributes": { + "eventName": "Acme Dev Summit", + "eventDate": "2026-11-14", + "eventType": "in person", + "socialHandles": "@acme", + "estimatedAttendees": 300, + "eventPublicWebLink": "https:\/\/summit.acme.example" + } + } + } + } + } + } + } + } + }, "\/growth\/installations": { "post": { "summary": "Record a self-hosted installation", @@ -43807,17 +45483,22 @@ "x-appwrite": { "group": null, "demo": "growth\/create-installation.md", - "rate-limit": 0, + "rate-limit": 10, "rate-time": 3600, - "rate-key": "url:{url},ip:{ip}", + "rate-key": [ + "url:{url},domain:{param-domain}", + "url:{url},ip:{ip}" + ], "scope": "public", "platforms": [ - "manager" + "console" ], "packaging": false, "public": true, "auth": { - "manager": [] + "console": { + "Project": [] + } } }, "security": [ @@ -44017,6 +45698,19 @@ "Key": [], "JWT": [] } + ], + "parameters": [ + { + "name": "total", + "description": "When set to false, the total count returned will be 0 and will not be calculated.", + "required": false, + "schema": { + "type": "boolean", + "example": false, + "default": true + }, + "in": "query" + } ] } }, @@ -44075,6 +45769,19 @@ "Key": [], "JWT": [] } + ], + "parameters": [ + { + "name": "total", + "description": "When set to false, the total count returned will be 0 and will not be calculated.", + "required": false, + "schema": { + "type": "boolean", + "example": false, + "default": true + }, + "in": "query" + } ] } }, @@ -44133,6 +45840,19 @@ "Key": [], "JWT": [] } + ], + "parameters": [ + { + "name": "total", + "description": "When set to false, the total count returned will be 0 and will not be calculated.", + "required": false, + "schema": { + "type": "boolean", + "example": false, + "default": true + }, + "in": "query" + } ] } }, @@ -44191,6 +45911,19 @@ "Key": [], "JWT": [] } + ], + "parameters": [ + { + "name": "total", + "description": "When set to false, the total count returned will be 0 and will not be calculated.", + "required": false, + "schema": { + "type": "boolean", + "example": false, + "default": true + }, + "in": "query" + } ] } }, @@ -44249,6 +45982,19 @@ "Key": [], "JWT": [] } + ], + "parameters": [ + { + "name": "total", + "description": "When set to false, the total count returned will be 0 and will not be calculated.", + "required": false, + "schema": { + "type": "boolean", + "example": false, + "default": true + }, + "in": "query" + } ] } }, @@ -44307,6 +46053,19 @@ "Key": [], "JWT": [] } + ], + "parameters": [ + { + "name": "total", + "description": "When set to false, the total count returned will be 0 and will not be calculated.", + "required": false, + "schema": { + "type": "boolean", + "example": false, + "default": true + }, + "in": "query" + } ] } }, @@ -44365,6 +46124,19 @@ "Key": [], "JWT": [] } + ], + "parameters": [ + { + "name": "total", + "description": "When set to false, the total count returned will be 0 and will not be calculated.", + "required": false, + "schema": { + "type": "boolean", + "example": false, + "default": true + }, + "in": "query" + } ] } }, @@ -45512,6 +47284,74 @@ } } }, + "\/manager\/organizations\/status": { + "patch": { + "summary": "Update an organization status by ID", + "operationId": "managerUpdateOrganizationStatus", + "tags": [ + "manager" + ], + "description": "Blocks or unblocks an organization, the same way a billing-limit block does. Blocking makes the organization read-only, disables its backup policies and spins down its dedicated databases.", + "responses": { + "200": { + "description": "Organization", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/organization" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "organizations", + "demo": "manager\/update-organization-status.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "", + "platforms": [ + "manager", + "console" + ], + "packaging": false, + "public": true + }, + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "teamId": { + "description": "Organization ID.", + "type": "string", + "example": "<TEAM_ID>" + }, + "status": { + "description": "Organization status. Set to `false` to block and `true` to unblock.", + "type": "boolean", + "example": false + }, + "reason": { + "description": "Optional reason when blocking, kept in the audit trail.", + "type": "string", + "default": "", + "example": "<REASON>" + } + }, + "required": [ + "teamId", + "status" + ] + } + } + } + } + } + }, "\/manager\/projects\/{projectId}\/databases\/{databaseId}": { "get": { "summary": "Get database routing info", @@ -46029,7 +47869,7 @@ "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. You may filter on the following attributes: scheduledAt, deliveredAt, deliveredTotal, status, description, providerType", + "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: scheduledAt, deliveredAt, deliveredTotal, status, description, providerType, users, targets", "required": false, "schema": { "type": "array", @@ -46223,6 +48063,17 @@ "subject", "content" ] + }, + "examples": { + "draft": { + "summary": "Create an email draft without sending it", + "value": { + "messageId": "<MESSAGE_ID>", + "subject": "Welcome", + "content": "Welcome to our app.", + "draft": true + } + } } } } @@ -46297,6 +48148,18 @@ "schema": { "type": "object", "properties": { + "subject": { + "description": "Email Subject.", + "type": "string", + "example": "<SUBJECT>", + "nullable": true + }, + "content": { + "description": "Email Content.", + "type": "string", + "example": "<CONTENT>", + "nullable": true + }, "topics": { "description": "List of Topic IDs.", "type": "array", @@ -46321,30 +48184,6 @@ }, "nullable": true }, - "subject": { - "description": "Email Subject.", - "type": "string", - "example": "<SUBJECT>", - "nullable": true - }, - "content": { - "description": "Email Content.", - "type": "string", - "example": "<CONTENT>", - "nullable": true - }, - "draft": { - "description": "Is message a draft", - "type": "boolean", - "example": false, - "nullable": true - }, - "html": { - "description": "Is content of type HTML", - "type": "boolean", - "example": false, - "nullable": true - }, "cc": { "description": "Array of target IDs to be added as CC.", "type": "array", @@ -46361,6 +48200,14 @@ }, "nullable": true }, + "attachments": { + "description": "Array of compound ID strings of bucket IDs and file IDs to be attached to the email. They should be formatted as <BUCKET_ID>:<FILE_ID>.", + "type": "array", + "items": { + "type": "string" + }, + "nullable": true + }, "replyToEmail": { "description": "Email address to reply to. Pass an empty string to restore the provider or sender default.", "type": "string", @@ -46374,20 +48221,24 @@ "example": "<REPLY_TO_NAME>", "nullable": true }, + "draft": { + "description": "Is message a draft", + "type": "boolean", + "example": false, + "nullable": true + }, + "html": { + "description": "Is content of type HTML", + "type": "boolean", + "example": false, + "nullable": true + }, "scheduledAt": { "description": "Scheduled delivery time for message in [ISO 8601](https:\/\/www.iso.org\/iso-8601-date-and-time-format.html) format. DateTime value must be in future.", "type": "string", "example": "2020-10-15T06:38:00.000+00:00", "format": "datetime", "nullable": true - }, - "attachments": { - "description": "Array of compound ID strings of bucket IDs and file IDs to be attached to the email. They should be formatted as <BUCKET_ID>:<FILE_ID>.", - "type": "array", - "items": { - "type": "string" - }, - "nullable": true } } } @@ -46590,11 +48441,28 @@ "title": "high" } ] + }, + "channelId": { + "description": "ID of the notification channel to deliver the notification on. The app must have already created a channel with this ID, otherwise the channel from the app manifest is used. Available only for Android Platform.", + "type": "string", + "default": "", + "example": "<CHANNEL_ID>" } }, "required": [ "messageId" ] + }, + "examples": { + "draft": { + "summary": "Create a push notification draft without sending it", + "value": { + "messageId": "<MESSAGE_ID>", + "title": "Welcome", + "body": "Welcome to our app.", + "draft": true + } + } } } } @@ -46669,6 +48537,18 @@ "schema": { "type": "object", "properties": { + "title": { + "description": "Title for push notification.", + "type": "string", + "example": "<TITLE>", + "nullable": true + }, + "body": { + "description": "Body for push notification.", + "type": "string", + "example": "<BODY>", + "nullable": true + }, "topics": { "description": "List of Topic IDs.", "type": "array", @@ -46693,18 +48573,6 @@ }, "nullable": true }, - "title": { - "description": "Title for push notification.", - "type": "string", - "example": "<TITLE>", - "nullable": true - }, - "body": { - "description": "Body for push notification.", - "type": "string", - "example": "<BODY>", - "nullable": true - }, "data": { "description": "Additional Data for push notification.", "type": "object", @@ -46802,6 +48670,12 @@ } ], "nullable": true + }, + "channelId": { + "description": "ID of the notification channel to deliver the notification on. The app must have already created a channel with this ID, otherwise the channel from the app manifest is used. Pass an empty string to clear it. Available only for Android platforms.", + "type": "string", + "example": "<CHANNEL_ID>", + "nullable": true } } } @@ -47008,6 +48882,16 @@ "messageId", "content" ] + }, + "examples": { + "draft": { + "summary": "Create an SMS draft without sending it", + "value": { + "messageId": "<MESSAGE_ID>", + "content": "Welcome to our app.", + "draft": true + } + } } } } @@ -47072,10 +48956,10 @@ }, "parameters": [ "messageId", + "content", "topics", "users", "targets", - "content", "draft", "scheduledAt" ], @@ -47115,10 +48999,10 @@ }, "parameters": [ "messageId", + "content", "topics", "users", "targets", - "content", "draft", "scheduledAt" ], @@ -47170,6 +49054,12 @@ "schema": { "type": "object", "properties": { + "content": { + "description": "Email Content.", + "type": "string", + "example": "<CONTENT>", + "nullable": true + }, "topics": { "description": "List of Topic IDs.", "type": "array", @@ -47194,12 +49084,6 @@ }, "nullable": true }, - "content": { - "description": "Email Content.", - "type": "string", - "example": "<CONTENT>", - "nullable": true - }, "draft": { "description": "Is message a draft", "type": "boolean", @@ -52058,6 +53942,9 @@ "resources": { "description": "List of resources to migrate", "type": "array", + "example": [ + "user" + ], "items": { "title": "AppwriteMigrationResource", "type": "string", @@ -53059,6 +54946,9 @@ "resources": { "description": "List of resources to migrate", "type": "array", + "example": [ + "user" + ], "items": { "title": "FirebaseMigrationResource", "type": "string", @@ -53278,7 +55168,10 @@ "title": "file" } ] - } + }, + "example": [ + "user" + ] }, "in": "query" }, @@ -53566,6 +55459,9 @@ "resources": { "description": "List of resources to migrate", "type": "array", + "example": [ + "user" + ], "items": { "title": "NHostMigrationResource", "type": "string", @@ -53837,7 +55733,10 @@ "title": "file" } ] - } + }, + "example": [ + "user" + ] }, "in": "query" }, @@ -53970,6 +55869,9 @@ "resources": { "description": "List of resources to migrate", "type": "array", + "example": [ + "user" + ], "items": { "title": "SupabaseMigrationResource", "type": "string", @@ -54236,7 +56138,10 @@ "title": "file" } ] - } + }, + "example": [ + "user" + ] }, "in": "query" }, @@ -56891,6 +58796,22 @@ "nullable": true } } + }, + "examples": { + "backup": { + "summary": "Restore from a backup", + "value": { + "type": "backup", + "backupId": "<BACKUP_ID>" + } + }, + "pitr": { + "summary": "Restore to a point in time within the PITR retention window", + "value": { + "type": "pitr", + "targetTime": "2026-01-01T00:00:00.000+00:00" + } + } } } } @@ -59823,6 +61744,22 @@ "nullable": true } } + }, + "examples": { + "backup": { + "summary": "Restore from a backup", + "value": { + "type": "backup", + "backupId": "<BACKUP_ID>" + } + }, + "pitr": { + "summary": "Restore to a point in time within the PITR retention window", + "value": { + "type": "pitr", + "targetTime": "2026-01-01T00:00:00.000+00:00" + } + } } } } @@ -60107,6 +62044,17 @@ "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", + "example": false, + "default": true + }, + "in": "query" } ] } @@ -60964,6 +62912,105 @@ ] } }, + "\/oauth2\/{project_id}\/introspect": { + "post": { + "summary": "OAuth2 Introspect", + "operationId": "oauth2Introspect", + "tags": [ + "oauth2" + ], + "description": "Introspect an OAuth2 access token or refresh token. Authenticate with an API key holding the `oauth2.introspect` scope to introspect any token in the project, or with the client credentials of the app the token was issued to.", + "responses": { + "200": { + "description": "OAuth2 Introspection", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/oauth2Introspection" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "tokens", + "demo": "oauth2\/introspect.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "url:{url},ip:{ip}", + "scope": "global", + "platforms": [ + "server" + ], + "packaging": false, + "public": true, + "config": { + "project_id": "project" + }, + "auth": { + "server": { + "Project": [], + "Key": [] + } + } + }, + "security": [ + { + "Key": [] + } + ], + "parameters": [ + { + "name": "project_id", + "description": "Project ID in which OAuth2 client exists.", + "required": true, + "schema": { + "type": "string", + "example": "<PROJECT_ID>" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "token": { + "description": "The access token or refresh token to introspect.", + "type": "string", + "example": "<TOKEN>" + }, + "token_type_hint": { + "description": "Type of token to introspect. Can be one of: `access_token` or `refresh_token`.", + "type": "string", + "default": "", + "example": "access_token" + }, + "client_id": { + "description": "OAuth2 client ID. Either a registered app ID or an HTTPS client ID metadata document URL.", + "type": "string", + "default": "", + "example": "<CLIENT_ID>" + }, + "client_secret": { + "description": "OAuth2 client secret.", + "type": "string", + "default": "", + "example": "<CLIENT_SECRET>" + } + }, + "required": [ + "token" + ] + } + } + } + } + } + }, "\/oauth2\/{project_id}\/logout": { "get": { "summary": "OAuth2 Logout", @@ -61910,6 +63957,34 @@ "required": [ "grant_type" ] + }, + "examples": { + "authorizationCode": { + "summary": "Exchange an authorization code", + "value": { + "grant_type": "authorization_code", + "code": "<CODE>", + "redirect_uri": "https:\/\/example.com\/callback", + "client_id": "<CLIENT_ID>", + "code_verifier": "<CODE_VERIFIER>" + } + }, + "refreshToken": { + "summary": "Refresh an access token", + "value": { + "grant_type": "refresh_token", + "refresh_token": "<REFRESH_TOKEN>", + "client_id": "<CLIENT_ID>" + } + }, + "deviceCode": { + "summary": "Exchange a device code", + "value": { + "grant_type": "urn:ietf:params:oauth:grant-type:device_code", + "device_code": "<DEVICE_CODE>", + "client_id": "<CLIENT_ID>" + } + } } } } @@ -64017,6 +66092,9 @@ "scopes": { "description": "Key scopes list. Maximum of 200 scopes are allowed.", "type": "array", + "example": [ + "users.read" + ], "items": { "title": "ProjectKeyScopes", "type": "string", @@ -64651,6 +66729,13 @@ ], "title": "avatars.read" }, + { + "type": "string", + "enum": [ + "avatars.write" + ], + "title": "avatars.write" + }, { "type": "string", "enum": [ @@ -64874,6 +66959,20 @@ "oauth2.introspect" ], "title": "oauth2.introspect" + }, + { + "type": "string", + "enum": [ + "analytics.read" + ], + "title": "analytics.read" + }, + { + "type": "string", + "enum": [ + "analytics.write" + ], + "title": "analytics.write" } ] } @@ -64972,6 +67071,9 @@ "scopes": { "description": "Key scopes list. Maximum of 200 scopes are allowed.", "type": "array", + "example": [ + "users.read" + ], "items": { "title": "ProjectKeyScopes", "type": "string", @@ -65606,6 +67708,13 @@ ], "title": "avatars.read" }, + { + "type": "string", + "enum": [ + "avatars.write" + ], + "title": "avatars.write" + }, { "type": "string", "enum": [ @@ -65829,6 +67938,20 @@ "oauth2.introspect" ], "title": "oauth2.introspect" + }, + { + "type": "string", + "enum": [ + "analytics.read" + ], + "title": "analytics.read" + }, + { + "type": "string", + "enum": [ + "analytics.write" + ], + "title": "analytics.write" } ] } @@ -66016,6 +68139,9 @@ "scopes": { "description": "Key scopes list. Maximum of 200 scopes are allowed.", "type": "array", + "example": [ + "users.read" + ], "items": { "title": "ProjectKeyScopes", "type": "string", @@ -66650,6 +68776,13 @@ ], "title": "avatars.read" }, + { + "type": "string", + "enum": [ + "avatars.write" + ], + "title": "avatars.write" + }, { "type": "string", "enum": [ @@ -66873,6 +69006,20 @@ "oauth2.introspect" ], "title": "oauth2.introspect" + }, + { + "type": "string", + "enum": [ + "analytics.read" + ], + "title": "analytics.read" + }, + { + "type": "string", + "enum": [ + "analytics.write" + ], + "title": "analytics.write" } ] } @@ -73230,6 +75377,22 @@ "nullable": true } } + }, + "examples": { + "backup": { + "summary": "Restore from a backup", + "value": { + "type": "backup", + "backupId": "<BACKUP_ID>" + } + }, + "pitr": { + "summary": "Restore to a point in time within the PITR retention window", + "value": { + "type": "pitr", + "targetTime": "2026-01-01T00:00:00.000+00:00" + } + } } } } @@ -74513,6 +76676,9 @@ "scopes": { "description": "Key scopes list. Maximum of 200 scopes are allowed.", "type": "array", + "example": [ + "users.read" + ], "items": { "title": "ProjectKeyScopes", "type": "string", @@ -75147,6 +77313,13 @@ ], "title": "avatars.read" }, + { + "type": "string", + "enum": [ + "avatars.write" + ], + "title": "avatars.write" + }, { "type": "string", "enum": [ @@ -75370,6 +77543,20 @@ "oauth2.introspect" ], "title": "oauth2.introspect" + }, + { + "type": "string", + "enum": [ + "analytics.read" + ], + "title": "analytics.read" + }, + { + "type": "string", + "enum": [ + "analytics.write" + ], + "title": "analytics.write" } ] } @@ -75452,6 +77639,9 @@ "scopes": { "description": "Key scopes list. Maximum of 200 scopes are allowed.", "type": "array", + "example": [ + "users.read" + ], "items": { "title": "ProjectKeyScopes", "type": "string", @@ -76086,6 +78276,13 @@ ], "title": "avatars.read" }, + { + "type": "string", + "enum": [ + "avatars.write" + ], + "title": "avatars.write" + }, { "type": "string", "enum": [ @@ -76309,6 +78506,20 @@ "oauth2.introspect" ], "title": "oauth2.introspect" + }, + { + "type": "string", + "enum": [ + "analytics.read" + ], + "title": "analytics.read" + }, + { + "type": "string", + "enum": [ + "analytics.write" + ], + "title": "analytics.write" } ] } @@ -76468,6 +78679,9 @@ "scopes": { "description": "Key scopes list. Maximum of 200 scopes are allowed.", "type": "array", + "example": [ + "users.read" + ], "items": { "title": "ProjectKeyScopes", "type": "string", @@ -77102,6 +79316,13 @@ ], "title": "avatars.read" }, + { + "type": "string", + "enum": [ + "avatars.write" + ], + "title": "avatars.write" + }, { "type": "string", "enum": [ @@ -77325,6 +79546,20 @@ "oauth2.introspect" ], "title": "oauth2.introspect" + }, + { + "type": "string", + "enum": [ + "analytics.read" + ], + "title": "analytics.read" + }, + { + "type": "string", + "enum": [ + "analytics.write" + ], + "title": "analytics.write" } ] } @@ -77461,6 +79696,9 @@ "labels": { "description": "Array of project labels. Replaces the previous labels. Maximum of 1000 labels are allowed, each up to 36 alphanumeric characters long.", "type": "array", + "example": [ + "production" + ], "items": { "type": "string" } @@ -78431,6 +80669,38 @@ "example": "<ENDPOINT>", "nullable": true }, + "prompt": { + "description": "Array of Auth0 OAuth2 prompt values. If \"none\" is included, it must be the only element. \"none\" means: don't display any authentication or consent screens. \"login\" means: prompt the user to re-authenticate. \"consent\" means: prompt the user for consent. Pass an empty array to use the Auth0 default.", + "type": "array", + "items": { + "title": "ProjectOAuth2Auth0Prompt", + "type": "string", + "oneOf": [ + { + "type": "string", + "enum": [ + "none" + ], + "title": "none" + }, + { + "type": "string", + "enum": [ + "login" + ], + "title": "login" + }, + { + "type": "string", + "enum": [ + "consent" + ], + "title": "consent" + } + ] + }, + "nullable": true + }, "enabled": { "description": "OAuth2 sign-in method status. Set to true to enable new session creation. Setting to true will trigger end-to-end credentials validation, and will throw if the credentials are invalid.", "type": "boolean", @@ -79085,6 +81355,31 @@ "example": "<CLIENT_SECRET>", "nullable": true }, + "prompt": { + "description": "Array with at most one Discord OAuth2 prompt value. \"none\" means: skip the authorization screen for users who already authorized the app with the requested scopes. \"consent\" means: ask users who already authorized the app to approve it again. Pass an empty array to use the Discord default.", + "type": "array", + "items": { + "title": "ProjectOAuth2DiscordPrompt", + "type": "string", + "oneOf": [ + { + "type": "string", + "enum": [ + "none" + ], + "title": "none" + }, + { + "type": "string", + "enum": [ + "consent" + ], + "title": "consent" + } + ] + }, + "nullable": true + }, "enabled": { "description": "OAuth2 sign-in method status. Set to true to enable new session creation. Setting to true will trigger end-to-end credentials validation, and will throw if the credentials are invalid.", "type": "boolean", @@ -79658,6 +81953,24 @@ "example": "<CLIENT_SECRET>", "nullable": true }, + "prompt": { + "description": "Array of GitHub OAuth2 prompt values. \"select_account\" means: prompt the user to select an account. Pass an empty array to use the GitHub default.", + "type": "array", + "items": { + "title": "ProjectOAuth2GitHubPrompt", + "type": "string", + "oneOf": [ + { + "type": "string", + "enum": [ + "select_account" + ], + "title": "select_account" + } + ] + }, + "nullable": true + }, "enabled": { "description": "OAuth2 sign-in method status. Set to true to enable new session creation. Setting to true will trigger end-to-end credentials validation, and will throw if the credentials are invalid.", "type": "boolean", @@ -80035,6 +82348,45 @@ "example": "<CLIENT_SECRET>", "nullable": true }, + "prompt": { + "description": "Array of Kakao OAuth2 prompt values. If \"none\" is included, it must be the only element. \"none\" means: don't display any authentication or consent screens. \"login\" means: prompt the user to re-authenticate. \"create\" means: prompt the user to sign up. \"select_account\" means: prompt the user to select an account. Pass an empty array to use the Kakao default.", + "type": "array", + "items": { + "title": "ProjectOAuth2KakaoPrompt", + "type": "string", + "oneOf": [ + { + "type": "string", + "enum": [ + "none" + ], + "title": "none" + }, + { + "type": "string", + "enum": [ + "login" + ], + "title": "login" + }, + { + "type": "string", + "enum": [ + "create" + ], + "title": "create" + }, + { + "type": "string", + "enum": [ + "select_account" + ], + "title": "select_account" + } + ] + }, + "nullable": true + }, "enabled": { "description": "OAuth2 sign-in method status. Set to true to enable new session creation. Setting to true will trigger end-to-end credentials validation, and will throw if the credentials are invalid.", "type": "boolean", @@ -80377,6 +82729,45 @@ "example": "<TENANT>", "nullable": true }, + "prompt": { + "description": "Array of Microsoft OAuth2 prompt values. \"none\" means: don't display any authentication or consent screens. \"login\" means: prompt the user to re-authenticate. \"consent\" means: prompt the user for consent. \"select_account\" means: prompt the user to select an account. Pass an empty array to use the Microsoft default.", + "type": "array", + "items": { + "title": "ProjectOAuth2MicrosoftPrompt", + "type": "string", + "oneOf": [ + { + "type": "string", + "enum": [ + "none" + ], + "title": "none" + }, + { + "type": "string", + "enum": [ + "login" + ], + "title": "login" + }, + { + "type": "string", + "enum": [ + "consent" + ], + "title": "consent" + }, + { + "type": "string", + "enum": [ + "select_account" + ], + "title": "select_account" + } + ] + }, + "nullable": true + }, "enabled": { "description": "OAuth2 sign-in method status. Set to true to enable new session creation. Setting to true will trigger end-to-end credentials validation, and will throw if the credentials are invalid.", "type": "boolean", @@ -80706,6 +83097,38 @@ "example": "<AUTHORIZATION_SERVER_ID>", "nullable": true }, + "prompt": { + "description": "Array of Okta OAuth2 prompt values. If \"none\" is included, it must be the only element. \"none\" means: don't display any authentication or consent screens. \"login\" means: prompt the user to re-authenticate. \"consent\" means: prompt the user for consent. Pass an empty array to use the Okta default.", + "type": "array", + "items": { + "title": "ProjectOAuth2OktaPrompt", + "type": "string", + "oneOf": [ + { + "type": "string", + "enum": [ + "none" + ], + "title": "none" + }, + { + "type": "string", + "enum": [ + "login" + ], + "title": "login" + }, + { + "type": "string", + "enum": [ + "consent" + ], + "title": "consent" + } + ] + }, + "nullable": true + }, "enabled": { "description": "OAuth2 sign-in method status. Set to true to enable new session creation. Setting to true will trigger end-to-end credentials validation, and will throw if the credentials are invalid.", "type": "boolean", @@ -81111,6 +83534,31 @@ "example": "<CUSTOMER_SECRET>", "nullable": true }, + "prompt": { + "description": "Array of Salesforce OAuth2 prompt values. \"login\" means: prompt the user to re-authenticate. \"consent\" means: prompt the user for consent. Pass an empty array to use the Salesforce default.", + "type": "array", + "items": { + "title": "ProjectOAuth2SalesforcePrompt", + "type": "string", + "oneOf": [ + { + "type": "string", + "enum": [ + "login" + ], + "title": "login" + }, + { + "type": "string", + "enum": [ + "consent" + ], + "title": "consent" + } + ] + }, + "nullable": true + }, "enabled": { "description": "OAuth2 sign-in method status. Set to true to enable new session creation. Setting to true will trigger end-to-end credentials validation, and will throw if the credentials are invalid.", "type": "boolean", @@ -81181,13 +83629,94 @@ "type": "object", "properties": { "clientId": { - "description": "'Client ID' of Slack OAuth2 app. For example: 23000000089.15000000000023", + "description": "'Client ID' of Slack OAuth2 app. For example: 23000000089.15000000000023", + "type": "string", + "example": "<CLIENT_ID>", + "nullable": true + }, + "clientSecret": { + "description": "'Client Secret' of Slack OAuth2 app. For example: 81656000000000000000000000f3d2fd", + "type": "string", + "example": "<CLIENT_SECRET>", + "nullable": true + }, + "enabled": { + "description": "OAuth2 sign-in method status. Set to true to enable new session creation. Setting to true will trigger end-to-end credentials validation, and will throw if the credentials are invalid.", + "type": "boolean", + "example": false, + "nullable": true + } + } + } + } + } + } + } + }, + "\/project\/oauth2\/spotify": { + "patch": { + "summary": "Update project OAuth2 Spotify", + "operationId": "projectUpdateOAuth2Spotify", + "tags": [ + "project" + ], + "description": "Update the project OAuth2 Spotify configuration.", + "responses": { + "200": { + "description": "OAuth2Spotify", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/oAuth2Spotify" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "group": "oauth2", + "demo": "project\/update-o-auth-2-spotify.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "project.oauth2.write", + "platforms": [ + "console", + "server" + ], + "packaging": false, + "public": true, + "auth": { + "console": { + "Project": [] + }, + "server": { + "Project": [], + "Key": [] + } + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "clientId": { + "description": "'Client ID' of Spotify OAuth2 app. For example: 6ec271000000000000000000009beace", "type": "string", "example": "<CLIENT_ID>", "nullable": true }, "clientSecret": { - "description": "'Client Secret' of Slack OAuth2 app. For example: 81656000000000000000000000f3d2fd", + "description": "'Client Secret' of Spotify OAuth2 app. For example: db068a000000000000000000008b5b9f", "type": "string", "example": "<CLIENT_SECRET>", "nullable": true @@ -81205,21 +83734,21 @@ } } }, - "\/project\/oauth2\/spotify": { + "\/project\/oauth2\/stripe": { "patch": { - "summary": "Update project OAuth2 Spotify", - "operationId": "projectUpdateOAuth2Spotify", + "summary": "Update project OAuth2 Stripe", + "operationId": "projectUpdateOAuth2Stripe", "tags": [ "project" ], - "description": "Update the project OAuth2 Spotify configuration.", + "description": "Update the project OAuth2 Stripe configuration.", "responses": { "200": { - "description": "OAuth2Spotify", + "description": "OAuth2Stripe", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/oAuth2Spotify" + "$ref": "#\/components\/schemas\/oAuth2Stripe" } } } @@ -81228,7 +83757,7 @@ "deprecated": false, "x-appwrite": { "group": "oauth2", - "demo": "project\/update-o-auth-2-spotify.md", + "demo": "project\/update-o-auth-2-stripe.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -81262,15 +83791,15 @@ "type": "object", "properties": { "clientId": { - "description": "'Client ID' of Spotify OAuth2 app. For example: 6ec271000000000000000000009beace", + "description": "'Client ID' of Stripe OAuth2 app. For example: ca_UKibXX0000000000000000000006byvR", "type": "string", "example": "<CLIENT_ID>", "nullable": true }, - "clientSecret": { - "description": "'Client Secret' of Spotify OAuth2 app. For example: db068a000000000000000000008b5b9f", + "apiSecretKey": { + "description": "'API Secret Key' of Stripe OAuth2 app. For example: sk_51SfOd000000000000000000000000000000000000000000000000000000000000000000000000000000000000000QGWYfp", "type": "string", - "example": "<CLIENT_SECRET>", + "example": "<API_SECRET_KEY>", "nullable": true }, "enabled": { @@ -81286,21 +83815,21 @@ } } }, - "\/project\/oauth2\/stripe": { + "\/project\/oauth2\/tiktok": { "patch": { - "summary": "Update project OAuth2 Stripe", - "operationId": "projectUpdateOAuth2Stripe", + "summary": "Update project OAuth2 TikTok", + "operationId": "projectUpdateOAuth2TikTok", "tags": [ "project" ], - "description": "Update the project OAuth2 Stripe configuration.", + "description": "Update the project OAuth2 TikTok configuration.", "responses": { "200": { - "description": "OAuth2Stripe", + "description": "OAuth2TikTok", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/oAuth2Stripe" + "$ref": "#\/components\/schemas\/oAuth2TikTok" } } } @@ -81309,7 +83838,7 @@ "deprecated": false, "x-appwrite": { "group": "oauth2", - "demo": "project\/update-o-auth-2-stripe.md", + "demo": "project\/update-o-auth-2-tik-tok.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -81343,15 +83872,15 @@ "type": "object", "properties": { "clientId": { - "description": "'Client ID' of Stripe OAuth2 app. For example: ca_UKibXX0000000000000000000006byvR", + "description": "'Client key' of TikTok OAuth2 app. For example: awz000000000tyw0", "type": "string", "example": "<CLIENT_ID>", "nullable": true }, - "apiSecretKey": { - "description": "'API Secret Key' of Stripe OAuth2 app. For example: sk_51SfOd000000000000000000000000000000000000000000000000000000000000000000000000000000000000000QGWYfp", + "clientSecret": { + "description": "'Client secret' of TikTok OAuth2 app. For example: 6wXewM00000000000000000000yXnite", "type": "string", - "example": "<API_SECRET_KEY>", + "example": "<CLIENT_SECRET>", "nullable": true }, "enabled": { @@ -81367,21 +83896,21 @@ } } }, - "\/project\/oauth2\/tiktok": { + "\/project\/oauth2\/tradeshift": { "patch": { - "summary": "Update project OAuth2 TikTok", - "operationId": "projectUpdateOAuth2TikTok", + "summary": "Update project OAuth2 Tradeshift", + "operationId": "projectUpdateOAuth2Tradeshift", "tags": [ "project" ], - "description": "Update the project OAuth2 TikTok configuration.", + "description": "Update the project OAuth2 Tradeshift configuration.", "responses": { "200": { - "description": "OAuth2TikTok", + "description": "OAuth2Tradeshift", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/oAuth2TikTok" + "$ref": "#\/components\/schemas\/oAuth2Tradeshift" } } } @@ -81390,7 +83919,7 @@ "deprecated": false, "x-appwrite": { "group": "oauth2", - "demo": "project\/update-o-auth-2-tik-tok.md", + "demo": "project\/update-o-auth-2-tradeshift.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -81423,16 +83952,16 @@ "schema": { "type": "object", "properties": { - "clientId": { - "description": "'Client key' of TikTok OAuth2 app. For example: awz000000000tyw0", + "oauth2ClientId": { + "description": "'OAuth2 Client ID' of Tradeshift OAuth2 app. For example: appwrite-tes00000.0000000000est-app", "type": "string", - "example": "<CLIENT_ID>", + "example": "<OAUTH2_CLIENT_ID>", "nullable": true }, - "clientSecret": { - "description": "'Client secret' of TikTok OAuth2 app. For example: 6wXewM00000000000000000000yXnite", + "oauth2ClientSecret": { + "description": "'OAuth2 Client Secret' of Tradeshift OAuth2 app. For example: 7cb52700-0000-0000-0000-000000ca5b83", "type": "string", - "example": "<CLIENT_SECRET>", + "example": "<OAUTH2_CLIENT_SECRET>", "nullable": true }, "enabled": { @@ -81448,14 +83977,14 @@ } } }, - "\/project\/oauth2\/tradeshift": { + "\/project\/oauth2\/tradeshiftBox": { "patch": { - "summary": "Update project OAuth2 Tradeshift", - "operationId": "projectUpdateOAuth2Tradeshift", + "summary": "Update project OAuth2 Tradeshift Sandbox", + "operationId": "projectUpdateOAuth2TradeshiftSandbox", "tags": [ "project" ], - "description": "Update the project OAuth2 Tradeshift configuration.", + "description": "Update the project OAuth2 Tradeshift Sandbox configuration.", "responses": { "200": { "description": "OAuth2Tradeshift", @@ -81471,7 +84000,7 @@ "deprecated": false, "x-appwrite": { "group": "oauth2", - "demo": "project\/update-o-auth-2-tradeshift.md", + "demo": "project\/update-o-auth-2-tradeshift-sandbox.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -81505,13 +84034,13 @@ "type": "object", "properties": { "oauth2ClientId": { - "description": "'OAuth2 Client ID' of Tradeshift OAuth2 app. For example: appwrite-tes00000.0000000000est-app", + "description": "'OAuth2 Client ID' of Tradeshift Sandbox OAuth2 app. For example: appwrite-tes00000.0000000000est-app", "type": "string", "example": "<OAUTH2_CLIENT_ID>", "nullable": true }, "oauth2ClientSecret": { - "description": "'OAuth2 Client Secret' of Tradeshift OAuth2 app. For example: 7cb52700-0000-0000-0000-000000ca5b83", + "description": "'OAuth2 Client Secret' of Tradeshift Sandbox OAuth2 app. For example: 7cb52700-0000-0000-0000-000000ca5b83", "type": "string", "example": "<OAUTH2_CLIENT_SECRET>", "nullable": true @@ -81529,21 +84058,21 @@ } } }, - "\/project\/oauth2\/tradeshiftBox": { + "\/project\/oauth2\/twitch": { "patch": { - "summary": "Update project OAuth2 Tradeshift Sandbox", - "operationId": "projectUpdateOAuth2TradeshiftSandbox", + "summary": "Update project OAuth2 Twitch", + "operationId": "projectUpdateOAuth2Twitch", "tags": [ "project" ], - "description": "Update the project OAuth2 Tradeshift Sandbox configuration.", + "description": "Update the project OAuth2 Twitch configuration.", "responses": { "200": { - "description": "OAuth2Tradeshift", + "description": "OAuth2Twitch", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/oAuth2Tradeshift" + "$ref": "#\/components\/schemas\/oAuth2Twitch" } } } @@ -81552,7 +84081,7 @@ "deprecated": false, "x-appwrite": { "group": "oauth2", - "demo": "project\/update-o-auth-2-tradeshift-sandbox.md", + "demo": "project\/update-o-auth-2-twitch.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -81585,16 +84114,16 @@ "schema": { "type": "object", "properties": { - "oauth2ClientId": { - "description": "'OAuth2 Client ID' of Tradeshift Sandbox OAuth2 app. For example: appwrite-tes00000.0000000000est-app", + "clientId": { + "description": "'Client ID' of Twitch OAuth2 app. For example: vvi0in000000000000000000ikmt9p", "type": "string", - "example": "<OAUTH2_CLIENT_ID>", + "example": "<CLIENT_ID>", "nullable": true }, - "oauth2ClientSecret": { - "description": "'OAuth2 Client Secret' of Tradeshift Sandbox OAuth2 app. For example: 7cb52700-0000-0000-0000-000000ca5b83", + "clientSecret": { + "description": "'Client Secret' of Twitch OAuth2 app. For example: pmapue000000000000000000zylw3v", "type": "string", - "example": "<OAUTH2_CLIENT_SECRET>", + "example": "<CLIENT_SECRET>", "nullable": true }, "enabled": { @@ -81610,21 +84139,21 @@ } } }, - "\/project\/oauth2\/twitch": { + "\/project\/oauth2\/webflow": { "patch": { - "summary": "Update project OAuth2 Twitch", - "operationId": "projectUpdateOAuth2Twitch", + "summary": "Update project OAuth2 Webflow", + "operationId": "projectUpdateOAuth2Webflow", "tags": [ "project" ], - "description": "Update the project OAuth2 Twitch configuration.", + "description": "Update the project OAuth2 Webflow configuration.", "responses": { "200": { - "description": "OAuth2Twitch", + "description": "OAuth2Webflow", "content": { "application\/json": { "schema": { - "$ref": "#\/components\/schemas\/oAuth2Twitch" + "$ref": "#\/components\/schemas\/oAuth2Webflow" } } } @@ -81633,7 +84162,7 @@ "deprecated": false, "x-appwrite": { "group": "oauth2", - "demo": "project\/update-o-auth-2-twitch.md", + "demo": "project\/update-o-auth-2-webflow.md", "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", @@ -81667,13 +84196,13 @@ "type": "object", "properties": { "clientId": { - "description": "'Client ID' of Twitch OAuth2 app. For example: vvi0in000000000000000000ikmt9p", + "description": "'Client ID' of Webflow OAuth2 app. For example: 8bb20000000000000000000000000000000000000000000000000000000040dd", "type": "string", "example": "<CLIENT_ID>", "nullable": true }, "clientSecret": { - "description": "'Client Secret' of Twitch OAuth2 app. For example: pmapue000000000000000000zylw3v", + "description": "'Client Secret' of Webflow OAuth2 app. For example: 59bf00000000000000000000000000000000000000000000000000000000fe59", "type": "string", "example": "<CLIENT_SECRET>", "nullable": true @@ -82083,6 +84612,24 @@ "example": "<CLIENT_SECRET>", "nullable": true }, + "prompt": { + "description": "Array of Zoho OAuth2 prompt values. \"consent\" means: prompt the user for consent. Pass an empty array to use the Zoho default.", + "type": "array", + "items": { + "title": "ProjectOAuth2ZohoPrompt", + "type": "string", + "oneOf": [ + { + "type": "string", + "enum": [ + "consent" + ], + "title": "consent" + } + ] + }, + "nullable": true + }, "enabled": { "description": "OAuth2 sign-in method status. Set to true to enable new session creation. Setting to true will trigger end-to-end credentials validation, and will throw if the credentials are invalid.", "type": "boolean", @@ -82187,7 +84734,7 @@ "description": "Get a single OAuth2 provider configuration. Credential fields (client secret, p8 file, key\/team IDs) are write-only and always returned empty.", "responses": { "200": { - "description": "OAuth2GitHub, or OAuth2Discord, or OAuth2Figma, or OAuth2Dropbox, or OAuth2Dailymotion, or OAuth2Bitbucket, or OAuth2Bitly, or OAuth2Box, or OAuth2Autodesk, or OAuth2Google, or OAuth2Zoom, or OAuth2Zoho, or OAuth2Yandex, or OAuth2X, or OAuth2WordPress, or OAuth2Twitch, or OAuth2Stripe, or OAuth2Spotify, or OAuth2Slack, or OAuth2Podio, or OAuth2Notion, or OAuth2Salesforce, or OAuth2Yahoo, or OAuth2HuggingFace, or OAuth2Resend, or OAuth2Cloudflare, or OAuth2Linkedin, or OAuth2Disqus, or OAuth2Amazon, or OAuth2Etsy, or OAuth2Facebook, or OAuth2Tradeshift, or OAuth2Paypal, or OAuth2Gitlab, or OAuth2Authentik, or OAuth2Auth0, or OAuth2FusionAuth, or OAuth2Keycloak, or OAuth2Oidc, or OAuth2Apple, or OAuth2Okta, or OAuth2Kick, or OAuth2Microsoft, or OAuth2TikTok, or OAuth2Kakao", + "description": "OAuth2GitHub, or OAuth2Discord, or OAuth2Figma, or OAuth2Dropbox, or OAuth2Dailymotion, or OAuth2Bitbucket, or OAuth2Bitly, or OAuth2Box, or OAuth2Autodesk, or OAuth2Google, or OAuth2Zoom, or OAuth2Zoho, or OAuth2Yandex, or OAuth2X, or OAuth2WordPress, or OAuth2Webflow, or OAuth2Twitch, or OAuth2Stripe, or OAuth2Spotify, or OAuth2Slack, or OAuth2Podio, or OAuth2Notion, or OAuth2Salesforce, or OAuth2Yahoo, or OAuth2HuggingFace, or OAuth2Resend, or OAuth2Cloudflare, or OAuth2Linkedin, or OAuth2Disqus, or OAuth2Amazon, or OAuth2Etsy, or OAuth2Facebook, or OAuth2Tradeshift, or OAuth2Paypal, or OAuth2Gitlab, or OAuth2Authentik, or OAuth2Auth0, or OAuth2FusionAuth, or OAuth2Keycloak, or OAuth2Oidc, or OAuth2Apple, or OAuth2Okta, or OAuth2Kick, or OAuth2Microsoft, or OAuth2TikTok, or OAuth2Kakao", "content": { "application\/json": { "schema": { @@ -82237,6 +84784,9 @@ { "$ref": "#\/components\/schemas\/oAuth2WordPress" }, + { + "$ref": "#\/components\/schemas\/oAuth2Webflow" + }, { "$ref": "#\/components\/schemas\/oAuth2Twitch" }, @@ -82346,6 +84896,7 @@ "yandex": "#\/components\/schemas\/oAuth2Yandex", "x": "#\/components\/schemas\/oAuth2X", "wordpress": "#\/components\/schemas\/oAuth2WordPress", + "webflow": "#\/components\/schemas\/oAuth2Webflow", "twitch": "#\/components\/schemas\/oAuth2Twitch", "stripe": "#\/components\/schemas\/oAuth2Stripe", "spotify": "#\/components\/schemas\/oAuth2Spotify", @@ -82719,6 +85270,13 @@ ], "title": "twitch" }, + { + "type": "string", + "enum": [ + "webflow" + ], + "title": "webflow" + }, { "type": "string", "enum": [ @@ -85962,6 +88520,9 @@ "emails": { "description": "Array of emails to send test email to. Maximum of 10 emails are allowed.", "type": "array", + "example": [ + "recipient@example.com" + ], "items": { "type": "string" } @@ -89604,7 +92165,7 @@ "tags": [ "proxy" ], - "description": "Create a new CDN cache invalidation for a domain. Executes a hard purge of cached content.\n\nDepending on type, the invalidation purges a single cache tag, a single URL path, or all cached content for the domain.", + "description": "Create a new CDN cache invalidation for a domain. Executes a hard purge of cached content.\n\nDepending on type, the invalidation purges a single cache tag, a single URL path, or all cached content for the domain.\n\nDomains that route to a function do not support cache invalidation.", "responses": { "201": { "description": "Invalidation", @@ -89698,6 +92259,24 @@ "domain", "type" ] + }, + "examples": { + "tag": { + "summary": "Purge a cache tag", + "value": { + "domain": "example.com", + "type": "tag", + "reference": "<TAG>" + } + }, + "path": { + "summary": "Purge a URL path", + "value": { + "domain": "example.com", + "type": "path", + "reference": "\/blog\/hello-world" + } + } } } } @@ -90907,6 +93486,14 @@ "type": "string", "default": "", "example": "<SERVICE>" + }, + "disabledMetrics": { + "description": "Usage metrics to skip for this execution, matched by suffix. The execution is still logged.", + "type": "array", + "default": [], + "items": { + "type": "string" + } } }, "required": [ @@ -93112,6 +95699,13 @@ ], "title": "avatars.read" }, + { + "type": "string", + "enum": [ + "avatars.write" + ], + "title": "avatars.write" + }, { "type": "string", "enum": [ @@ -93335,6 +95929,20 @@ "oauth2.introspect" ], "title": "oauth2.introspect" + }, + { + "type": "string", + "enum": [ + "analytics.read" + ], + "title": "analytics.read" + }, + { + "type": "string", + "enum": [ + "analytics.write" + ], + "title": "analytics.write" } ] } @@ -93401,6 +96009,19 @@ "Project": [], "Key": [] } + ], + "parameters": [ + { + "name": "total", + "description": "When set to false, the total count returned will be 0 and will not be calculated.", + "required": false, + "schema": { + "type": "boolean", + "example": false, + "default": true + }, + "in": "query" + } ] } }, @@ -93465,6 +96086,17 @@ "default": "runtimes" }, "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", + "example": false, + "default": true + }, + "in": "query" } ] } @@ -93744,6 +96376,17 @@ "default": 0 }, "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", + "example": false, + "default": true + }, + "in": "query" } ] } @@ -95508,6 +98151,13 @@ ], "title": "avatars.read" }, + { + "type": "string", + "enum": [ + "avatars.write" + ], + "title": "avatars.write" + }, { "type": "string", "enum": [ @@ -95731,6 +98381,20 @@ "oauth2.introspect" ], "title": "oauth2.introspect" + }, + { + "type": "string", + "enum": [ + "analytics.read" + ], + "title": "analytics.read" + }, + { + "type": "string", + "enum": [ + "analytics.write" + ], + "title": "analytics.write" } ] }, @@ -99302,6 +101966,17 @@ "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", + "example": false, + "default": true + }, + "in": "query" } ] }, @@ -99544,6 +102219,20 @@ "example": false } } + }, + "examples": { + "commit": { + "summary": "Commit the transaction", + "value": { + "commit": true + } + }, + "rollback": { + "summary": "Roll back the transaction", + "value": { + "rollback": true + } + } } } } @@ -99711,6 +102400,24 @@ } } } + }, + "examples": { + "createRow": { + "summary": "Stage a row creation", + "value": { + "operations": [ + { + "action": "create", + "databaseId": "<DATABASE_ID>", + "tableId": "<TABLE_ID>", + "rowId": "<ROW_ID>", + "data": { + "username": "walter.obrien" + } + } + ] + } + } } } } @@ -106614,6 +109321,9 @@ "columns": { "description": "Array of columns to index. Maximum of 100 columns are allowed, each 32 characters long.", "type": "array", + "example": [ + "username" + ], "items": { "type": "string" } @@ -107161,6 +109871,16 @@ "description": "Array of rows data as JSON objects.", "type": "array", "default": [], + "example": [ + { + "$id": "example1", + "username": "walter.obrien", + "email": "walter.obrien@example.com", + "fullName": "Walter O'Brien", + "age": 30, + "isAdmin": false + } + ], "items": { "type": "object" } @@ -107304,6 +110024,16 @@ "rows": { "description": "Array of row data as JSON objects. May contain partial rows.", "type": "array", + "example": [ + { + "$id": "example1", + "username": "walter.obrien", + "email": "walter.obrien@example.com", + "fullName": "Walter O'Brien", + "age": 30, + "isAdmin": false + } + ], "items": { "type": "object" } @@ -107430,6 +110160,19 @@ "nullable": true } } + }, + "examples": { + "updateSelected": { + "summary": "Update explicitly selected rows", + "value": { + "data": { + "username": "walter.obrien" + }, + "queries": [ + "{\"method\":\"equal\",\"attribute\":\"$id\",\"values\":[\"<ROW_ID>\"]}" + ] + } + } } } } @@ -107517,6 +110260,9 @@ "items": { "type": "string" }, + "example": [ + "{\"method\":\"equal\",\"attribute\":\"$id\",\"values\":[\"<ROW_ID>\"]}" + ], "default": [] }, "in": "query" @@ -107821,6 +110567,20 @@ "nullable": true } } + }, + "examples": { + "upsert": { + "summary": "Create or update row data", + "value": { + "data": { + "username": "walter.obrien", + "email": "walter.obrien@example.com", + "fullName": "Walter O'Brien", + "age": 30, + "isAdmin": false + } + } + } } } } @@ -107952,6 +110712,16 @@ "nullable": true } } + }, + "examples": { + "update": { + "summary": "Update row data", + "value": { + "data": { + "username": "walter.obrien" + } + } + } } } } @@ -108486,7 +111256,7 @@ "example": "<NAME>" }, "roles": { - "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.", + "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 81 characters long.", "type": "array", "default": [ "owner" @@ -109357,6 +112127,9 @@ "roles": { "description": "Array of strings. Use this param to set the user roles in the team. A role can be any string. Learn more about [roles and permissions](https:\/\/appwrite.io\/docs\/permissions). Maximum of 100 roles are allowed, each 81 characters long.", "type": "array", + "example": [ + "editor" + ], "items": { "type": "string" } @@ -109549,6 +112322,9 @@ "roles": { "description": "An array of strings. Use this param to set the user's roles in the team. A role can be any string. Learn more about [roles and permissions](https:\/\/appwrite.io\/docs\/permissions). Maximum of 100 roles are allowed, each 81 characters long.", "type": "array", + "example": [ + "editor" + ], "items": { "type": "string" } @@ -110343,6 +113119,27 @@ "title": "UsageEventMetric", "type": "string", "oneOf": [ + { + "type": "string", + "enum": [ + "analytics.events" + ], + "title": "analytics.events" + }, + { + "type": "string", + "enum": [ + "analytics.pageviews" + ], + "title": "analytics.pageviews" + }, + { + "type": "string", + "enum": [ + "analytics.bots.events" + ], + "title": "analytics.bots.events" + }, { "type": "string", "enum": [ @@ -110392,6 +113189,13 @@ ], "title": "messages.sent" }, + { + "type": "string", + "enum": [ + "messages.failed" + ], + "title": "messages.failed" + }, { "type": "string", "enum": [ @@ -110726,7 +113530,7 @@ }, { "name": "queries", - "description": "Up to 10 filter queries in Utopia syntax. Allowed attributes, also published as the `UsageEventDimension` enum: path, method, status, service, resourceType, resourceId, teamId, country, continentCode, city, region, hostname, ip, osName, clientType, clientName, deviceName, sdk, sdkVersion, isp, autonomousSystemNumber, autonomousSystemOrganization, connectionType, connectionUsageType, connectionOrganization. Allowed methods: equal, notEqual, contains, startsWith, endsWith, isNull, isNotNull. Example: `queries[]=equal(\"resourceType\", [\"bucket\"])`.", + "description": "Up to 10 filter queries in Utopia syntax. Allowed attributes, also published as the `UsageEventDimension` enum: path, method, status, service, resourceType, resourceId, teamId, country, continentCode, city, region, hostname, ip, osName, clientType, clientName, deviceName, sdk, sdkVersion, protocol, queryKeys, accept, acceptLanguage, postalCode, latitude, longitude, timeZone, weatherCode, isp, autonomousSystemNumber, autonomousSystemOrganization, connectionType, connectionUsageType, connectionOrganization. Allowed methods: equal, notEqual, contains, startsWith, endsWith, isNull, isNotNull. Example: `queries[]=equal(\"resourceType\", [\"bucket\"])`.", "required": false, "schema": { "type": "array", @@ -110787,7 +113591,7 @@ }, { "name": "dimensions", - "description": "Break-down dimensions (max 10). Allowed: path, method, status, service, resourceType, country, continentCode, city, region, hostname, ip, osName, clientType, clientName, deviceName, sdk, sdkVersion, teamId, resourceId, isp, autonomousSystemNumber, autonomousSystemOrganization, connectionType, connectionUsageType, connectionOrganization.", + "description": "Break-down dimensions (max 10). Allowed: path, method, status, service, resourceType, country, continentCode, city, region, hostname, ip, osName, clientType, clientName, deviceName, sdk, sdkVersion, teamId, resourceId, protocol, queryKeys, accept, acceptLanguage, postalCode, latitude, longitude, timeZone, weatherCode, isp, autonomousSystemNumber, autonomousSystemOrganization, connectionType, connectionUsageType, connectionOrganization.", "required": false, "schema": { "type": "array", @@ -110928,6 +113732,69 @@ ], "title": "resourceId" }, + { + "type": "string", + "enum": [ + "protocol" + ], + "title": "protocol" + }, + { + "type": "string", + "enum": [ + "queryKeys" + ], + "title": "queryKeys" + }, + { + "type": "string", + "enum": [ + "accept" + ], + "title": "accept" + }, + { + "type": "string", + "enum": [ + "acceptLanguage" + ], + "title": "acceptLanguage" + }, + { + "type": "string", + "enum": [ + "postalCode" + ], + "title": "postalCode" + }, + { + "type": "string", + "enum": [ + "latitude" + ], + "title": "latitude" + }, + { + "type": "string", + "enum": [ + "longitude" + ], + "title": "longitude" + }, + { + "type": "string", + "enum": [ + "timeZone" + ], + "title": "timeZone" + }, + { + "type": "string", + "enum": [ + "weatherCode" + ], + "title": "weatherCode" + }, { "type": "string", "enum": [ @@ -111142,6 +114009,13 @@ "title": "UsageGaugeMetric", "type": "string", "oneOf": [ + { + "type": "string", + "enum": [ + "analytics.properties" + ], + "title": "analytics.properties" + }, { "type": "string", "enum": [ @@ -113352,6 +116226,9 @@ "labels": { "description": "Array of user labels. Replaces the previous labels. Maximum of 1000 labels are allowed, each up to 36 alphanumeric characters long.", "type": "array", + "example": [ + "subscriber" + ], "items": { "type": "string" } @@ -116152,6 +119029,17 @@ "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", + "example": false, + "default": true + }, + "in": "query" } ] }, @@ -116399,6 +119287,17 @@ "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", + "example": false, + "default": true + }, + "in": "query" } ] } @@ -116841,6 +119740,17 @@ "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", + "example": false, + "default": true + }, + "in": "query" } ] } @@ -117144,6 +120054,17 @@ "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", + "example": false, + "default": true + }, + "in": "query" } ] }, @@ -117377,6 +120298,20 @@ "example": false } } + }, + "examples": { + "commit": { + "summary": "Commit the transaction", + "value": { + "commit": true + } + }, + "rollback": { + "summary": "Roll back the transaction", + "value": { + "rollback": true + } + } } } } @@ -117529,7 +120464,15 @@ "collectionId": "<COLLECTION_ID>", "documentId": "<DOCUMENT_ID>", "data": { - "name": "Walter O'Brien" + "embeddings": [ + 0.12, + -0.55, + 0.88, + 1.02 + ], + "metadata": { + "name": "First document" + } } } ], @@ -117538,6 +120481,32 @@ } } } + }, + "examples": { + "createDocument": { + "summary": "Stage a document creation in a four-dimensional collection", + "value": { + "operations": [ + { + "action": "create", + "databaseId": "<DATABASE_ID>", + "collectionId": "<COLLECTION_ID>", + "documentId": "<DOCUMENT_ID>", + "data": { + "embeddings": [ + 0.12, + -0.55, + 0.88, + 1.02 + ], + "metadata": { + "name": "Example document" + } + } + } + ] + } + } } } } @@ -117947,7 +120916,7 @@ "dimension": { "description": "Embedding dimension.", "type": "integer", - "example": 1, + "example": 4, "format": "int32" }, "permissions": { @@ -118142,7 +121111,7 @@ "dimension": { "description": "Embedding dimensions.", "type": "integer", - "example": 1, + "example": 4, "format": "int32" }, "permissions": { @@ -118571,6 +121540,20 @@ "description": "Array of documents data as JSON objects.", "type": "array", "default": [], + "example": [ + { + "$id": "example1", + "embeddings": [ + 0.12, + -0.55, + 0.88, + 1.02 + ], + "metadata": { + "name": "First document" + } + } + ], "items": { "type": "object" } @@ -118710,6 +121693,20 @@ "documents": { "description": "Array of document data as JSON objects. May contain partial documents.", "type": "array", + "example": [ + { + "$id": "example1", + "embeddings": [ + 0.12, + -0.55, + 0.88, + 1.02 + ], + "metadata": { + "name": "First document" + } + } + ], "items": { "type": "object" } @@ -118825,6 +121822,21 @@ "example": "<TRANSACTION_ID>" } } + }, + "examples": { + "updateSelected": { + "summary": "Update metadata on explicitly selected documents", + "value": { + "data": { + "metadata": { + "name": "Updated document" + } + }, + "queries": [ + "{\"method\":\"equal\",\"attribute\":\"$id\",\"values\":[\"<DOCUMENT_ID>\"]}" + ] + } + } } } } @@ -118909,6 +121921,9 @@ "items": { "type": "string" }, + "example": [ + "{\"method\":\"equal\",\"attribute\":\"$id\",\"values\":[\"<DOCUMENT_ID>\"]}" + ], "default": [] }, "in": "query" @@ -119316,6 +122331,24 @@ "example": "<TRANSACTION_ID>" } } + }, + "examples": { + "upsert": { + "summary": "Create or update a document in a four-dimensional collection", + "value": { + "data": { + "embeddings": [ + 0.12, + -0.55, + 0.88, + 1.02 + ], + "metadata": { + "name": "Example document" + } + } + } + } } } } @@ -119436,6 +122469,18 @@ "example": "<TRANSACTION_ID>" } } + }, + "examples": { + "update": { + "summary": "Update document metadata", + "value": { + "data": { + "metadata": { + "name": "Updated document" + } + } + } + } } } } @@ -119765,6 +122810,9 @@ "attributes": { "description": "Array of attributes to index. Maximum of 100 attributes are allowed, each 32 characters long.", "type": "array", + "example": [ + "embeddings" + ], "items": { "type": "string" } @@ -120476,6 +123524,19 @@ "resourceType", "name" ] + }, + "examples": { + "scoped": { + "summary": "Bypass other rules for an IP", + "value": { + "ruleId": "<RULE_ID>", + "resourceType": "api", + "name": "Office network", + "conditions": [ + "{\"method\":\"equal\",\"attribute\":\"ip\",\"values\":[\"198.51.100.10\"]}" + ] + } + } } } } @@ -120726,6 +123787,19 @@ "resourceType", "name" ] + }, + "examples": { + "scoped": { + "summary": "Challenge requests to a path", + "value": { + "ruleId": "<RULE_ID>", + "resourceType": "api", + "name": "Challenge sign-ins", + "conditions": [ + "{\"method\":\"startsWith\",\"attribute\":\"path\",\"values\":[\"\/v1\/account\/sessions\"]}" + ] + } + } } } } @@ -120976,6 +124050,19 @@ "resourceType", "name" ] + }, + "examples": { + "scoped": { + "summary": "Deny requests from an IP range", + "value": { + "ruleId": "<RULE_ID>", + "resourceType": "api", + "name": "Block abusive range", + "conditions": [ + "{\"method\":\"equal\",\"attribute\":\"ip\",\"values\":[\"203.0.113.0\/24\"]}" + ] + } + } } } } @@ -121239,6 +124326,21 @@ "limit", "interval" ] + }, + "examples": { + "scoped": { + "summary": "Rate limit requests to a path", + "value": { + "ruleId": "<RULE_ID>", + "resourceType": "api", + "name": "Limit sign-ins", + "limit": 10, + "interval": 60, + "conditions": [ + "{\"method\":\"startsWith\",\"attribute\":\"path\",\"values\":[\"\/v1\/account\/sessions\"]}" + ] + } + } } } } @@ -121509,6 +124611,21 @@ "location", "statusCode" ] + }, + "examples": { + "scoped": { + "summary": "Redirect requests for a path", + "value": { + "ruleId": "<RULE_ID>", + "resourceType": "api", + "name": "Moved page", + "location": "\/new-page", + "statusCode": 301, + "conditions": [ + "{\"method\":\"equal\",\"attribute\":\"path\",\"values\":[\"\/old-page\"]}" + ] + } + } } } } @@ -121914,6 +125031,9 @@ "events": { "description": "Events list. Maximum of 100 events are allowed.", "type": "array", + "example": [ + "users.*.create" + ], "items": { "type": "string" } @@ -122105,6 +125225,9 @@ "events": { "description": "Events list. Maximum of 100 events are allowed.", "type": "array", + "example": [ + "users.*.create" + ], "items": { "type": "string" } @@ -122128,11 +125251,11 @@ "example": "<AUTH_USERNAME>" }, "authPassword": { - "description": "Webhook HTTP password. Max length: 256 chars.", + "description": "Webhook HTTP password. Max length: 256 chars. Omit to keep the current password; it is cleared when the URL changes or TLS verification is disabled.", "type": "string", - "default": "", "example": "password", - "format": "password" + "format": "password", + "nullable": true } }, "required": [ @@ -122440,6 +125563,10 @@ "name": "activities", "description": "The Activities service allows you to list and inspect project activity events." }, + { + "name": "analytics", + "description": "" + }, { "name": "waf", "description": "" @@ -122458,7 +125585,7 @@ }, { "name": "growth", - "description": "" + "description": "The Growth service allows you to contact the Appwrite team and record self-hosted installations." } ], "components": { @@ -131979,202 +135106,401 @@ "impersonatorUserId": "5e5ea5c16897e" } }, - "algoMd5": { - "description": "AlgoMD5", - "type": "object", - "properties": { - "type": { - "type": "string", - "description": "Algo type.", - "example": "md5" - } - }, - "required": [ - "type" - ], - "example": { - "type": "md5" - } - }, - "algoSha": { - "description": "AlgoSHA", - "type": "object", - "properties": { - "type": { - "type": "string", - "description": "Algo type.", - "example": "sha" - } - }, - "required": [ - "type" - ], - "example": { - "type": "sha" - } - }, - "algoPhpass": { - "description": "AlgoPHPass", - "type": "object", - "properties": { - "type": { - "type": "string", - "description": "Algo type.", - "example": "phpass" - } - }, - "required": [ - "type" - ], - "example": { - "type": "phpass" - } - }, - "algoBcrypt": { - "description": "AlgoBcrypt", - "type": "object", - "properties": { - "type": { - "type": "string", - "description": "Algo type.", - "example": "bcrypt" - } - }, - "required": [ - "type" - ], - "example": { - "type": "bcrypt" - } - }, - "algoScrypt": { - "description": "AlgoScrypt", - "type": "object", - "properties": { - "type": { - "type": "string", - "description": "Algo type.", - "example": "scrypt" - }, - "costCpu": { - "type": "integer", - "description": "CPU complexity of computed hash.", - "format": "int32", - "example": 8 - }, - "costMemory": { - "type": "integer", - "description": "Memory complexity of computed hash.", - "format": "int32", - "example": 14 - }, - "costParallel": { - "type": "integer", - "description": "Parallelization of computed hash.", - "format": "int32", - "example": 1 - }, - "length": { - "type": "integer", - "description": "Length used to compute hash.", - "format": "int32", - "example": 64 - } - }, - "required": [ - "type", - "costCpu", - "costMemory", - "costParallel", - "length" - ], - "example": { - "type": "scrypt", - "costCpu": 8, - "costMemory": 14, - "costParallel": 1, - "length": 64 - } - }, - "algoScryptModified": { - "description": "AlgoScryptModified", - "type": "object", - "properties": { - "type": { - "type": "string", - "description": "Algo type.", - "example": "scryptMod" - }, - "salt": { - "type": "string", - "description": "Salt used to compute hash.", - "example": "UxLMreBr6tYyjQ==" - }, - "saltSeparator": { - "type": "string", - "description": "Separator used to compute hash.", - "example": "Bw==" - }, - "signerKey": { - "type": "string", - "description": "Key used to compute hash.", - "example": "XyEKE9RcTDeLEsL\/RjwPDBv\/RqDl8fb3gpYEOQaPihbxf1ZAtSOHCjuAAa7Q3oHpCYhXSN9tizHgVOwn6krflQ==" - } - }, - "required": [ - "type", - "salt", - "saltSeparator", - "signerKey" - ], - "example": { - "type": "scryptMod", - "salt": "UxLMreBr6tYyjQ==", - "saltSeparator": "Bw==", - "signerKey": "XyEKE9RcTDeLEsL\/RjwPDBv\/RqDl8fb3gpYEOQaPihbxf1ZAtSOHCjuAAa7Q3oHpCYhXSN9tizHgVOwn6krflQ==" - } - }, - "algoArgon2": { - "description": "AlgoArgon2", - "type": "object", - "properties": { - "type": { - "type": "string", - "description": "Algo type.", - "example": "argon2" - }, - "memoryCost": { - "type": "integer", - "description": "Memory used to compute hash.", - "format": "int32", - "example": 65536 - }, - "timeCost": { - "type": "integer", - "description": "Amount of time consumed to compute hash", - "format": "int32", - "example": 4 - }, - "threads": { - "type": "integer", - "description": "Number of threads used to compute hash.", - "format": "int32", - "example": 3 - } - }, - "required": [ - "type", - "memoryCost", - "timeCost", - "threads" - ], - "example": { - "type": "argon2", - "memoryCost": 65536, - "timeCost": 4, - "threads": 3 - } - }, + "algoMd5": { + "description": "AlgoMD5", + "type": "object", + "properties": { + "type": { + "type": "string", + "description": "Algo type.", + "example": "md5" + } + }, + "required": [ + "type" + ], + "example": { + "type": "md5" + } + }, + "algoSha": { + "description": "AlgoSHA", + "type": "object", + "properties": { + "type": { + "type": "string", + "description": "Algo type.", + "example": "sha" + } + }, + "required": [ + "type" + ], + "example": { + "type": "sha" + } + }, + "algoPhpass": { + "description": "AlgoPHPass", + "type": "object", + "properties": { + "type": { + "type": "string", + "description": "Algo type.", + "example": "phpass" + } + }, + "required": [ + "type" + ], + "example": { + "type": "phpass" + } + }, + "algoBcrypt": { + "description": "AlgoBcrypt", + "type": "object", + "properties": { + "type": { + "type": "string", + "description": "Algo type.", + "example": "bcrypt" + } + }, + "required": [ + "type" + ], + "example": { + "type": "bcrypt" + } + }, + "algoScrypt": { + "description": "AlgoScrypt", + "type": "object", + "properties": { + "type": { + "type": "string", + "description": "Algo type.", + "example": "scrypt" + }, + "costCpu": { + "type": "integer", + "description": "CPU complexity of computed hash.", + "format": "int32", + "example": 8 + }, + "costMemory": { + "type": "integer", + "description": "Memory complexity of computed hash.", + "format": "int32", + "example": 14 + }, + "costParallel": { + "type": "integer", + "description": "Parallelization of computed hash.", + "format": "int32", + "example": 1 + }, + "length": { + "type": "integer", + "description": "Length used to compute hash.", + "format": "int32", + "example": 64 + } + }, + "required": [ + "type", + "costCpu", + "costMemory", + "costParallel", + "length" + ], + "example": { + "type": "scrypt", + "costCpu": 8, + "costMemory": 14, + "costParallel": 1, + "length": 64 + } + }, + "algoScryptModified": { + "description": "AlgoScryptModified", + "type": "object", + "properties": { + "type": { + "type": "string", + "description": "Algo type.", + "example": "scryptMod" + }, + "salt": { + "type": "string", + "description": "Salt used to compute hash.", + "example": "UxLMreBr6tYyjQ==" + }, + "saltSeparator": { + "type": "string", + "description": "Separator used to compute hash.", + "example": "Bw==" + }, + "signerKey": { + "type": "string", + "description": "Key used to compute hash.", + "example": "XyEKE9RcTDeLEsL\/RjwPDBv\/RqDl8fb3gpYEOQaPihbxf1ZAtSOHCjuAAa7Q3oHpCYhXSN9tizHgVOwn6krflQ==" + } + }, + "required": [ + "type", + "salt", + "saltSeparator", + "signerKey" + ], + "example": { + "type": "scryptMod", + "salt": "UxLMreBr6tYyjQ==", + "saltSeparator": "Bw==", + "signerKey": "XyEKE9RcTDeLEsL\/RjwPDBv\/RqDl8fb3gpYEOQaPihbxf1ZAtSOHCjuAAa7Q3oHpCYhXSN9tizHgVOwn6krflQ==" + } + }, + "algoArgon2": { + "description": "AlgoArgon2", + "type": "object", + "properties": { + "type": { + "type": "string", + "description": "Algo type.", + "example": "argon2" + }, + "memoryCost": { + "type": "integer", + "description": "Memory used to compute hash.", + "format": "int32", + "example": 65536 + }, + "timeCost": { + "type": "integer", + "description": "Amount of time consumed to compute hash", + "format": "int32", + "example": 4 + }, + "threads": { + "type": "integer", + "description": "Number of threads used to compute hash.", + "format": "int32", + "example": 3 + } + }, + "required": [ + "type", + "memoryCost", + "timeCost", + "threads" + ], + "example": { + "type": "argon2", + "memoryCost": 65536, + "timeCost": 4, + "threads": 3 + } + }, + "account": { + "description": "Account", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "User ID.", + "example": "5e5ea5c16897e" + }, + "$createdAt": { + "type": "string", + "description": "User creation date in ISO 8601 format.", + "example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "User update date in ISO 8601 format.", + "example": "2020-10-15T06:38:00.000+00:00" + }, + "name": { + "type": "string", + "description": "User name.", + "example": "John Doe" + }, + "registration": { + "type": "string", + "description": "User registration date in ISO 8601 format.", + "example": "2020-10-15T06:38:00.000+00:00" + }, + "status": { + "type": "boolean", + "description": "User status. Pass `true` for enabled and `false` for disabled.", + "example": true + }, + "labels": { + "type": "array", + "description": "Labels for the user.", + "items": { + "type": "string" + }, + "example": [ + "vip" + ] + }, + "passwordUpdate": { + "type": "string", + "description": "Password update time in ISO 8601 format.", + "example": "2020-10-15T06:38:00.000+00:00" + }, + "email": { + "type": "string", + "description": "User email address.", + "example": "john@appwrite.io" + }, + "phone": { + "type": "string", + "description": "User phone number in E.164 format.", + "example": "+4930901820" + }, + "emailVerification": { + "type": "boolean", + "description": "Email verification status.", + "example": true + }, + "emailCanonical": { + "type": "string", + "description": "Canonical form of the user email address.", + "example": "john@appwrite.io", + "nullable": true + }, + "emailIsFree": { + "type": "boolean", + "description": "Whether the user email is from a free email provider.", + "example": true, + "nullable": true + }, + "emailIsDisposable": { + "type": "boolean", + "description": "Whether the user email is from a disposable email provider.", + "example": false, + "nullable": true + }, + "emailIsCorporate": { + "type": "boolean", + "description": "Whether the user email is from a corporate domain.", + "example": true, + "nullable": true + }, + "emailIsCanonical": { + "type": "boolean", + "description": "Whether the user email is in its canonical form.", + "example": true, + "nullable": true + }, + "passwordPwned": { + "type": "boolean", + "description": "Whether the password was found in a known data breach the last time it was checked. Null when the password has never been checked.", + "example": false, + "nullable": true + }, + "phoneVerification": { + "type": "boolean", + "description": "Phone verification status.", + "example": true + }, + "mfa": { + "type": "boolean", + "description": "Multi factor authentication status.", + "example": true + }, + "prefs": { + "type": "object", + "description": "User preferences as a key-value object", + "example": { + "theme": "pink", + "timezone": "UTC" + }, + "allOf": [ + { + "$ref": "#\/components\/schemas\/preferences" + } + ] + }, + "targets": { + "type": "array", + "description": "A user-owned message receiver. A single user may have multiple e.g. emails, phones, and a browser. Each target is registered with a single provider.", + "items": { + "$ref": "#\/components\/schemas\/target" + }, + "example": [] + }, + "accessedAt": { + "type": "string", + "description": "Most recent access date in ISO 8601 format. This attribute is only updated again after 24 hours.", + "example": "2020-10-15T06:38:00.000+00:00" + }, + "impersonator": { + "type": "boolean", + "description": "Whether the user can impersonate other users.", + "example": false, + "nullable": true + }, + "impersonatorUserId": { + "type": "string", + "description": "ID of the original actor performing the impersonation. Present only when the current request is impersonating another user. Internal audit logs attribute the action to this user, while the impersonated target is recorded only in internal audit payload data.", + "example": "5e5ea5c16897e", + "nullable": true + } + }, + "required": [ + "$id", + "$createdAt", + "$updatedAt", + "name", + "registration", + "status", + "labels", + "passwordUpdate", + "email", + "phone", + "emailVerification", + "phoneVerification", + "mfa", + "prefs", + "targets", + "accessedAt" + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "name": "John Doe", + "registration": "2020-10-15T06:38:00.000+00:00", + "status": true, + "labels": [ + "vip" + ], + "passwordUpdate": "2020-10-15T06:38:00.000+00:00", + "email": "john@appwrite.io", + "phone": "+4930901820", + "emailVerification": true, + "emailCanonical": "john@appwrite.io", + "emailIsFree": true, + "emailIsDisposable": false, + "emailIsCorporate": true, + "emailIsCanonical": true, + "passwordPwned": false, + "phoneVerification": true, + "mfa": true, + "prefs": { + "theme": "pink", + "timezone": "UTC" + }, + "targets": [], + "accessedAt": "2020-10-15T06:38:00.000+00:00", + "impersonator": false, + "impersonatorUserId": "5e5ea5c16897e" + } + }, "preferences": { "description": "Preferences", "type": "object", @@ -136294,7 +139620,7 @@ }, "authPassword": { "type": "string", - "description": "HTTP basic authentication password.", + "description": "HTTP basic authentication password. Write-only: always returned empty.", "format": "password", "example": "webhook-password" }, @@ -136581,19 +139907,42 @@ "type": "string", "description": "GitHub OAuth2 client secret.", "example": "5e07c00000000000000000000000000000198bcc" + }, + "prompt": { + "type": "array", + "description": "GitHub OAuth2 prompt values.", + "items": { + "type": "string", + "oneOf": [ + { + "type": "string", + "enum": [ + "select_account" + ], + "title": "select_account" + } + ] + }, + "example": [ + "select_account" + ] } }, "required": [ "$id", "enabled", "clientId", - "clientSecret" + "clientSecret", + "prompt" ], "example": { "$id": "github", "enabled": false, "clientId": "e4d87900000000540733", - "clientSecret": "5e07c00000000000000000000000000000198bcc" + "clientSecret": "5e07c00000000000000000000000000000198bcc", + "prompt": [ + "select_account" + ] } }, "oAuth2Discord": { @@ -136619,19 +139968,49 @@ "type": "string", "description": "Discord OAuth2 client secret.", "example": "YmPXnM000000000000000000002zFg5D" + }, + "prompt": { + "type": "array", + "description": "Discord OAuth2 prompt values.", + "items": { + "type": "string", + "oneOf": [ + { + "type": "string", + "enum": [ + "none" + ], + "title": "none" + }, + { + "type": "string", + "enum": [ + "consent" + ], + "title": "consent" + } + ] + }, + "example": [ + "none" + ] } }, "required": [ "$id", "enabled", "clientId", - "clientSecret" + "clientSecret", + "prompt" ], "example": { "$id": "github", "enabled": false, "clientId": "950722000000343754", - "clientSecret": "YmPXnM000000000000000000002zFg5D" + "clientSecret": "YmPXnM000000000000000000002zFg5D", + "prompt": [ + "none" + ] } }, "oAuth2Figma": { @@ -137057,19 +140436,42 @@ "type": "string", "description": "Zoho OAuth2 client secret.", "example": "fb5cac000000000000000000000000000000a68f6e" + }, + "prompt": { + "type": "array", + "description": "Zoho OAuth2 prompt values.", + "items": { + "type": "string", + "oneOf": [ + { + "type": "string", + "enum": [ + "consent" + ], + "title": "consent" + } + ] + }, + "example": [ + "consent" + ] } }, "required": [ "$id", "enabled", "clientId", - "clientSecret" + "clientSecret", + "prompt" ], "example": { "$id": "github", "enabled": false, "clientId": "1000.83C178000000000000000000RPNX0B", - "clientSecret": "fb5cac000000000000000000000000000000a68f6e" + "clientSecret": "fb5cac000000000000000000000000000000a68f6e", + "prompt": [ + "consent" + ] } }, "oAuth2Yandex": { @@ -137186,6 +140588,44 @@ "clientSecret": "PlBfJS0000000000000000000000000000000000000000000000000000EdUZJk" } }, + "oAuth2Webflow": { + "description": "OAuth2Webflow", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "OAuth2 provider ID.", + "example": "github" + }, + "enabled": { + "type": "boolean", + "description": "OAuth2 provider is active and can be used to create sessions.", + "example": false + }, + "clientId": { + "type": "string", + "description": "Webflow OAuth2 client ID.", + "example": "8bb20000000000000000000000000000000000000000000000000000000040dd" + }, + "clientSecret": { + "type": "string", + "description": "Webflow OAuth2 client secret.", + "example": "59bf00000000000000000000000000000000000000000000000000000000fe59" + } + }, + "required": [ + "$id", + "enabled", + "clientId", + "clientSecret" + ], + "example": { + "$id": "github", + "enabled": false, + "clientId": "8bb20000000000000000000000000000000000000000000000000000000040dd", + "clientSecret": "59bf00000000000000000000000000000000000000000000000000000000fe59" + } + }, "oAuth2Twitch": { "description": "OAuth2Twitch", "type": "object", @@ -137437,19 +140877,49 @@ "type": "string", "description": "Salesforce OAuth2 consumer secret.", "example": "3w000000000000e2" + }, + "prompt": { + "type": "array", + "description": "Salesforce OAuth2 prompt values.", + "items": { + "type": "string", + "oneOf": [ + { + "type": "string", + "enum": [ + "login" + ], + "title": "login" + }, + { + "type": "string", + "enum": [ + "consent" + ], + "title": "consent" + } + ] + }, + "example": [ + "login" + ] } }, "required": [ "$id", "enabled", "customerKey", - "customerSecret" + "customerSecret", + "prompt" ], "example": { "$id": "github", "enabled": false, "customerKey": "3MVG9I0000000000000000000000000000000000000000000000000000000000000000000000000C5Aejq", - "customerSecret": "3w000000000000e2" + "customerSecret": "3w000000000000e2", + "prompt": [ + "login" + ] } }, "oAuth2Yahoo": { @@ -137984,6 +141454,39 @@ "description": "Auth0 OAuth2 client secret.", "example": "zXz0000-00000000000000000000000000000-00000000000000000000PJafnF" }, + "prompt": { + "type": "array", + "description": "Auth0 OAuth2 prompt values.", + "items": { + "type": "string", + "oneOf": [ + { + "type": "string", + "enum": [ + "none" + ], + "title": "none" + }, + { + "type": "string", + "enum": [ + "login" + ], + "title": "login" + }, + { + "type": "string", + "enum": [ + "consent" + ], + "title": "consent" + } + ] + }, + "example": [ + "none" + ] + }, "endpoint": { "type": "string", "description": "Auth0 OAuth2 endpoint domain.", @@ -137995,6 +141498,7 @@ "enabled", "clientId", "clientSecret", + "prompt", "endpoint" ], "example": { @@ -138002,6 +141506,9 @@ "enabled": false, "clientId": "OaOkIA000000000000000000005KLSYq", "clientSecret": "zXz0000-00000000000000000000000000000-00000000000000000000PJafnF", + "prompt": [ + "none" + ], "endpoint": "example.us.auth0.com" } }, @@ -138126,26 +141633,6 @@ "description": "OpenID Connect OAuth2 client secret.", "example": "Ah68ed000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000003qpcHV" }, - "wellKnownURL": { - "type": "string", - "description": "OpenID Connect well-known configuration URL. When set, authorization, token, and user info endpoints can be discovered automatically.", - "example": "https:\/\/myoauth.com\/.well-known\/openid-configuration" - }, - "authorizationURL": { - "type": "string", - "description": "OpenID Connect authorization endpoint URL.", - "example": "https:\/\/myoauth.com\/oauth2\/authorize" - }, - "tokenURL": { - "type": "string", - "description": "OpenID Connect token endpoint URL.", - "example": "https:\/\/myoauth.com\/oauth2\/token" - }, - "userInfoURL": { - "type": "string", - "description": "OpenID Connect user info endpoint URL.", - "example": "https:\/\/myoauth.com\/oauth2\/userinfo" - }, "prompt": { "type": "array", "description": "OpenID Connect prompt values controlling the authentication and consent screens.", @@ -138183,9 +141670,29 @@ ] }, "example": [ - "consent" + "none" ] }, + "wellKnownURL": { + "type": "string", + "description": "OpenID Connect well-known configuration URL. When set, authorization, token, and user info endpoints can be discovered automatically.", + "example": "https:\/\/myoauth.com\/.well-known\/openid-configuration" + }, + "authorizationURL": { + "type": "string", + "description": "OpenID Connect authorization endpoint URL.", + "example": "https:\/\/myoauth.com\/oauth2\/authorize" + }, + "tokenURL": { + "type": "string", + "description": "OpenID Connect token endpoint URL.", + "example": "https:\/\/myoauth.com\/oauth2\/token" + }, + "userInfoURL": { + "type": "string", + "description": "OpenID Connect user info endpoint URL.", + "example": "https:\/\/myoauth.com\/oauth2\/userinfo" + }, "maxAge": { "type": "integer", "description": "Maximum authentication age in seconds. When set, the user must have authenticated within this many seconds.", @@ -138199,24 +141706,24 @@ "enabled", "clientId", "clientSecret", + "prompt", "wellKnownURL", "authorizationURL", "tokenURL", - "userInfoURL", - "prompt" + "userInfoURL" ], "example": { "$id": "github", "enabled": false, "clientId": "qibI2x0000000000000000000000000006L2YFoG", "clientSecret": "Ah68ed000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000003qpcHV", + "prompt": [ + "none" + ], "wellKnownURL": "https:\/\/myoauth.com\/.well-known\/openid-configuration", "authorizationURL": "https:\/\/myoauth.com\/oauth2\/authorize", "tokenURL": "https:\/\/myoauth.com\/oauth2\/token", "userInfoURL": "https:\/\/myoauth.com\/oauth2\/userinfo", - "prompt": [ - "consent" - ], "maxAge": 3600 } }, @@ -138244,6 +141751,39 @@ "description": "Okta OAuth2 client secret.", "example": "Kiq0000000000000000000000000000000000000-00000000000H2L5-3SJ-vRV" }, + "prompt": { + "type": "array", + "description": "Okta OAuth2 prompt values.", + "items": { + "type": "string", + "oneOf": [ + { + "type": "string", + "enum": [ + "none" + ], + "title": "none" + }, + { + "type": "string", + "enum": [ + "login" + ], + "title": "login" + }, + { + "type": "string", + "enum": [ + "consent" + ], + "title": "consent" + } + ] + }, + "example": [ + "none" + ] + }, "domain": { "type": "string", "description": "Okta OAuth2 domain.", @@ -138260,6 +141800,7 @@ "enabled", "clientId", "clientSecret", + "prompt", "domain", "authorizationServerId" ], @@ -138268,6 +141809,9 @@ "enabled": false, "clientId": "0oa00000000000000698", "clientSecret": "Kiq0000000000000000000000000000000000000-00000000000H2L5-3SJ-vRV", + "prompt": [ + "none" + ], "domain": "trial-6400025.okta.com", "authorizationServerId": "aus000000000000000h7z" } @@ -138407,6 +141951,46 @@ "description": "Microsoft OAuth2 application secret.", "example": "A1bC2dE3fH4iJ5kL6mN7oP8qR9sT0u" }, + "prompt": { + "type": "array", + "description": "Microsoft OAuth2 prompt values.", + "items": { + "type": "string", + "oneOf": [ + { + "type": "string", + "enum": [ + "none" + ], + "title": "none" + }, + { + "type": "string", + "enum": [ + "login" + ], + "title": "login" + }, + { + "type": "string", + "enum": [ + "consent" + ], + "title": "consent" + }, + { + "type": "string", + "enum": [ + "select_account" + ], + "title": "select_account" + } + ] + }, + "example": [ + "none" + ] + }, "tenant": { "type": "string", "description": "Microsoft Entra ID tenant identifier. Use 'common', 'organizations', 'consumers' or a specific tenant ID.", @@ -138418,6 +142002,7 @@ "enabled", "applicationId", "applicationSecret", + "prompt", "tenant" ], "example": { @@ -138425,6 +142010,9 @@ "enabled": false, "applicationId": "00001111-aaaa-2222-bbbb-3333cccc4444", "applicationSecret": "A1bC2dE3fH4iJ5kL6mN7oP8qR9sT0u", + "prompt": [ + "none" + ], "tenant": "common" } }, @@ -138527,19 +142115,63 @@ "type": "string", "description": "Kakao OAuth2 client secret.", "example": "jLNVOK00000000000000000000yJebea" + }, + "prompt": { + "type": "array", + "description": "Kakao OAuth2 prompt values.", + "items": { + "type": "string", + "oneOf": [ + { + "type": "string", + "enum": [ + "none" + ], + "title": "none" + }, + { + "type": "string", + "enum": [ + "login" + ], + "title": "login" + }, + { + "type": "string", + "enum": [ + "create" + ], + "title": "create" + }, + { + "type": "string", + "enum": [ + "select_account" + ], + "title": "select_account" + } + ] + }, + "example": [ + "none" + ] } }, "required": [ "$id", "enabled", "clientId", - "clientSecret" + "clientSecret", + "prompt" ], "example": { "$id": "github", "enabled": false, "clientId": "839ff5000000000000000000013206de", - "clientSecret": "jLNVOK00000000000000000000yJebea" + "clientSecret": "jLNVOK00000000000000000000yJebea", + "prompt": [ + "none" + ] } }, "oAuth2ProviderList": { @@ -138602,6 +142234,9 @@ { "$ref": "#\/components\/schemas\/oAuth2WordPress" }, + { + "$ref": "#\/components\/schemas\/oAuth2Webflow" + }, { "$ref": "#\/components\/schemas\/oAuth2Twitch" }, @@ -138714,6 +142349,7 @@ "yandex": "#\/components\/schemas\/oAuth2Yandex", "x": "#\/components\/schemas\/oAuth2X", "wordpress": "#\/components\/schemas\/oAuth2WordPress", + "webflow": "#\/components\/schemas\/oAuth2Webflow", "twitch": "#\/components\/schemas\/oAuth2Twitch", "stripe": "#\/components\/schemas\/oAuth2Stripe", "spotify": "#\/components\/schemas\/oAuth2Spotify", @@ -140264,6 +143900,36 @@ "example": "California", "nullable": true }, + "postalCode": { + "type": "string", + "description": "Postal code when broken down by `postalCode`.", + "example": "94043", + "nullable": true + }, + "latitude": { + "type": "string", + "description": "Latitude when broken down by `latitude`.", + "example": "37.4223", + "nullable": true + }, + "longitude": { + "type": "string", + "description": "Longitude when broken down by `longitude`.", + "example": "-122.0848", + "nullable": true + }, + "timeZone": { + "type": "string", + "description": "Time zone when broken down by `timeZone`.", + "example": "America\/Los_Angeles", + "nullable": true + }, + "weatherCode": { + "type": "string", + "description": "Weather station code when broken down by `weatherCode`.", + "example": "USCA0746", + "nullable": true + }, "isp": { "type": "string", "description": "Internet service provider when broken down by `isp`.", @@ -140337,6 +144003,11 @@ "continentCode": "NA", "city": "Mountain View", "subdivisions": "California", + "postalCode": "94043", + "latitude": "37.4223", + "longitude": "-122.0848", + "timeZone": "America\/Los_Angeles", + "weatherCode": "USCA0746", "isp": "Google", "autonomousSystemNumber": "15169", "autonomousSystemOrganization": "GOOGLE", @@ -140542,7 +144213,7 @@ "example": "n3u9feiwmf" }, "deploymentResourceType": { - "description": "Type of deployment. Possible values are \"function\", \"site\". Used if rule's type is \"deployment\".", + "description": "Type of deployment resource: function, site, or dedicatedDatabase.", "example": "function", "type": "string", "oneOf": [ @@ -140559,6 +144230,13 @@ "site" ], "title": "site" + }, + { + "type": "string", + "enum": [ + "dedicatedDatabase" + ], + "title": "dedicatedDatabase" } ], "nullable": true @@ -143483,6 +147161,225 @@ "resources": "" } }, + "analyticsMetric": { + "description": "AnalyticsMetric", + "type": "object", + "properties": { + "value": { + "type": "string", + "description": "Dimension value this row covers. Null when no dimension was requested, empty when the dimension could not be derived for those events.", + "example": "google.com", + "nullable": true + }, + "date": { + "type": "string", + "description": "Start of the time bucket this row covers, in ISO 8601. Null when no interval was requested.", + "example": "2026-05-01T00:00:00.000+00:00", + "nullable": true + }, + "visitors": { + "type": "integer", + "description": "Unique visitors in the requested range.", + "format": "int32", + "example": 1234 + }, + "sessions": { + "type": "integer", + "description": "Unique sessions in the requested range.", + "format": "int32", + "example": 4567 + }, + "pageviews": { + "type": "integer", + "description": "Total pageview events (events with name=\"pageview\") in the requested range. Only the flat aggregate computes it; null on breakdown and time-series rows.", + "format": "int32", + "example": 5678, + "nullable": true + }, + "events": { + "type": "integer", + "description": "Total events in the requested range.", + "format": "int32", + "example": 8910 + }, + "visits": { + "type": "integer", + "description": "Total sessions with activity in the requested range. Only the flat aggregate computes it; null on breakdown and time-series rows.", + "format": "int32", + "example": 2345, + "nullable": true + }, + "bounceRate": { + "type": "number", + "description": "Share of single-event sessions, as a percentage. Only the flat aggregate computes it; null on breakdown and time-series rows.", + "format": "double", + "example": 42.5, + "nullable": true + }, + "visitDuration": { + "type": "number", + "description": "Average session length in seconds, measured first event to last event. Single-event sessions count as 0. Only the flat aggregate computes it; null on breakdown and time-series rows.", + "format": "double", + "example": 75.4, + "nullable": true + }, + "viewsPerVisit": { + "type": "number", + "description": "Average pageviews per session (pageviews divided by visits). Only the flat aggregate computes it; null on breakdown and time-series rows.", + "format": "double", + "example": 2.7, + "nullable": true + }, + "scrollDepth": { + "type": "number", + "description": "Average scroll depth across events, as a percentage. Only the flat aggregate computes it; null on breakdown and time-series rows.", + "format": "double", + "example": 65, + "nullable": true + }, + "engagementTime": { + "type": "number", + "description": "Average engaged time per session in seconds, counting only foreground time. Sessions that reported no engagement are excluded. Only the flat aggregate computes it; null on breakdown and time-series rows.", + "format": "double", + "example": 18432, + "nullable": true + } + }, + "required": [ + "visitors", + "sessions", + "events" + ], + "example": { + "value": "google.com", + "date": "2026-05-01T00:00:00.000+00:00", + "visitors": 1234, + "sessions": 4567, + "pageviews": 5678, + "events": 8910, + "visits": 2345, + "bounceRate": 42.5, + "visitDuration": 75.4, + "viewsPerVisit": 2.7, + "scrollDepth": 65, + "engagementTime": 18432 + } + }, + "analyticsMetricList": { + "description": "AnalyticsMetricList", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of metric rows returned.", + "format": "int32", + "example": 30 + }, + "metrics": { + "type": "array", + "description": "Metric rows: one per time bucket, one per dimension value, or a single row for the flat aggregate.", + "items": { + "$ref": "#\/components\/schemas\/analyticsMetric" + }, + "example": [] + } + }, + "required": [ + "total", + "metrics" + ], + "example": { + "total": 30, + "metrics": [] + } + }, + "analyticsProperty": { + "description": "AnalyticsProperty", + "type": "object", + "properties": { + "$id": { + "type": "string", + "description": "Analytics property ID.", + "example": "5e5ea5c16897e" + }, + "$createdAt": { + "type": "string", + "description": "Property creation date in ISO 8601 format.", + "example": "2020-10-15T06:38:00.000+00:00" + }, + "$updatedAt": { + "type": "string", + "description": "Property update date in ISO 8601 format.", + "example": "2020-10-15T06:38:00.000+00:00" + }, + "name": { + "type": "string", + "description": "Human-readable name of the tracked website or application.", + "example": "My Website" + }, + "domain": { + "type": "string", + "description": "Primary domain being tracked (e.g. example.com). May be empty for native apps.", + "example": "example.com" + }, + "timezone": { + "type": "string", + "description": "IANA timezone used to define the daily boundary for stats.", + "example": "UTC" + }, + "enabled": { + "type": "boolean", + "description": "Whether tracking is currently active.", + "example": true + }, + "public": { + "type": "boolean", + "description": "Whether stats for this property are publicly viewable.", + "example": false + }, + "allowedOrigins": { + "type": "array", + "description": "List of origins allowed to send tracking events. Use [\"*\"] to allow all.", + "items": { + "type": "string" + }, + "example": [ + "https:\/\/example.com" + ] + }, + "snippetId": { + "type": "string", + "description": "Unique identifier for the tracking script snippet.", + "example": "snp_a1b2c3d4e5" + } + }, + "required": [ + "$id", + "$createdAt", + "$updatedAt", + "name", + "domain", + "timezone", + "enabled", + "public", + "allowedOrigins", + "snippetId" + ], + "example": { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "name": "My Website", + "domain": "example.com", + "timezone": "UTC", + "enabled": true, + "public": false, + "allowedOrigins": [ + "https:\/\/example.com" + ], + "snippetId": "snp_a1b2c3d4e5" + } + }, "aggregationTeam": { "description": "Team", "type": "object", @@ -143771,9 +147668,10 @@ }, "size": { "type": "integer", - "description": "Archive size in bytes.", + "description": "Archive size in bytes. Null until the size is known.", "format": "int32", - "example": 100000 + "example": 100000, + "nullable": true }, "status": { "type": "string", @@ -143782,8 +147680,9 @@ }, "startedAt": { "type": "string", - "description": "The backup start time.", - "example": "2020-10-15T06:38:00.000+00:00" + "description": "The backup start time. Null until the backup starts.", + "example": "2020-10-15T06:38:00.000+00:00", + "nullable": true }, "migrationId": { "type": "string", @@ -143828,9 +147727,7 @@ "$createdAt", "$updatedAt", "policyId", - "size", "status", - "startedAt", "migrationId", "services", "resources" @@ -144450,12 +148347,13 @@ }, "usage": { "type": "object", - "description": "Additional resources", + "description": "Additional resources. Null when the plan does not support usage billing.", "allOf": [ { "$ref": "#\/components\/schemas\/usageBillingPlan" } - ] + ], + "nullable": true }, "addons": { "type": "object", @@ -144721,7 +148619,6 @@ "usageLogs", "projectInactivityDays", "alertLimit", - "usage", "addons", "budgetCapEnabled", "customSmtp", @@ -146423,7 +150320,7 @@ }, "connections": { "type": "object", - "description": "Connection statistics.", + "description": "Connection statistics. Null when the database has not been probed.", "example": { "current": 12, "max": 100 @@ -146432,7 +150329,8 @@ { "$ref": "#\/components\/schemas\/databaseStatusConnections" } - ] + ], + "nullable": true }, "syncMode": { "type": "string", @@ -146515,7 +150413,6 @@ "engine", "version", "uptime", - "connections", "syncMode", "syncDegraded", "syncAcknowledgements", @@ -147495,6 +151392,37 @@ "organizationCredits": 0 } }, + "growthConversation": { + "description": "Growth Conversation", + "type": "object", + "properties": { + "type": { + "type": "string", + "description": "Conversation type.", + "example": "support" + }, + "email": { + "type": "string", + "description": "Email address the conversation was filed under. For a signed in console user this is the account email.", + "example": "john@appwrite.io" + }, + "organizationId": { + "type": "string", + "description": "Organization ID the conversation was filed against. Empty when none was given or the user is not a member.", + "example": "5e5ea5c16897e" + } + }, + "required": [ + "type", + "email", + "organizationId" + ], + "example": { + "type": "support", + "email": "john@appwrite.io", + "organizationId": "5e5ea5c16897e" + } + }, "dedicatedDatabaseExtensions": { "description": "Extensions", "type": "object", @@ -148684,7 +152612,7 @@ ] } ], - "config": [], + "config": {}, "resourceInternalId": 1 } }, @@ -149897,8 +153825,9 @@ }, "startedAt": { "type": "string", - "description": "The backup start time.", - "example": "2020-10-15T06:38:00.000+00:00" + "description": "The restoration start time. Null until the restoration starts.", + "example": "2020-10-15T06:38:00.000+00:00", + "nullable": true }, "migrationId": { "type": "string", @@ -149926,9 +153855,20 @@ ] }, "options": { - "type": "string", - "description": "Optional data in key-value object. ", - "example": "{databases.database[{oldId, newId, newName}]}" + "type": "object", + "additionalProperties": true, + "description": "Restoration options as a key-value object.", + "example": { + "databases": { + "database": [ + { + "oldId": "old", + "newId": "new", + "newName": "Restored" + } + ] + } + } } }, "required": [ @@ -149938,7 +153878,6 @@ "archiveId", "policyId", "status", - "startedAt", "migrationId", "services", "resources", @@ -149955,7 +153894,17 @@ "migrationId": "did8jx6ws45jana098ab7", "services": "['databases', 'storage']", "resources": "['databases', 'collections', 'attributes', 'indexes']", - "options": "{databases.database[{oldId, newId, newName}]}" + "options": { + "databases": { + "database": [ + { + "oldId": "old", + "newId": "new", + "newName": "Restored" + } + ] + } + } } }, "dedicatedDatabaseRestorationList": { @@ -150109,7 +154058,7 @@ "example": "n3u9feiwmf" }, "deploymentResourceType": { - "description": "Type of deployment. Possible values are \"function\", \"site\". Used if rule's type is \"deployment\".", + "description": "Type of deployment resource: function, site, or dedicatedDatabase.", "example": "function", "type": "string", "oneOf": [ @@ -150126,6 +154075,13 @@ "site" ], "title": "site" + }, + { + "type": "string", + "enum": [ + "dedicatedDatabase" + ], + "title": "dedicatedDatabase" } ], "nullable": true @@ -150954,6 +154910,12 @@ "format": "int32", "example": 0 }, + "avatarsStorageTotal": { + "type": "integer", + "description": "Aggregated stats for total custom user photos storage.", + "format": "int32", + "example": 0 + }, "storageTotal": { "type": "integer", "description": "Aggregated stats for total storage.", @@ -151044,6 +155006,7 @@ "databasesReadsTotal", "databasesWritesTotal", "backupsStorageTotal", + "avatarsStorageTotal", "storageTotal", "authPhoneTotal", "authPhoneEstimate", @@ -151076,6 +155039,7 @@ "databasesReadsTotal": 0, "databasesWritesTotal": 0, "backupsStorageTotal": 0, + "avatarsStorageTotal": 0, "storageTotal": 0, "authPhoneTotal": 0, "authPhoneEstimate": 0, @@ -152250,6 +156214,126 @@ "id_token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9..." } }, + "oauth2Introspection": { + "description": "OAuth2 Introspection", + "type": "object", + "properties": { + "active": { + "type": "boolean", + "description": "Whether the token is currently active. An inactive token carries no other claims (RFC 7662).", + "example": true + }, + "token_use": { + "type": "string", + "description": "Kind of token that was introspected. Can be one of: `access_token` or `refresh_token`.", + "example": "access_token", + "nullable": true + }, + "token_type": { + "type": "string", + "description": "OAuth2 token type.", + "example": "Bearer", + "nullable": true + }, + "scope": { + "type": "string", + "description": "Space-separated scopes granted to the token.", + "example": "openid email profile", + "nullable": true + }, + "client_id": { + "type": "string", + "description": "OAuth2 client ID the token was issued to.", + "example": "5e5ea5c16897e", + "nullable": true + }, + "sub": { + "type": "string", + "description": "ID of the user who authorized the token.", + "example": "5e5ea5c16897e", + "nullable": true + }, + "aud": { + "type": "array", + "description": "Audiences the token is intended for. The first entry is the project API base URL; any further entries are the resource indicators requested at authorization time (RFC 8707).", + "items": { + "type": "string" + }, + "example": [ + "https:\/\/cloud.appwrite.io\/v1\/5e5ea5c16897e" + ], + "nullable": true + }, + "iss": { + "type": "string", + "description": "Issuer URL of the token.", + "example": "https:\/\/cloud.appwrite.io\/v1\/oauth2\/5e5ea5c16897e", + "nullable": true + }, + "exp": { + "type": "integer", + "description": "Expiration time as a Unix timestamp in seconds.", + "format": "int32", + "example": 1735689600, + "nullable": true + }, + "iat": { + "type": "integer", + "description": "Issued-at time as a Unix timestamp in seconds.", + "format": "int32", + "example": 1735686000, + "nullable": true + }, + "jti": { + "type": "string", + "description": "Unique identifier of the token.", + "example": "5e5ea5c16897e", + "nullable": true + }, + "authorization_details": { + "type": "array", + "description": "Granted RFC 9396 authorization details, restricted to what the user can currently access.", + "items": { + "type": "object" + }, + "example": [ + { + "type": "project", + "identifiers": [ + "5e5ea5c16897e" + ] + } + ], + "nullable": true + } + }, + "required": [ + "active" + ], + "example": { + "active": true, + "token_use": "access_token", + "token_type": "Bearer", + "scope": "openid email profile", + "client_id": "5e5ea5c16897e", + "sub": "5e5ea5c16897e", + "aud": [ + "https:\/\/cloud.appwrite.io\/v1\/5e5ea5c16897e" + ], + "iss": "https:\/\/cloud.appwrite.io\/v1\/oauth2\/5e5ea5c16897e", + "exp": 1735689600, + "iat": 1735686000, + "jti": "5e5ea5c16897e", + "authorization_details": [ + { + "type": "project", + "identifiers": [ + "5e5ea5c16897e" + ] + } + ] + } + }, "oauth2Consent": { "description": "OAuth2 Consent", "type": "object", @@ -152617,7 +156701,7 @@ ] } ], - "config": [] + "config": {} } }, "wafRuleBypass": { @@ -152784,7 +156868,7 @@ ] } ], - "config": [] + "config": {} } }, "wafRuleDeny": { @@ -152951,7 +157035,7 @@ ] } ], - "config": [] + "config": {} } }, "wafRuleChallenge": { @@ -153138,7 +157222,7 @@ ] } ], - "config": [], + "config": {}, "challengeType": "compute", "difficulty": 3, "ttl": 1800 @@ -153341,7 +157425,7 @@ ] } ], - "config": [], + "config": {}, "limit": 1000, "interval": 60, "key": "userId", @@ -153526,7 +157610,7 @@ ] } ], - "config": [], + "config": {}, "location": "\/maintenance", "statusCode": 301 } @@ -153803,6 +157887,34 @@ "addons": "" } }, + "analyticsPropertyList": { + "description": "Analytics properties list", + "type": "object", + "properties": { + "total": { + "type": "integer", + "description": "Total number of properties that matched your query.", + "format": "int32", + "example": 5 + }, + "properties": { + "type": "array", + "description": "List of properties.", + "items": { + "$ref": "#\/components\/schemas\/analyticsProperty" + }, + "example": [] + } + }, + "required": [ + "total", + "properties" + ], + "example": { + "total": 5, + "properties": "" + } + }, "aggregationTeamList": { "description": "Aggregation team list", "type": "object",